Svyatoslav Nikolsky
cca75ee841
fixed receive_delivery_proof_for_two_messages_by_two_relayers ( #1764 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
3c4cce9eef
cargo machete removed unused deps (#1761 )
2024-04-10 10:28:37 +02:00
Serban Iorga
b63287da20
Remove sp-version dependency from bin-substrate ( #1758 )
2024-04-10 10:28:37 +02:00
Serban Iorga
b4c338f77d
Set R/WococoBridgeHub bundle runtime version ( #1756 )
...
* Define SimpleRuntimeVersion
* Set R/WococoBridgeHub bundle runtime version
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
70eb076ab2
Expose relay version metric ( #1750 )
...
* expose relay version metric
* spelling
* and clippy
* clippy
* typo
* use version directly and determine git commit
* typos and leftovers
2024-04-10 10:28:37 +02:00
Serban Iorga
444dbe7173
Use indirect runtime calls for RialtoParachain ( #1753 )
...
* Use indirect runtime calls for RialtoParachain
* Code review fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e0e84b734b
fix nightly clippy again ( #1752 )
2024-04-10 10:28:37 +02:00
Serban Iorga
c387f7a4b9
Remove TODO ( #1749 )
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
a21617082e
fix nightly clippy ( #1746 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7821e66bcd
Update project level docs ( #1734 )
...
* updated project level document
* updated high level overview document
* GRANDPA finality relay sequence diagram
* Parachains Finality Relay Sequence Diagram
* Messages Relay Sequence Diagram
* Complex Relayer Sequence Diagram
* small fix
* Polkadot <> Kusama bridge flowchart
* remove obsolete files
* started polkadot-kusama-bridge-overview.md
* continue polkadot-kusama-bridge-overview.md
* couple more sections in polkadot-kusama-bridge-overview.md
* continue polkadot-kusama-bridge-overview.md
* renew deployments readme
* fixed review suggestions
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* removed obsolete section
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* typo
* Update docs/polkadot-kusama-bridge-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/high-level-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/polkadot-kusama-bridge-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/polkadot-kusama-bridge-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/polkadot-kusama-bridge-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update docs/polkadot-kusama-bridge-overview.md
Co-authored-by: Adrian Catangiu <adrian@parity.io >
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Serban Iorga
64f03aaa0b
Improve relayer initialization behaviour ( #1743 )
...
Wait until the initialization transaction is finalized/lost.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f82372e818
Make debug display of LaneId compatible with its previous version ( #1740 )
...
* make {:?} of LaneId compatible with its previous version
* fmt
* apply review suggestions
2024-04-10 10:28:37 +02:00
Serban Iorga
4a10ccb118
Remove CliChain::KeyPair ( #1741 )
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
Serban Iorga
41daa32acb
Simplify read_client_state() ( #1739 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
15e7d828ea
Expose metrics of on-demand relay chain headers sync from with-parachain complex relays ( #1737 )
...
* expose metrics of on-demand relay chain headers sync from with-parachain complex relays
* spelling
* remove renundant arg
2024-04-10 10:28:37 +02:00
Serban Iorga
9495e1cfcb
Handle SIGTERM for the docker containers + relay ( #1735 )
...
* Handle SIGTERM for some docker containers
* Implement SIGTERM handling for the relay
2024-04-10 10:28:37 +02:00
Serban Iorga
e47f1e42e0
Replace BATCH_CALL_SUPPORTED ( #1733 )
...
* Simplify submit_and_watch_signed_extrinsic
The way submit_and_watch_signed_extrinsic is used now, we can always
derive the SignParam from other params. If in the future we need more
customization possibilities, we can define a new method.
* Simplify submit_signed_extrinsic
* Send maybe_batch_tx as a parameter
Send `maybe_batch_tx` as a parameter to `submit_proof()`. This way we
can deduplicate the logic that submits the extrinsic for
`messages_source and `messages_target` and we can simplify the logic in
the race loop a bit.
* Define BatchProofTransaction
Deduplicate BatchConfirmationTransaction and BatchDeliveryTransaction by
replacing both of them with BatchProofTransaction
* Define ChainWithUtilityPallet and BatchCallBuilderConstructor
- Define `ChainWithUtilityPallet` in order to be able to associate the
batching functionality with chains
- Defining `BatchCallBuilderConstructor` in order to have a more reliable
way of checking whether an end of a messages pipeline supports batching
or no. `BatchCallBuilderConstructor::new_builder()` returns an
`Option<BatchCallBuilder>`.This is a bit safer because each time a caller
tries to start creating a batch call, it will call `new_builder()` and
will be required to handle the returned `Option`. Before we only had a
bool `BATCH_CALL_SUPPORTED` the caller could have forgetten to check.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
df1aed01c4
Updated db weights and some experiments ( #1732 )
...
* updated weights
* also fix off-by-one in benchmarks
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1b9b134f30
Do not require new headers if lane is empty ( #1725 )
...
* do not require new headers if lane is empty
* handle edge case (need proof-of-delivery-confirmations to be able to submit delivery tx) in required_source_header_at_target
* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
b51da6451d
remove messages pallet owner relay argument ( #1728 )
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
3906131d53
remove BatchDeliveryTransaction::new and BatchConfirmationTransaction::new to avoid expects ( #1726 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
be27bd5e97
Batch transactions in complex relays ( #1669 )
...
* batch transactions in message relay: API prototype
* get rid of Box<dyn BatchTransaction> and actually submit it
* test batch transactions
* message_lane_loop_works_with_batch_transactions
* removed logger
* BatchConfirmationTransaction + BatchDeliveryTransaction
* more prototyping
* fmt
* continue with batch calls
* impl BatchCallBuilder for ()
* BatchDeliveryTransaction impl
* BundledBatchCallBuilder
* proper impl of BundledBatchCallBuilder + use it in RialtoParachain -> Millau
* impl prove_header in OnDemandHeadersRelay
* impl OnDemandParachainsRelay::prove_header (needs extensive tests)
* added a couple of TODOs
* return Result<Option<BatchTx>> when asking for more headers
* prove headers when reauire_* is called && return proper headers from required_header_id
* split parachains::prove_header and test select_headers_to_prove
* more traces and leave TODOs
* use finality stream in SubstrateFinalitySource::prove_block_finality
* prove parachain head at block, selected by headers relay
* const ANCIENT_BLOCK_THRESHOLD
* TODO -> proof
* clippy and spelling
* BatchCallBuilder::build_batch_call() returns Result
* read first proof from two streams
* FailedToFindFinalityProof -> FinalityProofNotFound
* changed select_headers_to_prove to version from PR review
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a732a04ed4
fix pallet names at bridge hubs ( #1722 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
dc989fa674
tests ( #1720 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
52542b11d4
Check origin? ( #1718 )
...
* Check origin?
* Removed ensure_signed
* clippy
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
Svyatoslav Nikolsky
7d55a0ffe2
fix parachains benchmarks ( #1717 )
2024-04-10 10:28:37 +02:00
Serban Iorga
ba75e63fcd
Remove WeightToFee ( #1713 )
...
* Remove WeightToFee
* Remove leftover
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
d63a75697c
Only store header state root (pallet-bridge-parachains) ( #1701 )
...
* store block number ++ state root in parachains pallet
* fixed parachains finality APIs
* (test commit)
* removed test code
* deduplicated code a bit
* removed commented code
* spelling
* Update modules/parachains/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update modules/parachains/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update modules/parachains/src/mock.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* added comment
Co-authored-by: Adrian Catangiu <adrian@parity.io >
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
aeeb53343e
DeliveryConfirmationPayments trait for paying relayer rewards at the source chain ( #1653 )
...
* DeliveryConfirmationPayments
* ref proper PR in TODO
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
b94bd8d46b
fixed benchmarks of relayers pallet ( #1700 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
66dfd2dcae
fix clippy ( #1698 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
3eb24d4515
removed MintReward and added PayLaneRewardFromAccount ( #1693 )
...
* removed MintReward and added PayLaneRewardFromAccount
* clippy
* added issue ref to TODO
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7ab985718a
added version guards to RBH<>WBH GRANDPA finality (and complex) relay ( #1697 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
9c8f8a90e7
removed ESTIMATE_MESSAGE_FEE_METHOD ( #1696 )
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
Binston Sukhael Cardoza
3a8cb23103
Replace const parameters types ( #1691 )
...
* Replace const parameters
* fmt
* missed out Maxlocks
2024-04-10 10:28:37 +02:00
Branislav Kontur
9cea69349f
dry-run mode for init bridge command (#1690 )
...
* `dry-run` mode for init bridge command
* fix clippy
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
b99267764c
fix clippy ( #1668 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
ea98118031
Per-lane rewards in pallet-bridge-relayers ( #1665 )
...
* per-lane rewards in pallet-bridge-relayers
* add lane id to RewardPaid event
* clippy
* fix benchmarks
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c03d99cd09
fix clippy ( #1664 )
2024-04-10 10:28:37 +02:00
Serban Iorga
7b74940539
Add RococoBridgeHub <> WococoBridgeHub full 2 way bridge ( #1663 )
...
* Add RococoBridgeHub <> WococoBridgeHub full 2 way bridge
* Use StorageMapKeyProvider instead of account_info_storage_key()
Avoid duplicating storage_map_final_key()
* clippy + leftovers
2024-04-10 10:28:37 +02:00