Skip to content

refactor(consensus): Split on_new_vertex() and remove fails_silently#1295

Merged
msbrogli merged 1 commit intomasterfrom
refactor/split-on-new-vertex
Jun 6, 2025
Merged

refactor(consensus): Split on_new_vertex() and remove fails_silently#1295
msbrogli merged 1 commit intomasterfrom
refactor/split-on-new-vertex

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented Jun 6, 2025

Motivation

This PR prepares for enforcing different rules depending on how the vertex was received.

Acceptance Criteria

  1. Add VertexHandler.on_new_block() which adds a new block and its dependencies.
  2. Add VertexHandler.on_new_mempool_transaction() which adds a new transaction in the mempool.
  3. Add VertexHandler.on_new_relayed_vertex() which adds an unsolicited vertex.
  4. Remove VertexHandler.on_new_vertex() and the choice to fail silently.
  5. Remove fails_silently argument from HathorManager.on_new_tx().
  6. No new rule is actually enforced here.

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 June 6, 2025 15:29
@msbrogli msbrogli self-assigned this Jun 6, 2025
@msbrogli msbrogli moved this from Todo to In Progress (WIP) in Hathor Network Jun 6, 2025
@msbrogli msbrogli moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jun 6, 2025
@msbrogli msbrogli requested a review from glevco June 6, 2025 15:38
@msbrogli msbrogli force-pushed the refactor/split-on-new-vertex branch from 68c035f to b6a3221 Compare June 6, 2025 15:39
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Jun 6, 2025
@codecov
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 87.67123% with 9 lines in your changes missing coverage. Please review.

Project coverage is 82.86%. Comparing base (b7abaae) to head (b6a3221).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
hathor/vertex_handler/vertex_handler.py 79.31% 4 Missing and 2 partials ⚠️
hathor/p2p/sync_v2/agent.py 78.57% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1295      +/-   ##
==========================================
+ Coverage   82.81%   82.86%   +0.05%     
==========================================
  Files         362      362              
  Lines       25819    25823       +4     
  Branches     3952     3954       +2     
==========================================
+ Hits        21382    21399      +17     
+ Misses       3706     3697       -9     
+ Partials      731      727       -4     

☔ 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 merged commit b6a3221 into master Jun 6, 2025
7 of 8 checks passed
@msbrogli msbrogli deleted the refactor/split-on-new-vertex branch June 6, 2025 16:04
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Jun 6, 2025
@jansegre jansegre mentioned this pull request Jul 22, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Jul 22, 2025
@jansegre jansegre mentioned this pull request Aug 7, 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