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] - v2alpha1 malfeasance API #6353

Closed
wants to merge 18 commits into from
Closed

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Sep 26, 2024

Motivation

This implements the malfeasance API for v2alpha1.

Description

For every malfeasance proof the API returns:

  • The SmesherID the proof was created for
  • The Domain of the proof (for ATXv1 proofs n/a but will be relevant for ATXv2)
  • The Type of the proof
  • The properties of the proof: this is a map of string-string pairs that depends on the type of the proof and gives additional information about it.

Additionally I updated events to not have wire.MalfeasanceProof as part of the event any more but instead only the raw bytes of the proof - listeners of events in general should only care about which identities are marked as malicious and not why.

Test Plan

Added test for new API and updated tests of existing handlers.

Tests in grpcserver/v2alpha1 where sharing setup code between them which caused tests to get stuck if they are executed in a different order. I updated the tests to all setup their environment individually to avoid this.

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 Sep 26, 2024
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 63.43284% with 147 lines in your changes missing coverage. Please review.

Project coverage is 81.6%. Comparing base (1954fd2) to head (9789f0e).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
api/grpcserver/v2alpha1/malfeasance.go 62.9% 59 Missing and 11 partials ⚠️
activation/malfeasance.go 0.0% 29 Missing ⚠️
hare3/malfeasance.go 0.0% 11 Missing ⚠️
mesh/malfeasance.go 0.0% 10 Missing ⚠️
malfeasance/handler.go 78.5% 6 Missing and 3 partials ⚠️
api/grpcserver/v2alpha1/activation.go 76.4% 4 Missing ⚠️
api/grpcserver/v2alpha1/layer.go 76.4% 4 Missing ⚠️
api/grpcserver/v2alpha1/reward.go 76.4% 4 Missing ⚠️
events/events.go 50.0% 2 Missing and 1 partial ⚠️
sql/builder/builder.go 87.5% 1 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #6353     +/-   ##
=========================================
- Coverage     81.7%   81.6%   -0.2%     
=========================================
  Files          312     313      +1     
  Lines        34657   34937    +280     
=========================================
+ Hits         28335   28511    +176     
- Misses        4486    4581     +95     
- Partials      1836    1845      +9     

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

@fasmat
Copy link
Member Author

fasmat commented Sep 27, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Sep 27, 2024
## Motivation

This implements the malfeasance API for v2alpha1.
@spacemesh-bors
Copy link

Canceled.

@fasmat
Copy link
Member Author

fasmat commented Sep 27, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Sep 27, 2024
## Motivation

This implements the malfeasance API for v2alpha1.
@spacemesh-bors
Copy link

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Sep 27, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Sep 27, 2024
## Motivation

This implements the malfeasance API for v2alpha1.
@spacemesh-bors
Copy link

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title v2alpha1 malfeasance API [Merged by Bors] - v2alpha1 malfeasance API Sep 27, 2024
@spacemesh-bors spacemesh-bors bot closed this Sep 27, 2024
@spacemesh-bors spacemesh-bors bot deleted the v2alpha1-malfeasance branch September 27, 2024 14:03
acud added a commit that referenced this pull request Oct 2, 2024
spacemesh-bors bot pushed a commit that referenced this pull request Oct 3, 2024
## Motivation

Backports a forgotten change to hare4 from hare3.
spacemesh-bors bot pushed a commit that referenced this pull request Oct 3, 2024
## Motivation

Backports a forgotten change to hare4 from hare3.
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.

2 participants