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

[Merged by Bors] - Malfeasance2 fetcher and sync #6652

Closed
wants to merge 68 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.

Closes #6689

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
  • The Malfeasance systest was updated 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 74.71264% with 198 lines in your changes missing coverage. Please review.

Project coverage is 79.8%. Comparing base (19bd73d) to head (fcea6a0).
Report is 1 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 67.8% 33 Missing and 11 partials ⚠️
activation/handler_v2.go 76.0% 17 Missing ⚠️
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 43.7% 6 Missing and 3 partials ⚠️
malfeasance2/handler.go 59.0% 6 Missing and 3 partials ⚠️
activation/wire/malfeasance_double_merge.go 52.9% 4 Missing and 4 partials ⚠️
activation/wire/malfeasance_invalid_prev_atx.go 22.2% 5 Missing and 2 partials ⚠️
activation/wire/malfeasance_double_marry.go 28.5% 3 Missing and 2 partials ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #6652     +/-   ##
=========================================
- Coverage     79.8%   79.8%   -0.1%     
=========================================
  Files          366     366             
  Lines        49517   49967    +450     
=========================================
+ Hits         39564   39886    +322     
- Misses        7711    7811    +100     
- Partials      2242    2270     +28     

☔ 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 Feb 3, 2025

bors try

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

spacemesh-bors bot commented Feb 3, 2025

try

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 3, 2025

bors try

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

spacemesh-bors bot commented Feb 3, 2025

try

Build failed:

activation/wire/interface.go Outdated Show resolved Hide resolved
sql/marriage/marriages.go Outdated Show resolved Hide resolved
systest/Makefile Show resolved Hide resolved
mesh/mesh.go Show resolved Hide resolved
@fasmat
Copy link
Member Author

fasmat commented Feb 4, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 4, 2025
## Motivation

This adds the necessary fetcher code for malfeasance v2 so that the node can sync new malfeasance proofs.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 4, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 4, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 4, 2025
## Motivation

This adds the necessary fetcher code for malfeasance v2 so that the node can sync new malfeasance proofs.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 4, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 4, 2025

flaky unit test on windows

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 4, 2025
## Motivation

This adds the necessary fetcher code for malfeasance v2 so that the node can sync new malfeasance proofs.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 4, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 4, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 4, 2025
## Motivation

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

Closes #6689
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 4, 2025

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title Malfeasance2 fetcher and sync [Merged by Bors] - Malfeasance2 fetcher and sync Feb 4, 2025
@spacemesh-bors spacemesh-bors bot closed this Feb 4, 2025
@spacemesh-bors spacemesh-bors bot deleted the malfeasance-fetcher branch February 4, 2025 19:32
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.

Malfeasance fetcher and sync v1
2 participants