Skip to content

feature(trie): create rawDB trieDB engine#3277

Closed
MaksymMalicki wants to merge 92 commits intomainfrom
maksym/rawdb
Closed

feature(trie): create rawDB trieDB engine#3277
MaksymMalicki wants to merge 92 commits intomainfrom
maksym/rawdb

Conversation

@MaksymMalicki
Copy link
Copy Markdown
Contributor

@MaksymMalicki MaksymMalicki commented Nov 18, 2025

This PR should be reviewed after #3017.
It introduces rawDB engine for the trie2, which is used by the new state. In this PR:

  • The new package with rawDB is created. The structure of the package is quite simple and follows the pattern of pathdb and hashdb both in structure and interfaces.
  • Contract, Class and Contract Storages are written directly to the pebbleDB and read directly from it. The writing is done in the Update() method, which takes the nodesets generated by trie2.Commit(), flattens them and writes them to the DB. For reading, the readNode() method was introduced.
  • For the new State, Juno defaults to rawdb as a triedb engine

Next PR to review: #3278

MaksymMalicki and others added 30 commits July 31, 2025 00:08
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: MaksymMalicki <81577596+MaksymMalicki@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: MaksymMalicki <81577596+MaksymMalicki@users.noreply.github.com>
Signed-off-by: MaksymMalicki <81577596+MaksymMalicki@users.noreply.github.com>
@MaksymMalicki MaksymMalicki changed the title feature(trie): create rawDB engine as a standalone package feature(trie): create rawDB trieDB engine Nov 19, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 61.84211% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.14%. Comparing base (ab5542a) to head (33d03f9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
core/trie2/triedb/rawdb/database.go 64.40% 16 Missing and 5 partials ⚠️
core/trie2/triedb/database.go 27.27% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3277      +/-   ##
==========================================
- Coverage   76.17%   76.14%   -0.04%     
==========================================
  Files         326      328       +2     
  Lines       32326    32393      +67     
==========================================
+ Hits        24624    24665      +41     
- Misses       5931     5945      +14     
- Partials     1771     1783      +12     

☔ 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.

Base automatically changed from maksym/trie-interface to main November 19, 2025 21:20
Signed-off-by: MaksymMalicki <81577596+MaksymMalicki@users.noreply.github.com>
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