snowbridge icon indicating copy to clipboard operation
snowbridge copied to clipboard

Sparse merkle tree multi-proof

Open hujw77 opened this issue 4 years ago • 3 comments

For gas saving, we could use the sparse merkle tree multi-proof to validate the commitment signed by beefy authority set. More detail can see https://github.com/darwinia-network/darwinia-bridge-sol/pull/104

hujw77 avatar Dec 21 '21 13:12 hujw77

Hey @hujw77 thanks for the contribution. I'll be able to review this properly next week, unless my colleagues get to it first.

vgeddes avatar Dec 22 '21 20:12 vgeddes

@hujw77 Taking another quick look - Using a multiproof instead of an array of individual proofs looks like a great idea and optimization!

We'll need to build the proof creation logic into our relayer and do a deeper team audit and review before merging this. At the moment we're focused on some other maintenance and new feature work, so it may take a few weeks before we schedule this work in, but will leave this open as it's definitely something we'll want to merge in before this code is used in production.

Thanks again!

musnit avatar Jan 12 '22 17:01 musnit

@musnit For the proof creation logic, there is research about it at https://github.com/hujw77/sparse-merkle-tree It may be some help for audit and review.

hujw77 avatar Jan 13 '22 04:01 hujw77