fuel-core
fuel-core copied to clipboard
Correctly implement merkle storage
- [ ] #629
- [ ] #626
- [ ] #627
- [ ] #628
- [ ] #633
- [ ] #634
- [ ] https://github.com/FuelLabs/fuel-merkle/issues/113
- [ ] https://github.com/FuelLabs/fuel-merkle/issues/114
Based on discussions with @adlerjohn, the current list of merkle trees that span data across blocks would be:
- Contract Balances (SMT)
- Contract State (SMT)
- Block IDs MMR (binary tree)
- Unlike other chains that just include a hash of the previous block into the current block header, Fuel will use a merkle mountain range of block ids and store the current root on each header. This allows L1 proofs about data in previous block headers without needing to maintain the state of all headers in L1.
The areas we can use ephemeral trees would be the following block header fields:
- Transactions Root (BMT)
- Output Messages Root (BMT)
On going research document: https://hackmd.io/@bvrooman/merklized_data_on_disk
The areas we can use ephemeral trees would be the following block header fields:
- Transactions Root (BMT)
- Output Messages Root (BMT)
According to the WIP spec, there is a field for Withdrawals Root (root of withdrawal IDs). I do not see Output Messages Root mentioned. Are these the same thing, just different terminology? Or is there a discrepancy?
Edit: As mentioned in the sync today, "Message" is the updated terminology for "Withdrawal". "Message" has replaced "Withdrawal" based on discussion with the bridging team.