Skip to content

interop: fromda DB#12436

Merged
axelKingsley merged 6 commits intodevelopfrom
interop-fromda-draft2
Oct 16, 2024
Merged

interop: fromda DB#12436
axelKingsley merged 6 commits intodevelopfrom
interop-fromda-draft2

Conversation

@protolambda
Copy link
Contributor

@protolambda protolambda commented Oct 11, 2024

Description

Depends on #12427

Simplified from-da DB, that always encodes both the L1 and L2 block as part of the same entry.

For a year of data, at 1 second block time, 100 bytes per entry, that would be 365 * 24 * 60 * 60 * 100 = 3,153,600,000, or about 3 GB. And with the single-type fixed-width append-only entries, it should be robust against corruption on restart, and easily sliced/diced/shared.

This generalized the entry-DB with generics such that we can use a custom entry type, and customize the entry size.

Tests

  • Tests that check all the AddDerived error cases
  • Tests that cover the empty / single-entry type edge-cases
  • Test that queries a randomly generated series of derived/derived-from additions
  • Parameterized testing of the above to cover cases where L1 and L2 start from a non-0 block.

Additional context

Supersedes draft 1 from here: #12428
and prior entry-db generalization work.

Metadata

Fix #12076

@semgrep-app
Copy link
Contributor

semgrep-app bot commented Oct 11, 2024

Semgrep found 3 sol-style-require-reason findings:

require() must include a reason string

Ignore this finding from sol-style-require-reason.

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 marked this pull request as ready for review October 14, 2024 14:24
@protolambda protolambda requested review from a team as code owners October 14, 2024 14:24
@protolambda protolambda requested review from axelKingsley and removed request for a team October 14, 2024 14:24
@protolambda protolambda force-pushed the interop-fromda-draft2 branch from 4c52936 to b6e34b9 Compare October 15, 2024 19:07
Base automatically changed from interop-cleanup to develop October 15, 2024 22:53
@axelKingsley axelKingsley changed the title interop: draft fromda DB interop: fromda DB Oct 15, 2024
Copy link
Contributor

@axelKingsley axelKingsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed offline, and then again synchronously with @protolambda . I addressed the minor bits I saw myself.

@axelKingsley axelKingsley added this pull request to the merge queue Oct 15, 2024
Merged via the queue into develop with commit 99021b5 Oct 16, 2024
@axelKingsley axelKingsley deleted the interop-fromda-draft2 branch October 16, 2024 00:06
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* op-supervisor: cleanup, refactor to take local-safe info from op-node

* interop: draft fromda DB

* op-supervisor: fromda DB fixes and tests

* fix test warnings

* add extra check ; remove LatestDerived, LatestDerivedFrom

---------

Co-authored-by: axelKingsley <axel.kingsley@gmail.com>
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.

Interop: persist index of cross-safe and local-safe increments per L1 block

2 participants