Commit Graph

37 Commits

Author SHA1 Message Date
Tomasz Drwięga acb872fbb0 Flatten back the structure (#837)
* Remove chains.

* Move relay clients.

* Flatten generic.

* Fix fmt.
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
Tomasz Drwięga 84cd93f936 Add Westend & Rococo primitives (#808)
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
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
Tomasz Drwięga 903018db3d Add Transaction Payment Custom RPC (#806)
* Transaction payment RPC.

* Add payment RuntimeApi to fix the build.

* cargo fmt --all
2024-04-10 10:28:37 +02:00
Hernando Castano f1553e3de9 Update Substrate Node build script (#786)
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga c3d651d29a Add inspect command to take a look at extrinsics. (#762)
* Add inspect command to take a look at extrinsics.

* cargo fmt --all

* New weight for on-chain remark in tests

* Minor style tweaks.

Co-authored-by: adoerr <0xad@gmx.net>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 82739314a8 Bump substrate in subtree import preparation. (#759) 2024-04-10 10:28:37 +02:00
Tomasz Drwięga 441c95ba2b Set weird substrate global state for custom SS58 prefixes (#754)
* Issue with SS58 decoding.

* Switch to test branch.

* Fix set.

* Revert "Switch to test branch."

This reverts commit d79e42ea9bc780edb20296dae546d534f1916fc7.

* cargo fmt --all

Co-authored-by: adoerr <0xad@gmx.net>
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
Hernando Castano ac1d12e607 Bump Substrate Dependency (#684)
* Bump Substrate to commit `0b0d124d5`

* Get Millau node compiling

* Get Rialto node compiling

* Increase account reference count before test

* Fix Clippy warnings for Millau node

* Fix Clippy warnings for Rialto node

* Trigger build.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Hernando Castano e4f195d14c Make Account Derivation More Unique (#686)
* Use more unique prefix when generating account IDs

* Update derived addresses used in tests

* Make `account` prefix more unique

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

* Update test account IDs again

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 0f56f18778 Use real weights to compute message delivery and dispatch fee (#598)
* message fee formula

* update GetDelvieryConfirmationTransactionFee

* include cost of transactions (i.e. not only dispatch cost) in delivery_and_dispatch_fee

* endow relayers fund account

* include db ops weight in max tx weight estimation

* (in bytes)

Co-authored-by: Hernando Castano <castano.ha@gmail.com>
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 58fbd8cb49 Bump substrate & deps (#637) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 0624fd0d94 Update Substrate reference (#604) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 595481f02e Enable Wasmtime and Remove secp256k1 (#593)
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b45d65f330 Fix grandpa initialization (#583)
* fix grandpa initialization

* fnt
2024-04-10 10:28:37 +02:00
Hernando Castano f26775d690 Rialto to Millau Transfer Generator (#568)
* Add option to relay for sending transfers to Millau chain

* Endow derived accounts on Millau chain

* Update message generator entrypoint script to send transfers

* Use correct command when sending messages

* Send Root messages from Root origin on source chain

* Wrap calls from Root Origin in Sudo Call

* Allow Root to send messages without paying fees

* Use correct variable when sending messages to Rialto

* Print warning if no message type is provided to script.

* Add note mentioning that certain source origins aren't supported yet

* Use correct runtime when initializing header sync

* Remove option to send messages as Root

* Remove endowment of derived Root accounts

* Fix indentation.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Hernando Castano ee655b1057 Update Substrate Dependency (#566)
* Update `sp-io` dependency

* Rename Trait to Config

* RustFmt

* Bump `sp-io` again

* Use new frame_system weight types in Rialto and Millau runtimes

* Update test Runtimes to use new weight types

* Bump `sp-io` again

* Update to not-the latest first.

* Update benchmarks.

* Another Trai.

* Move new weight types into runtime primitive crates

This allows us to check limits for extrinsics from other parts
of the codebase without pulling in the entire chain runtime.

* Remove leftover comments

* Move new functions to a better location

* Small formatting fixes

* Add actual documentation to new weight config types

* Decrease maximum block weight of Millau chain

* Decreease maximum block length of Millau chain

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Hernando Castano 0ff8c2437c Cross-Chain Transfer Generator (#535)
* Attempt at adding Cross-Chain Transfer Generator

* Add Transfer subcommand for sending messages to Rialto

* Add temp helper script for sending messages

* Remove Message and Lane Ids from Dispatch Event

* Increase transfer amount used by script

* Endow derived Dave account on Rialto with funds

* Update Message generator to send more types of messages

This commit first of all updates the script to use the new CLI
commands for sending messages. Second, it adds messages which are
sent from both Target and Source origins.

* Generate messages from Root origin

* Remove dbg! logs from relayer

* Log AccountId as well as HexId

* Remove Balances logs

* Add InstanceId and MessageId back to Dispatch Event

* Add InstanceId and MessageId types for Apps

* Add missing comment

* Document derived accounts as tests

* Move shared commands to variables

* Add example usage for send_message script

* Add docs to message variants

* Fix Clippy complaint
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] c155c31f50 Bump structopt from 0.3.20 to 0.3.21 (#562) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c20b4c868f Fixed clippy warnings (#537)
* fixed clippy warnings

* Revert "Actually use pinned nightly version when building runtimes (#465)"

This reverts commit dedddb6b0f22260e00053c28873a0cb1fbea22e2.

* Revert "Pin Rust Nightly Version (#420)"

This reverts commit 8902ac2030cf7ef48ec512463424f134a3b38804.

* fix after revert

* another fix after revert

* more clippy fixes
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 889b22bee5 Add more substrate accounts + use one account in one relay (#526)
* add more substrate accounts

* 's

* Update deployments/README.md

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update deployments/README.md

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* more fixes

* with messages to -> which contain messages for

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky dd7242bc79 Migrate back to Substrate master (#528)
* migrate back to Substrate master

* fmt

* clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 23f5f3cdd6 Limit messages weight in batch (#496)
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of #469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
2024-04-10 10:28:37 +02:00
Hernando Castano e515f4fb62 Fixes for Millau-Rialto Deployment (#493)
* Expose two nodes publicly through brucke.link

* Use flags for GNU `sed` instead of BSD `sed`

* Update Substrate relay entrypoint scripts to initialize bridge

* Add Rialto to Millau relay to Compose deployment

* Stop initializing Rialto chain through chainspec

* Include logging for Substrate pallet

* Make Rialto to Millau entrypoint executable

* Use YAML references for relay components

* Use published Substrate Relay image

* Relay messages from Millau to Rialto

* Use Bob nodes to serve message lane

* Fix some port number issues for PoA-Rialto deployment

* Stop directly referencing `environment` anchor in nodes

* Add probable cause to relayer error message

* Edit monitoring config file in-place

* Add some sleep time between bridge init call and starting relays

* Expose grafana.

* Use Root key as bridge pallet owner

In our case that's going to be Alice since she's Root for our Dev
and Local chains.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Hernando Castano c8e4d536a2 Remove Millau Genesis Config in Rialto Node (#494) 2024-04-10 10:28:37 +02:00
Hernando Castano 3f7655a056 Allow Substrate Pallet to be Halted (#485)
* Copy-Pasta owner and freezing code from `message-lane`

* Halt pallet if bridge hasn't been initialized

* Make owner optional in `message-lane` pallet

* Add `is_halted` to `InitializationData`

* Fix initialization tests

* Only allow pallet to be initialized once

* Add some logging around halting and ownership changes

* Remove `target` in debugging calls
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 2a6af69ff0 enable GrandpaRpcApi for Rialto (#486) 2024-04-10 10:28:37 +02:00
Hernando Castano cac8319480 Allow Substrate Pallet to be Initialized via Dipatchable (#481)
* Add dispatchable for intializing pallet

* Add Polkadot JS types for Substrate bridge pallet

* Ensure Root is the only one that can initialize the pallet

* Add some tests

* Pack initialization data into struct

* Only allow pallet to be initialized once

* Use new initialization config in nodes

* Rename ScheduledChange in Ethereum pallet

We're renaming it to prevent clashes with Substrate bridge pallet type
of the same name. This is relevant when importing types to Polkadot JS
Apps.

* Move all Polkadot JS types into one file

* Appease Clippy
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky ef9357596f Return cumulative dispatch weight of messages from the messageLane_proveMessages (#469)
* implement OutboundLaneApi and InboundLaneApi for Millau /Rialto runtimes

* fixed typo
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 74249a0896 Integrate message-lane module RPCs into Rialto/Millau nodes (#458)
* integrate message-lane RPCs into Millau and Rialto runtime

* fmt

* use instance in InboundLanes

* moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] f10f09a565 Bump structopt from 0.3.19 to 0.3.20 (#425) 2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 253d0d4774 Bump jsonrpc-core from 15.0.0 to 15.1.0 (#412) 2024-04-10 10:28:37 +02:00
dependabot-preview[bot] ef4bb1d492 Bump structopt from 0.3.18 to 0.3.19 (#411) 2024-04-10 10:28:37 +02:00
Hernando Castano f52c839d6e Add GenesisConfig for Millau and Rialto Runtimes (#401)
* Add Rialto as a target for the Millau node

* Rename Rialto module to Rialto-PoA

This will reduce confusion as the Millau runtime has a
Rialto module as well which refers to the Substrate chain.

* Add Millau as a target for the Rialto node

* Be more explicit about Rialto PoA related code

* Missed some name changes in the Ethereum PoA relay

* Re-export Substrate pallet structs used by node

* Remove `first_scheduled_change` of Millau in Rialto node

* Make Millau's genesis config for Rialto bridge more accurate

* Set initial header for Millau config

* Update initial Millau authorities

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>

* RustFmt Millau authorities

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
2024-04-10 10:28:37 +02:00
Hernando Castano 8b8248f83f Split Rialto and Millau Nodes (#372)
* Split the Rialto Node into a standalone crate

* Split the Millau Node into a standalone crate

* Remove `bridge-node` crate

* Add benchmarking feature to nodes

* Check that benchmarks compile in CI

* Remove nodes from CI matrix

* Update Rialto node to Substrate 2.0

* Get Millau node compiling with Substrate 2.0

* Remove extra license text

* Remove comments in TOML files

* Move nodes and runtimes into Rialto and Millau folders

* Fix dependency paths

* Remove unused script

* Add issue to benchmarking TODO

* Fix benchmark manifest paths
2024-04-10 10:28:37 +02:00