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

Optimize GRANDPA justifications before submitting them to the pallet-bridge-grandpa #1731

Closed
svyatonik opened this issue Dec 21, 2022 · 1 comment · Fixed by #1887
Closed
Assignees
Labels
Good First Issue Good for newcomers P-Relay

Comments

@svyatonik
Copy link
Contributor

Noticed one strange thing when testing our relay with Kusama/Polkadot - within the same session, GRANDPA justifications received from the node contain different number of signatures. E.g. given session with 1000 validators in Kusama, on justification has 672 precommits, other has 674 and the next one has 676. Since on-chain signature verification is expensive, it'd be better for relayers to "optimize" justifications before submitting them. Iiuc in this (1000 validators) case we only need 667 signatures, so extra ~10 signatures may be removed before sending it to the pallet.

@svyatonik svyatonik added Good First Issue Good for newcomers P-Relay labels Dec 21, 2022
@svyatonik svyatonik added this to the When Thou Have Spare Hour milestone Dec 21, 2022
@acatangiu
Copy link
Collaborator

Noticed one strange thing when testing our relay with Kusama/Polkadot - within the same session, GRANDPA justifications received from the node contain different number of signatures.

This is normal, GRANDPA justification is built using all the available/gossiped signatures, the condition being >= 2/3+1, so they can be more than 667 for 1000 validators.

so extra ~10 signatures may be removed before sending it to the pallet

Sounds good, if it's a low-hanging fruit let's do it.

@svyatonik svyatonik self-assigned this Feb 14, 2023
svyatonik pushed a commit that referenced this issue Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers P-Relay
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants