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

Add dispute structs #23

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Add dispute structs #23

merged 2 commits into from
Jul 30, 2024

Conversation

bamzedev
Copy link
Contributor

This PR adds ED part of the extrinsic. This includes Verdicts, Culprits, Faults as part of the Dispute.

@bamzedev bamzedev requested a review from a team July 29, 2024 12:17
@bamzedev bamzedev force-pushed the add-dispute-structs branch from caeb273 to dadc2ea Compare July 29, 2024 13:00
pantrif
pantrif previously approved these changes Jul 30, 2024
Copy link
Contributor

@pantrif pantrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bamzedev bamzedev force-pushed the add-dispute-structs branch from 619850a to 5aca0f6 Compare July 30, 2024 13:04
pantrif
pantrif previously approved these changes Jul 30, 2024
Copy link
Member

@asmie asmie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Just a question:
"Verdicts v must be ordered by report hash. Offender signatures c and f must each be ordered by the validator’s Ed25519 key. There may be no duplicate report hashes within the extrinsic, nor amongst any past reported hashes"

Is it possible to enforce those constraints by using different data types for those fields inside the structs?

internal/block/dispute.go Outdated Show resolved Hide resolved
@bamzedev
Copy link
Contributor Author

Nice!

Just a question: "Verdicts v must be ordered by report hash. Offender signatures c and f must each be ordered by the validator’s Ed25519 key. There may be no duplicate report hashes within the extrinsic, nor amongst any past reported hashes"

Is it possible to enforce those constraints by using different data types for those fields inside the structs?

Not possible out of the box. We would have to create custom types for that. You think it's worth doing in this PR?

@asmie
Copy link
Member

asmie commented Jul 30, 2024

Nice!
Just a question: "Verdicts v must be ordered by report hash. Offender signatures c and f must each be ordered by the validator’s Ed25519 key. There may be no duplicate report hashes within the extrinsic, nor amongst any past reported hashes"
Is it possible to enforce those constraints by using different data types for those fields inside the structs?

Not possible out of the box. We would have to create custom types for that. You think it's worth doing in this PR?

No, it was just a thought 👍

@bamzedev bamzedev merged commit 8d64844 into main Jul 30, 2024
2 checks passed
@bamzedev bamzedev deleted the add-dispute-structs branch July 30, 2024 16:27
@bamzedev bamzedev mentioned this pull request Jul 30, 2024
6 tasks
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