-
Notifications
You must be signed in to change notification settings - Fork 129
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
Reintroduce header chain trait #1622
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
svyatonik
added
the
A-chores
Something that has to be done, as part of regular maintenance
label
Nov 4, 2022
bkontur
reviewed
Nov 4, 2022
bkontur
reviewed
Nov 4, 2022
serban300
approved these changes
Nov 11, 2022
bkontur
reviewed
Nov 11, 2022
@@ -186,16 +170,16 @@ pub trait BridgedChainWithMessages: ChainWithMessages { | |||
pub type ThisChain<B> = <B as MessageBridge>::ThisChain; | |||
/// Bridged chain in context of message bridge. | |||
pub type BridgedChain<B> = <B as MessageBridge>::BridgedChain; | |||
/// Underlying chain type. | |||
pub type UnderlyingChainOf<C> = <C as ChainWithMessages>::Chain; |
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.
@svyatonik
just very nit: what about renaming ChainWithMessages
-> UnderlyingChain
,
ChainWithMessages
here is not very descriptive and also we have two trait ChainWithMessages
jiguantong
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Jan 6, 2023
jiguantong
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Jan 9, 2023
This reverts commit 4c5865d.
4 tasks
boundless-forest
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Jan 12, 2023
* Anchor polkadot-v0.9.32 * fix parity-util-mem conflict * Anchor polkadot-v0.9.33 * Companion for paritytech/parity-bridges-common#1613 * Companion for paritytech/parity-bridges-common#1616 * Companion for paritytech/parity-bridges-common#1619 * Companion for paritytech/parity-bridges-common#1623 * Companion for paritytech/parity-bridges-common#1622 * Companion for paritytech/parity-bridges-common#1655 * Companion for paritytech/parity-bridges-common#1670 * Companion for paritytech/parity-bridges-common#1690 * Correct cargo * Revert "Companion for paritytech/parity-bridges-common#1690" This reverts commit 926b32d. * Revert "Companion for paritytech/parity-bridges-common#1670" This reverts commit b96b41c. * Fix compile * Revert "Companion for paritytech/parity-bridges-common#1622" This reverts commit 4c5865d. * Fix compile * format * Fix test * Fix dispatch test * Try fix compile with darwinia-2.0 * Revert "Try fix compile with darwinia-2.0" This reverts commit c9dcd67. * Update prepare branch * Format * Remove unused trait * Remove unused import
jiguantong
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Jan 17, 2023
* Anchor polkadot-v0.9.32 * fix parity-util-mem conflict * Anchor polkadot-v0.9.33 * Companion for paritytech/parity-bridges-common#1613 * Companion for paritytech/parity-bridges-common#1616 * Companion for paritytech/parity-bridges-common#1619 * Companion for paritytech/parity-bridges-common#1623 * Companion for paritytech/parity-bridges-common#1622 * Companion for paritytech/parity-bridges-common#1655 * Companion for paritytech/parity-bridges-common#1670 * Companion for paritytech/parity-bridges-common#1690 * Correct cargo * Revert "Companion for paritytech/parity-bridges-common#1690" This reverts commit 926b32d. * Revert "Companion for paritytech/parity-bridges-common#1670" This reverts commit b96b41c. * Fix compile * Revert "Companion for paritytech/parity-bridges-common#1622" This reverts commit 4c5865d. * Fix compile * format * Fix test * Fix dispatch test * Try fix compile with darwinia-2.0 * Revert "Try fix compile with darwinia-2.0" This reverts commit c9dcd67. * Update prepare branch * Format * Remove unused trait * Remove unused import
jiguantong
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Jan 17, 2023
…238) * Anchor polkadot-v0.9.32 * fix parity-util-mem conflict * Anchor polkadot-v0.9.33 * Companion for paritytech/parity-bridges-common#1613 * Companion for paritytech/parity-bridges-common#1616 * Companion for paritytech/parity-bridges-common#1619 * Companion for paritytech/parity-bridges-common#1623 * Companion for paritytech/parity-bridges-common#1622 * Companion for paritytech/parity-bridges-common#1655 * Companion for paritytech/parity-bridges-common#1670 * Companion for paritytech/parity-bridges-common#1690 * Correct cargo * Revert "Companion for paritytech/parity-bridges-common#1690" This reverts commit 926b32d. * Revert "Companion for paritytech/parity-bridges-common#1670" This reverts commit b96b41c. * Fix compile * Revert "Companion for paritytech/parity-bridges-common#1622" This reverts commit 4c5865d. * Fix compile * format * Fix test * Fix dispatch test * Try fix compile with darwinia-2.0 * Revert "Try fix compile with darwinia-2.0" This reverts commit c9dcd67. * Update prepare branch * Format * Remove unused trait * Remove unused import
jiguantong
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Apr 13, 2023
jiguantong
pushed a commit
to darwinia-network/darwinia-messages-substrate
that referenced
this pull request
Apr 18, 2023
svyatonik
pushed a commit
that referenced
this pull request
Jul 17, 2023
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.34 to 1.0.35. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](dtolnay/thiserror@1.0.34...1.0.35) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
serban300
pushed a commit
to serban300/parity-bridges-common
that referenced
this pull request
Mar 27, 2024
* reintroduce header chain trait * renive BridgedChainWithMessages::maximal_extrinsic_size
serban300
pushed a commit
to serban300/parity-bridges-common
that referenced
this pull request
Apr 8, 2024
* reintroduce header chain trait * renive BridgedChainWithMessages::maximal_extrinsic_size
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.
There's a lot of changes, but it is mostly moving code around and removing some duplicate functions. The main change is the new
HeaderChain
which represents a storage ofChain
headers. This trait is implemented for both bridge GRANDPA and parachains pallets (for latter the adapter structParachainHeaders
is used). This way we may write code (e.g. glue code for bridge-messages pallet) in abstracted way - e.g. there's now singleverify_messages_proof
function vs previousverify_messages_proof
(for chains with GRANDPA)verify_messages_proof_from_parachain
(for parachains).I've also refactored + removed some obsolete concepts from the
messages.rs
file + changed how tests are working (we no longer need type tests, since we're usingChain
trait).Draft until I'll test it locallyTested