Skip to content

first iteration of more formal docs #101

first iteration of more formal docs

first iteration of more formal docs #101

Workflow file for this run

name: Emerald
on:
merge_group:
pull_request:
push:
branches: [main]
permissions:
contents: read
packages: read
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR.
# Ensures that we don't waste CI time, and returns results quicker.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: short
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
emerald-block-production:
name: Block Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run Forge build
run: forge build
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run emerald
run: |
cargo build
./scripts/generate_testnet_config.sh --nodes 3 --testnet-config-dir .testnet
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt --devnet
docker compose up -d reth0 reth1 reth2 prometheus grafana otterscan
./scripts/add_peers.sh --nodes 3
bash scripts/spawn.bash --nodes 3 --home nodes --no-delay --no-wait
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v5
with:
name: emerald-test-logs
path: nodes/**/logs/*.log