Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58f50d0395
|
||
|
|
c6436c653d
|
||
|
|
871c688b17
|
||
|
|
312d958a91
|
||
|
|
2c28dd77b4
|
No files matched your search
@@ -7,6 +7,12 @@ test_tool = "nextest"
|
|||||||
# Async tests + crypto work takes longer under mutation load.
|
# Async tests + crypto work takes longer under mutation load.
|
||||||
timeout_multiplier = 3.0
|
timeout_multiplier = 3.0
|
||||||
|
|
||||||
|
# Enable `test-support` so cfg-gated setters (e.g. Builder::dht_backend) and
|
||||||
|
# the integration tests that exercise them are part of the mutation surface.
|
||||||
|
# Without this, dht_backend mutations always "survive" trivially because the
|
||||||
|
# method isn't compiled in.
|
||||||
|
additional_cargo_args = ["--features", "test-support"]
|
||||||
|
|
||||||
# Skip paths that either can't be meaningfully mutated or are covered by
|
# Skip paths that either can't be meaningfully mutated or are covered by
|
||||||
# other tools:
|
# other tools:
|
||||||
# - sim_impl.rs: simulator is exercised via the simulator example, not
|
# - sim_impl.rs: simulator is exercised via the simulator example, not
|
||||||
|
|||||||
@@ -25,9 +25,11 @@ jobs:
|
|||||||
- name: miri on keys/wire/crypto/merge
|
- name: miri on keys/wire/crypto/merge
|
||||||
env:
|
env:
|
||||||
MIRIFLAGS: -Zmiri-disable-isolation
|
MIRIFLAGS: -Zmiri-disable-isolation
|
||||||
# Quoted because YAML plain scalars can't contain `: ` sequences
|
# `cargo test` takes a single TESTNAME positional, so multi-module
|
||||||
# without being misparsed as mapping entries.
|
# filters must be passed to the test binary after `--`. Quoted because
|
||||||
run: "cargo +nightly miri test --lib keys:: wire:: crypto:: merge::"
|
# YAML plain scalars can't contain `: ` sequences without being
|
||||||
|
# misparsed as mapping entries.
|
||||||
|
run: "cargo +nightly miri test --lib -- keys:: wire:: crypto:: merge::"
|
||||||
|
|
||||||
mutants:
|
mutants:
|
||||||
name: cargo-mutants
|
name: cargo-mutants
|
||||||
@@ -43,7 +45,7 @@ jobs:
|
|||||||
- uses: taiki-e/install-action@v2
|
- uses: taiki-e/install-action@v2
|
||||||
with:
|
with:
|
||||||
tool: cargo-mutants,cargo-nextest
|
tool: cargo-mutants,cargo-nextest
|
||||||
- run: cargo mutants --shard ${{ matrix.shard }}/4 --in-diff-base ""
|
- run: cargo mutants --shard ${{ matrix.shard }}/4
|
||||||
|
|
||||||
fuzz-smoke:
|
fuzz-smoke:
|
||||||
name: fuzz smoke (60s / target)
|
name: fuzz smoke (60s / target)
|
||||||
@@ -63,7 +65,11 @@ jobs:
|
|||||||
- uses: taiki-e/install-action@v2
|
- uses: taiki-e/install-action@v2
|
||||||
with:
|
with:
|
||||||
tool: cargo-fuzz
|
tool: cargo-fuzz
|
||||||
- run: cd fuzz && cargo +nightly fuzz run ${{ matrix.target }} -- -max_total_time=60
|
# `--target` is explicit because the binstall'd `cargo-fuzz` binary is a
|
||||||
|
# statically-linked musl build, and `cargo fuzz`'s default target is the
|
||||||
|
# triple it was compiled for. The libfuzzer sanitizer is incompatible
|
||||||
|
# with the static-crt musl target, so force the glibc triple.
|
||||||
|
- run: cd fuzz && cargo +nightly fuzz run --target x86_64-unknown-linux-gnu ${{ matrix.target }} -- -max_total_time=60
|
||||||
|
|
||||||
kani:
|
kani:
|
||||||
name: kani
|
name: kani
|
||||||
|
|||||||
+3
-3
@@ -135,6 +135,6 @@ peer addresses required.
|
|||||||
|
|
||||||
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
|
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
|
||||||
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
|
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
|
||||||
[protocol]: https://github.com/swaits/iroh-gossip-rendezvous/blob/main/PROTOCOL.md
|
[protocol]: https://git.swaits.com/swaits/iroh-gossip-rendezvous/src/branch/main/PROTOCOL.md
|
||||||
[Unreleased]: https://github.com/swaits/iroh-gossip-rendezvous/compare/v0.1.0...HEAD
|
[Unreleased]: https://git.swaits.com/swaits/iroh-gossip-rendezvous/compare/v0.1.0...main
|
||||||
[0.1.0]: https://github.com/swaits/iroh-gossip-rendezvous/releases/tag/v0.1.0
|
[0.1.0]: https://git.swaits.com/swaits/iroh-gossip-rendezvous/releases/tag/v0.1.0
|
||||||
+1
-1
@@ -6,7 +6,7 @@ Bug reports, feature requests, and pull requests welcome.
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Clone the repo.
|
# Clone the repo.
|
||||||
git clone https://github.com/swaits/iroh-gossip-rendezvous
|
git clone https://git.swaits.com/swaits/iroh-gossip-rendezvous
|
||||||
cd iroh-gossip-rendezvous
|
cd iroh-gossip-rendezvous
|
||||||
|
|
||||||
# Install the dev toolchain. Most tools are lightweight; Kani is the
|
# Install the dev toolchain. Most tools are lightweight; Kani is the
|
||||||
|
|||||||
+3
-3
@@ -1,13 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "iroh-gossip-rendezvous"
|
name = "iroh-gossip-rendezvous"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.93.0"
|
rust-version = "1.93.0"
|
||||||
authors = ["Stephen Waits <steve@waits.net>"]
|
authors = ["Stephen Waits <steve@waits.net>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Passphrase-based rendezvous for iroh-gossip swarms via Mainline DHT"
|
description = "Passphrase-based rendezvous for iroh-gossip swarms via Mainline DHT"
|
||||||
repository = "https://github.com/swaits/iroh-gossip-rendezvous"
|
repository = "https://git.swaits.com/swaits/iroh-gossip-rendezvous"
|
||||||
homepage = "https://github.com/swaits/iroh-gossip-rendezvous"
|
homepage = "https://git.swaits.com/swaits/iroh-gossip-rendezvous"
|
||||||
keywords = ["iroh", "gossip", "dht", "mainline", "rendezvous"]
|
keywords = ["iroh", "gossip", "dht", "mainline", "rendezvous"]
|
||||||
categories = ["network-programming"]
|
categories = ["network-programming"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
> modelled in `tests/stateright_model.rs` for bounded safety + liveness
|
> modelled in `tests/stateright_model.rs` for bounded safety + liveness
|
||||||
> checks.
|
> checks.
|
||||||
>
|
>
|
||||||
> Authoritative copy: <https://github.com/swaits/iroh-gossip-rendezvous/blob/main/PROTOCOL.md>.
|
> Authoritative copy: <https://git.swaits.com/swaits/iroh-gossip-rendezvous/src/branch/main/PROTOCOL.md>.
|
||||||
>
|
>
|
||||||
> [`iroh-gossip-rendezvous`]: https://docs.rs/iroh-gossip-rendezvous
|
> [`iroh-gossip-rendezvous`]: https://docs.rs/iroh-gossip-rendezvous
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://crates.io/crates/iroh-gossip-rendezvous)
|
[](https://crates.io/crates/iroh-gossip-rendezvous)
|
||||||
[](https://docs.rs/iroh-gossip-rendezvous)
|
[](https://docs.rs/iroh-gossip-rendezvous)
|
||||||
[](https://github.com/swaits/iroh-gossip-rendezvous/actions)
|
[](https://git.swaits.com/swaits/iroh-gossip-rendezvous/actions)
|
||||||
[](#msrv)
|
[](#msrv)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
|
|||||||
Generated
+604
-444
File diff suppressed because it is too large.
Load diff
@@ -470,6 +470,30 @@ mod tests {
|
|||||||
assert_eq!(Builder::default().heal_period(d).heal_period, d);
|
assert_eq!(Builder::default().heal_period(d).heal_period, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn failure_retry_period_setter_stores_exact_value() {
|
||||||
|
let d = Duration::from_millis(42);
|
||||||
|
assert_eq!(
|
||||||
|
Builder::default()
|
||||||
|
.failure_retry_period(d)
|
||||||
|
.failure_retry_period,
|
||||||
|
d
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(feature = "test-support")]
|
||||||
|
fn dht_backend_setter_stores_value() {
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use crate::sim::InMemoryDht;
|
||||||
|
let dht = Arc::new(InMemoryDht::new());
|
||||||
|
let before = Builder::default();
|
||||||
|
let after = Builder::default().dht_backend(dht);
|
||||||
|
assert!(before.dht_backend.is_none());
|
||||||
|
assert!(after.dht_backend.is_some());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn jitter_setter_stores_exact_value() {
|
fn jitter_setter_stores_exact_value() {
|
||||||
let b = Builder::default().jitter(0.25);
|
let b = Builder::default().jitter(0.25);
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ pub use state::{DhtStatus, RendezvousState};
|
|||||||
/// here so callers (and the `tests/spec_drift.rs` consistency check) can
|
/// here so callers (and the `tests/spec_drift.rs` consistency check) can
|
||||||
/// reference them without poking at private modules.
|
/// reference them without poking at private modules.
|
||||||
///
|
///
|
||||||
/// [`PROTOCOL.md`]: https://github.com/swaits/iroh-gossip-rendezvous/blob/main/PROTOCOL.md
|
/// [`PROTOCOL.md`]: https://git.swaits.com/swaits/iroh-gossip-rendezvous/src/branch/main/PROTOCOL.md
|
||||||
pub mod defaults {
|
pub mod defaults {
|
||||||
pub use crate::builder::{
|
pub use crate::builder::{
|
||||||
DEFAULT_EPOCH_WRITES, DEFAULT_HEAL_PERIOD, DEFAULT_JITTER, DEFAULT_MAX_AGE,
|
DEFAULT_EPOCH_WRITES, DEFAULT_HEAL_PERIOD, DEFAULT_JITTER, DEFAULT_MAX_AGE,
|
||||||
|
|||||||
@@ -278,6 +278,7 @@ fn random_large() {
|
|||||||
.checker()
|
.checker()
|
||||||
.threads(num_cpus())
|
.threads(num_cpus())
|
||||||
.target_max_depth(50)
|
.target_max_depth(50)
|
||||||
|
.target_state_count(1_000_000)
|
||||||
.spawn_simulation(0, stateright::UniformChooser)
|
.spawn_simulation(0, stateright::UniformChooser)
|
||||||
.join()
|
.join()
|
||||||
.assert_properties();
|
.assert_properties();
|
||||||
|
|||||||
Reference in new issue
Block a user