-
Notifications
You must be signed in to change notification settings - Fork 107
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
Split BEEFY relayer into two separate relayers #1216
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yrong
reviewed
May 31, 2024
yrong
reviewed
May 31, 2024
yrong
reviewed
May 31, 2024
yrong
reviewed
May 31, 2024
yrong
reviewed
May 31, 2024
yrong
reviewed
May 31, 2024
yrong
reviewed
May 31, 2024
yrong
reviewed
Jun 3, 2024
Comment on lines
165
to
177
func (li *PolkadotListener) queryBeefyNextAuthoritySet(blockHash types.Hash) (types.BeefyNextAuthoritySet, error) { | ||
var nextAuthoritySet types.BeefyNextAuthoritySet | ||
storageKey, err := types.CreateStorageKey(li.conn.Metadata(), "MmrLeaf", "BeefyNextAuthorities", nil, nil) | ||
ok, err := li.conn.API().RPC.State.GetStorage(storageKey, &nextAuthoritySet, blockHash) | ||
if err != nil { | ||
return nextAuthoritySet, err | ||
} | ||
if !ok { | ||
return nextAuthoritySet, fmt.Errorf("beefy nextAuthoritySet not found") | ||
} | ||
|
||
return nextAuthoritySet, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need this function for #1215, but no need to revert here I can address it in that PR.
yrong
approved these changes
Jun 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
* Sync beefy commitment on demand * Minor fix * More comments * More refactoring * Fix for skip mandatory commitment * Some refactoring * Find for next beefy block * Improve log * Remove check unrelated
vgeddes
added a commit
that referenced
this pull request
Jun 5, 2024
Co-authored-by: ron <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The BEEFY relayer is overly complicated, slow, and brittle as it tries to do too much with a core synchronization algorithm that is inappropriate:
Instead, we should split the relayer into services:
This PR currently implements (1). We should also implement (2) to allow anyone to sync instantly so they can have their messages relayed.
Suggested design for (2): Use GSRPC
beefy_getFinalizedHead
to get the latest finalized BEEFY head, thenchain_getBlock
, which I suspect should contain a beefy justification.Fixes: SNO-1017