Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ jobs:

- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: reftests/vectors
key: ${{ runner.os }}-reftest-vectors-coverage-${{ hashFiles('reftests/src/lib.rs', 'reftests/src/vectors.rs', 'reftests/src/vectors/*.rs') }}
path: tests/vectors
key: ${{ runner.os }}-reftest-vectors-coverage-${{ hashFiles('tests/src/lib.rs', 'tests/src/vectors.rs', 'tests/src/vectors/*.rs') }}
restore-keys: |
${{ runner.os }}-reftest-vectors-coverage-

- name: coverage
run: |
cargo llvm-cov clean --workspace --locked
cargo llvm-cov --locked --no-report run --release -p reftests --bin reftests-minimal --no-default-features --features minimal
cargo llvm-cov --locked --no-report run --release -p reftests --bin reftests
cargo llvm-cov --locked --no-report run --release -p tests --bin reftests-minimal --no-default-features --features minimal
cargo llvm-cov --locked --no-report run --release -p tests --bin reftests
cargo llvm-cov report --release --locked --codecov --output-path codecov.json \
--ignore-filename-regex '(reftests/src|/registry/|\.cargo)'
--ignore-filename-regex '(tests/src|/registry/|\.cargo)'
cargo llvm-cov report --release --locked --lcov --output-path lcov.info \
--ignore-filename-regex '(reftests/src|/registry/|\.cargo)'
--ignore-filename-regex '(tests/src|/registry/|\.cargo)'

- uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ jobs:

- name: rustdoc
run: cargo doc --workspace --no-deps --document-private-items --locked

- name: rustdoc-node
run: cargo doc -p moonglass-node --no-deps --document-private-items --no-default-features --features minimal,node --locked
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
- name: clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings

- name: clippy-node
run: cargo clippy -p moonglass-node --no-default-features --features minimal,node --all-targets --locked -- -D warnings

actionlint:
name: actionlint-shellcheck
runs-on: ubuntu-24.04
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ jobs:

- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: reftests/vectors
key: ${{ runner.os }}-reftest-vectors-mainnet-${{ hashFiles('reftests/src/lib.rs', 'reftests/src/vectors.rs', 'reftests/src/vectors/*.rs') }}
path: tests/vectors
key: ${{ runner.os }}-reftest-vectors-mainnet-${{ hashFiles('tests/src/lib.rs', 'tests/src/vectors.rs', 'tests/src/vectors/*.rs') }}
restore-keys: |
${{ runner.os }}-reftest-vectors-mainnet-

- name: build-reftests-runner
run: cargo build --release -p reftests --locked
run: cargo build --release -p tests --locked

- name: run-reftests
shell: bash
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- name: unit-tests
run: cargo test --workspace --locked

- name: node-tests
run: cargo test -p moonglass-node --no-default-features --features minimal,node --locked

reftests:
name: consensus-reftests-minimal
runs-on: ubuntu-24.04
Expand All @@ -55,16 +58,16 @@ jobs:

- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: reftests/vectors
key: ${{ runner.os }}-reftest-vectors-minimal-${{ hashFiles('reftests/src/lib.rs', 'reftests/src/vectors.rs', 'reftests/src/vectors/*.rs') }}
path: tests/vectors
key: ${{ runner.os }}-reftest-vectors-minimal-${{ hashFiles('tests/src/lib.rs', 'tests/src/vectors.rs', 'tests/src/vectors/*.rs') }}
restore-keys: |
${{ runner.os }}-reftest-vectors-minimal-

- name: test-reftests-minimal
run: cargo test -p reftests --no-default-features --features minimal --locked
run: cargo test -p tests --no-default-features --features minimal --locked

- name: build-reftests-runner
run: cargo build --release -p reftests --no-default-features --features minimal --locked
run: cargo build --release -p tests --no-default-features --features minimal --locked

- name: run-reftests
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
/tests/vectors/
/reftests/vectors/

# Coverage artifacts, regenerated by the Coverage workflow and cargo-llvm-cov.
Expand Down
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fix(state_transition): reject attestation with future target epoch
docs(constants): document bit-40 builder index flag
refactor(epoch): split process_epoch into phase-named helpers
test(primitives): add round-trip for BuilderIndex encoding
chore: bump ssz_rs to 0.10
chore: bump thiserror to 2
ci: split required checks by lane
```

Expand Down Expand Up @@ -81,8 +81,8 @@ Crates and tools outside the main library may document extra checks in their own
README files. Run those when your change touches that code.

Consensus changes also need fixture validation. If upstream consensus-spec
fixtures cover the behavior, add the matching `reftests` adapter and checks,
then run that lane. See [`reftests/README.md`](reftests/README.md).
fixtures cover the behavior, add the matching `tests` adapter and checks,
then run that lane. See [`tests/README.md`](tests/README.md).

## Review

Expand All @@ -100,8 +100,6 @@ Useful areas for contributors:
implemented Moonglass behavior.
- Expand transition and fork-choice coverage as Moonglass exposes more public
consensus APIs.
- Evaluate replacing the current `ssz_rs` dependency when the project is ready
to own that surface.
- Explore Rust-to-Lean generation and formal verification.

Discuss larger scope changes before implementation, especially networking,
Expand Down Expand Up @@ -130,7 +128,8 @@ ownership, mutations, invariants, and implementation boundaries. Avoid comments
that only restate obvious control flow.

Error descriptions are centralized in the domain error modules under
`moonglass/src/error*.rs`. Do not add repetitive per-function `# Errors`
`moonglass-core/src/error.rs` and `moonglass-core/src/error/`. Do not add
repetitive per-function `# Errors`
sections only to satisfy Clippy. Function docs should explain protocol flow and
local invariants, and only mention a rejection inline when it is essential to
understanding that function.
Expand Down
Loading
Loading