* 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
* 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>
* 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>
* Add Prometheus and Grafana to Docker Compose
* Expose relay's Prometheus metrics port
* Use Docker network references intead of localhost
When you have containers on the same network they don't communicate
over localhost, they instead refer to their container names
* Move dashboard components into deployment folder
* Update folder structure for Grafana and Prometheus config files
The new folder structure more closely matches the expected defaults
by Grafana and Prometheus, which allows us to clean up the paths
in our docker-compose file a bit.
* Add documentation about Prometheus and Grafana
* Refer to Prometheus server instead of node
* Bump Substrate to rc4
* Add BaseCallFilter type
* Add DenyUnsafe to SystemApi extension
* Use new ServiceBuilder build functions
* Add BaseCallFilter to test runtimes
* Remove old comments
* Add `rev` and `git` fields back
Turns out that if you don't have these future release candidates will
be used if available. For instance, once `rc5` is released a fresh pull
would use that instead of `rc4` which is what we want.
* Use tag release instead of specific commit
Will make scripted updates easier in the future
* Add short script to update between `rc` versions
* Update scripts/update_rc.sh
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Move EthereumRpc implementation to Eth client
* Move SubstrateRpc implementation to SubstrateClient
* Update deploy_contract to use new RPC interface
* Fix some types in the Substrate client
* Swap out method bodies in Eth sync loop
* Swap out method bodies in Substrate sync loop
* Remove Client from SourceClient trait return types
* Remove Client from TargetClient trait return types
* Remove client from Source select! arms
* Remove client from Target select! arms
* Add missing mutable refs in Substrate client
* Use mutable references in Source/Target Client traits
* Try and use mutable references in Source/Client trait implementations
* Handle errors more gracefully
* Remove unused imports
* Remove dead_code and unused_variables lints
* Remove usage of `jsonrpsee::RawClient`
By using a `jsonrpsee::Client` we are able to remove all the shared
mutable references required when interacting with the RPC server. This
is convenient as trying to sharing mutable references in code that uses
async/await is a bit of a pain.
However, using a `Client` instead of a `RawClient` is not yet supported
by the `jsonrpsee::rpc_api` macro, so a fork must be used for the moment.
* Clean up dead code and warnings
* Clean up higher level RPCs
Some of the RPCs that were "high level" didn't necessarily belong
as part of the trait, so they were removed.
* Use positional parameters for RPCs
Both Substrate and Ethereum's RPCs use positional (array) parameters,
so in order to be compatible with both we need to make sure that
our API is defined with positional paramters in mind.
* Rename argument for eth_getBlockByNumber
* Remove some unecessary Ok-wraps
* Process client requests synchonously
Before the refactoring the sync loop would wait until a client finished
handling a request before issuing another one. This behaviour was
inadvertently changed during the refactoring leading to race conditions.
This commit makes sure that the previous behaviour is respected.
* Reduce the errors that are considered a connection error
* Only decode bridge contract once
* Set genesis_config at RPC client startup
* Fetch genesis hash in SubstrateRpcClient::new()
* Move Decode error into SubstrateNodeError
* Suppress warnings caused by `rpc_api!`
* Implement From RpcError for String
* Handle Substrate client initalization errors more gracefully
* Remove match in favour of ?
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
* Use async_trait for SourceClient
* Use aync_trait for TargetClient
* Revert async_trait usage for Source/Target client
This reverts commit f636ffaffd60197e90e887362b4a0c35a0dc5a6c.
This reverts commit 2c15755e8c93318f8e0a605852efe87d72edb769.
I'm having a very hard time finding out what is causing compilation
issues, and I think it's best to start over again.
* Use async_trait for TargetClient
* Use async_trait for SourceClient
* Move where non-async methods are
* RustFmt
* QueuedHeader holds Arc to actual data
* Clean up async return type
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
* Clean up async return type
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
* Clean up async return type
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
* Remove unused import
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>