Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add initial ethereum light client #150

Merged
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a577c12
current state minus cosmwasm
gjermundgaraba Dec 4, 2024
bb1a04f
testing and cleanup
gjermundgaraba Dec 5, 2024
39c0414
fork tree_hash for now
gjermundgaraba Dec 5, 2024
8052da9
lint
gjermundgaraba Dec 5, 2024
c657b38
Merge branch 'main' into gjermund/142-create-initial-08-wasm-ethereum…
gjermundgaraba Dec 5, 2024
699cdf4
add run-script
gjermundgaraba Dec 6, 2024
14ebe5a
Merge branch 'main' into gjermund/142-create-initial-08-wasm-ethereum…
gjermundgaraba Dec 6, 2024
9022dfa
add wasm target to cosmwasm build in ci
gjermundgaraba Dec 6, 2024
2387472
move features out of top-level cargo
gjermundgaraba Dec 6, 2024
d95dd17
Merge branch 'main' into gjermund/142-create-initial-08-wasm-ethereum…
gjermundgaraba Dec 6, 2024
a3854e4
lint and fix just lint command
gjermundgaraba Dec 6, 2024
ee4df25
fix cosmwasm ci build
gjermundgaraba Dec 6, 2024
60730c2
cr fixes
gjermundgaraba Dec 6, 2024
26cb328
Merge branch 'main' into gjermund/142-create-initial-08-wasm-ethereum…
gjermundgaraba Dec 7, 2024
e9c1626
cargo lock
gjermundgaraba Dec 7, 2024
8577c38
fix e2e test in pow mode
gjermundgaraba Dec 7, 2024
b9d0ef4
add cosmwasm-check to ci
gjermundgaraba Dec 7, 2024
2d1c2b2
added unit tests on cosmwasm contract
gjermundgaraba Dec 7, 2024
abf2ef9
some minor cleanup before review
gjermundgaraba Dec 7, 2024
34df628
Update packages/ethereum-light-client/src/types/sync_committee.rs
gjermundgaraba Dec 9, 2024
1026bd2
Update programs/08-wasm-eth/src/msg.rs
gjermundgaraba Dec 9, 2024
001807f
add source errors to error messages
gjermundgaraba Dec 9, 2024
4021f54
remove From trait for json serializaiton
gjermundgaraba Dec 9, 2024
b4de277
remove no_std feature from typenum
gjermundgaraba Dec 9, 2024
2f6b5da
fix spacing issue
gjermundgaraba Dec 9, 2024
5ec6b9b
tree_hash using workspace
gjermundgaraba Dec 9, 2024
d0b7eac
Update programs/08-wasm-eth/src/state.rs
gjermundgaraba Dec 9, 2024
1991845
consistent returns macro usage
gjermundgaraba Dec 9, 2024
8ca1579
move optimized wasm build to justfile
gjermundgaraba Dec 9, 2024
6b5acb1
use div_ceil
gjermundgaraba Dec 9, 2024
6192e7e
Update packages/ethereum-light-client/src/types/wrappers.rs
gjermundgaraba Dec 9, 2024
82a4493
consistent line breaks for wrapper tree_hash fns
gjermundgaraba Dec 9, 2024
c346d0b
Update packages/ethereum-light-client/src/types/sync_committee.rs
gjermundgaraba Dec 9, 2024
afe0db9
rename load_fixture
gjermundgaraba Dec 9, 2024
f205908
move and rename cw light client program
gjermundgaraba Dec 9, 2024
d1e9199
remove tendermint proto crate
gjermundgaraba Dec 9, 2024
9dd789a
remove export metadata
gjermundgaraba Dec 9, 2024
e0d216e
update wasm ci file name for check
gjermundgaraba Dec 10, 2024
68e99f1
move and use branch consts everywhere
gjermundgaraba Dec 10, 2024
c9de44d
add readme with WIP warnings and acknowledgements
gjermundgaraba Dec 10, 2024
fc9958a
change ensure to macro
gjermundgaraba Dec 10, 2024
a4ac4aa
added unit tests for supermajority check
gjermundgaraba Dec 10, 2024
68a50d2
move rust fixtures into a single file per test
gjermundgaraba Dec 10, 2024
9cae4fa
docs: updated readmes
srdtrk Dec 11, 2024
a56859d
docs: fully linted and documented wasm client
srdtrk Dec 11, 2024
c792160
refactor: custom query
srdtrk Dec 11, 2024
b99018f
docs: update README
srdtrk Dec 11, 2024
52dfc31
docs: refactored and added docs to all of `ethereum-light-client`
srdtrk Dec 11, 2024
13caeb1
refactor: use match instead of if
srdtrk Dec 11, 2024
0442375
lint: fixed clippy complaint
srdtrk Dec 11, 2024
373d094
docs: added linting and docs to triedb
srdtrk Dec 11, 2024
2b5eaa0
deps: added std feature for error impl
srdtrk Dec 11, 2024
b1e90e2
imp: removed ethereum-utils::base64
srdtrk Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,34 @@ jobs:
with:
command: build
args: --bin operator --release --locked

build-08-wasm-eth:
name: build-08-wasm-eth
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
target: wasm32-unknown-unknown
- name: Install cargo-run-script and cosmwasm-check
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-run-script cosmwasm-check
- name: Build
uses: actions-rs/cargo@v1
with:
command: run-script
args: build-08-wasm-eth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't be building with docker in this CI, and use the rust toolchain instead. I'm also not a fan of using cargo scripts. justfile should suffice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the docker build to actually verify that we can build the optimized wasm file and then verify it. I don't see any issues with building with docker in CI here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any issues. the docker uses a specific version of rust whereas I'd like us to use the latest stable. That's all

# checks that the wasm binary is a proper cosmwasm smart contract
# it checks for things like memories, exports, imports, available capabilities, and non-determinism
- name: Check cosmwasm file
run: cosmwasm-check artifacts/cw_08_wasm_etheruem_light_client.wasm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of the file should have changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!



1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ broadcast/*/31337/
# Rust
target
elf
artifacts

# Config files and test artifacts
programs/relayer/config.json
Expand Down
Loading
Loading