maxNodes
untyped bigintTunables.
Value
(1000 <untyped> bigint)
maxNodesPerOperator
untyped bigintTunables.
Value
(10 <untyped> bigint)
minHeartbeatInterval
time.DurationTunables.
Value
<zero>
poolBps
untyped bigint// 14% of every job feeds the fairness pool (a nod to AtomOne's Nakamoto Bonus)
Value
(1400 <untyped> bigint)
minBonusEpoch
time.DurationTunables.
Value
<zero>
minOnlineWindow
time.DurationTunables.
Value
<zero>
maxOnlineWindow
time.DurationTunables.
Value
<zero>
admin
.uverse.addressValue
<gnolang.StringValue>
paused
bool// when true, new registrations are refused
Value
false
onlineWindow
time.DurationValue
<zero>
nextNodeID
intValue
5
nextJobID
intValue
7
nodes
*v0.Tree// padID(nodeID) -> \*Node
- OID
- 0e24cf…a8c3:9
nodes details
byOperator
*v0.Tree// operator + "/" + padID -> nodeID
- OID
- 0e24cf…a8c3:12
byOperator details
leaderboard
*v0.Tree// rankKey(total, id) -> nodeID
- OID
- 0e24cf…a8c3:15
leaderboard details
jobs
*v0.Tree// padID(jobID) -> \*Job
- OID
- 0e24cf…a8c3:18
jobs details
nodeJobs
*v0.Tree// padID(nodeID) + "/" + padID(jobID) -> jobID
- OID
- 0e24cf…a8c3:21
nodeJobs details
totalGrossCents
int64Value
471
poolCents
int64// undistributed fairness pool
Value
3
poolPaidCents
int64// distributed so far
Value
60
bonusRounds
intValue
2
lastDistribution
time.Time- OID
- 0e24cf…a8c3:361
lastDistribution details
realmURL
stringrealmURL is this realm's gnoweb path, e.g. /r/\<addr>/idlewatt.
Value
"/r/g1pzn6rn8q0pfmq4xje4j8086ncnldavyz8skgp3/idlewatt"
init.23
func()- OID
- 0e24cf…a8c3:30
init.23 details
RegisterNode
func(name string, kind string, hardware string, region string, power string, rateCents int64) intRegisterNode adds a node owned by the caller and returns its ID. kind: home-gpu | vehicle | cpu. power: grid | solar | powershare-backup. rateCents: asking price in US cents per hour (e.g. 45 = $0.45/h).
- OID
- 0e24cf…a8c3:32
RegisterNode details
UpdateNode
func(id int, name string, hardware string, region string, power string, rateCents int64)UpdateNode changes a node's descriptive fields and rate. Only the operator.
- OID
- 0e24cf…a8c3:33
UpdateNode details
SetRate
func(id int, rateCents int64)SetRate changes only the hourly asking rate (US cents). Only the operator.
- OID
- 0e24cf…a8c3:34
SetRate details
SetAvailability
func(id int, mode string)SetAvailability switches a node between available (parked & plugged in), driving (vehicles only) and paused. Only the operator.
- OID
- 0e24cf…a8c3:35
SetAvailability details
Heartbeat
func(id int, note string)Heartbeat records a signed liveness ping for a node, with an optional short status note (e.g. "SoC 82%, 41C"). Only the operator.
- OID
- 0e24cf…a8c3:36
Heartbeat details
RecordJob
func(id int, workload string, minutes int) intRecordJob records a completed (simulated) job on a node, e.g. an AI inference lease. Earnings are computed by the realm from the node's rate and the duration, so operators cannot claim arbitrary amounts. The node must be available and online. 14% of the gross goes to the fairness pool.
- OID
- 0e24cf…a8c3:37
RecordJob details
RemoveNode
func(id int)RemoveNode deletes the caller's node. Its job history stays on the record.
- OID
- 0e24cf…a8c3:38
RemoveNode details
DistributeBonus
func() intDistributeBonus splits the fairness pool equally across every node that is online and available right now, regardless of size or earnings, like AtomOne's Nakamoto Bonus splits its pool equally across validators. Anyone may call it, at most once per hour. Returns how many nodes shared.
- OID
- 0e24cf…a8c3:39
DistributeBonus details
SetPaused
func(p bool)SetPaused stops or resumes new registrations.
- OID
- 0e24cf…a8c3:40
SetPaused details
SetOnlineWindowMinutes
func(minutes int)SetOnlineWindowMinutes sets how long after its last heartbeat a node still counts as online (5 minutes to 7 days).
- OID
- 0e24cf…a8c3:41
SetOnlineWindowMinutes details
AdminRemoveNode
func(id int)AdminRemoveNode removes a spam or abusive node.
- OID
- 0e24cf…a8c3:42
AdminRemoveNode details
TransferAdmin
func(newAdmin .uverse.address)TransferAdmin hands the admin role to another address.
- OID
- 0e24cf…a8c3:43
TransferAdmin details
Admin
func() .uverse.address- OID
- 0e24cf…a8c3:44
Admin details
NodeCount
func() intNodeCount returns the number of registered nodes.
- OID
- 0e24cf…a8c3:45
NodeCount details
Stats
func() (int, int, int64, int64)Stats returns nodes, online nodes, simulated gross earnings (cents) and the undistributed fairness pool (cents).
- OID
- 0e24cf…a8c3:46
Stats details
NodeSummary
func(id int) stringNodeSummary returns a one-line text summary of a node, or "" if unknown.
- OID
- 0e24cf…a8c3:47
NodeSummary details
mustCaller
func() .uverse.address- OID
- 0e24cf…a8c3:48
mustCaller details
mustAdmin
func()- OID
- 0e24cf…a8c3:49
mustAdmin details
mustGetNode
func(id int) *idlewatt.Node- OID
- 0e24cf…a8c3:50
mustGetNode details
mustOwnNode
func(id int, caller .uverse.address) *idlewatt.Node- OID
- 0e24cf…a8c3:51
mustOwnNode details
removeNode
func(n *idlewatt.Node)- OID
- 0e24cf…a8c3:52
removeNode details
reRank
func(n *idlewatt.Node, oldTotal int64)- OID
- 0e24cf…a8c3:53
reRank details
operatorNodeCount
func(op .uverse.address) int- OID
- 0e24cf…a8c3:54
operatorNodeCount details
isOnlineAt
func(n *idlewatt.Node, now time.Time) bool- OID
- 0e24cf…a8c3:55
isOnlineAt details
countOnline
func(now time.Time) int- OID
- 0e24cf…a8c3:56
countOnline details
padID
func(id int) stringpadID makes IDs sort numerically as avl keys.
- OID
- 0e24cf…a8c3:57
padID details
rankKey
func(totalCents int64, id int) stringrankKey sorts the highest total first, ties broken by lowest node ID.
- OID
- 0e24cf…a8c3:58
rankKey details
pageSize
untyped bigintValue
(10 <untyped> bigint)
Render
func(path string) stringRender serves the gnoweb dashboard. "" network summary, live node cards, leaderboard, recent jobs "nodes?page=N" every node, paginated "node/<id>" one node, its jobs and operator actions "operator/<g1addr>" one operator's nodes "leaderboard" full ranking "jobs?page=N" job history "about" what this is, and what it is not
- OID
- 0e24cf…a8c3:59
Render details
renderHome
func(now time.Time) string- OID
- 0e24cf…a8c3:61
renderHome details
renderNodes
func(now time.Time, page int) string- OID
- 0e24cf…a8c3:62
renderNodes details
renderNode
func(now time.Time, id int) string- OID
- 0e24cf…a8c3:63
renderNode details
renderOperator
func(now time.Time, addr string) string- OID
- 0e24cf…a8c3:64
renderOperator details
renderLeaderboard
func(now time.Time, limit int) string- OID
- 0e24cf…a8c3:65
renderLeaderboard details
renderJobs
func(page int) string- OID
- 0e24cf…a8c3:66
renderJobs details
renderAbout
func() string- OID
- 0e24cf…a8c3:67
renderAbout details
navBar
func() string- OID
- 0e24cf…a8c3:68
navBar details
disclaimer
func() string- OID
- 0e24cf…a8c3:69
disclaimer details
statCard
func(icon string, title string, value string, sub string) string- OID
- 0e24cf…a8c3:70
statCard details
nodeCard
func(n *idlewatt.Node, now time.Time) string- OID
- 0e24cf…a8c3:71
nodeCard details
cardGrid
func(cards []string, perRow int) stringcardGrid lays cards out in rows of perRow columns.
- OID
- 0e24cf…a8c3:72
cardGrid details
leaderboardTable
func(now time.Time, limit int) string- OID
- 0e24cf…a8c3:73
leaderboardTable details
jobsTable
func(offset int, limit int, nodeID int) stringjobsTable lists jobs newest first. nodeID \< 0 means all nodes.
- OID
- 0e24cf…a8c3:74
jobsTable details
bonusSection
func(now time.Time) string- OID
- 0e24cf…a8c3:75
bonusSection details
registerForm
func() string- OID
- 0e24cf…a8c3:76
registerForm details
pager
func(route string, page int, total int) string- OID
- 0e24cf…a8c3:77
pager details
notFound
func() string- OID
- 0e24cf…a8c3:78
notFound details
link
func(sub string) string- OID
- 0e24cf…a8c3:79
link details
pageParam
func(query string) int- OID
- 0e24cf…a8c3:80
pageParam details
statusOf
func(n *idlewatt.Node, now time.Time) string- OID
- 0e24cf…a8c3:81
statusOf details
rankOf
func(n *idlewatt.Node) int- OID
- 0e24cf…a8c3:82
rankOf details
kindLabel
func(kind string) string- OID
- 0e24cf…a8c3:83
kindLabel details
kindIcon
func(kind string) string- OID
- 0e24cf…a8c3:84
kindIcon details
powerLabel
func(p string) string- OID
- 0e24cf…a8c3:85
powerLabel details
medal
func(rank int) string- OID
- 0e24cf…a8c3:86
medal details
boolWord
func(b bool, yes string, no string) string- OID
- 0e24cf…a8c3:87
boolWord details
fmtUSD
func(cents int64) stringfmtUSD renders cents as $1,234.56.
- OID
- 0e24cf…a8c3:88
fmtUSD details
fmtDuration
func(d time.Duration) string- OID
- 0e24cf…a8c3:89
fmtDuration details
ago
func(d time.Duration) string- OID
- 0e24cf…a8c3:90
ago details
shortAddr
func(a .uverse.address) string- OID
- 0e24cf…a8c3:91
shortAddr details
safeAddrText
func(s string) stringsafeAddrText echoes a user-supplied path segment only if it looks like an address, so the page never reflects arbitrary markdown.
- OID
- 0e24cf…a8c3:92
safeAddrText details
plural
func(n int, word string) string- OID
- 0e24cf…a8c3:93
plural details
KindHomeGPU
untyped stringNode kinds.
Value
"home-gpu"
KindVehicle
untyped stringNode kinds.
Value
"vehicle"
KindCPU
untyped stringNode kinds.
Value
"cpu"
PowerGrid
untyped stringPower sources.
Value
"grid"
PowerSolar
untyped stringPower sources.
Value
"solar"
PowerPowershare
untyped stringPower sources.
Value
"powershare-backup"
ModeAvailable
untyped string// parked & plugged in, ready for work
Value
"available"
ModeDriving
untyped string// vehicle in use, not renting compute
Value
"driving"
ModePaused
untyped string// operator paused the node
Value
"paused"
Node
typeNode is one idle-compute node registered by an operator. All figures are self-reported by the operator; nothing here is verified by Akash, Tesla or any hardware attestation (yet).
Value
idlewatt.Node
Job
typeJob is one simulated (self-reported) lease / job completion.
Value
idlewatt.Job
minNameLen
untyped bigintInput limits.
Value
(3 <untyped> bigint)
maxNameLen
untyped bigintInput limits.
Value
(48 <untyped> bigint)
maxHardwareLen
untyped bigintInput limits.
Value
(80 <untyped> bigint)
minRegionLen
untyped bigintInput limits.
Value
(2 <untyped> bigint)
maxRegionLen
untyped bigintInput limits.
Value
(40 <untyped> bigint)
maxWorkloadLen
untyped bigintInput limits.
Value
(60 <untyped> bigint)
maxNoteLen
untyped bigintInput limits.
Value
(60 <untyped> bigint)
maxRateCents
untyped bigint// $1,000/hour sanity cap
Value
(100000 <untyped> bigint)
maxJobMinutes
untyped bigintInput limits.
Value
(1440 <untyped> bigint)
isSafeChar
func(c int32) boolisSafeChar is the character whitelist for every free-text field. It keeps operator-supplied strings from injecting markdown, HTML, gnoweb tags or table pipes into Render output, and keeps them single-line.
- OID
- 0e24cf…a8c3:94
isSafeChar details
checkText
func(field string, s string, minLen int, maxLen int)checkText validates a free-text field and panics with a readable message.
- OID
- 0e24cf…a8c3:96
checkText details
checkKind
func(kind string)- OID
- 0e24cf…a8c3:97
checkKind details
checkPower
func(power string)- OID
- 0e24cf…a8c3:98
checkPower details
checkRate
func(rate int64)- OID
- 0e24cf…a8c3:99
checkRate details
checkMode
func(kind string, mode string)- OID
- 0e24cf…a8c3:100