-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b2239c
commit 51c29b1
Showing
1 changed file
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
# SubSMT | ||
|
||
- **Team Name:** farcloud-labs | ||
- **Payment Address:** 0xd08aD17A0336b52099ae54C81E668aeBfB3c968e(USDC) | ||
- **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 2 | ||
|
||
## Project Overview :page_facing_up: | ||
On-chain resources are precious, and more and more teams, especially L2, | ||
need to put data and calculations off-chain, and Merkel trees are used more frequently. | ||
Sparse Merkle trees are widely used in blockchains, and have been used hundreds of thousands of times in the Ethereum community. | ||
Polkadot uses the rust language as its development language, and the implementation of sparse Merkel trees currently lacks a unified solution. | ||
Especially in substrate and ink, if there is an implementation template for sparse Merkle trees, | ||
it will greatly save the community's development time and avoid repeated development. | ||
This project will do just that. | ||
### Overview | ||
|
||
- tags `rust, substrate, ink, sparse-merkle-tree, rocksdb, paritydb` | ||
- Provides a substrate-based pallet, an ink-based smart contract and an off-chain data backend. | ||
- Sparse Merkle trees are widely used in blockchain technology solutions and can be used to store data and verify data integrity, | ||
reducing the computing and storage pressure of the chain. We noticed that there is currently only the MMT solution in substrate, | ||
and sparse Merkle trees should also be provided to allow community developers to have more choices and avoid repeated development. | ||
|
||
### Project Details | ||
#### technology stack | ||
language: `rust, substrate, ink`. | ||
1. Sparse Merkle tree and data backend implemented in rust. | ||
2. Pallet for verifying sparse Merkle root. | ||
3. Verify sparse Merkle tree root, ink contract. | ||
|
||
#### What your project is *not* or will *not* provide or implement | ||
For the specific off-chain implementation of the sparse Merkle tree, | ||
we will not reinvent the wheel and directly use [https://github.com/nervosnetwork/sparse-merkle-tree](https://github.com/nervosnetwork/sparse-merkle-tree), | ||
but we may make necessary changes to it. such as in smart contracts, | ||
resources are precious, so use the algorithm that consumes the least Gas as much as possible, and for example, change some of its algorithms to be compatible with substrate. | ||
Here’s to thanking them for their great work. | ||
On-chain, we use the most intuitive and gas-saving verification method to meet the gas-saving needs of all teams. | ||
|
||
In orbiter's Ethereum smart contract, we originally planned to use [https://github.com/nervosnetwork/sparse-merkle-tree](https://github.com/nervosnetwork/sparse-merkle-tree) directly, | ||
but later found that there are many serialization and verification algorithm levels that do not meet our needs to consume the least Gas. | ||
This is also the reason why we provide this project for the Polkadot community to use. We think it is very meaningful and valuable. | ||
|
||
|
||
|
||
### Ecosystem Fit | ||
|
||
|
||
SubSMT serves projects that require off-chain storage and then on-chain verification of data integrity. | ||
This project is suitable for teams that want to use sparse Merkel trees and is also the best choice. | ||
In the Polkadot ecosystem, the only implementation of Merkle tree is MMT. This is an urgent need for sparse Merkle trees with a large user base. | ||
With this unified solution, community tools are further improved and the development ecosystem is further prosperous, | ||
which greatly helps developers spend more time. | ||
|
||
## Team :busts_in_silhouette: | ||
|
||
### Team members | ||
|
||
* YanOctavian | ||
* octavei | ||
* linkdrone1 | ||
|
||
### Contact | ||
|
||
- **Contact Name:** YanOctavian | ||
- **Contact Email:** [email protected] | ||
|
||
### Legal Structure | ||
|
||
- **Registered Address:** Shore Residence, Tower C2, Sunrise Dr. FLOOR 17, Sea View, Pasay, Philippines | ||
- **Registered Legal Entity:** N/A | ||
|
||
### Team's experience | ||
* `YanOctavian` worked in the Ethereum L2 cross-chain bridge Orbiter team, responsible for decentralized sequencer development and decentralized client submitter development. He has 3 years of rust development experience and 5 years of blockchain smart contract development experience. | ||
* `octavei` development engineer of Aband Network, with 4 years experience in substrate development. Familiar with Ethereum and EOS smart contracts. Have done many blockchain projects. | ||
* `linkdrone1` Core developer and leader of the Ethereum L2 cross-chain bridge Orbiter team. | ||
### Team Code Repos | ||
|
||
- https://github.com/farcloud-labs/submitter | ||
- https://github.com/farcloud-labs/subsmt | ||
- https://github.com/farcloud-labs/sparse-merkle-tree | ||
|
||
*** | ||
- https://github.com/YanOctavian | ||
- https://github.com/linkdrone | ||
- https://github.com/Octavei | ||
|
||
|
||
## Development Status :open_book: | ||
|
||
- https://github.com/farcloud-labs/subsmt | ||
- https://github.com/farcloud-labs/sparse-merkle-tree | ||
- https://github.com/farcloud-labs/smt-rocksdb-store | ||
|
||
## Development Roadmap :nut_and_bolt: | ||
|
||
### Overview | ||
|
||
- **Total Estimated Duration:** 2 months | ||
- **Full-Time Equivalent (FTE):** 4 FTE | ||
- **Total Costs:** 18000 USD | ||
|
||
### Milestone 1 - SMT pallet, SMT ink smart contract, and backend base on rocksdb. | ||
|
||
- **Estimated duration:** 1 month | ||
- **FTE:** 2 | ||
- **Costs:** 10,000 USD | ||
|
||
> :exclamation: **The default deliverables 0a-0d below are mandatory for all milestones**, and deliverable 0e at least for the last one. | ||
| Number | Deliverable | Specification | | ||
|--------:|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| **0a.** | License | Apache 2.0 | | ||
| **0b.** | Documentation | We will provide both **inline documentation** of the code and a basic **tutorial** that explains how a user can (for example) spin up one of our Substrate nodes and send test transactions, which will show how the new functionality works. | | ||
| **0c.** | Testing and Testing Guide | Core 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.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. | | ||
| 1. | verify root | An intuitive and gas-saving algorithm for verifying merkel roots. | | ||
| 2. | Substrate module: SMT | We will create a Substrate module that will verify Merkle root | | ||
| 3. | Smart contracts: SMT | We will deliver a set of ink! smart contracts that will will verify Merkle root | ||
| 4. | smt-rocksdb-store(backend) | Sparse merkle tree rocksdb store implementation | | ||
| 5. | SDK | Provide rpc to the backend for updating and deleting, obtaining root, verifying root, etc. | | ||
|
||
### Milestone 2 - backend base on parity-db and common backend. | ||
- **Estimated Duration:** 1 month | ||
- **FTE:** 2 | ||
- **Costs:** 8,000 USD | ||
|
||
| Number | Deliverable | Specification | | ||
|--------:|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| **0a.** | License | Apache 2.0 | | ||
| **0b.** | Documentation | We will provide both **inline documentation** of the code and a basic **tutorial** that explains how a user can (for example) spin up one of our Substrate nodes and send test transactions, which will show how the new functionality works. | | ||
| **0c.** | Testing and Testing Guide | Core 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.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. | | ||
| **0e.** | Article | We will publish an **article** that explains How SubSMT works | | ||
| 1. | smt-paritydb-store(backend) | Sparse merkle tree parity-db store implementation | | ||
| 2. | SDK | Provide rpc to the backend for updating and deleting, obtaining root, verifying root, etc. | | ||
| 3. | common-backend | A backend compatible with smt-rocksdb-store and smt-paritydb-store | | ||
|
||
|
||
|
||
|
||
## Future Plans | ||
- On-chain implementation of more functions besides verifying Merkel root. | ||
- Provide more permanent storage solutions off-chain, not just rocksdb and parity-db. | ||
- Provide a solidity version for use by parachains like moonbean that are compatible with Ethereum smart contracts. | ||
|
||
## Referral Program (optional) :moneybag: | ||
|
||
- **Referrer:** [JimYam](https://github.com/w3f/Grants-Program/pull/1050) | ||
- **Payment Address:** 0x2c738f52A6BC738d556095A79b9fc49359fE0159(USDT) | ||
|
||
## Additional Information :heavy_plus_sign: | ||
|
||
**How did you hear about the Grants Program?** personal recommendation. | ||
|