Skip to content

db-analyser: avoid partial trace-ledger era-transition path#1939

Draft
dancewithheart wants to merge 2 commits intoIntersectMBO:mainfrom
dancewithheart:fix/db-analyser-trace-ledger-era-transition
Draft

db-analyser: avoid partial trace-ledger era-transition path#1939
dancewithheart wants to merge 2 commits intoIntersectMBO:mainfrom
dancewithheart:fix/db-analyser-trace-ledger-era-transition

Conversation

@dancewithheart
Copy link
Copy Markdown

@dancewithheart dancewithheart commented Mar 25, 2026

Addresses #48 by

return Maybe a from analyseWithLedgerState and emit no traces on era transitions

so tracing is skipped at the boundary instead of crashing.

I was not able to reproduce the db-analyser --trace-ledger crash in tests.
I added an integration-style test that runs TraceLedgerProcessing on
synthesized Cardano test data and checks that analysis completes without
throwing.

Feedback would be very welcome: whether this is the right direction, and what
the best approach would be for a regression test.

@dancewithheart dancewithheart force-pushed the fix/db-analyser-trace-ledger-era-transition branch from f720b33 to 858a3a4 Compare March 25, 2026 18:37
@dancewithheart
Copy link
Copy Markdown
Author

dancewithheart commented Mar 26, 2026

The failing storage-test: ChainDB q-s-m.sequential, on CI with message

PostconditionFailed real response didn't match model response
IteratorResultGCed {real = True, iterResult = IteratorResult}
:/=
IteratorResultGCed {real = False, iterResult = IteratorExhausted}

can be reproduced on main branch with:

cabal test storage-test --test-options='-p "ouroboros-storage.Storage.ChainDB.ChainDB q-s-m.sequential" --quickcheck-replay="(SMGen 1310011906619349515 3290980239361589411,61)"'

it seems it is reported as #299. So this one looks unrelated to the change in this PR.

@dancewithheart
Copy link
Copy Markdown
Author

dancewithheart commented Mar 26, 2026

The failing byron-test with Node CoreId (CoreNodeId 0)'s ImmutableDB is leaking file handles on CI also reproduces on main:

cabal test byron-test --test-options='-p "Byron.simple convergence" --quickcheck-replay="(SMGen 13964393832207003311 14774351647257379649,80)"'

So this also looks unrelated to this PR.

Possibly related to #1294.

@dancewithheart dancewithheart marked this pull request as draft April 17, 2026 10:30
@dancewithheart
Copy link
Copy Markdown
Author

Converted to draft - probably without reproducing error manually and in tests the change is not that useful.

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.

1 participant