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

ISMP v0.1 #64

Merged
merged 33 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f41045e
ISMP v0.1 WIP
seunlanlege Dec 29, 2023
1208a7d
HostManager
seunlanlege Dec 29, 2023
65cb4ae
introduce bridge fees
seunlanlege Dec 29, 2023
3de55b5
how to refund relayer fees?
seunlanlege Dec 29, 2023
1044226
remove unneeded todo
seunlanlege Dec 29, 2023
98d4ee6
refund fees onTimeout
seunlanlege Dec 29, 2023
86bed76
wip fix build
seunlanlege Dec 29, 2023
1be67f5
switch to main
seunlanlege Dec 29, 2023
6971344
make the feeToken contract configurable through HostManager
seunlanlege Dec 30, 2023
74b6081
some ideas to unfuck integration-tests
seunlanlege Dec 30, 2023
92f7f4d
unfuck evm integration tests
seunlanlege Dec 30, 2023
0b2e2ff
fix workflow
seunlanlege Dec 30, 2023
c4ce1cf
rework actions
seunlanlege Dec 30, 2023
306a671
bump ci
seunlanlege Dec 30, 2023
710cb23
bump ci
seunlanlege Dec 30, 2023
b9f9101
revert ethers/foundry
seunlanlege Dec 30, 2023
29cb040
bump ethers
seunlanlege Dec 30, 2023
2259a50
decouple forge-testsuite & ismp-solidity-abi
seunlanlege Dec 31, 2023
294f232
bump Cargo.lock
seunlanlege Dec 31, 2023
16b8b04
fix all solidity warnings
seunlanlege Dec 31, 2023
7853269
introduce beefy-verifier-primitives
seunlanlege Dec 31, 2023
7298109
introduce beefy-prover
seunlanlege Dec 31, 2023
6b18087
cargo fmt
seunlanlege Dec 31, 2023
6e11bef
fix CI, again
seunlanlege Dec 31, 2023
e83da29
use cargo stable
seunlanlege Dec 31, 2023
a8cf805
try again
seunlanlege Dec 31, 2023
81b06dd
try again
seunlanlege Dec 31, 2023
7997740
try again
seunlanlege Dec 31, 2023
229604a
try again
seunlanlege Dec 31, 2023
87e01ff
fix tests
seunlanlege Dec 31, 2023
cb41a15
remove some sync committee tests
Wizdave97 Dec 31, 2023
6b9bead
add rust-cache to tests
seunlanlege Dec 31, 2023
407a824
split integration & unit tests
seunlanlege Dec 31, 2023
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
135 changes: 83 additions & 52 deletions .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: CI

on:
push:
Expand All @@ -17,66 +17,72 @@ env:
RUSTFLAGS: "-C link-args=-Wl,--allow-multiple-definition"
FOUNDRY_PROFILE: ci


jobs:
check-rust:
name: Check Workspace
check-wasm:
name: Check Wasm Crates
runs-on: ubuntu-latest
strategy:
matrix:
crate: [messier-runtime, gargantua-runtime]
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly

- uses: Swatinem/rust-cache@v1
- run: rustup target add wasm32-unknown-unknown --toolchain nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GH_TOKEN }}
- run: |
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup component add rust-src

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- name: check workspace
- name: check no-std
run: |
cargo +nightly check --all --benches --locked
cargo +nightly check -p ismp --no-default-features --target=wasm32-unknown-unknown --locked
cargo +nightly check -p pallet-ismp --no-default-features --target=wasm32-unknown-unknown --locked
cargo +nightly check -p ismp-demo --no-default-features --target=wasm32-unknown-unknown --locked
cargo +nightly check -p ethereum-trie --no-default-features --target=wasm32-unknown-unknown --locked
cargo +nightly check -p ismp-sync-committee --no-default-features --target=wasm32-unknown-unknown --locked


cargo +nightly check -p ${{ matrix.crate }} --no-default-features --target=wasm32-unknown-unknown --locked

check-runtime-wasm:
name: Check Runtime Wasm
check-workspace:
name: Check Workspace
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive
- name: Install toolchain

- name: Install rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v1
- run: rustup target add wasm32-unknown-unknown
toolchain: stable

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GH_TOKEN }}

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- name: check runtime no-std
- uses: Swatinem/rust-cache@v1

- name: Install wasm toolchain
run: |
rustup target add wasm32-unknown-unknown
rustup component add rust-src
rustup show

- name: check workspace
run: |
cargo +nightly check -p gargantua-runtime --no-default-features --target=wasm32-unknown-unknown --locked
cargo +nightly check -p messier-runtime --no-default-features --target=wasm32-unknown-unknown --locked
cargo check --all --benches --locked

fmt:
name: Cargo fmt
Expand All @@ -92,46 +98,73 @@ jobs:
- name: Cargo fmt
run: cargo +nightly fmt --all --check

test:
name: Test Suite
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
env:
TUID: 123
steps:
- name: set UID env
run: |
echo $UID
echo "TUID=$UID" >> $GITHUB_ENV

- name: Checkout sources
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive


- name: Install rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: stable

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- uses: Swatinem/rust-cache@v1

- name: Install wasm toolchain
run: |
rustup target add wasm32-unknown-unknown
rustup component add rust-src
rustup show

- name: Install protoc
run: |
sudo apt update
sudo apt install protobuf-compiler

- name: Run unit tests
run: |
cargo test --all-targets --features=runtime-benchmarks --locked

integration-tests:
name: Integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive

- name: Install rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- uses: Swatinem/rust-cache@v1

- name: Run unit tests
- name: Install wasm toolchain
run: |
cargo +nightly test -p pallet-ismp --all-targets --all-features --locked
cargo +nightly test -p ismp-testsuite --all-targets --all-features --locked
cargo +nightly test -p ethereum-trie --all-features --locked
# cd evm/forge && cargo test
rustup target add wasm32-unknown-unknown
rustup component add rust-src
rustup show

- name: Install protoc
run: |
sudo apt update
sudo apt install protobuf-compiler

- name: Clone eth-pos-devnet repository
run: |
Expand All @@ -142,16 +175,12 @@ jobs:
../scripts/wait_for_tcp_port_opening.sh localhost 3500
../scripts/wait_for_tcp_port_opening.sh localhost 8545

- name: Run all tests
- name: sync-committee integration tests
run: |
cargo +nightly test -p sync-committee-prover -- --nocapture

cargo test -p sync-committee-prover -- --nocapture --ignored

check-solidity:
strategy:
fail-fast: true

name: Foundry project
name: Check ismp-solidity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -165,11 +194,13 @@ jobs:

- name: Run Forge build
run: |
cd ./evm
forge --version
forge build --sizes
id: build

- name: Run Forge tests
run: |
cd ./evm
forge test -vvv
id: test
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/target
/.idea
.idea/

*.log
**/node_modules/*
Expand All @@ -14,4 +14,4 @@
evm/out/
evm/cache/
evm/broadcast/
evm/forge/target/
evm/integration-tests/target/
Loading
Loading