TargetConfig
typeTargetConfig binds a named target to the only address allowed to schedule actions against it, an enforced minimum delay, and an optional guardian who can veto pending actions. Without this binding a timelock attests nothing: anyone could schedule their own short-delay action against any name and "execute" it.
Value
timelock_guardian.TargetConfig
Action
typeAction represents a scheduled operation that can only execute after its delay has elapsed, and only within its grace window. State model (re-audit 2026-09-02): only PENDING and EXECUTED actions are stored. Executed records are permanent attestations consumers check via IsExecuted. Cancelled, vetoed, and expired actions are REAPED from state — their history lives in emitted events — so the live-action cap bounds live exposure and can never be consumed permanently by schedule/cancel cycling.
Value
timelock_guardian.Action
MinDelayFloor
int64Value
60
MaxDelay
int64// 10 years
Value
315360000
GracePeriod
int64// 30 days
Value
2592000
MaxTargetsPerOwner
untyped bigintValue
(10 <untyped> bigint)
MaxPendingPerTarget
untyped bigintValue
(20 <untyped> bigint)
MaxTargetNameLen
untyped bigintValue
(64 <untyped> bigint)
MaxDataLen
untyped bigintValue
(2000 <untyped> bigint)
MaxRenderActions
untyped bigintValue
(100 <untyped> bigint)
RenderIndexCap
untyped bigintValue
(200 <untyped> bigint)
targets
map[string]*timelock_guardian.TargetConfig- OID
- 04092f…8192:46
targets details
targetNames
[]string// insertion-ordered for deterministic iteration
- OID
- 04092f…8192:56
targetNames details
ownerTargets
map[.uverse.address]int- OID
- 04092f…8192:48
ownerTargets details
actions
map[string]*timelock_guardian.Action- OID
- 04092f…8192:49
actions details
actionIDs
[]string// insertion-ordered render window, self-trimmed to RenderIndexCap
- OID
- 04092f…8192:70
actionIDs details
pending
map[string][]string- OID
- 04092f…8192:51
pending details
pendingTargets
[]string- OID
- 04092f…8192:64
ptIndex
map[string]int- OID
- 04092f…8192:53
ptIndex details
nextID
intValue
6
init.20
func()- OID
- 04092f…8192:12
init.20 details
now
func() time.Time- OID
- 04092f…8192:14
now details
rejectStraySend
func()rejectStraySend aborts when coins are attached to a call (fix Y6): this realm handles no funds and holds no banker, so an attached send would strand on the realm address forever. Aborting reverts the transfer back to the sender. Fails open for realm-routed calls, whose attached send lands on the intermediary realm, never here.
- OID
- 04092f…8192:15
rejectStraySend details
mustGetTarget
func(name string) *timelock_guardian.TargetConfig- OID
- 04092f…8192:16
mustGetTarget details
mustGet
func(id string) *timelock_guardian.Action- OID
- 04092f…8192:17
mustGet details
isValidName
func(name string) bool- OID
- 04092f…8192:18
isValidName details
expired
func(a *timelock_guardian.Action) bool- OID
- 04092f…8192:19
expired details
removeID
func(list []string, id string) []string- OID
- 04092f…8192:20
removeID details
addPendingTarget
func(target string)- OID
- 04092f…8192:21
addPendingTarget details
removePendingTarget
func(target string)removePendingTarget drops a target from the with-pendings list in O(1) by swapping the last entry into its slot. Order afterwards is deterministic (a pure function of the operation history), which is all iteration needs.
- OID
- 04092f…8192:22
removePendingTarget details
dropPending
func(target string, id string)dropPending removes id from its target's pending list. Bounded: the list never exceeds MaxPendingPerTarget.
- OID
- 04092f…8192:23
dropPending details
reap
func(id string)reap removes a non-executed action from state entirely; its history is the emitted event. Executed records are permanent attestations: reap refuses them outright (round-2 hardening), so no future caller can erase one by mistake.
- OID
- 04092f…8192:24
reap details
sweepExpired
func(target string)sweepExpired reaps the expired pending actions of ONE target (fix Y4/Y2: the old global budget-windowed sweep let long-delay entries at the front of a shared queue starve everything behind them). A target's list is bounded by MaxPendingPerTarget, so the sweep is a bounded scan. Expiry history is the emitted event.
- OID
- 04092f…8192:25
sweepExpired details
pendingCount
func(target string) intpendingCount is the length of the target's live list. The counter it replaces (fix Y4) could desync from the lists it mirrored; a length cannot. It may briefly include not-yet-swept expired actions; those are reaped by the next Schedule's sweep or by anyone's Expire, and in the worst case an owner briefly under-uses their own quota — never another tenant's.
- OID
- 04092f…8192:26
pendingCount details
sanitize
func(s string) stringsanitize makes attacker-controlled text safe to embed in markdown and single-line summaries: backticks, pipes, newlines, link syntax, and raw HTML brackets (fix Y3: gnoweb has no HTML sanitization layer, so a literal \<script> tag must never reach the page) are replaced so a Data string cannot break out of its cell, inject rows or markup, or render a live link.
- OID
- 04092f…8192:27
sanitize details
truncate
func(s string, n int) stringtruncate shortens s to at most n runes without splitting a multibyte character. n is clamped to a minimum of 4 (re-audit: n\<=2 sliced out of bounds).
- OID
- 04092f…8192:28
truncate details
RegisterTarget
func(name string, minDelay int64, guardian .uverse.address)RegisterTarget creates a named target. The caller becomes its owner — the only address that may schedule actions against it. minDelay is the enforced floor for every action's delay. guardian may be empty (no guardian) or an address empowered to veto pending actions.
- OID
- 04092f…8192:29
RegisterTarget details
SetGuardian
func(targetName string, guardian .uverse.address)SetGuardian changes (or clears, with "") the target's guardian. Owner only, and REFUSED while the target has pending actions: the guardian's veto power exists precisely to check the owner during a delay window, so the owner must not be able to strip it mid-window. KNOWN LIMIT (documented, round-3 audit): the owner can cancel all pending actions, change the guardian, and reschedule — the price is a full fresh MinDelay on every rescheduled action, and every step emits an event (cancellations + the guardian change below), so observers always get MinDelay of warning under the new guardian regime. Guardians protect open windows, not the owner's future.
- OID
- 04092f…8192:30
SetGuardian details
TransferTargetOwnership
func(targetName string, newOwner .uverse.address)TransferTargetOwnership OFFERS a target to a new owner; the nominee must AcceptTargetOwnership to complete it (fix Y5: a one-step transfer let anyone fill a stranger's per-owner quota and dump pending obligations — with an attacker-chosen guardian — on an address that never asked). Owner only. Pass "" to clear a pending offer. Nothing changes hands until the nominee accepts.
- OID
- 04092f…8192:31
TransferTargetOwnership details
AcceptTargetOwnership
func(targetName string)AcceptTargetOwnership completes a pending ownership offer; only the nominee can accept. The nominee's quota is checked HERE — consent time — so an offer can never overfill an account that did not agree to carry it.
- OID
- 04092f…8192:32
AcceptTargetOwnership details
Schedule
func(targetName string, data string, delay int64) stringSchedule creates a new timelocked action against a registered target. Only the target's owner may schedule. The delay must be at least the target's registered minimum and at most MaxDelay. Returns the action ID.
- OID
- 04092f…8192:33
Schedule details
Execute
func(actionID string) stringExecute marks an action as executed. Anyone can call this — the timelock is the protection, not the executor's identity. The action must exist, be pending, its delay elapsed, and its grace window not yet expired.
- OID
- 04092f…8192:34
Execute details
Cancel
func(actionID string) stringCancel removes a pending action. Only the target's CURRENT owner can cancel (re-audit: the scheduling creator's rights must not survive an ownership transfer). The record is reaped; history is the event.
- OID
- 04092f…8192:35
Cancel details
Veto
func(actionID string) stringVeto cancels a pending action as the target's guardian. This is the guardian's whole power: it can stop a scheduled action during the delay window, never create or execute one. The record is reaped; history is the event.
- OID
- 04092f…8192:36
Veto details
Expire
func(actionID string) stringExpire reaps a provably expired action. Permissionless (fix Y2): an expired action decides nothing — reaping it only writes down what the clock already decided — so anyone may free the quota slot it holds. This is the recovery valve that makes a wedged target impossible: before it, a phantom expired entry consumed quota and blocked SetGuardian until a global sweep happened to reach it; now its own target's owner — or anyone else — reaps it directly.
- OID
- 04092f…8192:37
Expire details
GetTarget
func(targetName string) stringGetTarget returns a formatted summary of a registered target.
- OID
- 04092f…8192:38
GetTarget details
GetAction
func(actionID string) stringGetAction returns a formatted summary of a single pending or executed action. Cancelled/vetoed/expired actions are reaped — their history is in emitted events.
- OID
- 04092f…8192:39
GetAction details
GetPending
func() stringGetPending returns the IDs of all pending, non-expired actions, grouped by target, insertion-ordered within a target. Only targets that actually hold live pendings are visited (round-2 fix Y-1), so the scan cannot be inflated by registrations alone.
- OID
- 04092f…8192:40
GetPending details
IsReady
func(actionID string) boolIsReady returns true if the action exists, is pending, its delay has elapsed, and it has not expired.
- OID
- 04092f…8192:41
IsReady details
IsExecuted
func(actionID string) boolIsExecuted returns true if the action exists and was executed. This is the consumer-side check: combined with target registration it attests that the target's registered owner scheduled the action, it waited at least the registered minimum delay, no guardian vetoed it, and it was executed within its grace window. Executed records are permanent.
- OID
- 04092f…8192:42
IsExecuted details
Render
func(path string) stringRender returns a markdown overview. Never panics. Cancelled, vetoed, and expired actions are reaped from state; their history is in events. The page shows the most recent actions only (the ordering index is bounded — fix Y4); older executed records stay queryable via GetAction/IsExecuted forever.
- OID
- 04092f…8192:43
Render details
formatAction
func(a *timelock_guardian.Action) string- OID
- 04092f…8192:44
formatAction details
renderActionRow
func(a *timelock_guardian.Action) string- OID
- 04092f…8192:45