Skip to content

refactor(indexes): improve mempool tips index#1399

Merged
glevco merged 1 commit intomasterfrom
refactor/mempool-tips-index
Sep 10, 2025
Merged

refactor(indexes): improve mempool tips index#1399
glevco merged 1 commit intomasterfrom
refactor/mempool-tips-index

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Sep 9, 2025

Motivation

Improve handling of mempool tips on the index.

Acceptance Criteria

  • When available, use vertex.name on graphviz and on vertex repr, which is useful for tests that use the DAGBuilder.
  • Remove duplicate call to mempool_tips.update in vertex handler and move it to indexes.update.
  • Refactor mempool_tips.update method:
    • Change the remove argument from an optional bool to just a bool. Since the code is only ever called with either True or None, we could remove the current False case and use it instead of None, allowing simplification of the logic. Also, it's renamed to force_remove.
    • Change logic to use the existing any_non_voided function instead of repeating it manually.
  • Disable flak8 rule E731 do not assign a lambda expression, use a def. It was unnecessary and inconvenient.

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 9, 2025
@glevco glevco requested a review from jansegre as a code owner September 9, 2025 20:52
@glevco glevco requested a review from msbrogli as a code owner September 9, 2025 20:52
@glevco glevco moved this from Todo to In Progress (Done) in Hathor Network Sep 9, 2025
@glevco glevco force-pushed the refactor/mempool-tips-index branch from 7868224 to e2a6e7d Compare September 9, 2025 20:54
@github-actions
Copy link

github-actions bot commented Sep 9, 2025

🐰 Bencher Report

Branchrefactor/mempool-tips-index
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.90 m
(+12.69%)Baseline: 1.68 m
1.51 m
(79.87%)
2.02 m
(93.91%)
🐰 View full continuous benchmarking report in Bencher

@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Sep 9, 2025
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Sep 9, 2025
@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 91.89189% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.90%. Comparing base (18b35b7) to head (e2a6e7d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
hathor/graphviz.py 0.00% 1 Missing and 1 partial ⚠️
hathor/indexes/manager.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1399      +/-   ##
==========================================
- Coverage   85.91%   85.90%   -0.02%     
==========================================
  Files         431      431              
  Lines       32701    32700       -1     
  Branches     5095     5096       +1     
==========================================
- Hits        28095    28090       -5     
- Misses       3588     3595       +7     
+ Partials     1018     1015       -3     

☔ 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 merged commit 9d0e7dd into master Sep 10, 2025
13 of 14 checks passed
@glevco glevco deleted the refactor/mempool-tips-index branch September 10, 2025 01:10
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Sep 10, 2025
@jansegre jansegre mentioned this pull request Sep 11, 2025
2 tasks
@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

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants