Interop: fromda derived-from DB draft 1
#12428
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.
Description
Using the same
entrydbcode as the logs-DB is built on we can introduce a DB index that can store the L1 to L2 block derivation links.It tries to generalize the existing entry-DB usage, but does not yet refactor the logs-DB to use the same abstractions.
This is a draft, we should try and simplify it more. Having tried to use this for the cross-safe updating logic, I think the API is clear. And since the data content is much more simple than the event-logs, we should simplify.
Although the data-size might be larger if we do simplify, I think the simplicity is worth it. We can just concatenate all the entry data into a single entry type: last L1 block, last L2 block, and a type. That way there's no need to handle partial information. And binary-search won't need checkpoints, as every entry will just work and be readable.
Tests
Work in progress.
Additional context
Metadata
Fix #12076