feat(test-tools): add shape-proxy SV2 share-gating proxy#536
Closed
gimballock wants to merge 4 commits into
Closed
feat(test-tools): add shape-proxy SV2 share-gating proxy#536gimballock wants to merge 4 commits into
gimballock wants to merge 4 commits into
Conversation
A middlebox that sits between mining devices and a pool, enabling controlled modification of the share submission rate for testing pool difficulty adjustment algorithms. Core capabilities: - Transparent SV2/Noise proxy with channel management - Immediate share ACK to miners (decoupled from pool) - Token bucket share gate driven by configurable rate profiles - Upstream reconnection with exponential backoff - Difficulty floor enforcement via SetTarget interception - HTTP API for dynamic profile control and status monitoring Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All profiles are supply-relative multipliers (no absolute-rate mode): - Track, Step, Ramp, Stall, Burst, and Oscillate profiles - Count-based (N=15) supply window adapts to any share rate - Difficulty-weighted supply measurement for stable hashrate tracking - HTTP API for dynamic profile control and status monitoring Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7c3020c to
86246e7
Compare
…get) Point stratum-core dependency to marafoundation/stratum branch vardiff/simulation-framework at commit 006363aa which includes: - AcceleratingPartialRetarget as production UpdateRule - EwmaEstimator (reverts SpmRatioEstimator which had a production bug) - AsymmetricCusumBoundary with tighten_multiplier=3.0 Pin idna_adapter to 1.1.0 to avoid icu_collections 2.2 which requires Rust 1.86 (Docker image has 1.85.1). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
86246e7 to
8a976a7
Compare
Member
|
While this might be something useful for your investigation related to vardiff, it's definitely not something which we need to add and maintain on this repo. |
Contributor
Author
|
Yeah, this probably isn't the right place for this to live. The vardiff experiment repo itself has a similar identity crisis. I think I will make an isolated pr just for the final vardiff change, to separate the test framework from the results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new test tool that sits between mining devices and a pool, enabling controlled modification of the share
submission rate without touching mining hardware. Modulating share streams against a live pool is otherwise difficult
— miners produce shares at a rate determined by physics, not configuration.
This tool complements the vardiff simulation framework by providing calibration testing against real pool
infrastructure with real miners.
Architecture
Each arriving share is immediately ACKed to the miner (decoupling it from pool behavior), then the gate decides
whether to forward or drop based on the active profile and measured supply rate.
Using with SV1 miners
Most miners only speak Stratum V1. To use them with shape-proxy, place the existing translator_sv2 (from
roles/translator) between the miner and the proxy:
The translator is a pass-through protocol adapter — it doesn't buffer, gate, or modify shares. It adds no meaningful
latency or behavioral change to the share stream. The only operational impact is an additional process to manage.
Test plan