Commit Graph

29 Commits

Author SHA1 Message Date
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 647eb80165 Westend->Millau headers relay in deployments (#831)
* reorganize monitoring

* Westend->Millau bridge

* support multiple bridges

* initialize Westend -> Millau bridge byMillau.George

* fix intersecting ports

* ignore dashboards

* single bridged network

* deal with multple --env-file args

* fix chain name

* use images from docker hub

* update show_help

* updated comment

* mount whole dashboards directory

* removed unneeded network

* reverted reverse-proxy changes

* prometheus -> targets

* separate Grafana.Dockerfile with builtin /etc/grafana

* Revert "separate Grafana.Dockerfile with builtin /etc/grafana"

This reverts commit 53e04c4556f882d19e3af0fac581a926b8e0c167.

* read dashboards from /etc/grafana/dashboards

* stop comment
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 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
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 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
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 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
Svyatoslav Nikolsky 6167e50238 Expose GRANDPA RPC API from Millau node (#408)
* expose GRANDPA RPC API from Millau node

* fmt
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