Skip to content

refactor(consensus): Replace context.reorg_common_block by context.reorg_info#1442

Merged
msbrogli merged 1 commit intomasterfrom
refactor/reorg-info
Oct 3, 2025
Merged

refactor(consensus): Replace context.reorg_common_block by context.reorg_info#1442
msbrogli merged 1 commit intomasterfrom
refactor/reorg-info

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented Oct 2, 2025

Motivation

This PR replaces context.reorg_common_block by context.reorg_info. This is a simple refactor that will be used in a larger refactor of the consensus.

Acceptance Criteria

  1. Add ReorgInfo class and uses it to mark reorgs in the consensus algorithm.
  2. No behavior should change from this PR.

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 October 2, 2025 18:18
@msbrogli msbrogli self-assigned this Oct 2, 2025
@msbrogli msbrogli requested a review from glevco October 2, 2025 18:19
@msbrogli msbrogli moved this from Todo to In Progress (Done) in Hathor Network Oct 2, 2025
@github-actions
Copy link

github-actions bot commented Oct 2, 2025

🐰 Bencher Report

Branchrefactor/reorg-info
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.96 m
(+14.28%)Baseline: 1.72 m
1.54 m
(78.75%)
2.06 m
(95.24%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 87.17949% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.83%. Comparing base (b9b9bc9) to head (fe67026).

Files with missing lines Patch % Lines
hathor/consensus/block_consensus.py 76.19% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1442      +/-   ##
==========================================
- Coverage   85.86%   85.83%   -0.04%     
==========================================
  Files         431      431              
  Lines       33287    33308      +21     
  Branches     5218     5220       +2     
==========================================
+ Hits        28581    28589       +8     
- Misses       3665     3673       +8     
- Partials     1041     1046       +5     

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

@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Oct 2, 2025
@msbrogli msbrogli force-pushed the refactor/reorg-info branch from fe67026 to 72d74b4 Compare October 3, 2025 14:51
@jansegre jansegre moved this from In Review (WIP) to In Review (Done) in Hathor Network Oct 3, 2025
@msbrogli msbrogli merged commit 72d74b4 into master Oct 3, 2025
6 of 7 checks passed
@msbrogli msbrogli deleted the refactor/reorg-info branch October 3, 2025 15:06
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Oct 3, 2025
@jansegre jansegre mentioned this pull request Oct 7, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Oct 15, 2025
@jansegre jansegre mentioned this pull request Oct 16, 2025
2 tasks
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