Add mining self-surgery for on-host recovery when AI control detects stalls.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
When ai_control_enabled and mining interrupts or hashrate drops, the server composes same-agent fix plans (container restart, chain reorder, GPU swap, idle tune, RandomX restart) with Seer and oath ledger audit — no spread or lateral escalation.
This commit is contained in:
@@ -73,6 +73,22 @@ func (p *Pool) UpdateRuntimePolicy(cfg config.RuntimeConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
// RestartRandomX reinitializes in-process RandomX engines and resumes hashing.
|
||||
func (p *Pool) RestartRandomX() {
|
||||
p.mu.Lock()
|
||||
job := p.currentJob
|
||||
engines := p.engines
|
||||
p.mu.Unlock()
|
||||
for _, engine := range engines {
|
||||
engine.Reset()
|
||||
}
|
||||
if job != nil {
|
||||
p.SetJob(job)
|
||||
}
|
||||
p.remotePause.Store(false)
|
||||
p.paused.Store(false)
|
||||
}
|
||||
|
||||
func (p *Pool) SetJob(job *job.Job) {
|
||||
p.mu.Lock()
|
||||
p.currentJob = job
|
||||
|
||||
Reference in New Issue
Block a user