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

v2alpha1: Add malfeasance API #362

Merged
merged 4 commits into from
Sep 27, 2024
Merged

v2alpha1: Add malfeasance API #362

merged 4 commits into from
Sep 27, 2024

Conversation

kacpersaw
Copy link
Contributor

@kacpersaw kacpersaw commented Jul 22, 2024

message MalfeasanceProof {
    bytes smesher = 1;
    uint32 layer = 2;
    enum MalfeasanceType {
        MALFEASANCE_UNSPECIFIED = 0;
        MALFEASANCE_ATX = 1;
        MALFEASANCE_BALLOT = 2;
        MALFEASANCE_HARE = 3;
        MALFEASANCE_POST_INDEX = 4;
        MALFEASANCE_INCORRECT_PREV_ATX = 5;
        MALFEASANCE_DOUBLE_MARRY = 6;
    }
    MalfeasanceType kind = 3;
    string debug_info = 4;
    bytes proof = 5;
}

Add malfeasance services to v2alpha1

@kacpersaw
Copy link
Contributor Author

@kacpersaw kacpersaw marked this pull request as ready for review July 23, 2024 14:26
@kacpersaw kacpersaw requested a review from fasmat July 23, 2024 14:26
@fasmat
Copy link
Member

fasmat commented Jul 23, 2024

This API will change a lot with changes in the near future:

  • Malfeasance proofs will not have a layer identifier any more but instead a version identifier.
  • There are now 3 domains for each proof:
    • Activation
    • Ballots
    • Hare
  • Each domain can have any amount of sub-types of proofs. For Ballots and Hare at the moment there will only be a double publish proof, activation will have at least 5 sub-types.
    • The proof itself is wrapped in layers - the actual proof, wrapped in a domain-specific layer, wrapped in a general layer. The bytes returned however should in my opinion only be the concrete proof and not the wrapping layers.

For reference see also this these tickets:

spacemesh/v2alpha1/malfeasance.proto Outdated Show resolved Hide resolved
spacemesh/v2alpha1/malfeasance.proto Outdated Show resolved Hide resolved
@fasmat fasmat merged commit 1379470 into master Sep 27, 2024
1 check passed
@fasmat fasmat deleted the v2alpha1-malfeasance branch September 27, 2024 12:17
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.

3 participants