Skip to content

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.94 m
(+12.98%)Baseline: 1.72 m
1.55 m
(79.66%)
2.06 m
(94.15%)
🐰 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.35%. Comparing base (a010288) to head (0153848).

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.33%   86.35%   +0.02%     
==========================================
  Files         437      439       +2     
  Lines       33645    33673      +28     
  Branches     5258     5260       +2     
==========================================
+ Hits        29047    29078      +31     
+ Misses       3594     3591       -3     
  Partials     1004     1004              

☔ 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 from b59c79a to 7362549 Compare January 23, 2026 20:05
@msbrogli msbrogli force-pushed the refactor/nano-consensus-execution branch 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress (Done)

Development

Successfully merging this pull request may close these issues.

2 participants