Skip to content

Conversation

@protolambda
Copy link
Contributor

Description

Using the same entrydb code 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

@protolambda protolambda added this to the Interop: Devnet 1 milestone Oct 11, 2024
@semgrep-app
Copy link
Contributor

semgrep-app bot commented Oct 11, 2024

Semgrep found 2 golang_fmt_errorf_no_params findings:

No fmt.Errorf invocations without fmt arguments allowed

Ignore this finding from golang_fmt_errorf_no_params.

@protolambda protolambda mentioned this pull request Oct 11, 2024
@protolambda
Copy link
Contributor Author

Closing in favor of #12436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants