Commit Graph

385 Commits

Author SHA1 Message Date
Svyatoslav Nikolsky 3a145e5844 get rid of obsolete weight functions (#1926) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky aa466a485d Fix benchmarks (#1919)
* fixed benchmarks broken by rejecting storage proofs with excessive trie nodes and justifications with extra prevotes

* update weights

* fmt

* accidental paste

* revert changes to millau runtime (separate PR)

* revert comment change
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky e7f5560951 Fix multiple parachain headers submission for single message delivery (#1916)
* switch off parachains relay when we don't need to relay parachains (temp solution)

* parachains relay now only works with single parachain

* fix usages of parachains relay

* revert hacky fix

* fixes

* fixed Westmint parachain ID

* fixed metrics

* fixed compilation

* fmt

* clippy

* call -> typed_state_call
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
dependabot[bot] 822c82c26f Bump trie-db from 0.25.1 to 0.26.0
Bumps [trie-db](https://github.com/paritytech/trie) from 0.25.1 to 0.26.0.
- [Release notes](https://github.com/paritytech/trie/releases)
- [Commits](https://github.com/paritytech/trie/compare/trie-db-v0.25.1...trie-db-v0.26.0)

---
updated-dependencies:
- dependency-name: trie-db
  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
Serban Iorga e7debc4b09 Fix init-bridge (#1900) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 498a3e83d0 Weight+size limits for bridge GRANDPA pallet calls (#1882)
* weight+size limits for bridge GRANDPA pallet calls

* continue

* fixed all tests

* some changes to refund computations

* post_dispatch_refunds_relayer_in_all_finality_batch_with_extra_weight

* - dup code

* do not return Pays::No if call is above weight/size limits

* relayer_pays_tx_fee_when_submitting_huge_mandatory_header and relayer_pays_tx_fee_when_submitting_justification_with_long_ancestry_votes

* clippy

* fmt

* clippy

* small change in docs

* fixed GRANDPA-limits constants for Polkadot-like chains

* clippy

* clippy + spelling

* Update primitives/polkadot-core/src/lib.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>

* reverted unnecessary change

* GrandpaJustification::max_reasonable_size

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
2024-04-10 10:28:37 +02:00
Branislav Kontur 1aa6da448f Rewards refund for relaying BridgeHubRococo/BridgeHubWococo (#1894)
* Rewards refund for relaying BridgeHubRococo/BridgeHubWococo

* spellcheck + clippy

* RefundBridgedParachainMessages move to bp-runtime

* Dedicated RewardingBridgeSignedExtra for Rococo/Wococo shared runtime with two instances of `RefundBridgedParachainMessages`

* RefundBridgedParachainMessages with Tuple support for multiple

* Fix additional_signed

* revert fix

* Refactor to `RefundBridgedParachainMessagesSchema`

* removed unused deps
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 1d6e8a9a26 optimize justification before submit (#1887)
* optimize justification before submit

* fmt

* spelling

* clippy

* fmt again

* aaand compilation

* clippy
2024-04-10 10:28:37 +02:00
dependabot[bot] 7ad112e2c9 Bump trie-db from 0.25.0 to 0.25.1
Bumps [trie-db](https://github.com/paritytech/trie) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/paritytech/trie/releases)
- [Commits](https://github.com/paritytech/trie/compare/trie-db-v0.25.0...trie-db-v0.25.1)

---
updated-dependencies:
- dependency-name: trie-db
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
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 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 4982d1c2e5 MaxValues for maps in parachain maps (#1868)
* MaxValues for maps in parachain maps

* fix compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky a5a3f8065f fixed TODOs for weights v2 (#1860) 2024-04-10 10:28:37 +02:00
Serban Iorga 5c40f9e5f1 Use parity-util-mem 0.12.0 (#1856) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 411150b7be Decrease number of GRANDPA authorities in Polkadot-like chains from 100_000 to 2_048 (#1852)
* decrease number of GRANDPA authorities in Polkadot-like chains from 100_000 to 2048

* spelling
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky a091b8405e Update Substrate/Polkadot/Cumulus dependencies + weights v2 (#1850)
* cargo update

* weights v2

* clippy

* no spellcheck for weights.rs

* fix proof_size component in MAXIMUM_BLOCK_WEIGHT  constants

* "fix" proof_size in select_delivery_transaction_limits_works

* spellcheck
2024-04-10 10:28:37 +02:00
dependabot[bot] 93e65f553e Bump trie-db from 0.24.0 to 0.25.0
Bumps [trie-db](https://github.com/paritytech/trie) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/paritytech/trie/releases)
- [Commits](https://github.com/paritytech/trie/commits/trie-db-v0.25.0)

---
updated-dependencies:
- dependency-name: trie-db
  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
Serban Iorga b2832575f6 Add tool for auto generating runtime code from metadata (#1812)
* Create CLI tool for generating indirect runtimes code

* Use the generated runtime for rialto parachain

* Avoid autogenerated files when executing cargo spellcheck

* Fix clippy warning
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 7370222802 fix bridge hubs blocks interval (#1836) 2024-04-10 10:28:37 +02:00
Serban Iorga 5d875d05d3 Use named parameters for indirect calls (#1823) 2024-04-10 10:28:37 +02:00
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