CheckBridgedBlockNumber signed extension to reject duplicate header-submit transactions#1352
Merged
svyatonik merged 3 commits intoMay 16, 2022
Conversation
…ubmit transactions
Contributor
Author
|
Merging with deferred review |
This was referenced May 16, 2022
Collaborator
|
Related to:
We might be able to match the call with something like: This example is for parachains but it can be adapted for the grandpa pallet. I will do some experiments these days to see if it works. |
Merged
wuminzhe
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Aug 8, 2022
30 tasks
serban300
pushed a commit
to serban300/parity-bridges-common
that referenced
this pull request
Mar 27, 2024
…ubmit transactions (paritytech#1352) * CheckBridgedBlockNumber signed extension to reject duplicate header submit transactions * fix depends_on
serban300
pushed a commit
to serban300/parity-bridges-common
that referenced
this pull request
Apr 8, 2024
…ubmit transactions (paritytech#1352) * CheckBridgedBlockNumber signed extension to reject duplicate header submit transactions * fix depends_on
This file contains hidden or 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
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.
related to #1162 (we'll need a couple of other extensions to close the issue)
Things to do:
BestBlockNumberstorage entry (or changing existingBestFinalizedto store both block hash and number) to the grandpa pallet. This would allow us to use single storage read instead of two when validating. This needs to be done carefully (in a separate PR), because it may break existing deployments, which will need an upgrade in this case. UPD: extracted to Store best finalized header id (hash + number) instead of just hash in bridge-grandpa pallet #1368;CheckBridgedBlockNumber<Runtime, WestendGrandpaInstance>andCheckBridgedBlockNumber<Runtime, RialtoGrandpaInstance>? That's because every extension has associatedIDENTIFIERconst, which has to be unique. The outcome of not being unique, iirc is invalid metadata. We could useadt_const_paramsrust feature if we were on nightly, but we are not. So the only solution I see now, is to have this single, multi-instance extension that can only be created using macro (as I said before - worth exploring).Update related to last checkbox - I was thinking that possibly using
impl_for_tupleswould help. So something like:But I've found no way to match (and deconstruct) runtime call when you're at pallet level. So given runtime call, but no knowledge of runtime, I can't do match inside
FilterCall::is_valid. So I see no other option, but to use macro for now.