Commit Graph

214 Commits

Author SHA1 Message Date
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 51f39c4427 Update jsonrpsee reference (#467)
* update Millau state_root

* update jsonrpsee reference
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b99fa90edd SubmitMillauToRialtoMessage subcommand in substrate-relay (#460)
* substrate-relay::SubmitMillauToRialtoMessage

* typo

* Update relays/substrate/src/cli.rs

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

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Hernando Castano a6048bca59 Support Tracking Forks in Substrate Pallet (#409)
* Support multiple "best headers" from different forks

* Update the name of a test

* Add note about multiple scheduled changes

* Disallow multiple scheduled authority set changes

* Return multiple best headers from Runtime APIs

* Remove invalid test write-up

* Add some sketch-ups of test scenarios

* Clean up test scenarios

* Add module for testing forks

* Write headers to storage

* Add way to check expected outcome for header imports

* Add support for importing finality proofs

* Support importing headers which schedule changes

* Write out test scenario using new framework

* Map authority set changes across forks

Gets all the tests in the `forks` module passing

* Remove basic tests

These were used when working on the initial test helper

* Prevent multiple pending set changes on the same fork

* Remove old test which allowed imports past unfinalized header

* Ignore failing test (for now)

* Rewrite `if` comparison using `match` and `cmp`

Fixes Clippy warning: `comparison_chain`

* Add helper for writing test headers with default characteristics

* Fix test that checked authority set updates

* Make note about importing headers on different unfinalized fork

* Perform some cleanup on the fork module

* Fix Clippy complaints

* Provide list of unfinalized headers to Runtime APIs

* Add proofs to expect() calls

* Make tests the focus of the forks module

* Allow specific errors to be checked in fork tests

* Remove unused method

* Replace unreachable() statement with expect()

* Rename storage `unfinalized_headers() `to make its purpose more clear

* Update Runtime API name in relayer to match pallet

* Commit `unfinalized_headers` changes I forgot to add

* Rename ChainTipHeight to BestHeight

* Make schedule_next_set_change require a mutable reference

* Remove check for key when enacting authority set

We only expect to take the happy-path in the pallet anyways, so this check
to save ourselves the time spent decoding the entry isn't really used.

* Clear justification set when writing headers to storage

* Clarify why we only allow one set change per fork

* Change best_headers() to return HeaderIDs

Prevents us from returning full headers (which are more expensive to
get from storage) since we only care about header IDs (number, hash)
anyways.

* Fix Clippy complaint

* Make note about equivocations

* Use HeaderIds when returning incomplete headers

This change stops returning full headers which are more expensive
to get from storage than header Ids (number, hash) are. Clients likely
don't need the full header anyways which is why this change is fine.

* Introduce HeaderId type to reduce type complexity

* Add signal hash to storage during genesis config

* Return error instead of expect()-ing

* Fix Clippy lint about `ok_or` fn call

* Rename `forks` module to indicate that it's for testing

* Use `const` for `expect()` proofs

* Remove check that key exists before `kill`-ing value

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
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 ddef170340 Actually use pinned nightly version when building runtimes (#465)
* try to fix build

* use pinned nightly for in stable
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 1b96e51679 Subscribe to justifications in Millau->Rialto headers sync (#394)
* maintain MillauHeadersToRialto sync by subscribing to Millau justifications

* more tracing in maintain

* Update relays/substrate/src/headers_maintain.rs

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

* Update relays/substrate/src/headers_maintain.rs

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

* -Please

* -TODO

* revert raise recursion limit

* updated comment

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky e2d9b6393d Integrate Rialto <-> Millau message lanes into Millau/Rialto runtimes (#386)
* millau -> rialto lanes integration

* extrace common message-lane integration types into bridge-runtime-common

* rialto_messages.rs in Millau runtime

* tests

* Update bin/rialto/runtime/src/millau_messages.rs

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

* RELAYER_INTEREST_PERCENT -> RELAYER_FEE_PERCENT

* Update bin/runtime-common/src/messages.rs

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

* estimate_message_dispatch_and_delivery_fee returns Result

* Update bin/rialto/runtime/src/millau_messages.rs

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

* Update bin/rialto/runtime/src/millau_messages.rs

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

* Update bin/rialto/runtime/src/millau_messages.rs

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

* fmt

* mowed weight formula to primitives

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
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] bf51e1cc6e Bump serde from 1.0.116 to 1.0.117 (#427) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 7a03b709be Millau -> Rialto headers relay (#398)
* working-millau-to-rialto-relay

* fix Millau state root

* properly fix synced+incomplete headers for sub2sub

* removed wrong TODO

* fmt + clippy

* Update relays/headers-relay/src/headers.rs

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

* moved SubstrateTransactionMaker definition

* removed M from phantomdata

* removed prune_synced_children

* methods names as consts

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Andreas Doerr ede0ff8656 Add ChainTime associated type (#410)
* add HeaderTimestamp associated type

* use Header Timestamp

* rename HeaderTimestamp to ChainTime

* add unit test

* deal with clippy

* Apply suggestions from code review

Commit review suggestions

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

* code review

* cargo fmt

* get rid of additional test runtime

* unit test asserts against concrete import context

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
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
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
Svyatoslav Nikolsky 9e9ac8df3c Move Chain trait to runtime primitives (#403)
* extract ChainBase to bp-runtime

* post-merge fixes

* cargo fmt --all

* compilation fixes

* reexport BlockNumberOf, HashOf, HeaderOf
2024-04-10 10:28:37 +02:00
Hernando Castano 86834e2fd6 Implement Substrate Pallet Runtime APIs (#389)
* Implement public helpers for querying header info

* Update `best_header` when importing headers

* Add BestHeader to GenesisConfig

* Define extra types for Millau primitives

* Start implementing runtime APIs in Millau runtime

* Add helper for getting headers which require a justification

* Add runtime API for getting headers requiring a justification

* Reword `expect()` proof for valid authority sets

* Fix typo

* Clean up Hasher comment

* Add the Call Dispatch Pallet back to the Millau runtime

* Use types from Rialto in bridge pallet config

* Use the Rialto runtime APIS in the Millau runtime

* Include Millau bridge instance in Rialto runtime

* Add missing doc comment

* Use one storage function for setting and clearing `RequiresJustification`

* Remove TODO comments
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
Svyatoslav Nikolsky 07a514e9f7 Get substrate dependencies from crates io (#387)
* get Substrate dependencies from crates.io

* removing unused dependencies

* cargo fmt --all

* remove commented dependencies

* remove commented dependencies again

* try to fix compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky dbb72faa86 Substrate relay stub (#376)
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 52c1913fff Extract minimal Rialto-Sub and Millau-Sub clients (#365)
* extracting sub clients

* fmt + lost docs

* revert enum BridgeInstance

* apply suggestions from review

* explicite debug impl

* remove unused imports from Millau

* fix typo

* fix instance + API name

* Update relays/ethereum/src/ethereum_sync_loop.rs

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

* separate crates for millau and rialto client

* cargo fmt

* fix

* fmt

* remove no_std support

* fix compilation again

* Update relays/substrate-client/Cargo.toml

* Update relay clients to Substrate 2.0

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
Tomasz Drwięga be050bda84 Bump Substrate to v2.0.0 (#382)
* Change script to update versions.

* Bump versions.

* Address remainders.

* cargo fmt --all

* Fix tests.

* Whitelist BlueOak license

* Fix benchmarks?
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky fa2abfb140 Support user-provided origins in Call-dispatch module (#355)
* call dispatch origin

* Update modules/call-dispatch/src/lib.rs

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

* cargo fmt --all

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Hernando Castano 5163f62df4 Rename Ethereum Headers to AuraHeader (#354)
* Rename Header to AuraHeader

This prevents some type conflicts with the PolkadotJS Apps types.

* Fix test and benchmark builds

* Update AuraHeader in types.json
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c2791c2772 Fix Rialto test-poa genesis state root (#350)
* fix test-poa genesis state root

* fix test
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky d8ae786792 Prepare separate runtime for testing sub2sub bridge (#341)
* renamed bin/node/runtime to bin/node/rialto-runtime

* replaced bridge-node-runtime references with rialto-runtime references

* separate folders for millau/rialto nodes+runtimes

* extracted pallet-shift-session-manager

* bridge-node -> bridge-node-runtime

* uninstall previous rust (temp solution???)

* fix dockerfile

* cargo fmt

* fix benchmarks check

* fix benchmarks again

* update LAST_RUST_UPDATE to clear the cache

* changed runtime comments

* move bin/node/* to bin/

* REVERT ME

* Revert "REVERT ME"

This reverts commit 7c335f946308ed11d9ed6ffec7c1c13dbe2743ed.

* specify container name

* REVERT ME

* container_name -> hostname

* fix typo

* aliases

* Revert "REVERT ME"

This reverts commit 0e74af5f8430f1975a3fc924d8b52079f266bda1.

* removed prefixes
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 463a01716c Bump serde from 1.0.115 to 1.0.116 (#348) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 6df0341064 extract ShiftSessionManager into separate pallet (#342) 2024-04-10 10:28:37 +02:00
Tomasz Drwięga 858940050a Initial version of Call::decode dispatch. (#300)
* Initial version of call dispatch.

* cargo fmt --all

* Remove unused stuff.

* cargo fmt --all

* weight is part of msg + events

* should_fail_on_weight_mismatch

* plug into runtime

* cargo fmt --all

* fix benchmarks compilation?

* expected/actual values in events

* return actual weight from MessageDispatch::dispatch()

* MessageOrigin -> InstanceId + move bridge_account_id to bp-runtime

* fix benchmarks again

* cargo fmt --all

* clippy

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c7437c7d91 Custom RPC methods for DummyOrdered pallet (#317)
* RPC for DummyOrdered

* add test for RPC

* proof returned by RPC is Vec<<Vec<u8>>>.encode()

* retrieval -> receiving

* bp-runtime crate

* bp-runtime supports no_std

* cargo fmt --all

* jsonrpc_core::BoxFuture

* Update modules/message-lane/rpc/Cargo.toml

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

* Update modules/message-lane/rpc/src/lib.rs

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

* messageLane_ prefix for RPC methods

* Update primitives/runtime/Cargo.toml

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

* Update primitives/runtime/src/lib.rs

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

* Update modules/message-lane/rpc/src/lib.rs

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

* Update modules/message-lane/rpc/src/lib.rs

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

* Update modules/message-lane/rpc/src/lib.rs

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

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky f6d45a38da Initial version of DummyOrdered pallet (#299)
* initial commit of DummyOrdered (aka message-lane) pallet

* API for relay

* cargo fmt --all

* some clippy + no_std

* more clippy + no_std

* inbound lane tests

* outbound lane tests

* cargo fmt --all

* prune old messages whenever outbound lane is updated

* do not care about MessageNonce overflow

* cargo fmt --all

* update crate docs

* MaxHeadersToPruneAtOnce -> MaxMessagesToPruneAtOnce

* MessageAction -> MessageResult

* cargo fmt --all

* fire MessageAccepted + MessagesDelivered

* confirm message processing

* cargo fmt --all

* clippy

* cargo fmt again

* Update modules/message-lane/src/lib.rs

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

* Update modules/message-lane/src/lib.rs

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

* use crate::*

* cargo fmt --all

* Storage -> S

* Update modules/message-lane/src/outbound_lane.rs

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

* add method doc

* Update modules/message-lane/src/inbound_lane.rs

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

* added detailed module docs

* Update modules/message-lane/src/lib.rs

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

* updated OnMessageReceived docs

* prune only when new message is sent

* removed #![warn(missing_docs)]

* fixed merge with overlapped PR

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 5e86447d3e Bump structopt from 0.3.16 to 0.3.17 (#330) 2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b7cb0623d4 Update substrate reference to rc6 (#321)
* update substrate to rc6

* clippy

* fixed benchmarks compilation

* Update bin/node/node/src/service.rs

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

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 1823923a79 Remove errors from log (#294)
* changed log level from error to trace

* incomplete during submit != synced
2024-04-10 10:28:37 +02:00
Hernando Castano 29244ba76d Introduce Minimal Header Chain: Proving Interface (#287)
* Add header-chain primitive crate

* Make MinimalHeaderChain functionaly the same as PeerBlockchain

* Use a better doc comment for MinimalHeaderChain

* Fix benchmark compilation

* Rust Fmt

* Remove Substrate based dependencies

* Rename MinimalHeaderChain to BaseHeaderChain
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 49bbcae637 Bump serde from 1.0.114 to 1.0.115 (#282) 2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 94192aec3b Bump structopt from 0.3.15 to 0.3.16 (#277) 2024-04-10 10:28:37 +02:00
Hernando Castano 9f6bd28384 Rename Primitive Crates (#271)
* Rename Ethereum PoA primitives crate

The "sp" prefix comes from Substrate primitives, since this crate originated
in that repo. However, it is not part of Substrate anymore and its name should
be updated to reflect that.

* Rename currency exchange primitives

* Rust Fmt

* Update import in benchmarking module

* Rust Fmt

* Split pub and no-pub

* Sort toml files.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00
Hernando Castano 6fd1651b21 Bump Substrate to RC5 (#243)
* Bump Substrate to rc5

* Bump async-std to v1.6.2

There was a bug in v.1.6.0 which kept us locked to v1.5 releases.
I think that's fixed now so I'm bumping this.

* Update bridge node runtime

* Update node service

* Update CLI

* Add SystemWeightInfo type to test runtimes

* Add RPC extension builder to service

* Directly return rpc_extensions_builder

* Allow complex types in service

This comes from Substrate, so I'd rather just keep the code as is

* Update benchmarking code for new CLI
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky b98b7d2e43 Prepare for sub to eth relay (#248)
* fixed PoA contract deploy (granda_authorities call)

* pause if all submitted headers were rejected

* give funds to Bertha and Carlos

* max 1 active PoA transaction in headers sync :(

* display initial header id when deploying PoA contract

* cargo fmt + clipy

* fix compilation

* Update relays/ethereum/src/sync_types.rs

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

* Update relays/ethereum/src/utils.rs

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

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky fddfbb5b1c Submit exchange transactions to PoA node (#229)
* submit Eth exchange transactions

* submit ethereum in docker-compose

* submit Eth exchange transactions

* fix duplicate message

* fix relay script

* lost file

* cargo fmt --all

* cargo +nightly clippy

* Show sccache

* remove test-helpers remains

* what's going on with jsonrpsee + Cargo.lock?

* relay-eth-submit-exchange-tx -> poa-exchange-tx-generator

* Update relays/ethereum/src/main.rs

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

* configuring exchange-gen loop using env variables

* fixed signer account from dev chain to Arthur

* improve debug prints

* parse nonce from relay output

* --eth-nonce=

* fix compilation

* cargo fmt --all

* fix typo

* duplicate relay output to tty

* allow using from bash scripts tests

* fix: U256::parse() expects hex string :/

* cargo fmt --all

* BRIDGE_HASH: ${BRIDGE_HASH:-master}

* script comment

* generate exchange PoA transactions by Bertha

* Bertha address

Co-authored-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 156ec9862f Make transactions receipts part of transaction inclusion proof (#236)
* make receipts part of tx proof

* is_successful_raw_receipt_with_empty_data

* cargo fmt --all

* clippy

* fix everything
2024-04-10 10:28:37 +02:00
Hernando Castano 30844b1e9c Allow Multiple Bridge Pallet Instances (#226)
* Add Instance type parameter to pallet

* Sketch out what the runtime could look like

* Allow runtime to compile with multiple bridge pallets

* Cargo Fmt

* Allow an instance of a PoA chain to be used with currency-exchange

I specify that it's only _an instance_ instead of _instances_ since the currency-exchange
pallet does not support multiple instances itself. What this commit does is make it so
that the different instances of the PoA chains we currently have are compatible with the
currency-exchange pallet through the implementation of the PeerBlockchain trait.

* Add Instance type parameter to Currency Exchange pallet

* Wire up currency exchange intances in runtime

* Rust Fmt

* Show sccache

* Allow Eth pallet to use a default instance

* Use a default instance in Eth pallet tests

* Remove Rialto and Kovan feature flags

Through some discussions it has been decided that the `bridge-node` should, like
Substrate's `node-template`, be a showcase of the different pallets available in
a project. Because of this I've removed the feature flags for the Rialto and Kovan
networks in favour of having both of them included in the runtime.

* Update the chain_spec to use both Rialto and Kovan configs

* Update pallet level calls used by Substrate client

Allows the project to compile. However, it should be noted that in reality
we shouldn't be hardcoding the pallet we're calling.

* Allow currency-exchange pallet to use a default instance

* Support benchmarking an instance of the Eth pallet

* Update currency exchange benchmarks to work with instances

* Fix test helpers which now need a PoA instance

* Remove Actions for checking Rialto and Kovan features

* Add missing comments

* Update Runtime API string constants

* Add issue number for generic chain support in relay

* Add Runtime APIs for instances of the currency-exchange pallet

* Rust Fmt

Co-authored-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky c4424e5b73 Auto relay exchange transactions (#227)
* auto relay exchange transactions

* docker + auto-relay-tx

* clippy

* jsonrpsee in Cargo.lock ???

* fix tests compilation

* Show sccache

* mute clippy

* move

* Update relays/ethereum/src/exchange.rs

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

* finish comment

* (bool, String) -> StringifiedMaybeConnectionError

* Update deployments/rialto/docker-compose.yml

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

Co-authored-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Tomasz Drwięga bdf6901ce2 Fix clippy suggestions. (#179)
* Fix clippy errors.

* Cargo fmt.

* Enable clippy checks.

* Create if does not exist.

* Fix warnings and enable sccache for clippy.

* chmod +x

* Revert and ignore errors.

* Update cancel-workflow-action.

* Fixes.

* Clippy fixes.

* Fix compilation.

* Fix new clippy warnings.

* fmt --all

* Fix the rest.

* fmt --all

* Conditional.

* Bump smallvec.

* Use separate cache dir for clippy to prevent races.

* Remove unused imports in tests

* Remove "useless conversion"

* Move clippy to main worfklow to avoid clashes.

* Fix clippy error.

* Fix remaning clippy errors.

* cargo fmt --all

Co-authored-by: Hernando Castano <castano.ha@gmail.com>
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 65852944e3 Bump log from 0.4.8 to 0.4.11 (#224) 2024-04-10 10:28:37 +02:00
dependabot-preview[bot] f017b635a8 Bump hex-literal from 0.2.1 to 0.3.0 (#223) 2024-04-10 10:28:37 +02:00
Tomasz Drwięga bebb5e6035 Rialto test network setup (#163)
* Dockerfile for OpenEth.

* Add relayer dockerfile.

* Add docker-compose.

* Working on the relay.

* Bump a bunch of deps.

* Change relay branch.

* Running a 3-validators poa network.

* Add bridge nodes.

* Conditional compilation of bridge configs.

* Fix genesis hash.

* Disable features build.

* Disable empty steps.

* Work on sub2eth

* Add some logs.

* More logs.

* Fix compilation.

* Add chain-id parameter to relay.

* Unify bridge-hash.

* Update the hash.

* Ditch sub2eth for now.

* Add some docs & proxy configuration.

* Fixes.

* Fix remaining issues.

* Increase health timeout.

* Make sure to install curl for health monitoring.

* Fix kovan.

* Fix build.

* Create if does not exist.

* Fix benches.

* Revert CLI params requirements.

* cargo fmt --all

* Apply suggestions from code review

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

* Add some docs.

* Update BRIDGE_HASH to master

* Duplicate compose file.

* Rename testpoa to Rialto.

* Fix borked merge.

* Fix entrypoints to take arguments.

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky 00bd13f8cd Exchange pallet benchmarks (#158)
* exchange benchmarks: framework

* updated comment about tx size

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2024-04-10 10:28:37 +02:00