refactor(blockchain): change default transaction layout to combined and remove related flags from commands#3506
Merged
thiagodeev merged 5 commits intomainfrom Apr 6, 2026
Conversation
rodrodros
reviewed
Mar 27, 2026
This was referenced Mar 27, 2026
Closed
55f34dd to
5ef9091
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3506 +/- ##
==========================================
- Coverage 75.48% 75.28% -0.21%
==========================================
Files 386 386
Lines 34907 34912 +5
==========================================
- Hits 26350 26283 -67
- Misses 6712 6728 +16
- Partials 1845 1901 +56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rodrodros
reviewed
Mar 30, 2026
e3493a4 to
f4b452c
Compare
f4b452c to
3fea15e
Compare
EgeCaner
reviewed
Apr 3, 2026
EgeCaner
approved these changes
Apr 6, 2026
3fea15e to
aac79fd
Compare
…nd remove related flags from commands
Update TransactionsByBlockNumber tests to assert errors for non-existent blocks and reverted heights
aac79fd to
6774432
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blocktransactionsmigration mandatory (no longer opt-in) and switches the default transaction storage layout from per-tx to combined (per-block)--transaction-combined-layoutCLI flag and all associated config/wiringdb.ErrKeyNotFoundfor non-existent blocks in combined layout (consistent error propagation), and adds test coverage for both non-existent blocks and validblocks with no transactions
A follow-up PR will be made to completely remove the old layout code.
Changes
Migration & config cleanup:
node/migration.go:WithOptional→Withfor theblocktransactionsmigratornode/node.go: RemoveFlagTransactionCombinedLayoutconstant andTransactionCombinedLayoutfromConfigblockchain/blockchain.go: Change default layout inNew()toTransactionLayoutCombinedcmd/juno/juno.go+cmd/juno/dbcmd.go: Remove--transaction-combined-layoutflag from all commandsTests:
blockchain/blockchain_test.go: Add test for valid block with no transactions (expects success + empty result), and update non-existent/reverted block tests to expect errorscore/transaction_layout_test.go: AddNonExistentBlock_*subtests verifying both layouts return errors for missing blocksTestTransactionLayoutare being skipped for the old layout since it behaves differently, and we plan to remove it