Skip to main content

solidity-trie-verifier

  • Team Name: Polytope Labs
  • Payment Address: 0x486cbad2d704bc76f8d0cdda6aa93c94d53297b9 (Ethereum DAI)
  • Level: 2

Project Overview 📄​

Overview​

This project aims to deliver an implementation of the parity trie verifier as required by state proof checking algorithms (read_child_proof_check, read_proof_check_on_proving_backend) in the Solidity programming language, which would include various sub implementations (for example NodeCodec for both layoutv0 & layoutv1) required to build trustless bridging protocols from the Polkadot ecosystem to the EVM ecosystem.

Goal: To create a primitive for more generalized bridging protocols like IBC, it is more efficient to verify Parachain state/storage than to use custom implementations which Darwinia and Snowfork do.

Project Details​

APIs​

function VerifyProof(root bytes32, proof bytes[], keyValues KeyValue[]) public external returns (bool)

struct KeyValue {
key bytes;
value bytes;
}

Technology Stack​

  • Solidity

Team 👥​

Team members​

  • Seun Lanlege,
  • Sam Omidiora, Femi Bankole

Contact​

  • Registered Address: Harneys Fiduciary (Cayman) Limited, 4th Floor, Harbour Place, 103 South Church Street, Cayman Islands
  • Registered Legal Entity: Polytope Labs Ltd.

Team's experience​

Polytope Labs is a collective of core blockchain engineers, researchers & scientists from varying blockchain protocol backgrounds passionate about the proliferation of networks over platforms and enabling this future through blockchain research & education, tooling and core infrastructure development.

  • Seun Lanlege: Previously core developer at Parity Tech, Ethereum and Polkadot with over 4 years of industry experience, core contributor of the code utilized by the ecosystem who recently joined the Polkadot fellowship program and Mad Scientist at Polytope Labs.
  • Sam Omidiora: Senior Blockchain Engineer with over four years of industry experience, previosly at Aave, Ambire and Advanced Blockchain working with the solidity programming language and Lab Scientist at Polytope Labs.
  • Femi Bankole: Blockchain engineer at Matchx_iot + MXC Foundation and Lab Intern at Polytope Labs.

Team Code Repos​

Team GitHub Profiles​

Team LinkedIn Profiles​

Development Roadmap 🔩​

Overview​

  • Total Estimated Duration: 6 Weeks
  • Full-Time Equivalent (FTE): 2.5 FTE
  • Total Costs: 30,000 USD

Milestone 1 Implementation​

  • Estimated duration: 6 Weeks
  • FTE: 2.5
  • Costs: 30,000 USD
NumberDeliverableSpecification
0a.LicenseApache 2.0
0b.DocumentationA documentation on how to use this library in form of a README on the project repository.
0c.Testing and Testing GuideCore functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests.
0d.DockerWe will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone.
0e.ArticleWe will publish an article that covers what was done/achieved as part of the grant.
1Solidity SCALE CodecThis will include support for enum{option/result}, Vec<Vec<u8>> decoding and other types required for verifying state proofs as current implementations(Darwinia, Snowfork) don't support.
2.KeyspacedDBProvide the solidity implementation of the following; https://github.com/paritytech/substrate/blob/129fee774a6d185d117a57fd1e81b3d0d05ad747/primitives/trie/src/lib.rs#L426.
3.MemoryDBProvide the solidity implementation of the following; https://github.com/paritytech/substrate/blob/129fee774a6d185d117a57fd1e81b3d0d05ad747/primitives/trie/src/lib.rs#L163.
4.NodeCodecProvide solidity implementation of the following; https://github.com/paritytech/substrate/blob/129fee774a6d185d117a57fd1e81b3d0d05ad747/primitives/trie/src/node_codec.rs#L81.
5.NodeProvide the solidity implementation of the following; https://github.com/paritytech/trie/blob/42f086bc8748f25e978da10a9cefdb396a72b158/trie-db/src/node.rs#L184.
6.NodePlanProvide the solidity implementation of the following; https://github.com/paritytech/trie/blob/42f086bc8748f25e978da10a9cefdb396a72b158/trie-db/src/node.rs#L507.
7.NodeHeaderProvide the solidity implementation of the following; https://github.com/paritytech/substrate/blob/129fee774a6d185d117a57fd1e81b3d0d05ad747/primitives/trie/src/node_header.rs#L26.
8.NibbleSlicePlanProvide the solidity implementation of the following; https://github.com/paritytech/trie/blob/42f086bc8748f25e978da10a9cefdb396a72b158/trie-db/src/node.rs#L454.
9.NibbleSliceProvide the solidity implementation of the following; https://github.com/paritytech/trie/blob/42f086bc8748f25e978da10a9cefdb396a72b158/trie-db/src/nibble/mod.rs#L180.
10.Layoutv0Provide the Solidity implementation of following; https://github.com/paritytech/substrate/blob/ece32a72e934f6fe6705a7d418bbf3e71b4931ad/primitives/trie/src/lib.rs#L60.
11.Layoutv1Provide the Solidity implementation of the following; https://github.com/paritytech/substrate/blob/ece32a72e934f6fe6705a7d418bbf3e71b4931ad/primitives/trie/src/lib.rs#L63 .
12.Trie VerifierProvide the Solidity implementation of the following; https://github.com/paritytech/trie/blob/42f086bc8748f25e978da10a9cefdb396a72b158/trie-db/src/triedb.rs#L233.

Additional Information ➕​

How did you hear about the Grants Program? Web3 Foundation Website.