Merge pool-finish-21 4d7521b3 into release-0.3.22 (the pool daemon keeps jobs 60 s or 256 per member, stale grace 30 s: the Devnet 3 read of 25,477 unknown_job shares at one template a second)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
bf6dbdf355
2 changed files with 20 additions and 2 deletions
|
|
@ -25,6 +25,8 @@ pub struct Config {
|
|||
pub min_shift: u32,
|
||||
pub max_shift: u32,
|
||||
pub stale_grace_ms: u64,
|
||||
/// Whether --stale-grace-ms was given (the open pool's default is 30 s, pool-0's 2 s)
|
||||
pub stale_grace_set: bool,
|
||||
/// A pending block older than this many DAA scores and not blue is an orphan
|
||||
pub orphan_after_daa: u64,
|
||||
pub name: String,
|
||||
|
|
@ -103,6 +105,7 @@ impl Config {
|
|||
min_shift: 0,
|
||||
max_shift: 60,
|
||||
stale_grace_ms: 2000,
|
||||
stale_grace_set: false,
|
||||
orphan_after_daa: 120,
|
||||
name: "Igneum pool".into(),
|
||||
public_url: String::new(),
|
||||
|
|
@ -149,7 +152,10 @@ impl Config {
|
|||
"--share-interval-s" => c.share_interval_s = val().parse().unwrap_or_else(|_| Config::usage()),
|
||||
"--min-shift" => c.min_shift = val().parse().unwrap_or_else(|_| Config::usage()),
|
||||
"--max-shift" => c.max_shift = val().parse().unwrap_or_else(|_| Config::usage()),
|
||||
"--stale-grace-ms" => c.stale_grace_ms = val().parse().unwrap_or_else(|_| Config::usage()),
|
||||
"--stale-grace-ms" => {
|
||||
c.stale_grace_ms = val().parse().unwrap_or_else(|_| Config::usage());
|
||||
c.stale_grace_set = true;
|
||||
}
|
||||
"--orphan-after-daa" => c.orphan_after_daa = val().parse().unwrap_or_else(|_| Config::usage()),
|
||||
"--name" => c.name = val(),
|
||||
"--public-url" => c.public_url = val(),
|
||||
|
|
@ -207,6 +213,14 @@ impl Config {
|
|||
if c.p2p_listen.is_empty() {
|
||||
c.p2p_listen = format!("0.0.0.0:{}", port + 10);
|
||||
}
|
||||
// The open pool (Devnet 3 pair, 7 October 2026, 18:16Z: 25,477 unknown_job and 19,119 stale shares, 0
|
||||
// accepted): a template arrives every second on a 1-block-a-second chain and a GPU worker's batch outlives
|
||||
// it, so a share on a template a few seconds old is the normal case, and a share of the share chain is valid
|
||||
// on any template whose share-chain parent the chain accepts (P2Pool's rule); a share that is also a block on
|
||||
// an old template is at worst an orphan. The open pool's grace is 30 s unless the operator says otherwise.
|
||||
if c.open && !c.stale_grace_set {
|
||||
c.stale_grace_ms = 30_000;
|
||||
}
|
||||
c
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,11 @@ async fn issue_job(pool: &Arc<Pool>, member: &Arc<Member>, mut raw: RpcRawBlock,
|
|||
open_parent,
|
||||
open_share_target64,
|
||||
});
|
||||
while g.jobs.len() > 12 {
|
||||
// jobs are kept for the share's round trip: 60 s or 256 jobs, never fewer than 12 (the first version kept 12,
|
||||
// which on a 1-block-a-second chain is about 7 s of jobs, under a GPU worker's batch: every share arrived for
|
||||
// a job already dropped, "unknown_job" on all of them, the Devnet 3 pair of 7 October 2026)
|
||||
let keep_from = Instant::now() - Duration::from_secs(60);
|
||||
while g.jobs.len() > 256 || (g.jobs.len() > 12 && g.jobs.front().is_some_and(|j| j.issued < keep_from)) {
|
||||
g.jobs.pop_front();
|
||||
}
|
||||
(shift, clean, seeds_changed, share_t)
|
||||
|
|
|
|||
Loading…
Reference in a new issue