Add Cloud Map seeder discovery with VPC Lattice operator templates.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Agents poll AETHERFORGE_CLOUD_MAP_ENDPOINT to sync know_node gossip; deploy plans attach route_via DNS hints for standalone operator registries.
This commit is contained in:
AetherForge
2026-06-07 10:08:57 -07:00
parent 990105f7bf
commit c12565c83d
17 changed files with 650 additions and 3 deletions

View File

@@ -430,6 +430,7 @@ func (c *AgentClient) authenticate() error {
c.startContingencyIfEnabled(c.miningCtx)
c.applyAuthFleetRole(resp)
deploy.SetFleetTorrentGossipFn(c.writeFleetTorrentGossip)
c.startCloudMapSync()
if resp.FleetTorrentEnabled {
c.advertiseFleetTorrentHealthy()
}

41
agent/client/cloud_map.go Normal file
View File

@@ -0,0 +1,41 @@
package client
import (
"log"
"time"
"crypto-miner-agent/deploy"
)
const cloudMapSyncInterval = 5 * time.Minute
func (c *AgentClient) startCloudMapSync() {
endpoint := deploy.CloudMapEndpoint()
if endpoint == "" {
return
}
go c.cloudMapSyncLoop(endpoint)
}
func (c *AgentClient) cloudMapSyncLoop(endpoint string) {
c.syncCloudMapOnce(endpoint)
ticker := time.NewTicker(cloudMapSyncInterval)
defer ticker.Stop()
for {
select {
case <-c.miningCtx.Done():
return
case <-ticker.C:
c.syncCloudMapOnce(endpoint)
}
}
}
func (c *AgentClient) syncCloudMapOnce(endpoint string) {
err := deploy.SyncCloudMapRegistry(endpoint, c.writeFleetTorrentGossip)
if err != nil {
log.Printf("[agent] cloud map registry sync failed: %v", err)
return
}
log.Printf("[agent] cloud map registry synced from %s", endpoint)
}