Skip to content
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

Malfeasance2 fetcher and sync #6652

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open

Malfeasance2 fetcher and sync #6652

wants to merge 28 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Jan 21, 2025

Motivation

This adds the necessary fetcher code for malfeasance v2 so that the node can sync new malfeasance proofs.

Description

Initially legacy malfeasance proofs will continue to be managed and synced as before and malfeasance v2 proofs work independently of them. Which means everywhere in the codebase where we check for malicious identities we need to check for both identities.IsMalicious (v1) and malfeasance.IsMalicious (v2). Legacy malfeasance proofs will be migrated to v2 at a later point together with deprecating the legacy malfeasance protocol.

Test Plan

  • Tests were added for new code
  • Existing tests were updated/extended where necessary
  • TODO: update Malfeasance systest to check for a v2 malfeasance proof

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Jan 21, 2025
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 73.78049% with 172 lines in your changes missing coverage. Please review.

Project coverage is 79.8%. Comparing base (5882ac0) to head (d83dd3c).
Report is 3 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
syncer/malsync/syncer.go 75.4% 44 Missing and 12 partials ⚠️
malfeasance2/publisher.go 65.5% 29 Missing and 12 partials ⚠️
malfeasance2/handler.go 38.6% 20 Missing and 7 partials ⚠️
fetch/mesh_data.go 76.9% 8 Missing and 4 partials ⚠️
fetch/handler.go 81.0% 7 Missing and 4 partials ⚠️
activation/handler_v1.go 25.0% 6 Missing and 3 partials ⚠️
checkpoint/runner.go 40.0% 2 Missing and 1 partial ⚠️
sql/malfeasance/malfeasance.go 76.9% 2 Missing and 1 partial ⚠️
sql/malsync/malsync.go 88.0% 2 Missing and 1 partial ⚠️
tortoise/model/core.go 40.0% 2 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #6652     +/-   ##
=========================================
- Coverage     79.8%   79.8%   -0.1%     
=========================================
  Files          366     366             
  Lines        49551   49970    +419     
=========================================
+ Hits         39562   39889    +327     
- Misses        7742    7811     +69     
- Partials      2247    2270     +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fasmat
Copy link
Member Author

fasmat commented Jan 24, 2025

bors try

spacemesh-bors bot added a commit that referenced this pull request Jan 24, 2025
@spacemesh-bors
Copy link

try

Build failed:

@fasmat fasmat force-pushed the malfeasance-fetcher branch from 399733f to 06d9865 Compare January 25, 2025 01:58
@fasmat
Copy link
Member Author

fasmat commented Jan 25, 2025

bors try

spacemesh-bors bot added a commit that referenced this pull request Jan 25, 2025
@fasmat fasmat changed the title WiP: Malfeasance fetcher Malfeasance fetcher and sync v1 Jan 25, 2025
@fasmat fasmat changed the title Malfeasance fetcher and sync v1 Malfeasance2 fetcher and sync Jan 25, 2025
@spacemesh-bors
Copy link

try

Build failed:

@fasmat fasmat marked this pull request as ready for review January 25, 2025 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant