Skip to content

fix(nano): initialization of block root ids#1418

Merged
jansegre merged 1 commit intomasterfrom
fix/nano/init-block-root-id
Sep 18, 2025
Merged

fix(nano): initialization of block root ids#1418
jansegre merged 1 commit intomasterfrom
fix/nano/init-block-root-id

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Sep 17, 2025

Motivation

There's a bug in the initialization of block root IDs that makes the sync become too slow. This PR fixes it. Before this PR, _nc_initialize_empty was called only for the genesis and for the first active block. Instead, it should be called for every block where nano is not active.

Acceptance Criteria

  • Use feature activation to decide whether we should call nano execution on the consensus.
  • Call _nc_initialize_empty for every block non-active block, instead of just the genesis and the first active block.

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

@glevco glevco self-assigned this Sep 17, 2025
@glevco glevco added the bug Something isn't working label Sep 17, 2025
@glevco glevco moved this from Todo to In Progress (Done) in Hathor Network Sep 17, 2025
@github-actions
Copy link

🐰 Bencher Report

Branchfix/nano/init-block-root-id
Testbedubuntu-22.04

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencyminutes (m)
sync-v2 (up to 20000 blocks)📈 view plot
⚠️ NO THRESHOLD
1.97 m
🐰 View full continuous benchmarking report in Bencher

@glevco glevco force-pushed the fix/nano/init-block-root-id branch 4 times, most recently from f86c983 to 0efaec3 Compare September 17, 2025 21:20
msbrogli
msbrogli previously approved these changes Sep 17, 2025
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Sep 18, 2025
@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.75%. Comparing base (95b75f6) to head (bbc930a).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1418      +/-   ##
==========================================
- Coverage   85.83%   85.75%   -0.08%     
==========================================
  Files         430      430              
  Lines       32973    33061      +88     
  Branches     5161     5171      +10     
==========================================
+ Hits        28301    28353      +52     
- Misses       3639     3668      +29     
- Partials     1033     1040       +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.

@jansegre jansegre mentioned this pull request Sep 18, 2025
2 tasks
@jansegre jansegre force-pushed the fix/nano/init-block-root-id branch from 56f8a4f to bbc930a Compare September 18, 2025 20:08
@jansegre jansegre merged commit 93c1aa5 into master Sep 18, 2025
6 of 7 checks passed
@jansegre jansegre deleted the fix/nano/init-block-root-id branch September 18, 2025 20:09
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Sep 18, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Sep 18, 2025
@jansegre jansegre mentioned this pull request Sep 24, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants