Instant verification for the parachain relay using Fiat–Shamir#1565
Instant verification for the parachain relay using Fiat–Shamir#1565
Conversation
This reverts commit 0a20d9f.
There was a problem hiding this comment.
Would we ever relay fiat shamir from the relayers given that it is 3x more expensive? I do not think we need any relayer changes here. Maybe a one shot command, that we could use in a playbook to unstuck the beefy client.
A more important relayer change is to make sure the beefy and on-demand-beefy relayer abandons a ticket if someone has successfully submitted a fiat shamir with a block greater than your tickets block.
| state, err := wr.queryBeefyClientState(ctx) | ||
| if err != nil { | ||
| return fmt.Errorf("query beefy client state: %w", err) | ||
| } | ||
|
|
||
| // Ignore beefy block already synced | ||
| if uint64(task.SignedCommitment.Commitment.BlockNumber) <= state.LatestBeefyBlock { | ||
| log.WithFields(log.Fields{ | ||
| "validatorSetID": state.CurrentValidatorSetID, | ||
| "beefyBlock": state.LatestBeefyBlock, | ||
| "relayBlock": task.SignedCommitment.Commitment.BlockNumber, | ||
| }).Info("Beefy block already synced, just ignore") | ||
| return nil | ||
| } | ||
|
|
There was a problem hiding this comment.
Check with the light client whether this update is outdated.
This PR is mainly intended to address a specific use case where the end user is willing to bear the full cost of both the consensus update and the message execution for time-sensitive scenarios (as mentioned by the Hydration team in the channel). In such cases, the message relay will submit the Fiat-Shamir consensus update together with the message update.
Yes, we add a one shot command for submit Fiat-Shamir in this PR.
Yes, we've added this check, as mentioned in https://github.com/Snowfork/snowbridge/pull/1565/files#r2563477732 before |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1565 +/- ##
=======================================
Coverage 91.02% 91.02%
=======================================
Files 19 19
Lines 903 903
Branches 164 164
=======================================
Hits 822 822
Misses 64 64
Partials 17 17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Context
This change introduces
FiatShamirsupport on the relay side by adding a separate relay based on the existing parachain relay. The main changes include:submitFiatShmir, followed byv2_submitwith the proof derived from the latest BEEFY block in the light client.