jmt icon indicating copy to clipboard operation
jmt copied to clipboard

Tracking Issue: Combine with Sovereign-Labs/jmt

Open preston-evans98 opened this issue 2 years ago • 5 comments

Overview

Sovereign Labs and Penumbra are combining efforts to make one JMT to rule them all. This is a tracking issue for all of the changes from the Sovereign Labs JMT that we want to port over to this repo:

  • [x] Separate values from Leaf Nodes #77
  • [x] Convert Children from a HashMap to an array #75
  • [x] Make the JMT generic over hash function #79
  • [x] Feature gate metrics. See https://github.com/Sovereign-Labs/jellyfish-merkle-generic/blob/master/src/metrics/mod.rs
  • [ ] Send all updates through the batch_insert API to share intermediate hashes
  • [ ] Add optional parallelism with rayon
  • [x] #84
  • [ ] Add a mechanism to share intermediate hashes when reading multiple values
  • [ ] Consider changing TreeReader::get_value to use Key instead of KeyHash
  • [x] Support no_std. #87

preston-evans98 avatar Feb 13 '23 17:02 preston-evans98

Consider changing TreeReader::get_value to use Key instead of KeyHash

What if we made it take K: Into<KeyHash>?

hdevalence avatar Feb 24 '23 01:02 hdevalence

What if we made it take K: Into<KeyHash>?

This is a good suggestion. I'll open a PR this afternoon.

The underlying motivation for this item is to allow apps to efficiently retrieve a sequential keys using an iterator though, so just switching to Into<KeyHash> won't be sufficient. I'll open a separate issue where we can explore the tradeoffs. #81

preston-evans98 avatar Feb 24 '23 17:02 preston-evans98

Hmm, on further thought I think this change will prevent TreeReader from being object safe

preston-evans98 avatar Feb 24 '23 18:02 preston-evans98

In our weekly sprint planning, we pulled in all outstanding JMT issues and are wondering what the status of this one is. @preston-evans98 is there anything that needs to be done on our end?

zbuc avatar Mar 31 '23 17:03 zbuc

@zbuc Nothing immediate. I'll be trying to add no_std support this weekend, but the diff should be minimal and will just need review. I don't think we have any AIs here for the very short term

preston-evans98 avatar Mar 31 '23 19:03 preston-evans98