Serban Iorga
5f73a456c5
GRANDPA justifications: equivocation detection primitives ( #2295 ) ( #2297 )
...
* GRANDPA justifications: equivocation detection primitives
- made the justification verification logic more customizable
- added support for parsing multiple justifications and extracting
equivocations
- split the logic into multiple files
- split the errors into multiple enums
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
57550eb867
More backports from Cumulus subtree to polkadot-staging ( #2283 )
...
* more backports from Cumulus subtree
* spelling
* fmt
* trigger CI
* Revert "trigger CI"
This reverts commit b009d732aa26d006a7f2b48878ee864c338c49d5.
* Revert "Revert "trigger CI""
This reverts commit 715606a75948124962b14dbb260cf3aed01bc665.
* Revert "Revert "Revert "trigger CI"""
This reverts commit dc0d2233da86fd12a77216008e59bd38fcbb2fac.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
4d42bb22f3
Update dependecies ( #2277 ) ( #2281 )
...
* cargo update -p parachain-info
* flush
* it compiles
* clippy
* temporary add more logging to cargo deny
* Revert "temporary add more logging to cargo deny"
This reverts commit 20daa88bca6d9a01dbe933579b1d57ae5c3a7bd8.
* list installed Rust binaries before running cargo deny
* changed prev commit
* once again
* try cargo update?
* post-update fixes (nothing important)
2024-04-10 10:28:37 +02:00
Serban Iorga
b4c7ffd3d3
GRANDPA: optimize votes_ancestries when needed ( #2262 ) ( #2264 )
...
* GRANDPA: optimize votes_ancestries when needed
* Address review comments
2024-04-10 10:28:37 +02:00
Serban Iorga
c5f24cb761
Implement RuntimeDebug for GrandpaJustification ( #2254 )
2024-04-10 10:28:37 +02:00
Serban Iorga
fc0aa382ab
Deduplicate Grandpa consensus log reading logic ( #2245 ) ( #2246 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
d327c9e0a8
Fix deps from Cumulus ( #2244 )
...
* Fix deps
* Fix deps
2024-04-10 10:28:37 +02:00
Branislav Kontur
320aea743b
Nits for subtree ( #2241 )
...
* Updated version according to Cumulus
* Renaming
* Cargo.lock
2024-04-10 10:28:37 +02:00
Adrian Catangiu
cc1966ff43
minor doc fix ( #2207 )
2024-04-10 10:28:37 +02:00
Adrian Catangiu
564cc5ead7
expose test utilities to be used in BH paras ( #2142 )
...
Signed-off-by: acatangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Branislav Kontur
4330d0491c
Bump polkadot/substrate ( #2134 )
...
* Bump polkadot/substrate
* Fix millau network service
* Fix polkadot_node_core_pvf_worker
* Fix sc-network
* Fix parachain rpc stuff
* Check `integrity-test` for `bridge-runtime-common`
* Backport fix from cumulus https://github.com/paritytech/cumulus/pull/2585/files#diff-5a942d80670b5ef31bb18b5acacab93ff30512d7cd21c19d7da364f76f6bb5c3 because of https://gitlab.parity.io/parity/mirrors/cumulus/-/jobs/2842938
* TODO
* Bump cumulus
2024-04-10 10:28:37 +02:00
Branislav Kontur
7188765244
BHK/P alignments ( #2115 )
...
* Constants
* Unused import?
* Cargo.lock
* Unused deps
* TODO: fix doc or reimport?
* Try to aviod redefine para_id constant for `RefundableParachainId`
* Checked and removed TODOs
2024-04-10 10:28:37 +02:00
Serban Iorga
d80d2a5039
Cosmetics ( #2124 )
...
* Cosmetics
* Address PR comment
2024-04-10 10:28:37 +02:00
Serban Iorga
56d4013878
Propagate message verification errors ( #2114 )
...
* Propagate message verification errors
* Replace parse_finalized_storage_proof() with storage_proof_checker()
* small fixes
* fix comment
2024-04-10 10:28:37 +02:00
dependabot[bot]
cffc8e3a7b
Bump scale-info from 2.5.0 to 2.6.0
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/commits )
---
updated-dependencies:
- dependency-name: scale-info
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
c17f625770
Add more logs to relayer and message pallets ( #2082 )
...
* add more logs
* unused import
* fmt
2024-04-10 10:28:37 +02:00
Branislav Kontur
f7cc060d9b
Nits ( #2083 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
db53d68e9b
Removed relayer_account: &AccountId from MessageDispatch ( #2080 )
...
* SourceBridgeHubChain/TargetBridgeHubChain replaced with RelayerAccountChain
* Fix
* Removed `relayer_account: &AccountId` from `MessageDispatch`
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
53e1b7e264
Slash relayers for invalid transactions ( #2025 )
...
* slash relayer balance for invalid transactions
* require some gap before unstake is possible
* more clippy
* log priority boost
* add issue ref to TODO
* fix typo
* is_message_delivery_call -> is_receive_messages_proof_call
* moved is_receive_messages_proof_call above
* only slash relayers for priority transactions
* Update primitives/relayers/src/registration.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update primitives/relayers/src/registration.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 >
* Update modules/relayers/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* Update primitives/relayers/src/registration.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io >
* benificiary -> beneficiary
---------
Co-authored-by: Adrian Catangiu <adrian@parity.io >
2024-04-10 10:28:37 +02:00
Serban Iorga
13ecaf1eca
Small simplifications ( #2050 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
512d43fabe
Revert dispatch-results ( #2048 )
...
* Revert "Reintroduce msg dispatch status reporting (#2027 )"
This reverts commit 38bb051e3d778ee2f5e9451f89cf479a71fd68f8.
* post-revert fix
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
bd583d6334
update refs ( #2041 )
2024-04-10 10:28:37 +02:00
Serban Iorga
b8f4086095
Define RangeInclusiveExt ( #2037 )
...
* Define RangeInclusiveExt
* Use RangeInclusiveExt
* Add docs
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
9e48162df2
refund extra weight in receive_messages_delivery_proof call ( #2031 )
2024-04-10 10:28:37 +02:00
Serban Iorga
3b968a2aba
Reintroduce msg dispatch status reporting ( #2027 )
...
* Use an actual Result inside MessageDispatchResult
We need this in order to distinguish between Ok and Err
* Revert #1660
* Fixes + simplifications
* Implement review suggestions
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
f659ebed7a
fail with InsufficientDispatchWeight if dispatch_weight doesn't cover weight of all bundled messages ( #2018 )
2024-04-10 10:28:37 +02:00
dependabot[bot]
1659b4b447
Bump scale-info from 2.4.0 to 2.5.0
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/compare/v2.4.0...v2.5.0 )
---
updated-dependencies:
- dependency-name: scale-info
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]
cf00c67579
Bump hex-literal from 0.3.4 to 0.4.0
...
Bumps [hex-literal](https://github.com/RustCrypto/utils ) from 0.3.4 to 0.4.0.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.4...hex-literal-v0.4.0 )
---
updated-dependencies:
- dependency-name: hex-literal
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
Branislav Kontur
5fbabb3907
Try check-rustdoc pipeline ( #1782 )
...
* Try check-rustdoc pipeline
* another try
* another try without `--all-features`
* fixed cargo doc issues
* exclude relay-rialto-parachain-client from cargo doc
---------
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
2024-04-10 10:28:37 +02:00
Adrian Catangiu
e55d4dd6e0
bump substrate+polkadot refs and fix builds ( #1989 )
...
* bump refs and fix build
* more fixes
* Fix rialto-parachain node
* Update dependencies for tools/runtime-codegen
* Regenerate rialto-parachain indirect runtime
* Fix register_parachain
* Fix clippy
* Undo clippy allow
---------
Co-authored-by: Serban Iorga <serban@parity.io >
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
a75c28d5b2
Remove deprecated code from bridge-runtime-common ( #1983 )
...
* removed FromBridgedChainMessageDispatch in favor of XcmBlobMessageDispatch
* use HaulBlobExporter/HaulBlobExporterAdapter instead of XcmBridge/XcmBridgeAdapter
* tests for sending/dispatching messages
* use new schema in testnet bridges + some cleanup
* clippy
* spelling + added TODO
* cleanup some checks
* benchmarks compilation
* all is XCM
* updated README.md
* ref issue from TODO
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
eccbdff851
remove invalid weight, returned by send_message ( #1984 )
2024-04-10 10:28:37 +02:00
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
dependabot[bot]
8e14f3f9af
Bump finality-grandpa from 0.16.1 to 0.16.2
...
Bumps [finality-grandpa](https://github.com/paritytech/finality-grandpa ) from 0.16.1 to 0.16.2.
- [Release notes](https://github.com/paritytech/finality-grandpa/releases )
- [Commits](https://github.com/paritytech/finality-grandpa/compare/v0.16.1...v0.16.2 )
---
updated-dependencies:
- dependency-name: finality-grandpa
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
dependabot[bot]
7cc62d75b4
Bump trie-db from 0.26.0 to 0.27.1
...
Bumps [trie-db](https://github.com/paritytech/trie ) from 0.26.0 to 0.27.1.
- [Release notes](https://github.com/paritytech/trie/releases )
- [Commits](https://github.com/paritytech/trie/compare/trie-db-v0.26.0...trie-db-v0.27.1 )
---
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
Svyatoslav Nikolsky
62480cf9db
move signed extension stuff from prolkadot-core primitives to bridge-hub-cumulus-primitives ( #1968 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
802e134368
enable relayer rewards metrics at bridge hubs ( #1965 )
2024-04-10 10:28:37 +02:00
Branislav Kontur
874ab44e00
Bump substrate/polkadot/cumulus ( #1962 )
...
* Bump substrate/polkadot/cumulus
* sp_finality_grandpa - >sp_consensus_grandpa
* sp_beefy -> sp_consensus_beefy
* pallet_randomness_collective_flip -> pallet_insecure_randomness_collective_flip
* fix
* Cumulus parachain stuff
* Cumulus parachain stuff one more
* Millau/Rialto runtimes
* Removed pallet_insecure_randomness_collective_flip
* Millau node
* Removed session historial
* TMP: just try disable all fetches
* Docs in gitlab.yml
2024-04-10 10:28:37 +02:00
Serban Iorga
9b44db0fbe
Some error improvements ( #1956 )
...
* Use `HeaderChainError` in parachains module
* Use MessageProofError instead of 'static str in some places
* Avoid implementing Into<'static str> for some errors
We avoid deriving `Debug` for the structs that we use in the runtime and
we derive `RuntimeDebug` instead in order to avoid bloating th eruntime
with static strs. But implementing `Into<'static str>` does the same. So
in some places it makes sense to replace `Into<'static str>` with `Debug`.
* Move the messages error definition
Move the messages error definition outside of `mod target`
2024-04-10 10:28:37 +02:00
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