Commit Graph

321 Commits

Author SHA1 Message Date
Svyatoslav Nikolsky 690a929cf6 added one more test to parachains finality pallet (#1435) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 5340ee5ab5 Added tracked parachains filter (#1432)
* added trackerd parachains filter + changed some docs

* fix compilation
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 5f2f61ced5 messages bridge between RialtoParachain and Millau (#1218) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 03c2f06a27 Parachains finality relay (#1199) 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 748c265c47 Xcm in Rialto<>Millau bridge (#1379)
* add XCM pallet to Millau runtime

* some progress

* messages are delivered (no fee)

* temp

* flush

* flush

* some progress

* progress

* Trap(42) is dispatched successfully

* fix spelling

* no more manual sending

* parametrize weight credit for tests

* actually charge fees

* enable send-using-messages-pallet to keep our test deployments alive + send valid XCM sometimes

* fix benchmarks build

* fix tests
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky f54bd6c779 Parachains finality pallet (#1068)
* parachains finality

* parachains pallet test

* demo of how to configure GRANDPA pallet instance

* allow instances in parachains pallet

* spellcheck

* TODO + fix

* fmt

* removed invalid storage_keys file

* change all hashers to Blake2_128Concat

* use Twox64Concat for insertion position

* fix build

* fix compilation

* change ParaId and ParaHead types

* TODOs -> TODOs with issues refs
2024-04-10 10:28:37 +02:00
echo f2a8ca1d3e Small opt when prune messages (#1389)
* Small opt when prune messages

* Fix typing error
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky d582061dff Remove support for encoded-call messaging from relay and runtime integration code (#1376)
* remove support for encoded-call messaging

* continue cleanup

* continue cleanup

* continue cleanup

* more cleanpup

* more cleanup

* fmt

* continue cleanup

* spellcheck

* rename

* fix benchmarks

* mention encoded-calls-messaging tag

* fixing deployments

* fix messages generation

* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c538a39816 Switch to gav-xcm-v3 branch to be able to test bridges + XCMv3 integration (#1378)
* switch to gav-xcm-v3 branch (wip)

* add comment

* play with CI

* keep playing with CI

* play with CI

* trigger CI

* Revert "trigger CI"

This reverts commit fc35ac648fe6a3ea8e710a2e07dfee7d8762c6c4.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 8859a313cc Revert "add api data() for inbound_lane (#1373)" (#1375)
This reverts commit 9e3cb0c7615a8f06bd32b2f0fcc99a8cc481cd80.
2024-04-10 10:28:37 +02:00
xiaoch05 6a4144e8f2 add api data() for inbound_lane (#1373) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky eb1e48edba pub use WeightInfo in Grandpa + Messsages pallets (#1370) 2024-04-10 10:28:37 +02:00
Adrian Catangiu d04b018630 Few typos and clippy fixes (#1362)
* fix typos

* clippy fixes
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 ed2a3082ef Support dedicated lanes for pallets (#962)
* pass call origin to the message verifier

* is_outbound_lane_enabled -> is_message_accepted

* trait SenderOrigin

* only accept messages from token swap pallet to token swap lane

* tests for edge cases of pay_delivery_and_dispatch_fee

* fixed origin verification

* fmt

* fix benchmarks compilation

* fix TODO with None account and non-zero message fee (already covered by tests)

* revert cargo fmt changes temporarily
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 097a28418b Add some tests to check integrity of chain constants + bridge configuration (#1316)
* add some tests to check integrity of chain constants + bridge configuration

* try to use named parameters where possible
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky a39c567274 Endow relayer account at target chain in message benchmarks (#1310)
* endow relayer account at target chain in message benchmarks

* pick another line
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 43d2e4967b fix benchmarks before using it in Polkadot/Kusama/Rococo runtimes (#1309) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky ea2d6f898d Bump Substrate/Polkadot/Cumulus refs (#1295)
Substrate: 31d90c202d6df9ce3837ee55587b604619a912ba
Polkadot: 60df3c55c711c2872872d6220f98b2611340e051
Cumulus: a9630551c2
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 25008a5166 when messages pallet is halted, relay shall not submit messages delivery/confirmation transactions (#1289) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 0fa8c02e7a when GRANDPA pallet is halted, relay shall not submit finality transactions (#1288) 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 fd816b60e3 move "common" code of messages pallet benchmarks helpers to the common library (#1281) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky a7fa7a491f removed extra messages benchmarks (#1279) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 00f68e7722 Move benchmarks from Rialto to Millau (#1277)
* move brnchmarks from Rialto to Millau

* fix limits test
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 22b1e456ab move storage keys computation to primitivs (#1254) 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
Antonio Dropulic 7b30098a12 update dependencies (#1229) 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
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
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
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 f4a82d4e81 fix/ignore cargo deny issues (#1183) 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 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
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
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 87cbb382d9 Fix/ignore clippy warnings (#1157)
* fix/ignore clippy

* --locked check && test

* RUSTC_WRAPPER="" for clippy-nightly, check-nightly, test-nightly
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 70f87e826c Add rialto-parachain runtime and node (#1142)
* Substrate: 63b32fbaa2764c0a8ee76b70cdfa0fcb59b7181f
Polkadot:  7229ab87acf5bc5d4d10655ad1a9819a1e317442
Cumulus:   d5284b0e78

* rialto parachain runtime

* fixed tests

* add node + bump refs (not compiling yet):
Substrate:           630422d6108cbaaca893ab213dde69f3bdaa1f6b
Polkadot:            7229ab87acf5bc5d4d10655ad1a9819a1e317442
Cumulus:             5af2990cfd
GrandpaBridgeGadget: c152c45ac331eb8ab40d956ab1d008d181810ef4

* fix compilation (collator is not working)

* more fixes

* fmt

* spellcheck

* fix warnings

* fix compilation

* fmt

* trigger CI

* trigger CI

* Revert "trigger CI"

This reverts commit a31f53cec47909817b31a48f3c9f1abd9321f72c.

* benchmarks

* fix benchmarks

* fix again

* Revert "Revert "trigger CI""

This reverts commit 1dea8b42ac8bca830dea982fd2613eb89d607a6c.

* Revert "Revert "Revert "trigger CI"""

This reverts commit 8fb74fa5eba483b7f6a3ce3e25a60757aef4c6bc.

* try fix

* lost lock file

* spellcheck

* try to disable sccache for cargo check

* Revert "Revert "Revert "Revert "trigger CI""""

This reverts commit f157461482d4c1d19156715c4b1ee2acb169531b.

* try to disable again

* disable sccache for test
2024-04-10 10:28:37 +02:00
Tomasz Drwięga eaf519dc1b Rename MessageId -> BridgeMessageId (#1152) 2024-04-10 10:28:37 +02:00