[WIP] Support for variable size MMRs #2690
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl;dr Track
offset
andsize
per element in the append-only file impl.Currently track them in memory (and build this when reading the file). But it would be strightforward to persist this size data to disk if necessary (via some kind of size file alongside the data file).
I'd like to keep size data out of the data file itself to keep sync data small (we can rebuild size info on receiving side).
Replaces a big chunk of #1260. The approach in #1260 was to include optional "extra" data in a parallel data file associated with the MMR. This approach here where we track sizes (just in memory currently) is far cleaner and a lot more flexible with not much additional overhead.
If this approach works then it should be relatively straightforward to make
fee
andlock_height
both optional on kernels. We can then explore introducing an optionalrelative_kernel
the same way via a new kernel feature to allow us to support "relative lock heights".TODO -
elmt_size
to append-only file to support "fixes size"MMRsprintln!
logging...