Commit Graph

362 Commits

Author SHA1 Message Date
dependabot[bot] 9c9952f6f6 Bump fixed-hash from 0.7.0 to 0.8.0
Bumps [fixed-hash](https://github.com/paritytech/parity-common) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/paritytech/parity-common/releases)
- [Commits](https://github.com/paritytech/parity-common/compare/fixed-hash-v0.7.0...fixed-hash-v0.8.0)

---
updated-dependencies:
- dependency-name: fixed-hash
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-10 10:28:37 +02:00
dependabot[bot] ffa1b8f6c5 Bump impl-serde from 0.3.2 to 0.4.0
Bumps [impl-serde](https://github.com/paritytech/parity-common) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/paritytech/parity-common/releases)
- [Commits](https://github.com/paritytech/parity-common/compare/impl-serde-v0.3.2...impl-serde-v0.4.0)

---
updated-dependencies:
- dependency-name: impl-serde
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
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 9465ef6071 Expose EXTRA_STORAGE_PROOF_SIZE in bp-bridge-hub-cumulus (#1788)
We need this for the integrity tests in cumulus.
2024-04-10 10:28:37 +02:00
Branislav Kontur 51fc5f6708 Removed unecesserry test + substrate/polkadot (#1787)
* just update polkadot version

* Removed unecesserry test + substrate/polkadot
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
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 8a4f984a7a Define separate signed extension for BHR/BHW (#1776)
- Make signed extensions for indirect runtimes more extensible
- Define separate signed extension for BHR/BHW
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 8494162d2a update Substrate/Polkadot/Cumulus deps to master (#1775) 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
Svyatoslav Nikolsky c81afc3e93 increase MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX and MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX for RBH/WBH (#1765)
* increase MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX and MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX for RBH/WBH

* moved MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX and MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX to cumulus bridge primitives

* typo
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 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
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 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
Svyatoslav Nikolsky 03425b33ae Use TypedLaneId instead of LaneId (#1738)
* TypedLaneId -> LaneId

* fix benchmarks compilation
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
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 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 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 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
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 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
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
Branislav Kontur 786db04bbc Fixes fo ro/wo bridge (#1661) 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 59b36b43bf Utility to generate hex bytes for send-message command (#1658) 2024-04-10 10:28:37 +02:00
Serban Iorga 1f9110a065 Add BEEFY finality pallet with basic functionality (#1606)
* pallet-bridge-beefy: initial commit
2024-04-10 10:28:37 +02:00
Branislav Kontur b3ab4a1b6a Added event MessagesReceived for better visibility on receiving side (#1655)
* Added event `MessagesReceived` for better visibility on receiving side

* Fixes/comments from PR

* Final cleanup
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 8e660dd74e Remove callbacks from the messages pallet (#1649)
* remove callbacks

* clippy

* fmt
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
Branislav Kontur 1217b2cf80 Small fix after rebase (#1644) 2024-04-10 10:28:37 +02:00
Branislav Kontur 6c4728f1cc Rococo/Wococo bridge hub relay integration (#1565)
* [BridgeHub] Added bridge-hub-rococo/wococo clients with bridge-hub-rococo-runtime

* [BridgeHub] Add init-bridge stuff for bridge-hub-rococo/wococo

* [BridgeHub] Add init-bridge stuff for bridge-hub-rococo/wococo

* [BridgeHub] Fixed Call-encoding for init-bridge rococo runtime wrapper

* Final index update to runtime calls

* [BridgeHub] Add init-bridge stuff for bridge-hub-rococo/wococo (otherside)

* Added runtime best_finalized functions + relay-headers init

* Renaming and change BridgeHubRococo/Wococo to Rococo/Wococo config

* [BridgeHub] Add relay-parachains (Rococo/Wococo)

* Missing stuff for adding xcm messaging to BridgeHub

* extracted parachain IDs to the primitives

* fix compilation

* Fixes

* Init setup for Rococo->Wococo messaging support

* Removed unused AccountId from `trait MessagesBridge`

* Removed unused trait SenderOrigin

* Small fixes

* Cleaning after master-merge

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes:
- align WeightToFee with BridgeHubRococo runtime
- MAX_HEADER_SIZE
- updated TODOs

* Added relay_messages cfg for BridgeHubWococo -> BridgeHubRococo

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
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
Svyatoslav Nikolsky 3e00c5c022 Statemine primitives (#1625)
* Statemine primitives

* ref issue in TODO

* fix TODO
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
Serban Iorga 01538bc5fa Finality loop: get block justification and authorities change by consensus engine ID (#1619)
* SignedBlock: get justification by consensus engine id

* Define ConsensusLogReader

Making the check for authority changes more generic

* cod review changes
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
Branislav Kontur 829b23c7cf Removed unused trait SenderOrigin (#1611) 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 9e1847d12a Fix new nightly clippy issues (#1604)
* clipy

* revert some fixes that newest clippy reports as issues, but older does not
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 6c26aae035 increase max header size of Rialto and Millau (512 -> 1024) (#1603) 2024-04-10 10:28:37 +02:00