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

Beefy equivocation: add runtime API methods #4993

Merged
merged 7 commits into from
Jul 23, 2024

Conversation

serban300
Copy link
Contributor

@serban300 serban300 commented Jul 10, 2024

Related to #4523

Add runtime API methods for:

  • generating the ancestry proof
  • submiting a fork voting report
  • submitting a future voting report

@serban300 serban300 added the T15-bridges This PR/Issue is related to bridges. label Jul 10, 2024
@serban300 serban300 requested a review from a team July 10, 2024 12:08
@serban300 serban300 self-assigned this Jul 10, 2024
@serban300 serban300 requested a review from acatangiu as a code owner July 10, 2024 12:08
@@ -349,6 +349,19 @@ pub struct ForkVotingProof<Header: HeaderT, Id: RuntimeAppPublic, AncestryProof>
pub header: Header,
}

impl<Header: HeaderT, Id: RuntimeAppPublic> ForkVotingProof<Header, Id, OpaqueValue> {
/// Try to decode the `AncestryProof`.
pub fn try_into<AncestryProof: Decode>(
Copy link
Contributor

Choose a reason for hiding this comment

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

@serban300 impl TryInto or TryFrom does not work here?

Copy link
Contributor Author

@serban300 serban300 Jul 23, 2024

Choose a reason for hiding this comment

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

I tried, but TryInto must return an Error and here it was better to return an Option.

@serban300 serban300 added this pull request to the merge queue Jul 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 23, 2024
@serban300 serban300 enabled auto-merge July 23, 2024 10:20
@serban300 serban300 added this pull request to the merge queue Jul 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 23, 2024
@serban300 serban300 added this pull request to the merge queue Jul 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 23, 2024
@serban300 serban300 added this pull request to the merge queue Jul 23, 2024
Merged via the queue into paritytech:master with commit 216e8fa Jul 23, 2024
158 of 161 checks passed
@serban300 serban300 deleted the beefy-equivocation-runtime branch July 23, 2024 15:10
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
Related to paritytech#4523

Add runtime API methods for:
- generating the ancestry proof
- submiting a fork voting report
- submitting a future voting report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T15-bridges This PR/Issue is related to bridges.
Projects
Status: Done
Status: Audited
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants