Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
771afa3
feat(vardiff): inject Clock trait + add_shares trait method
May 13, 2026
255b9bf
feat(vardiff_sim): in-process simulation framework for vardiff charac…
May 13, 2026
f490ad4
data(vardiff_sim): design doc + baseline characterization of VardiffS…
May 13, 2026
c90cecd
feat(vardiff_sim): four-axis algorithm decomposition + characterization
gimballock May 16, 2026
33a8db3
feat(vardiff_sim): pareto report, floors in TL;DR, CI on rates, MD co…
gimballock May 16, 2026
ef2eb2e
feat(channels_sv2): promote four-axis composed/ from sim to production
gimballock May 17, 2026
2fb6ad9
chore(vardiff_sim): clippy + rustfmt + CI toolchain fixes
gimballock May 17, 2026
5f8a146
feat(vardiff): retune FullRemedy default to η=0.2 + add (η, z) Pareto…
May 17, 2026
f0bda61
feat(vardiff): add top-level default() factory + deprecate VardiffSta…
May 17, 2026
062d4d0
fix(channels_sv2): widen hash_rate_from_target multiply to U512
May 17, 2026
459633e
feat(vardiff): three-stage pipeline, AdaCUSUM algorithm, operational …
May 20, 2026
a1d3fa7
feat(vardiff): AsymmetricCusumBoundary — directional cost awareness
May 20, 2026
3a38127
chore: fix formatting and regenerate regression baseline
May 21, 2026
2a791c4
feat(vardiff/sim): add asymmetry preference to fitness + upward_step_…
May 21, 2026
5d871ed
refactor(vardiff/sim): revamp fitness weights for harm-avoidance prio…
May 21, 2026
70fcb26
feat(vardiff_sim): counter-age-aware algorithm evaluation
Jun 2, 2026
9ad1745
feat(vardiff): PID investigation yields AcceleratingPartialRetarget
Jun 3, 2026
81f71d2
feat(vardiff): promote AcceleratingPartialRetarget to production
Jun 3, 2026
7630a65
fix(vardiff): revert to EwmaEstimator for production
Jun 3, 2026
5a26fc9
fix(mining_sv2): add missing error code constant for extended channel…
Jun 3, 2026
4bec685
fix(vardiff): use CumulativeCounter for production
Jun 3, 2026
612eb39
fix(vardiff): make EwmaEstimator safe for per-share observe() calls
Jun 3, 2026
f4cd687
feat(vardiff): promote EwmaEstimator to production now that observe()…
Jun 3, 2026
6aa27a9
feat(vardiff): add ckpool algorithm investigation and per-share decay…
Jun 4, 2026
3262fc1
fix(mining_sv2): remove duplicate error code constant after rebase
Jun 4, 2026
adab1ee
style: apply rustfmt to vardiff modules
Jun 4, 2026
f446c7c
chore(vardiff_sim): regenerate regression baseline for current algorithm
Jun 4, 2026
15d7092
feat(vardiff): adaptive boundary — PoissonCI at low SPM, CUSUM at hig…
Jun 6, 2026
b77eff8
docs(vardiff): update ckpool investigation with hysteresis sweep and …
Jun 6, 2026
007dcb4
refactor(vardiff): rename transition_shares to spm_threshold
Jun 8, 2026
92a10d2
feat(vardiff): add AsymmetricPoissonCI boundary + parameter sweep
Jun 10, 2026
31a9dbc
feat(vardiff): derived algorithm naming, equal-weight radar, and two …
Jun 18, 2026
5f86183
feat(vardiff): generalize dual-mode boundary, fix react_priority low-…
Jun 18, 2026
7464240
fix(vardiff): revert production VardiffState to the classic algorithm
Jun 19, 2026
412e6de
feat(sim): §10 log-error regret/effort metric + theory writeup
Jun 19, 2026
5a21b0f
feat(sim): regret/effort sweep, weight analysis, and trajectory viz bins
Jun 19, 2026
1c645bc
feat(vardiff): SignPersist champion — fix ramp-up & settle-bias
Jun 19, 2026
f5ba4ae
feat(vardiff): WarmupBoundary primitive + cold-start warm-up negative…
Jun 19, 2026
252e26b
feat(vardiff): DebiasEstimator + settle-gap-is-optimal result
Jun 19, 2026
55e5dd0
docs(sim): vardiff metric derivation white paper
Jun 20, 2026
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
122 changes: 122 additions & 0 deletions .github/workflows/vardiff-sim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: vardiff_sim

