Svyatoslav Nikolsky
9b57f2181c
Kusama <> Polkadot relay prototype ( #1982 )
...
* moved bridge declarations to dedicated folder
* Kusama <> Polkadot bridges declaration
* support for Kusama <> Polkadot bridge in CLI
* update dictionary
2024-04-10 10:28:37 +02:00
Serban Iorga
f5fee288b9
Relayers pallet: extend payment source id ( #1907 )
...
* Add Chain::ID const
* Relayers pallet: extend payment source id
* Addressed code review comments
* Fix benchmarks
* Fix dashboards
* Renamings
* Fix compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
26330d9a25
get rid of ChainWithMessages::WeightInfo, because we can't have exact weights for "external chains" ( #1899 )
2024-04-10 10:28:37 +02:00
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
d7b131646c
Relayer reward metric ( #1742 )
...
* use StorageDoubleMapKeyProvider in RelayerRewards
* add metrics
* clippy
* fixed alerts that have caused missing dashboards
* fix metric name
* fix metric name again
* add new metrics to the RialtoParachain <> Millau maintenance dashboard
* remove obsolete dashboard
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
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
ba75e63fcd
Remove WeightToFee ( #1713 )
...
* Remove WeightToFee
* Remove leftover
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
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
a979340e49
refactor transaction sign scheme ( #1621 )
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
Svyatoslav Nikolsky
5ff36549f1
remove unnecessary consts ( #1586 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f35b4f4897
Extract unsigned tx from the SignParam structure ( #1561 )
...
* change sign_transaction method
* clippy
* rustup update && clippy
* remove redudnant clone
2024-04-10 10:28:37 +02:00
Branislav Kontur
effe0f11c8
Unnecessery clones + removed unused Enum value ( #1557 )
...
* Unnecessary clone
* Removed unused Enum value
* Client - ConnectionParams wrapped with Arc + removed unnecessery clone
* Client - ConnectionParams wrapped with Arc + removed unnecessery clone
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
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
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
Svyatoslav Nikolsky
53780cfd1a
remove duplicate parachain heads exension ( #1444 )
...
* remove duplicate parachain heads exension
* fix benchmarks compilation
* actually fix it
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
db2bc11476
CheckBridgedBlockNumber -> BridgeRejectObsoleteGrandpaHeader ( #1442 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f0d05de080
Get dispatch weight from the target chain (when DispatchFeePayment::AtTargetChain is used) ( #1430 )
...
* reintroduce From<SourceChain>InboundLaneApi
* impl From<Chain>InboundLaneApi for testnet runtimes
* use inboundlaneapi in relay
* remove unused OutboundXcmWeigher
* spelling
* added the only test to messages pallet
* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7a92b40eab
Fix clippy warnings + try to enable proper (no-warning) clippy on CI ( #1410 )
...
* fix clippy warnings
* try to reenable proper clippy on CI
* fix clippy error
* more Eqs
* ignore clippy::derive-partial-eq-without-eq - clippy seems to be broken now :/
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f64357e7e8
CheckBridgedBlockNumber signed extension to reject duplicate header-submit transactions ( #1352 )
...
* CheckBridgedBlockNumber signed extension to reject duplicate header submit transactions
* fix depends_on
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
133934df7c
fix parse_transaction on Rialto+Millau ( #1360 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
65c2c0ccce
Update Substrate/Polkadot/Cumulus references ( #1353 )
...
* cumulus: 4e95228291
polkadot: 975e780ae0d988dc033f400ba822d14b326ee5b9
substrate: 89fcb3e4f62d221d4e161a437768e77d6265889e
* fix refs
* sync changes from https://github.com/paritytech/polkadot/pull/3828
* sync changes from https://github.com/paritytech/polkadot/pull/4387
* sync changes from https://github.com/paritytech/polkadot/pull/3940
* sync with changes from https://github.com/paritytech/polkadot/pull/4493
* sync with changes from https://github.com/paritytech/polkadot/pull/4958
* sync with changes from https://github.com/paritytech/polkadot/pull/3889
* sync with changes from https://github.com/paritytech/polkadot/pull/5033
* sync with changes from https://github.com/paritytech/polkadot/pull/5065
* compilation fixes
* fixed prometheus endpoint startup (it now requires to be spawned within tokio context)
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f95456d4ea
replace From<>InboundLaneApi with direct storage reads ( #1348 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
2bf5b23262
edition = "2021" ( #1346 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
efa3e97210
Encode and estimate Rococo/Wococo/Kusama/Polkadot messages ( #1322 )
...
* encode and estimate Rococo/Wococo/Kusama/Polkadot messages
* allow send-message for non-bundled chains
* weight -> dispatch-weight
* fmt
* fix spelling
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1d99ad3619
replace latest_confirmed_nonce runtime APIs with direct storage reads ( #1282 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a88207876c
Replace InboundLaneApi::latest_received_nonce with direct storage read ( #1269 )
...
* remove inbound_latest_received_nonce
* Update relays/lib-substrate-relay/src/messages_target.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
bb249eff15
verify that GRANDPA pallet is not initialized before submitting initialization transaction ( #1267 )
...
* verify that GRANDPA pallet is not initialized before submitting initialization transaction
* spelling
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
988f6b1664
remove OutboundLaneApi::latest_received_nonce ( #1262 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
c21217a282
read latest_generated_nonce directly from storage ( #1260 )
2024-04-10 10:28:37 +02:00
fewensa
3aff81a707
Change submit transaction spec_version and transaction_version query from chain ( #1248 )
...
* The `spec_version` and `transaction_version` query from chain
* fix compile
* Lint
* Custom spec_version and transaction_version
* runtime version params struct opt
* runtime version cli
* cli params
* Add missing types defined
* fix compile
* debug cli
* clippy
* clippy
* Query spec_version and transaction_version same times
* Fix vars
* Wrap option
* Wrap option
* Try fix ci
* Change follow suggestions
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4cdd959057
Refactor message relay helpers ( #1234 )
...
* refactor message relay helpers
* single standalone_metrics function
* fixed tests
* clippy + fmt
* removed commented code
* add calls tracing
* fix spelling
* cargo fmt
* -commented code
* fix build again
* post-merge build fix
* clippy + fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e675b13042
Refactor finality relay helpers ( #1220 )
...
* refactor finality relay helper definitions
* add missing doc
* removed commented code
* fmt
* disable rustfmt for macro
* move best_finalized method const to relay chain def
2024-04-10 10:28:37 +02:00
hacpy
bd70de8b8b
Match substrate's fmt ( #1148 )
...
* Alter gitlab.
* Use substrate's rustfmt.toml
* cargo +nightly fmt --all
* Fix spellcheck.
* cargo +nightly fmt --all
* format.
* Fix spellcheck and fmt
* fmt?
* Fix spellcheck
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
7369ff9d70
Move some associated types from relay_substrate_client::Chain to bp_runtime::Chain ( #1087 )
...
* move some associated types from relay_substrate_client::Chain to bp_runtime::Chain
* dummy commit
* Revert "dummy commit"
This reverts commit 81bc64aa092df115a7c68e7bb7ca5e83ec31fd20.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
1df7076c4f
Transactions resubmitter ( #1083 )
...
* resubmit transactions: start
* resubmit transactions: continue
* enable resubmitter in deployments
* clippy
* spellcheck
* Update relays/client-substrate/src/chain.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* fix compilation
* fix compilation
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
03a54df398
Fix delivery transaction estimation used by rational relayer ( #1109 )
...
* fix delivery transaction estimation in greedy relayer
* fixed typo
* improve logging
* improve logging
* fmt
* fix compilation
* fmt
* Update relays/lib-substrate-relay/src/messages_target.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
864c830618
Emit mortal transactions from relay ( #1073 )
...
* mortal relay transactions
* sign block hash for mortal transactions
* TransactionEraOf
* add explanation
* enable mortal transactions for Westend -> Millau headers relay
* clippy
* spellcheck
2024-04-10 10:28:37 +02:00
Squirrel
8b52cd2593
Remove unused deps ( #1102 )
...
* remove unused dev deps
* Removing unused deps
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f5f73537a8
bump dependencies before start referencing polkadot repo ( #1048 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
db0216dabb
estimate transaction fee ( #1015 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4a47452c20
Move ChainWithBalances::NativeBalance -> Chain::Balance ( #990 )
...
* move ChainWithBalances::NativeBalance -> Chain::Balance
* dummy commit
* Revert "dummy commit"
This reverts commit c00642153d260685a91d4fffbc424d225741fceb.
2024-04-10 10:28:37 +02:00
Hernando Castano
2f1c4c23fc
Remove Substrate Pallet ( #866 )
...
* Remove `pallet-substrate-bridge`
* Fix transfer call encoding test
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Hernando Castano
21baffc832
Update Copyright Date to 2021 ( #864 )
...
* Update copyright date to 2021
* Bump date in license header template
2024-04-10 10:28:37 +02:00