const MinDelayFloor, MaxDelay, GracePeriod, MaxTargetsPerOwner, MaxPendingPerTarget, MaxTargetNameLen, MaxDataLen, MaxRenderActions, RenderIndexCap
1const (
2 // MinDelayFloor is the smallest minimum delay a target may register.
3 // A timelock with a 1-second delay protects nothing.
4 MinDelayFloor = int64(60)
5
6 // MaxDelay bounds both registered minimum delays and per-action
7 // delays. Also the overflow guard: MaxDelay seconds in nanoseconds
8 // is far below int64 range, so ExecuteAfter arithmetic cannot wrap
9 // into the past.
10 MaxDelay = int64(10 * 365 * 24 * 3600) // 10 years
11
12 // GracePeriod is how long an action stays executable once ready.
13 // After it, the action expires: something scheduled and forgotten
14 // cannot be sprung on a target years later.
15 GracePeriod = int64(30 * 24 * 3600) // 30 days
16
17 // Quotas are PER-OWNER only (re-audit round 3): any global cap is a
18 // shared resource a few sybil accounts can exhaust forever (10y
19 // delays defeat expiry sweeping), bricking every other tenant. With
20 // per-owner quotas an attacker only ever consumes their own budget;
21 // state growth is priced in gas and funded accounts.
22 MaxTargetsPerOwner = 10
23 MaxPendingPerTarget = 20
24 MaxTargetNameLen = 64
25 MaxDataLen = 2000
26 MaxRenderActions = 100
27 // RenderIndexCap bounds the render-ordering index (fix Y4): the
28 // index self-trims to this size, so reaping an entry from it is a
29 // bounded scan no matter how many actions the realm has ever seen.
30 // Records older than the window stay in state (GetAction/IsExecuted
31 // are map reads and permanent); they only leave the front page.
32 RenderIndexCap = 2 * MaxRenderActions
33)