Serban Iorga
623bd85a5e
RefundRelayerForMessagesFromParachain improvements ( #1895 )
...
* RefundRelayerForMessagesFromParachain changes
- some renamings and cosmetics
- removing the GI generic param since we can get it from the parachains
config
- merging (Parachains Instance, Parachain Id) and (Messages Instance,
Messages lane Id) generic params
- removing unnecessay derives
- renaming for the `TransactionFeeCalculation` and defining
`ActualFeeRefund` concrete implementation
- adding support for multiple RefundRelayerForMessagesFromParachain
(by adding a `StaticStrProvider` generic param)
* Revert to using RuntimeDebug
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c6c39be967
ChainWithGrandpa in primitives ( #1885 )
...
* ChainWithGrandpa in primitives
* clippy ++ spelling
* fix benchmarks comppilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
914213d0af
Fix clippy issues ( #1884 )
...
* fix clippy issues
* fix?
* fix?
* forget about extra_unused_type_parameters lint for now
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
25c17feb23
Reject storage proofs with unused nodes: begin ( #1878 )
...
* reject storage proofs with unused nodes: begin
* fix ignores_parachain_head_if_it_is_missing_from_storage_proof
* message_proof_is_rejected_if_it_has_duplicate_trie_nodes && message_proof_is_rejected_if_it_has_unused_trie_nodes
* proof_with_duplicate_items_is_rejected and proof_with_unused_items_is_rejected
* clippy
* fix benchmarks compilation
* impl From<Error> for &'static str
* fix review comments
* added comment
2024-04-10 10:28:37 +02:00
Serban Iorga
c9c6d566d0
RefundRelayerForMessagesFromParachain improvements ( #1879 )
...
* RefundRelayerForMessagesFromParachain improvements
* Address code review comments
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2657973bb8
fix bridge-runtime-common build ( #1839 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c8c606dd66
Functions to benchmark messages pallet with linked to parachain ( #1817 )
...
* functions to benchmark messages pallet with linked to parachain
* unused imports
* fmt
2024-04-10 10:28:37 +02:00
Serban Iorga
1f727beb5d
Remove InboundPayload check ( #1816 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1b608e4b9f
No wildcard patterns in Cargo.toml ( #1789 )
...
* dependabot doesn't support wildcard patterns in cargo.toml and we want dependabot
* spelling for "fresh" crates
* and fmt
* spelling again
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ec9cd8ddb0
Remove chain-specific dependencies from crates that will be used in Cumulus ( #1783 )
...
* leave-modules.sh
* remove bp-rialto dependency from bp-relayers
* update leave-modules.sh
* fix Cargo.toml of pallet-bridge-relayers
* update leave-modules.sh
* remove bp-rialto and millau-runtime frombridge-runtime-common Cargo.toml
* update leave-modules.sh
* remove chain dependencies from bridge-runtime-common crate
* fix tests
* cleanup script
* rename script
* kind of success message
* remove leave-modules.sh
* use TargetHeaderChainAdapter and SourceHeaderChainAdapter in our testnets
* update script
2024-04-10 10:28:37 +02:00
Serban Iorga
2ff3a7aa38
Add integrity check for signed extensions ( #1780 )
...
* Add integrity check for signed extensions
* Remove unneeded type specification
2024-04-10 10:28:37 +02:00
Branislav Kontur
5fdc89d651
Bump xcm-v3 + substrate ( #1767 )
...
* Bump xcm-v3 + substrate
* More fixes
* Added `#[pallet::call_index`
* Fixes for MMR (TODO:plese check)
* More call indexes
* Cumulus bump
* Fixes for mmr
* Fixes for weights
* Fixes for xcm
* MMR fixes + cargo fmt
* Fix some rpc errors (bump jsonrpsee version)
* Fix cumulus stuff
* Fixes cumulus
* clippy
* more clipy
* Fix test + unused deps
* PR fixes
* cargo update (bump xcm-v3)
Co-authored-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Serban Iorga
add2914a5c
Define method for checking message lane weights ( #1766 )
...
* Define method for checking message lane weights
* Docs for public function
* Renamings
2024-04-10 10:28:37 +02:00
Serban Iorga
63a538a9bb
Deduplicate pallet call structs used for indirect runtime calls ( #1744 )
...
* Small changes
* Define generic bridge pallets call structs
* polkadot-core SignedExtension simplifications
- we don't seem to need to pass the Call as a generic param
- we can use codec(skip) instead of implementing Encode and Decode
* Split BridgeHubRococo and BridgeHubWococo calls
* code review fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
03425b33ae
Use TypedLaneId instead of LaneId ( #1738 )
...
* TypedLaneId -> LaneId
* fix benchmarks compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7964152b49
more traces + remove signer override ( #1727 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
dc989fa674
tests ( #1720 )
2024-04-10 10:28:37 +02:00
Serban Iorga
bde1629f86
Remove SOURCE_PARACHAIN_PARA_ID ( #1716 )
...
* Remove SOURCE_PARACHAIN_PARA_ID
Remove SubstrateParachainsPipeline::SOURCE_PARACHAIN_PARA_ID
* Avoid duplicate ChainBase and ParachainBase implementations
* Replace ChainShadow with UnderlyingChainProvider
2024-04-10 10:28:37 +02:00
Serban Iorga
e85b3fd998
Fix bridge hub rococo/wococo weights ( #1712 )
...
* Fix bridge hub rococo/wococo weights
* Remove SS58Prefix
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2c5e2f09eb
New relayer rewards scheme integration ( #1652 )
...
* relayer rewards integration: initial commit
* added refund-relayer-extension to the millau runtime
* spelling
* spelling again
* new -> Default
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
161d861d9b
Signed extension to refund relayer at the target chain ( #1657 )
...
* add utlity pallet to the Millau runtime
* RefundRelayerForMessagesDeliveryFromParachain prototype
* done with RefundRelayerForMessagesDeliveryFromParachain::post_dispatch
* parse calls
* check batch for obsolete headers/messages
* fmt
* shorten generic arg names + add parachain id generic arg
* check lane_id
* impl all state read functions
* fix typos from review
* renamed extension + reference issue from TODO
* tests for pre-dispaytch
* renamed extension source file
* tests for post-dispatch
* abstract fee calculation
* clippy
* actually fix clippy
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update bin/runtime-common/src/refund_relayer_extension.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7014046485
only store header state root (pallet-bridge-grandpa) ( #1699 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
9e92564c69
refund_pay_dispatch_fee removed ( #1695 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
02ef3a1a25
Added generic DispatchLevelResult to the MessageDispatchResult ( #1670 )
...
* Added generic DispatchLevelResult to the MessageDispatchResult
* Removed unnecessery `Clone + Decode + sp_std::fmt::Debug + Eq` + clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1688b493cd
Remove dispatch_result field ( #1660 )
...
* remove dispatch_result field
* fix benchmarks
2024-04-10 10:28:37 +02:00
Branislav Kontur
56d58d60da
More accurate dispatch_result: true/false ( #1659 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
eabfea6229
Prune messages from on-idle callback ( #1650 )
...
* prune messages from on-idle callback
* no more secondary lanes at deployments
* clippy
* Update modules/messages/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* sub -> add
* more tests + check that message is sent using one of ActiveOutboundLanes
* ensure spent_weight is correct
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
8c845602cf
Remove message fee + message send calls ( #1642 )
...
* remove message fee
* it is compiling!
* fixes + fmt
* more cleanup
* more cleanup
* restore MessageDeliveryAndDispatchPayment since we'll need relayer rewards
* started rational relayer removal
* more removal
* removed estimate fee subcommand
* remove DispatchFeePayment
* more removals
* removed conversion rates && some metrics
* - unneeded associated type
* - OutboundMessageFee
* fix benchmarks compilation
* fmt
* test + fix benchmarks
* fix send message
* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3c76889948
rename ChainWithMessages -> UnderlyingChainProvider ( #1639 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
6dcecf4425
Reintroduce header chain trait ( #1622 )
...
* reintroduce header chain trait
* renive BridgedChainWithMessages::maximal_extrinsic_size
2024-04-10 10:28:37 +02:00
Branislav Kontur
2c0b6b73e0
Bump xcm v3 + substrate
...
* Bumping substrate/polkadot/cumulus
* Update Cargo.lock
* Fixes
* Fixes for mmr
* Bump clap
* Fix for millau - added CompatibilityMode
* Fixes for rialto-parachain
* Align everywhere branch='master' and just use overrides from main Cargo.toml
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
9bf36be259
remove xcm-copy module ( #1614 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e97bb57564
weights v1.5: iteration 2 ( #1613 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a3dc2d2748
Bump Substrate/Polkadot/Cumulus refs (aka Weights v1.5) ( #1597 )
...
* update Substrate + Polkadot + Cumulus refs
* Origin -> RuntimeOrigin
* weights v1.5
* update refs once again + `cargo test -p pallet-bridge-grandpa` works
* started work on `cargo test -p pallet-bridge-messages`
* cargo test -p pallet-bridge-relayers
* cargo test -p pallet-bridge-parachains
* cargo test -p millau-runtime
* cargo test -p bridge-runtime-common
* cargo test -p rialto-runtime
* cargo test -p rialto-parachain-runtime
* cargo test -p millau-bridge-node
* cargo test -p rialto-bridge-node
* cargo test -p rialto-parachain-collator
* cargo test -p messages-relay
* cargo test -p parachains-relay
* cargo test -p substrate-relay
* cargo test --all
* cargo check -p millau-runtime --locked --features runtime-benchmarks
* fix remaining test
* fmt
* try to allow clippy failure temporarily
* Revert "try to allow clippy failure temporarily"
This reverts commit d1b6593580f07e0dbeecb7ab0aa92cee98888ed3.
* use min_by
* Revert "use min_by"
This reverts commit 33042f49ed37e8dd0505370289e17f03bf1a56ee.
* Revert "Revert "use min_by""
This reverts commit 1d2204f0b14dc81e5650bb574dedb5fa78c7097d.
* trigger CI
* Revert "trigger CI"
This reverts commit 259d91b5606743bba9d043c69f07eac6c8700ef5.
* new day, new clippy warning
* more clippy issues
2024-04-10 10:28:37 +02:00
Branislav Kontur
87c3a57942
Removed unused AccountId from trait MessagesBridge ( #1600 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
75d61ff708
LaneMessageVerifier - removed unused Submitter ( #1589 )
...
* LaneMessageVerifier - removed unused Submitter
* fmt
2024-04-10 10:28:37 +02:00
Branislav Kontur
d64815cdef
Cleaning deps + satisfy `cargo build --release --all-targets --all-fe… ( #1587 )
...
* Cleaning deps + satisfy `cargo build --release --all-targets --all-features`
* PR fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
95c30c780c
update Substrate/Polkadot/Cumulus refs ( #1562 )
...
* update Substrate/Polkadot/Cumulus refs
* finality-grandpa 0.16
* fix miillau-runtime compilation
* fix rialto runtime compilation
* fixed rialto-parachain runtime compilation
* backport GRANDPA test fixes
* helper instead of removed record_all_keys
* substrate-relay is compiling
* millau-bridge-node at least compiles
* rialto-bridge-node at least compiles
* rialto-parachain-collator compiles
* fixings tests (wip)
* fmt
* fixed BEEFY alert
* clippy
* removed unused dep
* -extra var
* move Leaf to mod mmr
* fix benchmarks
2024-04-10 10:28:37 +02:00
Branislav Kontur
7ad5b0fe56
Bump codec version 3.0.0 -> 3.1.5 + unify parity-scale-codec vs codec ( #1552 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
260dad5110
Bko cosmetics ( #1550 )
...
* Bump log version to 0.4.17
* Removed unnecesseray dependency + rename BridgeGrandpaMillauCall to BridgeGrandpaCall
2024-04-10 10:28:37 +02:00
Serban Iorga
e0b42dfae7
Follow-up on #1518 ( #1546 )
...
* Adjustments for the xcm messages sending logic
Signed-off-by: Serban Iorga <serban@parity.io >
* Deduplicate XCM destination
Signed-off-by: Serban Iorga <serban@parity.io >
* [send_message] small changes
Signed-off-by: Serban Iorga <serban@parity.io >
* Define CustomNetworkId
Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;
We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.
Signed-off-by: Serban Iorga <serban@parity.io >
* Revert "Deduplicate XCM destination"
This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c131a5e3c8
Send messages using xcm pallet ( #1518 )
...
* send messages using xcm pallet
* XcmBridge && XcmBridgeAdapter + (untested) config in RialtoParachain
* impl encode_send_xcm for the rest
* remove duplicate code
* some fixes
* cleanup
* some more tests
* cleanup
* cleanup
* send Rialto -> Millau messages using bridge-messages pallet
* fmt
* some clippy fixes
* more clippy
2024-04-10 10:28:37 +02:00
Serban Iorga
5d9bd1d0b5
Reduce the number of macros used for SignedExtensions
...
Reduce the number of macros used for SignedExtensions
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Serban Iorga
1e0c2a6e02
Follow-up on #1487 ( #1511 )
...
* Remove unused trait implementations
Signed-off-by: Serban Iorga <serban@parity.io >
* Define encoded_size_hint_u32()
Signed-off-by: Serban Iorga <serban@parity.io >
* Define TransactionEstimationParams trait
Signed-off-by: Serban Iorga <serban@parity.io >
* Rework TransactionEstimation
Signed-off-by: Serban Iorga <serban@parity.io >
* Docs + Renamings
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ea1f46ff45
Add another condition to the reject-obsolete-parachain-heads extension ( #1505 )
...
* add another condition to the reject-obsolete-parachain-heads extension
* add tracing to obsolete-tx-extensions
* fix tests
* extension_rejects_header_from_new_relay_block_with_same_hash
* fmt
* fix benchmarks
2024-04-10 10:28:37 +02:00
Dan Shields
e9d7adf8fd
rm substrate.dev homepage ( #1506 )
...
new docs page
2024-04-10 10:28:37 +02:00
Serban Iorga
e1fd877b80
CLI refactoring
...
* [CLI] Make bridge definitions more complete
* [CLI] Refactor relay_headers_and_messages
Signed-off-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ceefd1b05d
remove account derivation functions ( #1498 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7d97e576d0
Remove without_storage_info for messages pallet ( #1487 )
...
* draft: remove without_storage_info for messages pallet
* some cleanup
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
19c73ce0b7
Signed extension for rejecting obsolete messages pallet transactions ( #1446 )
...
* BridgeRejectObsoleteMessages
* add obsolete confirmations verification to the BridgeRejectObsoleteMessages
* move tests where they belong
2024-04-10 10:28:37 +02:00