fix(hs): probe onion reachability instead of waiting on Bootstrapping
All checks were successful
ci / test (push) Successful in 2m59s

Arti combined status stays Bootstrapping through a 5 min HsDir upload
round. Treat a successful connect as published, floor cbtinitialtimeout
with cbtmintimeout at 20s, and skip preemptive 80/443 circuits so IPT
and HsDir builds are not starved. PUBLISH_WAIT stays 360s fail-closed.
This commit is contained in:
Sirius DevOps 2026-09-10 16:14:10 -04:00
commit e902a9041d
No known key found for this signature in database
5 changed files with 130 additions and 24 deletions

View file

@ -63,20 +63,29 @@ impl Node {
.ok_or_else(|| "onion service disabled in config — fail closed".to_string())?;
let (svc, rend) = launched;
let onion = hs::onion_string(&svc)?;
hs::wait_until_published(&svc, &onion).await?;
store.set_onion(&onion).map_err(|e| e.to_string())?;
let node = Arc::new(Self {
home,
store: Mutex::new(store),
client,
hs: Mutex::new(None),
onion: Mutex::new(onion),
onion: Mutex::new(onion.clone()),
keys: Mutex::new(keys),
wallet: Wallet::from_env(),
incoming_limit: Mutex::new(TokenBucket::default()),
});
// Accept rens before waiting so a reachability probe can succeed
// while combined status is still Bootstrapping.
let rend = spawn_rend(Arc::clone(&node), rend);
*node.hs.lock().map_err(|e| e.to_string())? = Some(HsHandle { _svc: svc, rend });
*node.hs.lock().map_err(|e| e.to_string())? = Some(HsHandle {
_svc: Arc::clone(&svc),
rend,
});
hs::wait_until_published(&node.client, &svc, &onion, &onion).await?;
node.store
.lock()
.map_err(|e| e.to_string())?
.set_onion(&onion)
.map_err(|e| e.to_string())?;
Ok(node)
}
@ -400,9 +409,12 @@ impl Node {
let onion = hs::onion_string(&svc)?;
// ponytail: hard-cut old HS before waiting; keeping both stalled ow1 at Bootstrapping.
*self.hs.lock().map_err(|e| e.to_string())? = None;
hs::wait_until_published(&svc, &onion).await?;
let rend = spawn_rend(Arc::clone(self), rend);
*self.hs.lock().map_err(|e| e.to_string())? = Some(HsHandle { _svc: svc, rend });
*self.hs.lock().map_err(|e| e.to_string())? = Some(HsHandle {
_svc: Arc::clone(&svc),
rend,
});
hs::wait_until_published(&self.client, &svc, &onion, &onion).await?;
{
let store = self.store.lock().map_err(|e| e.to_string())?;
store.set_onion(&onion).map_err(|e| e.to_string())?;