Skip to content

refactor(nano): Move the nano execution logic to a separate file#1535

Merged
msbrogli merged 1 commit intomasterfrom
refactor/nano-consensus-execution
Jan 27, 2026
Merged

refactor(nano): Move the nano execution logic to a separate file#1535
msbrogli merged 1 commit intomasterfrom
refactor/nano-consensus-execution

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented Dec 30, 2025

Motivation

This PR moves the nano execution logic from the Block Consensus Algorithm to a separate file. This is a preparation for upcoming features such as block execution replay and block execution logging.

Acceptance Criteria

  1. Introduce NCBlockExecutor to encapsulate nano execution logic.
  2. Move existing nano execution code from BlockConsensusAlgorithm into NCBlockExecutor.
  3. Keep the feature activation logic in the BlockConsensusAlgorithm.
  4. Keep all existing behavior intact; this is intended as a pure refactor.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@msbrogli msbrogli requested a review from jansegre as a code owner December 30, 2025 13:41
@msbrogli msbrogli self-assigned this Dec 30, 2025
@msbrogli msbrogli moved this from Todo to In Progress (WIP) in Hathor Network Dec 30, 2025
@msbrogli msbrogli moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Dec 30, 2025
@github-actions
Copy link

github-actions bot commented Dec 30, 2025

🐰 Bencher Report

Branchrefactor/nano-consensus-execution
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.69 m
(-1.71%)Baseline: 1.72 m
1.55 m
(91.56%)
2.06 m
(81.91%)
🐰 View full continuous benchmarking report in Bencher

@msbrogli msbrogli force-pushed the refactor/nano-consensus-execution branch 2 times, most recently from 6a6d233 to b59c79a Compare December 30, 2025 14:04
@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

❌ Patch coverage is 92.34694% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.34%. Comparing base (73d3e56) to head (ccfe8c6).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
hathor/nanocontracts/execution/block_executor.py 91.80% 11 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1535      +/-   ##
==========================================
+ Coverage   86.27%   86.34%   +0.07%     
==========================================
  Files         437      439       +2     
  Lines       33662    33690      +28     
  Branches     5269     5271       +2     
==========================================
+ Hits        29042    29091      +49     
+ Misses       3611     3596      -15     
+ Partials     1009     1003       -6     

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

@msbrogli msbrogli moved this from In Progress (Done) to In Progress (WIP) in Hathor Network Jan 9, 2026
@msbrogli msbrogli force-pushed the refactor/nano-consensus-execution branch 2 times, most recently from 7362549 to 0153848 Compare January 23, 2026 20:17
@msbrogli msbrogli moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jan 23, 2026
@msbrogli msbrogli requested a review from glevco January 23, 2026 21:29
jansegre
jansegre previously approved these changes Jan 26, 2026
glevco
glevco previously approved these changes Jan 26, 2026
@github-project-automation github-project-automation bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Jan 26, 2026
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Jan 26, 2026
@msbrogli msbrogli dismissed stale reviews from glevco and jansegre via ccfe8c6 January 27, 2026 03:51
@msbrogli msbrogli force-pushed the refactor/nano-consensus-execution branch from 0153848 to ccfe8c6 Compare January 27, 2026 03:51
@msbrogli msbrogli merged commit ccfe8c6 into master Jan 27, 2026
12 of 13 checks passed
@msbrogli msbrogli deleted the refactor/nano-consensus-execution branch January 27, 2026 03:56
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Jan 27, 2026
This was referenced Jan 27, 2026
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants