Commit Graph

16180 Commits

Author SHA1 Message Date
Svyatoslav Nikolsky 2db84b74cc Polkadot <> Kusama relayers (#1122)
* relay headers between Kusama and Polkadot

* relay messages between Kusama and Polkadot

* complex Kusama <> Polkadot relayer

* expose relayer_fund_account_id from messages pallet

* create relayers fund accounts on Kusama/Polkadot + some more fixes

* fmt

* fix compilation

* compilation + clippy

* compilation

* MAXIMAL_BALANCE_DECREASE_PER_DAY for K<>P header relays

* fmt

* deduplicate tests

* Update modules/messages/src/lib.rs

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

* extract storage_parameter_key function

* other grumbles

* fix

* fmt

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
bear 417903f9e7 Add OnMessageAccepted callback (#1134)
* Add `OnMessageAccepted` config type

* Update actual weight

* Add unit test

* Update weight

* Remove old comment & update wrong test data

* Make ci happy

* Add lane_id param

* update test case

* Make log info more readable

* Use saturating_sub

* Update docs
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 24bd2d6c51 Integrate token swap pallet into Millau runtime (#1099)
* integrate token swap pallet into Millau runtime

* set OnDeliveryConfirmed callback in Millau runtime
2024-04-10 10:28:37 +02:00
Alfredo Garcia 71080f94df Add tests for Raw and BridgeSendMessage enum Call variants (#1125)
* add some missing tests to encode_call

* fix tests
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
Svyatoslav Nikolsky 79143f6ec6 Add parachain pallets to rialto runtime (#1053)
* use BABE to author blocks on Rialto (previously: Aura)

* removed extra script

* use bp_rialto::Moment

* fix tests

* Babe should control session end

* add parachain pallets to Rialto runtime

* add parachain pallets to rialto runtime + add parachains inherent data provider to node

* remove script again

* fmt

* allow unlicensed crates

* spellcheck

* fix compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 74024b028c fix transaction resubmitter limits for Millau -> Rialto transactions (#1135) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 77969c567f add --mandatory-headers-only cli option to complex relay (#1129) 2024-04-10 10:28:37 +02:00
Alexander 7e98cc8f37 Add local CI info to README (#1131) 2024-04-10 10:28:37 +02:00
Chevdor 3295b0c388 chore: spellchecker fixes (#1130) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b9bd14562b set fee for importing mandatory headers to zero (#1127) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 7730e417a8 Increase pause before messages generation start (#1126)
* increase pause before messages generation start

* spelling
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 7369ff9d70 Move some associated types from relay_substrate_client::Chain to bp_runtime::Chain (#1087)
* move some associated types from relay_substrate_client::Chain to bp_runtime::Chain

* dummy commit

* Revert "dummy commit"

This reverts commit 81bc64aa092df115a7c68e7bb7ca5e83ec31fd20.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 1df7076c4f Transactions resubmitter (#1083)
* resubmit transactions: start

* resubmit transactions: continue

* enable resubmitter in deployments

* clippy

* spellcheck

* Update relays/client-substrate/src/chain.rs

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

* fix compilation

* fix compilation

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky d59d442e93 log max balance drop when sending message (#1117) 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
bear 3c4167f11f Format code work (#1116) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 8bb12bc888 fix spelling (#1119) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 6e3b083ab3 Fix spelling (#1118)
* I'm just trying to do my job

* spelling
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky d554639380 added missing constants to Kusama/Polkadot primitives (#1114) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 03a54df398 Fix delivery transaction estimation used by rational relayer (#1109)
* fix delivery transaction estimation in greedy relayer

* fixed typo

* improve logging

* improve logging

* fmt

* fix compilation

* fmt

* Update relays/lib-substrate-relay/src/messages_target.rs

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

* review

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 2101ed9cc5 Remove fund account checks from upgrade. (#1111) 2024-04-10 10:28:37 +02:00
bear e20163c4ea Rename param and update comment (#1108)
* Rename param in `confirm_delivery`

* Fix typo

* Update comment

* Fix review issue
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 88fa487631 Fix spellcheck (#1110)
* fix spellcheck

* invariants
2024-04-10 10:28:37 +02:00
Antonio Dropulic 5c71f0e996 Refactor substrate messages source and substrate messages target (#1105)
* Remove redundant generic parameters from SubstrateMessagesSource

* Remove redundant generic parameters from SubstrateMessagesTarget

* use uniform alias naming

* use aliases instead of fully quallified syntax

* pr feedback
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b5240f3f18 fix compilation (#1107) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 864c830618 Emit mortal transactions from relay (#1073)
* mortal relay transactions

* sign block hash for mortal transactions

* TransactionEraOf

* add explanation

* enable mortal transactions for Westend -> Millau headers relay

* clippy

* spellcheck
2024-04-10 10:28:37 +02:00
Squirrel 8b52cd2593 Remove unused deps (#1102)
* remove unused dev deps

* Removing unused deps
2024-04-10 10:28:37 +02:00
bear ccfc1082f8 Remove unnessary deps (#1101) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 3ef4574594 Stored conversion rate updater (#1005)
* update conversion rate: initial commit

* Rialto=Polkadot && Millau=Kusama + actually update conversion rates

* update deployment scripts and readme

* allow non-zero difference between stored and real rates

* dummy commit

* Revert "dummy commit"

This reverts commit a438198180a8385feeaaca60c9d2da0950465215.

* clippy

* #[allow(clippy::float_cmp)] in conversion rate update

* dummy

* Revert "dummy"

This reverts commit 90cd6e47cda56f655e94dbef76138e6cc58d664a.

* spell

* shared_value_ref() -> get()

* Revert "shared_value_ref() -> get()"

This reverts commit 20aa30de6a59b2099cfba3e9676e71200b7bb468.
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
Ignacio Palacios 8cbdc8244d README fix (#1100) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4dc76030c4 upgrade currency exchange pallet to frame v2 (#1097) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky bd74b0ab24 Add missing docs (#1095)
* added missing docs

* added .cargo to gitignore
2024-04-10 10:28:37 +02:00
fewensa 8cb2633437 Common crate for substrate-relay (#1082)
* lib-substrate-relay

* pass to build

* remove unused file

* clippy && tests

* Changed follow suggestions

* License

* Make changes follow suggested

* docs

* fix fmt
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 1527f515de Update high-level-overview.md (#1093)
Update outdated GRANDPA pallet docs.
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 68eaee1bd4 migrate pallet-shift-session-manager to frame v2 (#1090) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 92b3a69126 migrate eth PoA pallet to frame v2 (#1091) 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
Hector Bulgarini b1db3df199 Bridge/This Chain Ids should be exposed as constants on pallet level. (#1085)
* Adding BridgedChainId constant to message pallet

* Addressing PR feedback
2024-04-10 10:28:37 +02:00
Hector Bulgarini c99fb933ca Change ChainSpec::from_genesis for Rialto and Millau chains to reflect the chain names. (#1079)
* Changing chain_spec of Rialto and Millau chains to retrieve their respective name

* Adding development as well

* Addressing PR feedback

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
2024-04-10 10:28:37 +02:00
Hernando Castano 75df85f52a Make CI happy again (#1086)
* Appease `cargo-spellcheck`

* Increase logging for `cargo-spellcheck`

* Fix config file name
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 82a952c0db fix typo (#1080) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky eba80f42a9 Token-swap-over-bridge pallet (#944)
* token swap pallet

* token swap type (replay protection)

* post-merge fixes

* post-merge fix

* Update modules/token-swap/src/lib.rs

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

* Update modules/token-swap/src/lib.rs

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

* add missing comment part

* Update modules/token-swap/src/lib.rs

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

* starting claim after lock period is over is forbidden

* move spec_version and weight to arguments

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Tomasz Waszczyk f86d101d7c Fix full spellcheck (#1076)
* fix(spellcheck): test of fixing

* fix(hunspell): improved many typos etc.

* fix(hunspell): all errors solved

* fix(hunspell): extended scope of files - the build should fail

* Return error code.

* Fix spelling, sort dictionary.

* fix(hunspell): added fix to gitlabs check

* fix(typo): one typo and test of verification on github

* fix(typo): one typo

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 562fac801d fixed wrong trace (#1075) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 4f7b0d3b19 merge two weight-related loops in messages pallet (#1071) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 712ccbb742 increase_message_fee depends on stored mesage size (#1066) 2024-04-10 10:28:37 +02:00
Guillaume Thiolliere 23ff5db103 companion for https://github.com/paritytech/polkadot/pull/3507 (#1067)
* better test

* fmt

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
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