Commit Graph

102 Commits

Author SHA1 Message Date
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 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 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
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 2bf5b23262 edition = "2021" (#1346) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 814f23584c use DecodeLimit when decoding incoming calls (#1344) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 0ef401ae53 Revert "Revert "override conversion rate in estimate-message-fee RPC (#1189)" (#1275)" (#1333)
This reverts commit ffd25db46c5855bcef6710b53d5ca3325ce54e56.
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 fd816b60e3 move "common" code of messages pallet benchmarks helpers to the common library (#1281) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky eb5a3eecd2 Revert "override conversion rate in estimate-message-fee RPC (#1189)" (#1275)
This reverts commit ad4299f6c91ce4c50cb6fbc739a0c788e2920956.
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
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 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
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
Tomasz Drwięga eaf519dc1b Rename MessageId -> BridgeMessageId (#1152) 2024-04-10 10:28:37 +02:00
Alfredo Garcia 6b3b6516e7 calculate fee using full message payload (#1132) 2024-04-10 10:28:37 +02:00
Xavier Lau 3d4d66456d Code Cleaning (#1124)
* Remove Trailing Space

* Correct Source Chain Name
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky fc9363619a [BREAKING] Migrate messages pallet to frame v2 (#1088)
* get rid of frame_support::traits::Instance usage in messaging

* migrate messages pallet to frame v2

* fix benchmarks

* remove dummy event + add Parameter to metadata

* review

* typo
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 239790fc72 Migrate dispatch pallet to frame v2 (#1089)
* pallet-bridge-dispatch -> frame v2

* fix metadata
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 9e0efdb7ac extract message_details impl into runtime common (#1070) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4e18bff37c enable weight fee adjustent in Rialto/Millau (#1044) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky f5f73537a8 bump dependencies before start referencing polkadot repo (#1048) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 165730a2c2 Rococo <> Wococo messages relay (#1030)
* MessagesInstance -> BridgedMessagesInstance

* Chain::ID -> Bridge::THIS_CHAIN_ID+Bridge::BRIDGED_CHAIN_ID

* FromBridgedChainEncodedMessageCall<B> -> FromBridgedChainEncodedMessageCall<DecodedCall>

* impl Parameter for ()

* copypaste storage_map_final_key to avoid different runtime references/dummy runtimes

* moved dummy runtime from primitives to relay client

* Rococo <> Wococo messages relays

* send R<>W messages using relay

* fmt

* return Result from get_dispatch_info

* fix benchmarks compilation

* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 20b7f341e1 pay dispatch fee at target chain (#911)
* pay dispatch fee at target chain

* refund unspent dispatch weight to messages relayer

* test that transfer actually happens

* pay-at-target-cchain benchmarks + fix previous benchmarks (invalid signature)

* include/exclude pay-dispatch-fee weight from delivery_and_dispatch_fee/delivery tx cost

* remvoe some redundant traces

* enum DispatchFeePayment {}

* typo

* update docs

* (revert removal of valid check)

* Update modules/messages/src/benchmarking.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update modules/messages/src/benchmarking.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update modules/messages/src/benchmarking.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update modules/messages/src/benchmarking.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 0261d1e321 Fix clippy in test code (#993)
* fix clippy issues

* clippy + tests

* more clippy

Co-authored-by: adoerr <0xad@gmx.net>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky ff7f8ad098 pass source and target chain ids to account_ownership_proof (#963) 2024-04-10 10:28:37 +02:00
fewensa 4ccf7a2f5a Move pallet-bridge-dispatch types to primitives (#948)
* message dispatch support multiple instances

* Move pallet-bridge-dispatch types to primitives

* remove pallet-bridge-dispatch dependency

* Update cargo.lock (remove pallet-bridge-dispatch in substrate-relay)

* remove extra dependencies
2024-04-10 10:28:37 +02:00
fewensa 01cede2120 Message dispatch support multiple instances (#942)
* message dispatch support multiple instances

* format code

* define millau grandpa instance in rialto
2024-04-10 10:28:37 +02:00
Hernando Castano 982a50df66 Bump Substrate (#939)
* Bump Substrate to `0856e072`

* Fix compilation errors
2024-04-10 10:28:37 +02:00
Hernando Castano c6ae74725b Bump Substrate (#871)
* Bump Substrate

* Change usage of "Module" to "Pallet"

Related Substrate PR: https://github.com/paritytech/substrate/pull/8372

* Add `OnSetCode` config param

Related Substrate PR: https://github.com/paritytech/substrate/pull/8496

* Update Aura Slot duration time type

Related Substrate PR: https://github.com/paritytech/substrate/pull/8386

* Add `OnSetCode` to mock runtimes

* Add support for multiple justifications

Related Substrate PR: https://github.com/paritytech/substrate/pull/7640

* Use updated justification type in more places

* Make GenesisConfig type non-optional

Related Substrate PR: https://github.com/paritytech/substrate/pull/8275

* Update service to use updated telemetry

Related Substrate PR: https://github.com/paritytech/substrate/pull/8143

* Appease Clippy
2024-04-10 10:28:37 +02:00
Hernando Castano 21baffc832 Update Copyright Date to 2021 (#864)
* Update copyright date to 2021

* Bump date in license header template
2024-04-10 10:28:37 +02:00
Hernando Castano 8d122b03f1 Rename Finality Verifier and Call Dispatch Pallets (#838)
* Rename `pallet-finality-verifier` to `pallet-bridge-grandpa`

* Missed some CamelCase ones

* Update logging target in GRANDPA pallet

* Rename `pallet-bridge-call-dispatch` to `pallet-bridge-dispatch`

* Rename the dispatch pallet folder

* Update logging target in Dispatch pallet

* Missed a couple

* Format the repo

* Stop listing individual pallets in Compose logs

* Use correct pallet name in module doc comments

* Add `pallet-bridge-dispatch` to README project layout

* Sort crate names in TOML files

* Rename `pallet-bridge-grandpa` runtime Call alias
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4105575794 Rename pallet-message-lane into pallet-bridge-messages (#834)
* use runtime:: prefix for message-lane pallet traces

* renamed message-lane (module and primitives) folder into messages

* replace "message lane" with "messages" where appropriate
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 401d3847d1 Add multiplier parameter to transaction_payment function (#830)
* transaction_payment_without_multiplier -> transaction_payment

* tests

* fmt
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 249a8f73ff Make finality verifier pallet instantiable (#825)
* make finality verifier pallet instantiable

* try to fix benchmarks

* fix benchmarks compilation
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 8f11732bb9 Uniform git dependencies (Backport of substrate#2589) (#805)
* Make Substrate deps uniform

* Rest of the deps.

* Fix broken merge.

* Revert substrate.

* Fix tests

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2024-04-10 10:28:37 +02:00
Hernando Castano 51db99ea79 Move Storage Parser from Bridge Pallet (#793)
* Move storage proof checker to runtime primtives

* Add method for parsing storage proofs

* Use finality-verifier pallet in runtime-common

* Get bridge pallet compiling again

* Use storage prover from bp-runtime in a few more places

* Don't leak `std` items from proof helper into `no-std` builds

* Fix benchmarking compilation

* Remove unused import in fuzzer
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 324e083cba Changed delivery and dispatch fee computation methods (#795)
* removed weight <-> fee mess

* updated documentation

Co-authored-by: Hernando Castano <castano.ha@gmail.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4a1a990fa6 Message lane integration documentation (#736)
* how-to-integrate-message-lane-module

* added README stub for bridge-runtime-common

* added README stub for pallet-bridge-call-dispatch

* bridge-runtime-common documentation

* call dispatch module documentation

* some fixes

* more fixes

* more fixes

* more fixes

* more fixes for runtime-common/README.md

* more fixes in call-dispatch/README.md

* more fixes in call-dispatch/README.md

* more fixes in call-dispatch/README.md

* more fixes in message-lane/README.md

* more fixes in message-lane/README.md

* Wrap most text at 100 characters

* Clean up some of the formatting

* Fix broken link

* Stop running CI for README changes

* Don't run any CI steps on documentation changes

Co-authored-by: Hernando Castano <castano.ha@gmail.com>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 7aa51f8d30 Update to latest substrate (#723)
* Bump substrate deps.

* Bump scale.

* Bump ethabi.

* Remove inherent from aura.

* Migrate to construct_runtime

* cargo fmt --all
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky ca91d34059 limit number of pending messages at outbound lane (#715) 2024-04-10 10:28:37 +02:00