* Bump Substrate to version used by Polkadot (`5f056830`)
* Use `log` crate for runtime logging
See https://github.com/paritytech/substrate/pull/8128/ for more info.
* Stop using return value from `execute_block`
* Update test weight
* Revert "Pin Rust Nightly to 2020-12-17 (#652)"
This reverts commit e54e6f7e3d34c28d698e637f9099162b3c1917e9.
* fix clippy
* clippy again
* more clippy in test code
* and new cargo fmt
* another try
* 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>
* 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
* 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
* 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>
* Rename Header to AuraHeader
This prevents some type conflicts with the PolkadotJS Apps types.
* Fix test and benchmark builds
* Update AuraHeader in types.json
* 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>
* 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
* 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>
* 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>
* Add skeleton for worst case import_unsigned_header
* Fix a typo
* Add benchmark test for best case unsigned header import
* Add finality verification to worst case bench
* Move `insert_header()` from mock to test_utils
Allows the benchmarking code to use this without having to pull it in from the mock.
* Add a rough bench to test a finalizing a "long" chain
* Try to use complexity parameter for finality bench
* Improve long finality bench
* Remove stray dot file
* Remove old "worst" case bench
* Scribble some ideas down for pruning bench
* Prune headers during benchmarking
* Clean up some comments
* Make finality bench work for entire range of complexity parameter
* Place initialization code into a function
* Add bench for block finalization with caching
* First attempt at bench with receipts
* Try and trigger validator set change
* Perform a validator set change during benchmarking
* Move `validators_change_receipt()` to shared location
Allows unit tests and benchmarks to access the same helper function
and const
* Extract a test receipt root into a constant
* Clean up description of pruning bench
* Fix cache and pruning tests
* Remove unecessary `build_custom_header` usage
* Get rid of warnings
* Remove code duplication comment
I don't think its entirely worth it to split out so few lines of code.
The benches aren't particularly hard to read anyways.
* Increase the range of the complexity parameter
* Use dynamic number of receipts while benchmarking
As part of this change we have removed the hardcoded TEST_RECEIPT_ROOT
and instead chose to calculate the receipt root on the fly. This will
make tests and benches less fragile.
* Prune a dynamic number of headers
* runtime benchmarks: start
* merge tests + benchmarks infrastructure
* fix compilation
* Fix compilation issues with runtime-benchmark feature flag
Mainly involved pulling in correct dependencies and adding some functions
which were called but didn't yet exist.
* Fix broken compilation for tests
* Move header signing methods into trait
* Move signing related test helpers to own module
* Remove comment about feature flag
* Add constants to tests
* Add top level comment for testing utilities
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
* removeInMemoryStorage + extract Kovan stuff to runtime
* removed comment from the future
* limit number of headers that are pruned within single import Call
* verify that pruning range upper bottom is always-increasing
* Fix typo
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
* Run RustFmt as part of the CI
* Format repo
* Run RustFmt before the default Travis build step
Apparently if you override `script` you also need to make
sure to `build` and `test` the code yourself.
* Format repo
* Update dependencies
Upgrades Substrate based dependencies from v2.0.0 -> v2.0.0-alpha.1
and uses the `jsonrpsee`'s new feature flags. The actual code hasn't
been updated though, so this won't compile.
* Use `RawClient`s from `jsonrpsee`
* Update to use jsonrpsee's new API
* Hook up Ethereum Bridge Runtime, Relay, and Node Runtime
* Bump `parity-crypto` from v0.4 to v0.6
Fixes error when trying to compile tests. This was caused by
`parity-crypto` v0.4's use of `parity-secp256k1` over `secp256k1'.
Using the Parity fork meant multiple version of the same underlying
C library were being pulled in. `parity-crypto` v0.6 moved away from
this, only relying on `secp256k1` thus fixing the issue.
* Copy node-template over from Substrate repo
Got the template at rev=6e6d06c33911
* Use dependencies from crates.io + stop renaming on import
* Remove template pallet
* Stop using crates.io dependencies
Instead they're going to be pinned at v2.0.0-alpha.2
at commit `2afecf81ee19b8a6edb364b419190ea47c4a4a31`
until something stable comes along.
* Remove LICENSE
* Change references of `node-template` to `bridge-node`
* Remove README
* Fix some missed node-template references
* Add WASM toolchain to CI
* Be more specific about nightly version to use
* Maybe don't tie to a specific nightly
* Use composite accounts
* Update to use lazy reaping
* Only use Development chain config