on:
pull_request:
branches:
- main
paths:
- 'sv2/channels-sv2/sim/**'
- 'sv2/channels-sv2/src/vardiff/**'
- 'sv2/channels-sv2/src/target.rs'
- '.github/workflows/vardiff-sim.yaml'

jobs:
# Fast tests in the sim crate. Always run.
test-fast:
name: cargo test --lib
runs-on: ubuntu-latest
defaults:
run:
working-directory: sv2/channels-sv2/sim

steps:
- uses: actions/checkout@v4

- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
id: toolchain

# The repo root's `rust-toolchain.toml` pins 1.75, but the sim
# crate's Cargo.lock is v4 format (needs newer rustup). Override
# explicitly so the sim crate gets the stable toolchain.
- name: Override toolchain
run: rustup override set ${{ steps.toolchain.outputs.name }}
working-directory: sv2/channels-sv2/sim

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
sv2/channels-sv2/sim/target
key: ${{ runner.os }}-vardiff-sim-${{ hashFiles('sv2/channels-sv2/sim/Cargo.lock') }}

- name: Build sim crate
run: cargo build --release --verbose

- name: Fast unit tests
run: cargo test --lib --verbose

# Slow regression check: cargo test --release --lib -- --ignored runs
# the full 50-cell × 1000-trial baseline regression. ~15-20s.
# The current algorithm's behavior is asserted against the checked-in
# baseline_VardiffState.toml with CI-aware tolerance budgets.
test-regression:
name: regression vs checked-in baseline
runs-on: ubuntu-latest
defaults:
run:
working-directory: sv2/channels-sv2/sim

steps:
- uses: actions/checkout@v4

- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
id: toolchain

# The repo root's `rust-toolchain.toml` pins 1.75, but the sim
# crate's Cargo.lock is v4 format (needs newer rustup). Override
# explicitly so the sim crate gets the stable toolchain.
- name: Override toolchain
run: rustup override set ${{ steps.toolchain.outputs.name }}
working-directory: sv2/channels-sv2/sim

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
sv2/channels-sv2/sim/target
key: ${{ runner.os }}-vardiff-sim-regression-${{ hashFiles('sv2/channels-sv2/sim/Cargo.lock') }}

- name: Slow regression test
run: cargo test --release --lib -- --ignored

# Verify that the binaries still build (compare-algorithms,
# generate-baseline, trace-trial, sweep-ewma-tau). Doesn't run them
# (full sweep takes ~150s).
build-binaries:
name: cargo build --release (all bins)
runs-on: ubuntu-latest
defaults:
run:
working-directory: sv2/channels-sv2/sim

steps:
- uses: actions/checkout@v4

- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
id: toolchain

# The repo root's `rust-toolchain.toml` pins 1.75, but the sim
# crate's Cargo.lock is v4 format (needs newer rustup). Override
# explicitly so the sim crate gets the stable toolchain.
- name: Override toolchain
run: rustup override set ${{ steps.toolchain.outputs.name }}
working-directory: sv2/channels-sv2/sim

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
sv2/channels-sv2/sim/target
key: ${{ runner.os }}-vardiff-sim-bins-${{ hashFiles('sv2/channels-sv2/sim/Cargo.lock') }}

- name: Build all binaries
run: cargo build --release --bins --verbose
27 changes: 27 additions & 0 deletions asymmetric_poisson_sweep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# AsymmetricPoissonCI Sweep Results

## Comprehensive Fitness

| Algorithm | Avg | 4 | 6 | 8 | 10 | 12 | 15 | 20 | 30 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| AsymPoisson-t300 | 0.846 | 0.858 | 0.872 | 0.882 | 0.779 | 0.792 | 0.811 | 0.894 | 0.877 |
| AsymPoisson-t250 | 0.844 | 0.852 | 0.866 | 0.879 | 0.779 | 0.792 | 0.811 | 0.894 | 0.877 |
| AsymPoisson-t200 | 0.822 | 0.799 | 0.821 | 0.801 | 0.779 | 0.792 | 0.811 | 0.894 | 0.877 |
| AsymPoisson-t150 | 0.807 | 0.743 | 0.771 | 0.784 | 0.779 | 0.792 | 0.811 | 0.894 | 0.877 |
| AsymPoisson-t125 | 0.803 | 0.730 | 0.766 | 0.778 | 0.779 | 0.792 | 0.811 | 0.894 | 0.877 |
| AsymPoisson-t100 | 0.795 | 0.706 | 0.744 | 0.758 | 0.779 | 0.792 | 0.811 | 0.894 | 0.877 |
| AdaptiveBoundary-spm10 | 0.788 | 0.689 | 0.742 | 0.756 | 0.771 | 0.788 | 0.802 | 0.885 | 0.872 |
| FullRemedy | 0.740 | 0.705 | 0.723 | 0.724 | 0.733 | 0.745 | 0.752 | 0.763 | 0.774 |

## Operational Fitness

| Algorithm | Avg | 4 | 6 | 8 | 10 | 12 | 15 | 20 | 30 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| AsymPoisson-t300 | 0.807 | 0.823 | 0.841 | 0.853 | 0.724 | 0.740 | 0.764 | 0.868 | 0.847 |
| AsymPoisson-t250 | 0.805 | 0.815 | 0.833 | 0.848 | 0.724 | 0.740 | 0.764 | 0.868 | 0.847 |
| AsymPoisson-t200 | 0.777 | 0.748 | 0.776 | 0.752 | 0.724 | 0.740 | 0.764 | 0.868 | 0.847 |
| AsymPoisson-t150 | 0.758 | 0.678 | 0.714 | 0.731 | 0.724 | 0.740 | 0.764 | 0.868 | 0.847 |
| AsymPoisson-t125 | 0.754 | 0.662 | 0.707 | 0.722 | 0.724 | 0.740 | 0.764 | 0.868 | 0.847 |
| AsymPoisson-t100 | 0.744 | 0.633 | 0.680 | 0.697 | 0.724 | 0.740 | 0.764 | 0.868 | 0.847 |
| AdaptiveBoundary-spm10 | 0.735 | 0.611 | 0.677 | 0.695 | 0.714 | 0.735 | 0.752 | 0.856 | 0.840 |
| FullRemedy | 0.675 | 0.631 | 0.653 | 0.656 | 0.667 | 0.682 | 0.690 | 0.704 | 0.717 |
29 changes: 29 additions & 0 deletions sv2/channels-sv2/sim/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build artifacts (sim is its own Cargo workspace; root .gitignore
# covers the parent workspace's target/, this entry covers ours).
/target

# macOS finder noise
.DS_Store

# Editor swap files
*.swp
*.swo
*~

# Locally generated reports & traces — regenerate via `cargo run`, no
# need to track. The checked-in baselines are explicitly named.
/trace-*.txt
/scratch-*
# Sweep/comparison reports and charts (regenerate via the sweep / radar
# / trajectory bins; the analysis lives in commit messages / docs, not
# the raw output files).
/*_sweep.md
/*_sweep_big.md
/confirm_*.md
/champion_weights.md
/*.svg
/compare_out*/
/sweep_out/

# Optional: cargo-semver-checks scratch directory
.semver-checks/
Loading
Loading