-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add map-bridge proposal #59
Conversation
Thanks for the application. You still needs to sign the terms via the cla assistant |
Hello, we have signed the terms via the cla assistant. Thank you for you review! |
@zcheng9 Thanks for the application. We are looking into it. |
@zcheng9 Could you please specify the method signatures for each of the deliverables that you've included in the What exactly are you planning to develop as part of |
Thank you for your reply for our proposal. We have included the method signatures for each of the deliverables and unit test in our milestones. And for the MMR Implementation, we have checked the code you referred. It seems they have done a quite good job. However, there is some functionality we might need while they do not provide. Fox examples, we need a customized field for each node(time stamp, difficulty, counter, etc.), as well as we need a customized method to merge two child nodes and construct a parent node(not simply hash them together, we need to handle the the customized filed when merging). Furthermore we need to construct merkle proof for a bunch of leaf nodes, some of the branch nodes maybe exist in multiple times, we can use one single merkle proof for a list of leaf nodes. We have a Go implementation for this case. So we might implement MMR Trie based on the code you referred and extend some more functionality we need based on their code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zcheng9 I don't see the method signatures anywhere.
So are you planning to use (&extend) the existing MMR implementation?
Hello, we have added the method signatures for each milestone. And for MMR implementation, we indeed plan to extend the existing MMR implementaion. |
@zcheng9 I still do not see signatures anywhere - perhaps you misunderstood what I was asking for, maybe also because I was using the Java-borrowed naming (method signature vs type signature?). Here is an explanation. Anyway, would you mind jumping on an introductory call with us? Could you reach out to me on Element at @marcin:web3.foundation so we can coordinate better, please? |
Sorry for the misunderstanding, I have added you on Element and we can make talk about MAP Bridge on Element. |
@zcheng9 - your milestone 3 includes a |
@Lederstrumpf Oh, it should be a cross-chain digit asset transfer demo. We will borrow the idea from pegged sidechain partially. The difference is we will use Flyclient(as reference as ULVP in proposal) for cross chain transaction verifying instead of SPV. The demo would involve two blockchain(A and B), if user locked some token in A chain, B chain could verify such locked transaction through a reference contract deployed in chain B(this step is what ULVP or Flyclient is involved). And a mint contract in chain B could call this reference contract to mint same amount token in chain B once such transaction passed the contest period. Thus the token transfer is complete. Here is a demo we developed earlier for two testchain (mouse and duck). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the application. A few questions/comments from my side:
- What are your future plans with the project? Do you have a concrete network you want to bridge? Do you want to become a parachain?
- The price of the milestones needs to be in BTC instead of fiat.
- Could you reduce the price of milestone 1, given that it’s already implemented?
- Could you comment on your connection to softbank?
Reduce to 2 milestones and add some method signature.
@Noc2 Thank you for your comment.
|
@zcheng9 Thanks for adjusting the application. Regarding the existing MMR library:
From my understanding of the existing MMR implementation, the MMR data structure can be stored as a vector of hashes, as shown in the tests. If you want to get a subtree based on a certain hash of a node, you could use:
Wouldn't that work?
As I understand, you need to define your own fields for the node, right? (e.g. counter) |
@mmagician Thank you for your comments. I will answer your questions as follows:
As a conclusion, we need do some extra work to make the MMR fit our ULVP. And this is what milestone 1 would do. Besides, milestone 1 would do some jobs other than MMR. For example, after sampling blocks in ULVP, we need to generate MMR proof for a bunch of leaf nodes(not a single leaf node as the implementation you refer). Notice that these proof might have a lot of ovelapped intermediate nodes. Instead generating an array of proofs, we wouldd combine all these proofs into one hybrid proof(overlapped nodes would appear only once in hybrid proof). |
We added the detail description of three steps of ultra-light verification protocol, and the asset transfer demo between parachain in Polkadot and Ethereum testnet. Also we gibe some more details of milestone 2.
@mmagician We have added some more details of our MAP bridge, could you please check it? Thanks. |
Add three ways to have MMR root in Ethereum and P2P substrate module details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the updates, it looks good to me!
In general, it looks also interesting to me, but I like to get some additional feedback from our researchers first and have shared the application again with them. Also are you aware of https://github.com/Snowfork/polkadot-ethereum? |
Thanks! We are aware of Snowfork. The different between these two bridge is we do not require trustness on the relayer group to deliver block headers. The way to verify the validity of a block header in our program is based on flyclient paper. |
Thanks. |
As I understand it, you want to construct an MMR of every block hash on Ethereum in any Ethereum smart contract. Wouldn't this be quite expensive in terms of gas? |
Thanks for the reply. Would you be interested in starting potentially with a different network initially other than ethereum (given that we already have an ethereum bridge under development)? Independent of it I’m happy to go ahead with it. |
@AlistairStewart It would be epoch-based MMR, not every block hash. We could set a epoch with 512 blocks or 256 blocks, Each epoch would generate a small MMR and be represented as a MMR root. |
@Noc2 Thanks for comment. As we mentioned in the future plan, we indeed would promote our work to other network later. And could we start with Ethereum first since we have done a lot of preparation work for it. |
FYI Snowfork's bridge will not require trust in the relays either - we're building an Ethereum Light Client into our parachain and an MMR/FlyClient-like Polkadot Light client into our smart contracts based on the MMR proofs created by this gadget. |
Congratulations! As part of the Open Grants Program, we want to help winning teams acknowledge their grants publicly while observing the foundation’s guidelines. To that end, we’ve created a badge for grant-winning teams. Here is a link to the download and guidelines. |
Thank you |
Grant Application Checklist