You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch read-only LedgerTxn to BucketList snapshots (#4431)
Resolves#4315 and
#3800 This PR
automatically switches overlay/herder to using BucketListDB snapshots
instead of LedgerTxn.
This change introduces a single "read-only ledger state snapshot"
interface, which supports both SQL (via LedgerTxn) and BucketListDB
snapshots. A unified interface avoids invasive changes to the rest of
the codebase to support both snapshot types, and allows to have a
centralized validation flow for both overlay and apply time.
A notable change is the removal of nested LegderTxn in validation paths,
and using loadWithoutRecord instead in newer protocols. This creates a
stronger invariant that validation flow is only meant to be accessing
read-only version of the ledger, and prevents it from making
modifications by accident. Note that nested LedgerTxn is preserved for
older buggy versions of the protocol (making the code a bit uglier than
I would have preferred, I'm open to ideas on simplifying/refactoring old
protocol logic out of the critical path).
0 commit comments