Skip to content

Commit

Permalink
Eth2Client: improvements, refactoring (#882)
Browse files Browse the repository at this point in the history
Refactor the eth2 light client to resolve an issue of missing finality for more than 5 epochs.

- Added two modes `SubmitLightClientUpdate` and `SubmitHeader`.
- By default, the client is in `SubmitLightClientUpdate` and it turns into `SubmitHeader` after submitting a light client update.
- Added integration tests for migration logic.
- The relayer can submit a `LightClientUpdate` after any number of epochs/blocks, but those can be finalized only if the size of the gap between the current finalized block and the subsequent finalized block is higher than `hashes_gc_threshold`, otherwise, the `GC` can't be applied correctly.
- Update Eth2-to-Near relay and `eth2near` crates to v0.3.0.
- Update dependencies.
- Update tests and remove irrelevant tests.

---------

Co-authored-by: Olga Kunyavskaya <olga.kunyavskaya@aurora.dev>
Co-authored-by: Kirill <kirill@aurora.dev>
  • Loading branch information
3 people authored Apr 5, 2023
1 parent a9c9c7a commit 1117f95
Show file tree
Hide file tree
Showing 31 changed files with 779 additions and 2,487 deletions.
4 changes: 2 additions & 2 deletions contracts/near/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/near/eth2-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eth2-client"
version = "0.2.0"
version = "0.3.0"
authors = ["Aurora <hello@aurora.dev>"]
edition = "2021"

Expand Down
1 change: 1 addition & 0 deletions contracts/near/eth2-client/src/data/.gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.json filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Loading

0 comments on commit 1117f95

Please sign in to comment.