Commit Graph

8 Commits

Author SHA1 Message Date
Svyatoslav Nikolsky c6c46462ab Sync ethereum headers using unsigned (substrate) transactions (#45)
* reward submitters on finalization

* PoA -> Substrate: unsigned_import_header API

* fix grumble

* make submitter part of ImportContext

* verify using next validators set + tests

* fix nostd compilation

* add sub-tx-mode argument

* support sub-tx-mode

* impl ValidateUnsigned for Runtime

* do not submit too much transactions to the pool

* cargo fmt

* fix bad merge

* revert license fix

* Update modules/ethereum/src/lib.rs

Co-Authored-By: Hernando Castano <HCastano@users.noreply.github.com>

* Update modules/ethereum/src/verification.rs

Co-Authored-By: Hernando Castano <HCastano@users.noreply.github.com>

* updated comment

* validate receipts before accepting unsigned tx to pool

* cargo fmt

* fix comment

* fix grumbles

* Update modules/ethereum/src/verification.rs

Co-Authored-By: Hernando Castano <HCastano@users.noreply.github.com>

* cargo fmt --all

* struct ChangeToEnact

* updated doc

* fix doc

* add docs to the code method

* simplify fn ancestry

* finish incomplete docs

* Update modules/ethereum/src/lib.rs

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

* Update modules/ethereum/src/lib.rs

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

* return err from unsigned_import_header

* get header once

* Update relays/ethereum/src/ethereum_sync.rs

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

* fix

* UnsignedTooFarInTheFuture -> Custom(err.code())

* updated ImportContext::last_signal_block

* cargo fmt --all

* rename runtime calls

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
Svyatoslav Nikolsky b055027161 Add missing RPC required for relay (#57)
* add missing RPC required for relay

* cargo fmt --all
2024-04-10 10:28:37 +02:00
dependabot-preview[bot] 709be9e58d Bump serde from 1.0.105 to 1.0.106 (#52) 2024-04-10 10:28:37 +02:00
dependabot-preview[bot] bf4851976d Bump serde from 1.0.104 to 1.0.105 (#41) 2024-04-10 10:28:37 +02:00
Hernando Castano e5f998d7d9 Run RustFmt as part of the CI (#37)
* 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
2024-04-10 10:28:37 +02:00
Hernando Castano 8232bdfe30 Get Ethereum Relay to Compile (#21)
* 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.
2024-04-10 10:28:37 +02:00
Tomasz Drwięga 91b6248f96 Add license headers (#27)
* Add the scripts.

* Add license preamble.

* Change existing license headers.
2024-04-10 10:28:37 +02:00
Hernando Castano 40b4f78bd8 Add a Node (#22)
* 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
2024-04-10 10:28:37 +02:00