Skip to content

Commit

Permalink
Simplify beacon light client (#839)
Browse files Browse the repository at this point in the history
Co-authored-by: Ron <yrong1997@gmail.com>
  • Loading branch information
vgeddes and yrong authored May 23, 2023
1 parent 8f6ed31 commit 789fa3e
Show file tree
Hide file tree
Showing 55 changed files with 3,925 additions and 9,199 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,32 +78,36 @@ jobs:
profile: minimal
toolchain: nightly-2023-04-22
target: wasm32-unknown-unknown
- name: test beacon client with minimal feature
uses: actions-rs/cargo@v1
# Increase stack limit for beacon light client tests
- run: sudo prlimit --pid $$ --stack=32768
# Run tests for everything except the beacon light client
- uses: actions-rs/cargo@v1
with:
command: test
args: >-
--manifest-path parachain/Cargo.toml
--verbose
--package snowbridge-ethereum-beacon-client
--features minimal
--workspace
--release
--features runtime-benchmarks
--exclude snowbridge-query-events
--exclude snowbridge-ethereum-beacon-client
toolchain: nightly-2023-04-22
- uses: actions-rs/install@v0.1.2
# Run tests for beacon light client, excluding benchmark tests
- uses: actions-rs/cargo@v1
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
- name: cargo test
uses: actions-rs/cargo@v1
command: test
args: >-
--manifest-path parachain/Cargo.toml
--release
--package snowbridge-ethereum-beacon-client
toolchain: nightly-2023-04-22
# Run benchmark tests for beacon light client
- uses: actions-rs/cargo@v1
with:
command: tarpaulin
command: test
args: >-
--manifest-path parachain/Cargo.toml
--release
--verbose
--workspace
--exclude snowbridge-query-events
--features runtime-benchmarks
--avoid-cfg-tarpaulin
--coveralls ${{ secrets.COVERALLS_REPO_TOKEN }}
--package snowbridge-ethereum-beacon-client
toolchain: nightly-2023-04-22
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ chronic typos .
(cd relayer && chronic mage lint && chronic go fmt ./...)

# cargo fmt
(cd parachain && SKIP_WASM_BUILD= cargo fmt --all)
#(cd parachain && SKIP_WASM_BUILD= cargo fmt --all)

echo 'Pre-commit hook successful!'
2 changes: 1 addition & 1 deletion core/packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test:bootstrap": "mocha --timeout 600000 --parallel --grep Bootstrap --exit"
},
"devDependencies": {
"@chainsafe/lodestar": "1.5.1",
"@chainsafe/lodestar": "1.8.0",
"@polkadot/api": "^10.7.1",
"@polkadot/api-cli": "^0.54.4",
"@polkadot/types": "^10.7.1",
Expand Down
4 changes: 2 additions & 2 deletions core/packages/test/scripts/build-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ rebuild_cumulus(){
build_cumulus_from_source(){
pushd $root_dir/cumulus
if [[ "$active_spec" == "minimal" ]]; then
cargo build --features "minimal" --release --bin polkadot-parachain
else
cargo build --release --bin polkadot-parachain
else
cargo build --features beacon-spec-mainnet --release --bin polkadot-parachain
fi
cp target/release/polkadot-parachain $output_bin_dir/polkadot-parachain
popd
Expand Down
2 changes: 1 addition & 1 deletion core/packages/test/scripts/set-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cumulus_version="${CUMULUS_VER:-snowbridge}"
cumulus_dir="$root_dir/parachain/.cargo/$cumulus_version"
cumulus_bin="${CUMULUS_BIN:-$cumulus_dir/bin/polkadot-parachain}"
core_dir="$root_dir/core"
lodestar_version="${LODESTAR_VER:-1.5.1}"
lodestar_version="${LODESTAR_VER:-1.8.0}"
geth_version="${GETH_VER:-v1.11.2}"
geth_dir="$root_dir/../go-ethereum/$geth_version"
contract_dir="$core_dir/packages/contracts"
Expand Down
Loading

0 comments on commit 789fa3e

Please sign in to comment.