Commit Graph

16236 Commits

Author SHA1 Message Date
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 13a3974f27 bump rococo version (#1263) 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
Svyatoslav Nikolsky 741484214e override conversion rate in estimate-message-fee RPC (#1189) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 22b1e456ab move storage keys computation to primitivs (#1254) 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 ecd7687701 Add missing RPC APIs to rialto parachain node (#1250)
* add missing RPC APIs to rialto parachain node

* spellcheck
2024-04-10 10:28:37 +02:00
Tomasz Drwięga bbd3f1229a Bump relay version to 1.0.0 (#1249) 2024-04-10 10:28:37 +02:00
Adrian Catangiu 8edc9038d1 runtimes: fix call_size() test (#1245)
Signed-off-by: acatangiu <adrian@parity.io>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b84d0e4028 Use same endowed accounts set on dev/local chains (#1244)
* use same accounts set on dev/local chains

* run altruistic relayers in local demo scripts
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 90f2b3c365 post-merge build fix (#1243) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky cc6320c3f9 Fix transactions mortality (#1196)
* added lost stall timeout fix

* use best_block.parent() to start mortal tx era

* fmt

* Revert "revert messages transactions mortality"

This reverts commit 77776357dafdfa80dcb3ec307d76fcfd0d5195bb.
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
Svyatoslav Nikolsky f84590817b Update Rococo/Wococo version + prepare relay for Rococo<>Wococo bridge (#1241)
* update Rococo version + create relayers fund account

* start finality relay guards when complex relay is started
2024-04-10 10:28:37 +02:00
Tomasz Drwięga e69e94d4f9 Enable offchain indexing for Rialto/Millau nodes (#1239)
* Enable off-chain indexing for Rialto & Millau nodes

* cargo fmt --all

* cargo +nightly fmt --all

* fmt is weird.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky edd1724957 Fix storage parameter name computation (#1238)
* fixed storage_parameter_key

* added test for storage_parameter_key
2024-04-10 10:28:37 +02:00
Adrian Catangiu 1fb70c7ed7 Integrate BEEFY with Rialto & Millau runtimes (#1227)
* Add Beefy pallet to Rialto runtime

* Add Beefy gadget to Rialto node

* Add MMR pallet to Rialto runtime

* Add Beefy pallet to Millau runtime

* Add Beefy gadget to Millau node

* Add MMR pallet to Millau runtime

* Add pallet_beefy_mmr to Millau runtime

* Add pallet_beefy_mmr to Rialto runtime

* Implement MMR and BEEFY APIs in Rialto

* fix unit tests

- should_encode_bridge_send_message_call() tests for new
  runtime encoding resulted from newly added pallets.
- runtime size_of::<Call>() slightly increased from newly
  added pallets.

* fix grumbles

* tighten clippy allowances

* fix more grumbles

* Add MMR RPC to Rialto and Millau nodes

Also implement MmrApi in Millau runtime.

* rialto: use upstream polkadot_client::RuntimeApiCollection
2024-04-10 10:28:37 +02:00
Antonio Dropulic 7b30098a12 update dependencies (#1229) 2024-04-10 10:28:37 +02:00
fewensa 26c5a35d7a Add mut support (#1232) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 5beeb9b4d6 fixed set_operational in GRANDPA pallet (#1226) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky bbf8b51f9c Unify metric names (#1209)
* unify metric names

* refactor standalone metrics

* headers sync metrics

* post-merge fix

* fix compilation

* fmt

* fix dashboards

* fix local dashboards

* update Rococo/Wococo runtime version

* remove commented code

* fixed grumbles

* fmt

* fixed widget names
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 940d7e463b remove abandoned exchange relay (#1217) 2024-04-10 10:28:37 +02:00
Adrian Catangiu 2a6b065a91 Remove unused relays/headers (#1216)
* Decouple `relays/client-substrate` from `headers_relay`
* Remove `blocks_in_state` from `SyncLoopMetrics`
    This metric was only relevant for PoA <> Substrate bridge.
* Move `sync_loop_metrics.rs` to `relays/finality`
* Remove unused `SyncLoopMetrics::update()`
* Hook up SyncLoopMetrics to finality_loop
* Delete now unused `relays/headers`

Signed-off-by: acatangiu <adrian@parity.io>
2024-04-10 10:28:37 +02:00
Adrian Catangiu 57f3f36cb1 Remove unused PoA<>Substrate bridge (#1210)
* Decouple the PoA bridge code from Rialto
* Remove Rialto PoA bridge code
* Remove relays/bin-ethereum code
* Remove relays/client-ethereum code
* Remove modules/ethereum code
* Remove modules/ethereum-contract-builtin code
* Remove PoA bridge documentation
* Remove primitives/ethereum-poa code
* Decouple Rialto from currency-exchange
* Fix building with runtime-benchmarks
* Fix should_encode_bridge_send_message_call test
    Because we removed some runtime modules/pallets, the
    substrate2substrate bridge pallet has a different index within
    the runtime so its calls have a different encoding.
    Update the test to use the new encoding.
* Update readme - no more PoA bridge
* Remove deployments/bridges/poa-rialto
    Also removes:
    - deployments/networks/eth-poa.yml
    - deployments/networks/OpenEthereum.Dockerfile
* Remove deployments/dev/poa-config
* Update deployments readme - no more PoA bridge
* Remove eth-related scripts
    Deletes:
    - deployments/networks/eth-poa.yml
    - scripts/run-openethereum-node.sh
* Remove poa-relay from gitlab-ci
* Dockerfiles to use substrate-relay as default
* Remove modules/currency-exchange code
* Remove primitives/currency-exchange code

Signed-off-by: acatangiu <adrian@parity.io>
2024-04-10 10:28:37 +02:00
fewensa 2d05583b15 Add AtLeast32BitUnsigned for MessageLance::SourceChainBalance (#1207) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 07b9686e52 add missing license header (#1204) 2024-04-10 10:28:37 +02:00
fewensa 19201175e6 Custom relay strategy (#1198)
* Add relayer strategy

* Add default relayer strategy

* default relayer strategy

* expose relayer strategy

* fix compile

* fix compile

* docs

* Rename Relayer to Relay, keep RelayerDecide

* split `DefaultRelayerStrategy` into `AltruisticRelayerStrategy` and `RationalRelayerStrategy`

* Remove relayer mode

* Remove unused import

* Rename `RelayerStrategy` to `RelayStrategy`

* Add missing docs

* clippy

* clippy

* clippy

* clippy

* Revert `relayer_mode` and add `MixStrategy`

* Add `EnforcementStrategy`

* fix bug and simplify relay strategy

* Update message_lane_loop.rs

* Update messages_target.rs

* clippy

* clippy

* clippy

* clippy

* clippy

* clippy

* clippy

* fix test

* fix test

* test

test

test

fix test
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c2b38ba530 fix clippy things (#1200) 2024-04-10 10:28:37 +02:00
bear 48121604cd Expose some const value and type (#1186)
* change const value visable

* Add docs

* Update docs

* Update docs 2

* Fix ci

* Fix spell check
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 1ef41a59be Message transactions mortality (#1191)
* transactions mortality in message and complex relays

* logging + enable in test deployments

* spellcheck

* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky e23266c7e6 Bump dependencies (#1180)
* substrate: d0f6c1c60da22e04dd25c2eca46ebfe6f1571af0
polkadot: dd4b2e6a34a08a01b876d14641e99e7011be3463
cumulus: 9379cd6c18

* fmt

* fixed lost refs

* spelling

* benckhmarks

* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 6396239e18 cargo +nightly fmt --all (#1192) 2024-04-10 10:28:37 +02:00
Vladislav 5842968273 Unify error enums in substrate and ethereum clients with thiserror (#1094)
* Unify error enums in substrate and ethereum clients with `thiserror`

Related to https://github.com/paritytech/parity-bridges-common/issues/857

* Add license pre-amble

* rustfmt

* Fix spelling
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 7b4f1c2236 Limit max call size of Rialto/Millau runtimes (#1187)
* max call size <= 230 bytes

* fix benchmarks
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b60df0849c replace collective flip with babe randomness in Rialto (#1188)
* replace collective flip with babe randomness in Rialto

* fmt

* fix test
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky f4a82d4e81 fix/ignore cargo deny issues (#1183) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 44a6416ffc additional log in finality relay + rephrase "failed" (#1182) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 2c608cbb29 Resubmit transactions strategy for Polkadot/Kusama (#1175)
* resubmit strategy for Polkadot/Kusama

* spellcheck

* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky e5b5679592 fix checks order when registering parachain (#1177) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky a635048b8a Register-parachain subcommand of substrate-relay (#1170)
* register parachain relay subcommand

* revert cargo patch

* added basic test

* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4b525f4fe1 Token swap pallet benchmarks (#1174)
* token swap benchmarks

* spellcheck
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c0df990b90 copypasted -> copied (#1168) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 772b52e479 fix spelling (#1167) 2024-04-10 10:28:37 +02:00
David f3eefc9df9 Upgrade jsonrpsee to v0.3 (#1051)
* Upgrade `jsonrpsee` to v0.3

* whitespace

* fmt

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
2024-04-10 10:28:37 +02:00
Alfredo Garcia 84258f5d8c add some basic tests for swap tokens (#1164) 2024-04-10 10:28:37 +02:00
bear f2092515a0 Move calculation relayer reward into MessageDeliveryAndDispatchPayment (#1153)
* Refactor logic

* Thanks svyatonik help, it compile

* Fix failed unit test

* Remove compile warning

* Rename

* Return result in pay_relayers_rewards

* Fix runtime compile issue

* Use MessageNonce

* Fix review issue

* Missing u64 replacement

* Revert return type changes

* Fix merge issue

* Remove useless clone
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 75a1baac03 fix clippy warning (#1163) 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