Svyatoslav Nikolsky
ec34870eab
Extract minimal ethereum client ( #359 )
...
* relay-ethereum-client
* use relay-ethereum-client from ethereum-poa-relay
* cargo fmt --all
* #![warn(missing_docs)]
* EthereumRpcClient -> EthereumClient
* make EthereumHeadersSyncPipeline private
* return concrete type from crate::new
* cleanup dependencies
* *self -> self
* remove trait Client
* sort deps
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d614cdaba8
Extract (headers, exchange, messages) relay loops into separate crates ( #357 )
...
* extracted relay crates
* moved metrics to utils
* exchange-relay compilation
* fix compilation of headers-relay
* fixed messages-relay compilation
* fixed ethereum-poa-relay compilation
* cargo lock
* cargo fmt --all
* clippy
* cargo fmt --all
* fix tests compilation
* clippy
* eof
* module level docs
* removed obsolete comment
* #![warn(missing_docs)]
* .0 -> Deref
* post-merge fix
* cargo fmt
* Update relays/headers-relay/src/headers.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/headers-relay/src/headers.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update relays/headers-relay/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
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
Svyatoslav Nikolsky
2ae886506d
Relay receiving + processing confirmations ( #351 )
...
* relay receiving + processing confirmations
* fmt && clippy
* removed message processing race
* remove more traces
* generic args names
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
750a369273
Verify GRANDPA justifications from runtime ( #353 )
...
* verify justifications from runtime
* unreachable
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
d918bcb6f8
Remove queueing from message-lane ( #352 )
...
* remove queueing from message-lane
* also remove queueing from RPCs
* another trace
* new clippy
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
Svyatoslav Nikolsky
bed44dec13
Relay DummyOrdered messages ( #318 )
...
* DummyOrdered relay: initial commit
* 1 ML file -> 3 files
* extracted generic message race loop
* uncommented race error procesing
* lane loop tests
* cargo fmt
* moved HeaderId to utils.rs
* restart lane loop on stall
* message delivery strategy tests
* removed obsolete code
* clippy
* Update relays/ethereum/src/message_lane_loop.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update relays/ethereum/src/message_lane_loop.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* added more races docs
* Update relays/ethereum/src/message_race_delivery.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* update docs
* Update relays/ethereum/src/message_race_loop.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* deal with TODOs
* removed docs
* docs
* cargo fmt --all
* Update relays/ethereum/src/message_race_loop.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
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
fce133e2cb
Make message-lane Event generic ( #345 )
...
* make message-lane Event generic
* cargo fmt --all
* Update modules/message-lane/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
54553df8dc
resurrect substrate StorageProofChecker ( #343 )
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
dependabot-preview[bot]
112e60439a
Bump async-trait from 0.1.38 to 0.1.40 ( #329 )
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
933a8e9252
Bump async-trait from 0.1.37 to 0.1.38 ( #306 )
...
Bumps [async-trait](https://github.com/dtolnay/async-trait ) from 0.1.37 to 0.1.38.
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.37...0.1.38 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
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
aa90d16832
Fix (workaround) for "cannot read property 'toFixed' of null" ( #297 )
...
* fix (workaround) for NaN CPU usage
* cargo fmt --all
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
Svyatoslav Nikolsky
b2c3238501
MAX_SUBMITTED_HEADERS = 4 ( #293 )
2024-04-10 10:28:37 +02:00
Hernando Castano
0f38601252
Remove old Substrate pallet ( #292 )
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
Svyatoslav Nikolsky
a0555d8118
Parse all deploy contract arguments ( #289 )
...
* parse all deploy contract arguments
* cargo fmt --all
2024-04-10 10:28:37 +02:00
Tomasz Drwięga
7a71279ab8
Update open ethereum. ( #290 )
...
* Update open ethereum.
* Remove extra line break.
* Remove branch comment.
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
4ddb8b1e7a
Bump clap from 2.33.2 to 2.33.3 ( #284 )
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]
0900573706
Bump async-trait from 0.1.36 to 0.1.37 ( #283 )
2024-04-10 10:28:37 +02:00
Hernando Castano
accdc454ec
Add instructions and scripts for local development ( #280 )
...
* Add dev deployment profile with Ethereum PoA config
* Add scripts for running local components
* Use `openethereum` folder
* Add local development instructions in README
* Add note about clone location
* Point to right folder for scripts
* Add some missing back-ticks
* Remove Bertha and Carlos as authorities
* Fix a line length issue
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
761882e06b
Bump clap from 2.33.1 to 2.33.2 ( #279 )
2024-04-10 10:28:37 +02:00
dependabot-preview[bot]
4545931e02
Bump async-stream from 0.2.1 to 0.3.0 ( #278 )
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
acb78b0595
Fix panic when no instance is passed to certain CLI options ( #275 )
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
Svyatoslav Nikolsky
868814e4b6
Prepare for sub to eth relay - part2 ( #253 )
...
* 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
* update PoA contract to accept <= 4 Substrate headers at once
* pause submitting headers when contract rejects all new headers + we have active transactions
* fix compilation
* cargo fmt --all
* does_not_select_new_headers_to_submit_when_submit_is_paused
* updated bridge contract
* Update relays/ethereum/src/sync.rs
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* WiP.
* Submit first incomplete header.
* Finish up test.
* cargo fmt --all
* Remove redundant clone.
* Address review comments.
* cargo fmt --all
* Fix clippy.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2024-04-10 10:28:37 +02:00
Hernando Castano
7f8360d8ab
Support Pallet Instances in Relay ( #238 )
...
* Sketch out how to support different bridge pallet instances
* Create a common interface for using pallet instances
* Start introducing generic instance parameter
Attemps to make the compiler happy, but I'm having second thoughts about
this approach. Commiting now as a way to have a checkpoint, but I think
I'm going to need to re-consider my approach here.
Ideally I want a change which introduces minimal changes, but this seems
to be propagating around the codebase in ways I don't want.
* Use trait objects instead of generics
* Implement traits for Boxed trait objects
This is done in order to statisfy trait bounds by types
which use these new trait objects
* Remove Clone usage for sync parameters
* Remove implementation of Default for sync params
* Require that BridgeInstance implements Debug
* Ensure that BridgeInstance trait implements Send/Sync
* Add documentation related to instances
* Rust Fmt
* Remove needless format
* Make instance CLI option case insensitive
* Replace `with_*` constructors with `new`
* Clean up usage of instance structs
* Enforce a default instance in the CLI params
* Build sync params as we process input from CLI
* Remove case insensitivity from sub-tx-mode
I think this should happen, but maybe as part of a different PR
* Process default Eth contract deployment config in CLI
* Build EthereumExchangeParams in CLI
* Process EthereumExchangeSubmitParams params in CLI
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
80cc9e793e
Fix gas_used fields in receipts ( #261 )
...
* gas_used should be cumulative_gas_used!!!
* more runtime traces
* improve logs
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
e665f93608
Add traces to PoA builtin ( #258 )
...
* replace debug printlns with traces
* cargo fmt --all
* fixed traces
* update RUST_LOG in docker-compose
* only print hex data if error has occured
* updated OE hash
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
Tomasz Drwięga
d3f6948050
Remove substrate relay. ( #244 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
8456d0d969
Exchange transactions relay dashboard ( #241 )
...
* update dashboards
* cargo fmt --all
* Update deployments/rialto/dashboard/prometheus/prometheus.yml
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
ae88e86d6d
fixed method name ( #239 )
2024-04-10 10:28:37 +02:00
Svyatoslav Nikolsky
0be27839bc
Auto exchange transactions relay metrics ( #237 )
...
* auto exchange tx relay dashboard
* cargo fmt --all
* single metrics startup fn
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
70135cb797
Fix Local Dockerfile Entrypoint ( #233 )
...
* Correctly resolve project in Dockerfile entrypoint
* Improve instruction for running local Docker containers
* Rename bridge entrypoint script
2024-04-10 10:28:37 +02:00