Initial commit: AetherForge Linux (forge-mesh) v0.1.0-dev
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
This commit is contained in:
40
internal/policy/mining.go
Normal file
40
internal/policy/mining.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package policy
|
||||
|
||||
import (
|
||||
"forge-mesh/internal/api/types"
|
||||
)
|
||||
|
||||
// DefaultMiningProfile returns the standard tier order for new agents.
|
||||
func DefaultMiningProfile(wallet string) types.MiningProfile {
|
||||
if wallet == "" {
|
||||
wallet = "WALLET_UNSET"
|
||||
}
|
||||
return types.MiningProfile{
|
||||
ID: "default",
|
||||
Name: "Default tier chain",
|
||||
WalletAddress: wallet,
|
||||
PolicyFromServer: true,
|
||||
Tiers: []types.MiningTierSpec{
|
||||
{Type: "oci", Duration: 5, Config: map[string]string{"image": "docker.io/xmrig/xmrig:latest"}},
|
||||
{Type: "xmrig", Duration: 10, Config: map[string]string{"algo": "rx/0"}},
|
||||
{Type: "gpu", Duration: 10, Config: map[string]string{"algo": "kawpow", "coin": "RVN"}},
|
||||
{Type: "stratum", Duration: 0, Config: map[string]string{"algo": "rx/0"}},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// TierDisplayName maps tier type to a human label.
|
||||
func TierDisplayName(tierType string) string {
|
||||
switch tierType {
|
||||
case "oci":
|
||||
return "OCI podman"
|
||||
case "xmrig":
|
||||
return "Bundled xmrig"
|
||||
case "gpu", "lolminer":
|
||||
return "GPU lolMiner"
|
||||
case "stratum":
|
||||
return "Stratum direct"
|
||||
default:
|
||||
return tierType
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user