Initial release: v0.1.0
Passphrase-based peer rendezvous for iroh-gossip swarms over the public Mainline DHT. Two nodes that share a passphrase + application salt find each other and join the same gossip topic — no bootstrap server, no prior knowledge of peer addresses. The algorithm is a clock-free variant of HyParView-style partition healing on BEP 44 mutable items, with K-sharded slots, logical aging with random-tie eviction, vouching of up to V neighbors at age 1, and a two-layer AEAD record envelope. Full spec in PROTOCOL.md. Ships with: * 119 tests (unit / property / integration / doctest) all green * 100% mutation-testing catch rate (cargo-mutants) * cargo-fuzz harnesses for the parse surface * Kani proofs of no-UB / no-panic on crypto::epoch_of and wire::decode_entries across their full symbolic input spaces * Stateright distributed-system model: safety invariants S1 + S2 proved exhaustively for N ≤ 6, K ≤ 3; liveness witness under weak fairness * Miri green on the synchronous modules * cargo-deny + cargo-audit clean * criterion benches * Full-matrix CI (Linux + macOS + Windows × stable + MSRV 1.93.0) * Dedicated nightly lane for Miri / mutation / fuzz / Kani / Stateright Pinned iroh 0.98.x. License MIT. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
54 files changed
+16897
No files matched your search
@@ -0,0 +1,54 @@
|
||||
name: Bug report
|
||||
description: Something isn't working as expected.
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
placeholder: "0.2.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: rust-version
|
||||
attributes:
|
||||
label: Rust version (`rustc --version`)
|
||||
placeholder: "1.93.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating system
|
||||
options: [Linux, macOS, Windows, Other]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: summary
|
||||
attributes:
|
||||
label: Summary
|
||||
description: What happened, and what did you expect instead?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Minimal reproduction
|
||||
description: Ideally a self-contained snippet + steps. Logs with `RUST_LOG=iroh_gossip_rendezvous=debug` help.
|
||||
render: rust
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Checks
|
||||
options:
|
||||
- label: I searched existing issues and this isn't a duplicate.
|
||||
required: true
|
||||
- label: I can reproduce on the latest published release.
|
||||
required: false
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Feature request
|
||||
description: Propose a new feature or API change.
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: textarea
|
||||
id: motivation
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: What are you trying to accomplish? What's the problem?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposal
|
||||
description: What API / behavior would solve this? Alternatives you've considered?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: impact
|
||||
attributes:
|
||||
label: Impact
|
||||
options:
|
||||
- label: This would require a breaking API change (major version bump).
|
||||
required: false
|
||||
- label: This would change the wire format (major version bump, incompatible with older releases).
|
||||
required: false
|
||||
@@ -0,0 +1,11 @@
|
||||
# Description
|
||||
|
||||
<!-- What does this PR do and why? -->
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Tests added / updated for the behavior touched.
|
||||
- [ ] `just check` green locally.
|
||||
- [ ] If public API changed: `cargo semver-checks` considered; version bump in the PR title.
|
||||
- [ ] If wire format / PROTOCOL.md changed: `tests/spec_drift.rs` updated; CHANGELOG entry added.
|
||||
- [ ] If algorithmic core (`keys`/`wire`/`crypto`/`merge`/`protocol`) changed: re-ran `just mutants` and `just kani` locally.
|
||||
@@ -0,0 +1,21 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: cargo
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
patch-updates:
|
||||
update-types: [patch]
|
||||
|
||||
- package-ecosystem: cargo
|
||||
directory: /fuzz
|
||||
schedule:
|
||||
interval: monthly
|
||||
open-pull-requests-limit: 2
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
@@ -0,0 +1,123 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: -D warnings
|
||||
|
||||
jobs:
|
||||
# ── Fast lane: OS × toolchain matrix ──────────────────────────────
|
||||
check:
|
||||
name: check (${{ matrix.os }}, ${{ matrix.toolchain }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
toolchain: [stable, "1.93.0"] # MSRV
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-nextest
|
||||
- name: fmt
|
||||
run: cargo fmt --check
|
||||
- name: clippy
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
- name: nextest
|
||||
run: cargo nextest run --all-features --profile ci
|
||||
- name: doctests
|
||||
run: cargo test --doc --all-features
|
||||
|
||||
# ── Supply-chain hygiene ──────────────────────────────────────────
|
||||
deny:
|
||||
name: cargo deny
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-deny
|
||||
- run: cargo deny check
|
||||
|
||||
audit:
|
||||
name: cargo audit
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-audit
|
||||
- run: cargo audit
|
||||
|
||||
# ── Public-API semver compliance (PR only) ────────────────────────
|
||||
semver:
|
||||
name: cargo semver-checks
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-semver-checks
|
||||
- name: semver-checks (non-blocking until 0.1 on crates.io)
|
||||
run: cargo semver-checks check-release || echo "pre-publish; ignoring"
|
||||
|
||||
# ── Line + branch coverage (Linux stable only) ────────────────────
|
||||
coverage:
|
||||
name: coverage
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: llvm-tools-preview
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-llvm-cov,cargo-nextest
|
||||
- name: lcov
|
||||
run: cargo llvm-cov nextest --all-features --lcov --output-path lcov.info
|
||||
- uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: lcov.info
|
||||
fail_ci_if_error: false
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
# ── Build examples (smoke) ────────────────────────────────────────
|
||||
examples:
|
||||
name: examples build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo build --example quickstart
|
||||
- run: cargo build --example simulator --features sim
|
||||
|
||||
# ── Stateright BFS safety proof (fast) ────────────────────────────
|
||||
stateright:
|
||||
name: stateright BFS N=3 K=2
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test --test stateright_model --release --all-features -- bfs_n3_k2 --ignored
|
||||
@@ -0,0 +1,93 @@
|
||||
name: Nightly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 5 * * *" # 05:00 UTC daily
|
||||
workflow_dispatch: {}
|
||||
|
||||
concurrency:
|
||||
group: nightly-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
miri:
|
||||
name: miri (sync modules)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
components: miri
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: miri on keys/wire/crypto/merge
|
||||
env:
|
||||
MIRIFLAGS: -Zmiri-disable-isolation
|
||||
run: cargo +nightly miri test --lib keys:: wire:: crypto:: merge::
|
||||
|
||||
mutants:
|
||||
name: cargo-mutants
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
shard: [0, 1, 2, 3]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-mutants,cargo-nextest
|
||||
- run: cargo mutants --shard ${{ matrix.shard }}/4 --in-diff-base ""
|
||||
|
||||
fuzz-smoke:
|
||||
name: fuzz smoke (60s / target)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- fuzz_decode_entries
|
||||
- fuzz_wire_roundtrip
|
||||
- fuzz_crypto_open
|
||||
- fuzz_merge
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-fuzz
|
||||
- run: cd fuzz && cargo +nightly fuzz run ${{ matrix.target }} -- -max_total_time=60
|
||||
|
||||
kani:
|
||||
name: kani
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: model-checking/kani-github-action@v1
|
||||
with:
|
||||
args: "--harness merge_size_invariant --harness merge_age_invariant --harness merge_self_always_at_zero --harness wire_encode_decode_roundtrip --harness wire_decode_no_panic --harness crypto_epoch_of_no_overflow"
|
||||
|
||||
stateright-random:
|
||||
name: stateright random N=6 K=3
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test --test stateright_model --release --all-features -- random_large --ignored
|
||||
|
||||
bench:
|
||||
name: criterion benches
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo bench --all-features
|
||||
Reference in new issue
Block a user