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

Polkadot Bulletin Chain client #2552

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Conversation

svyatonik
Copy link
Contributor

related to #2547


/// Signed extension, used by Polkadot Bulletin.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub struct SignedExtension(SignedExtensionSchema);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to add this custom struct, because this chain has no transaction payment signed extension.

Copy link
Collaborator

@serban300 serban300 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ! Left just one comment.

#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub struct SignedExtension(SignedExtensionSchema);

impl sp_runtime::traits::SignedExtension for SignedExtension {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could have another trait something like SignedExtensionSchemaProvider {SignedExtensionSchema = ...} and implement sp_runtime::traits::SignedExtension automatically for the types that implement SignedExtensionSchemaProvider.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea, however it won't allow us to have a blanket implementation (I guess that is what you mean by "implement sp_runtime::traits::SignedExtension automatically", right?) of sp_runtime::traits::SignedExtension, because sp_runtime::traits::SignedExtension lives in the external crate (Substrate). And if we'll create some adapter for that, we won't be able to add custom methods which we need here (e.g. from_params and so on). I know - that looks ugly, but probably in the future we'll switch to something better (auto detecting well known signed extensions and explicitly asking about unknown on relayer start? something that we'll need to think of in #2491)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, you're right. I forgot about that.

@svyatonik svyatonik merged commit f8a610e into master Sep 12, 2023
@svyatonik svyatonik deleted the relay-bulletin-chain-client branch September 12, 2023 06:37
svyatonik added a commit that referenced this pull request Sep 12, 2023
* relay-polkadot-bulletin-client

* generate Polkadot Bulletin Chain Runtime
svyatonik added a commit that referenced this pull request Sep 19, 2023
* polkadot-staging for v1.0.0

* Add polkadot bulletin chain primitives (#2542)

* add polkadot bulletin chain primitives

* also impl ChainWithMessages

* clippy

* instead of requiring sp_std::vec::Vec import when using runtime API generation macro, let's use full type path directly in macro (#2551)

* Polkadot Bulletin Chain client (#2552)

* relay-polkadot-bulletin-client

* generate Polkadot Bulletin Chain Runtime

* Add relays that will be used in Polkadot Bulletin <> Polkadot.BH bridge (#2556)

* added Polkadot.BH <> Polkadot Bulletin chain relays

* uncommented ED stuff

* complex PolkadotBulletin <> Polkadot.BH relay

* removed TODO

* spelling

* prepare refund extension infra to add refund extension for messages from standalone chain (#2558)

* prepare refund extension infra to add refund extension for messages from standalone chain

* spelling

* apply adapter to fix compilation

* clippy

* added POLKADOT_BULLETIN_CHAIN_ID constant

* RefundBridgedGrandpaMessages to refund transaction costs for messages coming to/from bridged standalone/relay chain (#2566)

* RefundBridgedGrandpaMessages to refund transaction costs for messages coming to/from bridged standalone/relay chain

* clippy

* fix compilation

* fix codec dependency (#2567)

* Support message relay limits override (#2570)

* support message relay limits overrides for bridges

* spelling

* export EXTRA_STORAGE_PROOF_SIZE for Polkadot Bulletin (#2572)
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Mar 27, 2024
* polkadot-staging for v1.0.0

* Add polkadot bulletin chain primitives (paritytech#2542)

* add polkadot bulletin chain primitives

* also impl ChainWithMessages

* clippy

* instead of requiring sp_std::vec::Vec import when using runtime API generation macro, let's use full type path directly in macro (paritytech#2551)

* Polkadot Bulletin Chain client (paritytech#2552)

* relay-polkadot-bulletin-client

* generate Polkadot Bulletin Chain Runtime

* Add relays that will be used in Polkadot Bulletin <> Polkadot.BH bridge (paritytech#2556)

* added Polkadot.BH <> Polkadot Bulletin chain relays

* uncommented ED stuff

* complex PolkadotBulletin <> Polkadot.BH relay

* removed TODO

* spelling

* prepare refund extension infra to add refund extension for messages from standalone chain (paritytech#2558)

* prepare refund extension infra to add refund extension for messages from standalone chain

* spelling

* apply adapter to fix compilation

* clippy

* added POLKADOT_BULLETIN_CHAIN_ID constant

* RefundBridgedGrandpaMessages to refund transaction costs for messages coming to/from bridged standalone/relay chain (paritytech#2566)

* RefundBridgedGrandpaMessages to refund transaction costs for messages coming to/from bridged standalone/relay chain

* clippy

* fix compilation

* fix codec dependency (paritytech#2567)

* Support message relay limits override (paritytech#2570)

* support message relay limits overrides for bridges

* spelling

* export EXTRA_STORAGE_PROOF_SIZE for Polkadot Bulletin (paritytech#2572)
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Apr 8, 2024
* polkadot-staging for v1.0.0

* Add polkadot bulletin chain primitives (paritytech#2542)

* add polkadot bulletin chain primitives

* also impl ChainWithMessages

* clippy

* instead of requiring sp_std::vec::Vec import when using runtime API generation macro, let's use full type path directly in macro (paritytech#2551)

* Polkadot Bulletin Chain client (paritytech#2552)

* relay-polkadot-bulletin-client

* generate Polkadot Bulletin Chain Runtime

* Add relays that will be used in Polkadot Bulletin <> Polkadot.BH bridge (paritytech#2556)

* added Polkadot.BH <> Polkadot Bulletin chain relays

* uncommented ED stuff

* complex PolkadotBulletin <> Polkadot.BH relay

* removed TODO

* spelling

* prepare refund extension infra to add refund extension for messages from standalone chain (paritytech#2558)

* prepare refund extension infra to add refund extension for messages from standalone chain

* spelling

* apply adapter to fix compilation

* clippy

* added POLKADOT_BULLETIN_CHAIN_ID constant

* RefundBridgedGrandpaMessages to refund transaction costs for messages coming to/from bridged standalone/relay chain (paritytech#2566)

* RefundBridgedGrandpaMessages to refund transaction costs for messages coming to/from bridged standalone/relay chain

* clippy

* fix compilation

* fix codec dependency (paritytech#2567)

* Support message relay limits override (paritytech#2570)

* support message relay limits overrides for bridges

* spelling

* export EXTRA_STORAGE_PROOF_SIZE for Polkadot Bulletin (paritytech#2572)
bkontur pushed a commit that referenced this pull request May 7, 2024
* relay-polkadot-bulletin-client

* generate Polkadot Bulletin Chain Runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants