Skip to content

refactor(juno): Use common interfaces in Juno#3283

Open
MaksymMalicki wants to merge 3 commits intomainfrom
maksym/common-interfaces-integration
Open

refactor(juno): Use common interfaces in Juno#3283
MaksymMalicki wants to merge 3 commits intomainfrom
maksym/common-interfaces-integration

Conversation

@MaksymMalicki
Copy link
Contributor

@MaksymMalicki MaksymMalicki commented Nov 20, 2025

This PR should be reviewed after #3282 . It aims to:

  • Move the State and Trie interfaces from commonstate and commontrie packages to core package and rename them to CommonState and CommonTrie. This way the circular imports in pending_state.go are omitted and there is no naming clash.
  • Use the CommonState and CommonTrie in Juno. Right now both old and new implementations of State and Trie use these interfaces. It is possible to utilise the new interfaces in Juno, but always feed the old implementations to them. The CMD flag, specifying which set of implementations to use will be introduced in the next PR.
  • Implement the missing CompiledClassHash() and CompiledClassHashV2() methods for the new State
  • Rename MockStateHistoryReader and all its methods to MockCommonState

The next PR to review: #3187

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 48.88889% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.71%. Comparing base (a2867a2) to head (d0423e5).

Files with missing lines Patch % Lines
core/state/state.go 0.00% 18 Missing ⚠️
rpc/mocks/mock_gateway_handler.go 0.00% 15 Missing ⚠️
core/history.go 0.00% 3 Missing ⚠️
core/pending_state.go 0.00% 3 Missing ⚠️
core/state/statefactory/state_factory.go 0.00% 3 Missing ⚠️
core/state/history.go 75.00% 2 Missing ⚠️
core/state.go 66.66% 1 Missing ⚠️
sync/sync.go 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (48.88%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3283      +/-   ##
==========================================
+ Coverage   75.57%   75.71%   +0.14%     
==========================================
  Files         378      378              
  Lines       34819    34782      -37     
==========================================
+ Hits        26313    26334      +21     
+ Misses       6660     6609      -51     
+ Partials     1846     1839       -7     

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

@MaksymMalicki MaksymMalicki force-pushed the maksym/rawdb-clean branch 2 times, most recently from 225d960 to 2168fca Compare December 2, 2025 13:55
Base automatically changed from maksym/rawdb-clean to main December 2, 2025 14:05
@MaksymMalicki MaksymMalicki force-pushed the maksym/common-interfaces-integration branch from 42162a8 to 3fb0091 Compare December 2, 2025 18:20
@MaksymMalicki MaksymMalicki force-pushed the maksym/common-interfaces-integration branch from 561eca9 to ac44bab Compare December 5, 2025 12:40
@MaksymMalicki MaksymMalicki force-pushed the maksym/common-interfaces-integration branch from ac44bab to 21af273 Compare December 5, 2025 13:14
@rodrodros rodrodros requested review from EgeCaner, infrmtcs and rodrodros and removed request for EgeCaner and rodrodros December 8, 2025 17:31
@MaksymMalicki MaksymMalicki force-pushed the maksym/common-interfaces-integration branch from d97eab5 to 00c2081 Compare February 9, 2026 22:25
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