Skip to content

refactor(juno): integrate common interface with rawDB as trieDB engine#3187

Merged
MaksymMalicki merged 38 commits intomainfrom
maksym/integrate-common-interface-rawdb
Apr 28, 2026
Merged

refactor(juno): integrate common interface with rawDB as trieDB engine#3187
MaksymMalicki merged 38 commits intomainfrom
maksym/integrate-common-interface-rawdb

Conversation

@MaksymMalicki
Copy link
Copy Markdown
Contributor

@MaksymMalicki MaksymMalicki commented Oct 18, 2025

  1. This PR should be reviewed after refactor(state): remove DB writes from the new state to make writes atomic #3360
  2. It integrates the common interfaces across the project, including in utilities and tests. This PR uses rawDB - direct pebbleDB reads/writes - as a trieDB engine.
  3. Some adapting had to be also done for the prove logic inside of storage.go and storage_test.go to support both trie and trie2 packages.
  4. The experimental --new-state boolean CLI flag is now fully integrated. It can be used via the command line and in the dbcmd Revert utility.
  5. A new command was added to the Makefile, to run the unit tests strictly with the new state and trie implementations in the future CI/CD:
test-new-state: clean-testcache rustdeps ## Run tests with new state
	JUNO_NEW_STATE=true go test $(GO_TAGS) -v ./...

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 18, 2025

Codecov Report

❌ Patch coverage is 70.14493% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.15%. Comparing base (b4a2393) to head (36b0061).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
rpc/v8/storage.go 69.23% 19 Missing and 13 partials ⚠️
rpc/v10/storage.go 70.75% 18 Missing and 13 partials ⚠️
rpc/v9/storage.go 69.90% 18 Missing and 13 partials ⚠️
cmd/juno/dbcmd.go 72.72% 2 Missing and 1 partial ⚠️
genesis/genesis.go 72.72% 1 Missing and 2 partials ⚠️
mempool/mempool.go 0.00% 1 Missing ⚠️
node/genesis.go 0.00% 1 Missing ⚠️
node/node.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3187      +/-   ##
==========================================
+ Coverage   75.54%   77.15%   +1.60%     
==========================================
  Files         380      380              
  Lines       33927    34190     +263     
==========================================
+ Hits        25631    26380     +749     
+ Misses       6517     5914     -603     
- Partials     1779     1896     +117     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread consensus/p2p/validator/fixtures_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain_test.go Outdated
Comment thread blockchain/blockchain.go Outdated
Comment thread blockchain/blockchain.go Outdated
@MaksymMalicki MaksymMalicki changed the base branch from maksym/trie-interface to maksym/rawdb November 18, 2025 20:07
@MaksymMalicki MaksymMalicki changed the base branch from maksym/rawdb to maksym/integrate-common-interfaces-rawdb November 19, 2025 14:40
@MaksymMalicki MaksymMalicki force-pushed the maksym/integrate-common-interface-rawdb branch from 33d81d5 to dc23482 Compare December 29, 2025 15:11
@MaksymMalicki MaksymMalicki changed the base branch from maksym/integrate-common-interfaces-rawdb to maksym/common-interfaces-integration February 4, 2026 14:52
@MaksymMalicki MaksymMalicki changed the base branch from maksym/common-interfaces-integration to maksym/integrate-common-interfaces-rawdb February 4, 2026 14:55
@MaksymMalicki MaksymMalicki force-pushed the maksym/integrate-common-interface-rawdb branch from dc23482 to ddded14 Compare February 10, 2026 09:23
@MaksymMalicki MaksymMalicki changed the base branch from maksym/integrate-common-interfaces-rawdb to maksym/common-interfaces-integration February 10, 2026 09:24
@MaksymMalicki MaksymMalicki force-pushed the maksym/integrate-common-interface-rawdb branch from 374fcf7 to 1ba0bf0 Compare February 10, 2026 21:48
@MaksymMalicki MaksymMalicki force-pushed the maksym/common-interfaces-integration branch 2 times, most recently from 6eb0933 to 386d97c Compare February 25, 2026 15:23
@MaksymMalicki MaksymMalicki force-pushed the maksym/integrate-common-interface-rawdb branch 2 times, most recently from 7740498 to 1f4a9a6 Compare February 25, 2026 15:58
fix unit tests

cleanups

renames

unit tests

interface modifications

linter

linter

linter
cleanups

Integrate common interfaces into rawdb

fixes after rebase

minor linter changes

clean-up blockchain.go, fix linter

minor cleanups

state atomicity

remove node ordering

fixes after rebase
fix unit tests

cleanups

Integrate common interfaces into rawdb

fixes after rebase

minor linter changes

clean-up blockchain.go, fix linter

unit tests

linter

minor cleanups

linter

linter

fixes after rebase
@MaksymMalicki MaksymMalicki force-pushed the maksym/integrate-common-interface-rawdb branch from dd87a16 to 83e4759 Compare April 27, 2026 11:39
@MaksymMalicki MaksymMalicki merged commit 4310ba5 into main Apr 28, 2026
25 checks passed
@MaksymMalicki MaksymMalicki deleted the maksym/integrate-common-interface-rawdb branch April 28, 2026 11:38
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.

4 participants