Skip to content

Port LeiosDB schema changes from leios-prototype - #2370

Draft
geo2a wants to merge 3 commits into
mainfrom
geo2a/leios-db-denormalisation
Draft

geo2a wants to merge 3 commits into
mainfrom
geo2a/leios-db-denormalisation

Conversation

@geo2a

@geo2a geo2a commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@geo2a
geo2a force-pushed the geo2a/leios-db-denormalisation branch from ed0ff53 to 5322acd Compare October 9, 2026 09:49
ch1bo and others added 3 commits October 9, 2026 13:53
Port of the LeiosDB part of #2334 (leios-prototype) onto the
Ouroboros.Consensus.Storage.LeiosDB modules.

Tx bytes move from the shared, hash-keyed `txs` table to `ebTxBytes`,
keyed by (ebHashBytes, txOffset) like `ebTxs`. The body write
pre-allocates one zeroblob row per tx; `writeTxs` now takes the EB's
point and offsets, and fills the rows in place, guarded on the row
existing, being unfilled and having the declared size. Completion counts
the filled rows, so `ebsMissingTxs` goes away. GC evicts an EB with
three range deletes, so `gcTxCandidates`, `idx_ebTxs_txHashBytes`, the
orphan-tx sweep and its startup re-staging go away too.

Not ported: the cross-EB fills (LocalFill), which need the LeiosTxCache.
No migration: existing LeiosDB files must be wiped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

asdfsdfa
The bench declared every tx as 200 bytes in the EB body but wrote 16 KiB
payloads. Now that a tx write is dropped unless its size is the declared
one, no tx bytes were written at all: no closure ever completed, and the
timings measured an empty workload. Declare the payload size instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@geo2a
geo2a force-pushed the geo2a/leios-db-denormalisation branch from 5322acd to c310383 Compare October 9, 2026 11:53

This branch has not been deployed

No deployments
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