Add Fleet Torrent erasure extension with shard DHT and gossip.
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
Content-addressed shard DHT on seeder agents with subnet_primary_seeder election, cross-subnet fleet_torrent_gossip, BGP swarm magnets, C2 torrent manifest, and k-of-n peer fetch with C2 fallback.
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"crypto-miner-server/internal/clearance"
|
||||
"crypto-miner-server/internal/db"
|
||||
"crypto-miner-server/internal/strategy"
|
||||
)
|
||||
|
||||
@@ -55,6 +56,11 @@ func (f *FleetHandler) PostFleetGraft(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
graftPolicy, err := f.ws.ApproveFleetGraft(sourceID, targetID)
|
||||
if err != nil {
|
||||
_ = (&OathLedgerBridge{DB: f.db, Hub: f.ws}).Record(
|
||||
AuthUsername(r), db.OathGraft, targetID, "", db.OathOutcomeFail,
|
||||
map[string]string{"source_agent_id": sourceID, "target_agent_id": targetID},
|
||||
map[string]interface{}{"error": err.Error()},
|
||||
)
|
||||
writeJSON(w, map[string]interface{}{
|
||||
"success": false,
|
||||
"error": err.Error(),
|
||||
@@ -74,4 +80,17 @@ func (f *FleetHandler) PostFleetGraft(w http.ResponseWriter, r *http.Request) {
|
||||
"graft_tier": graftPolicy.GraftTier,
|
||||
"strain": graftPolicy.GraftSourceStrain,
|
||||
})
|
||||
_ = (&OathLedgerBridge{DB: f.db, Hub: f.ws}).Record(
|
||||
AuthUsername(r), db.OathGraft, targetID, graftPolicy.GraftSourceStrain, db.OathOutcomeSuccess,
|
||||
map[string]interface{}{
|
||||
"source_agent_id": sourceID,
|
||||
"graft_tier": graftPolicy.GraftTier,
|
||||
"graft_policy": graftPolicy,
|
||||
},
|
||||
map[string]interface{}{
|
||||
"source_agent_id": sourceID,
|
||||
"graft_tier": graftPolicy.GraftTier,
|
||||
"pushed": f.ws.IsAgentReachable(targetID),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user