Skip to content

chore: add reorg log #1253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

chore: add reorg log #1253

wants to merge 1 commit into from

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Apr 1, 2025

Motivation

It would be useful to track reorgs via full node logs.

Acceptance Criteria

  • Add an info log whenever a reorg happens.

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 Apr 1, 2025
@glevco glevco requested a review from jansegre as a code owner April 1, 2025 16:38
@glevco glevco requested a review from msbrogli as a code owner April 1, 2025 16:38
@glevco glevco moved this from Todo to In Progress (WIP) in Hathor Network Apr 1, 2025
Copy link

github-actions bot commented Apr 1, 2025

🐰 Bencher Report

Branchchore/log-reorg
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.65 m
(+1.07%)Baseline: 1.63 m
1.47 m
(89.05%)
1.80 m
(91.88%)
🐰 View full continuous benchmarking report in Bencher

@glevco glevco moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Apr 1, 2025
@@ -135,12 +135,26 @@ def unsafe_update(self, base: BaseTransaction) -> None:
assert isinstance(old_best_block, Block)
new_best_block = base.storage.get_transaction(new_best_tip)
reorg_size = old_best_block.get_height() - context.reorg_common_block.get_height()
# TODO: After we remove block ties, should the assert below be true?
# assert old_best_block.get_metadata().voided_by
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why it would not be true even with block ties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-project-automation github-project-automation bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Apr 1, 2025
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.12%. Comparing base (70700f7) to head (449f104).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1253      +/-   ##
==========================================
- Coverage   84.22%   84.12%   -0.11%     
==========================================
  Files         311      311              
  Lines       23868    23869       +1     
  Branches     3651     3651              
==========================================
- Hits        20103    20079      -24     
- Misses       3055     3071      +16     
- Partials      710      719       +9     

☔ 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 Review (WIP) to In Review (Done) in Hathor Network Apr 1, 2025
@glevco glevco force-pushed the chore/log-reorg branch from 3a1b660 to 449f104 Compare April 3, 2025 16:35
@glevco glevco moved this from In Review (Done) to In Review (WIP) in Hathor Network Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review (WIP)
Development

Successfully merging this pull request may close these issues.

3 participants