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
TransactionFrame and OperationFrame access to Application during validation and apply time makes applying in the background more dangerous. In reality, we just need access to medida metrics, and some configs (soroban and core config). Resolved in Cleanup apply and validation flows #4471
Similarly, BucketManager uses Application where it doesn't need. We should refactor it such that we can do addBatch atomically in the background during ledgerClose.
marta-lokhova
changed the title
background ledger close: overhaul of core interfaces. Right now core classes are lacking proper encapsulation and separation of responsibilities (e.g. many classes have access to Application class, which allows them to get and set a bunch of state). This makes synchronization much harder to get right.
background ledger close: overhaul of core interfaces (tech debt)
May 14, 2024
Part of #4318 - main
change is to stop passing around Application during validation and
application flows, and use AppConnector instead, which is forced to
either assert main thread or implement thread-safe methods
Resolves#3800 - note that
READ_ONLY_WITHOUT_SQL_TXN LedgerTxn mode should go away completely once
we switch to mandatory BucketListDB. It looks like we were using RO
LedgerTxn during apply scenarios, which I think is not legal? Either
way, all READ_ONLY_WITHOUT_SQL_TXN usages except for the legacy one in
LedgerSnapshot have been removed now.
Note that the second commit has a huge diff but is a no-op, as it's
basically a find and replace for `Application -> AppConnector`
Improve access to ledger state, to better support parallelization
changes in #4543
Note that management of SorobanNetworkConfig is still not great, as
currently LM manages multiple versions of the config. Ideally, soroban
network config lives inside of the state snapshot (either BucketList
snapshot or LedgerTxn), but this was too tricky to implement at this
time due to how network config is currently implemented. We may need to
clean this up later.
This change also partially addresses
#4318
marta-lokhova
changed the title
background ledger close: overhaul of core interfaces (tech debt)
background ledger close: cleanup core interfaces and add invariance (tech debt)
Jan 10, 2025
The text was updated successfully, but these errors were encountered: