const MaxServices, MaxServicesPerOwner, MaxNameLen, MaxTypeLen, MaxPkgPathLen, MaxDescriptionLen, MaxMetadataLen, pkgPathPrefix, ReservationPeriod, MaxRenderServices, renderDescLen
1const (
2 // MaxServices is a pure state bound, not an anti-squat defense —
3 // MaxServicesPerOwner is what makes monopolization expensive
4 // (pearl audit R1). Kept at 1000 rather than raised further so the
5 // linear scans over `names` (Deregister, ListServices, ListByType)
6 // stay bounded at a size one transaction can comfortably pay for.
7 MaxServices = 1000
8
9 // MaxServicesPerOwner caps how many names one address may hold at
10 // once. Enforced at registration and, for a handoff, at the moment
11 // the recipient CONSENTS (see AcceptOwnership).
12 MaxServicesPerOwner = 20
13
14 MaxNameLen = 64
15 MaxTypeLen = 32
16 MaxPkgPathLen = 128
17 MaxDescriptionLen = 500
18 MaxMetadataLen = 2000
19
20 pkgPathPrefix = "gno.land/"
21
22 // ReservationPeriod is how long a deregistered name stays reserved.
23 // Long enough for integrators to notice the deregistration; finite
24 // so tombstones cannot lock the namespace forever.
25 ReservationPeriod = int64(90 * 24 * 3600) // 90 days
26
27 // MaxRenderServices bounds the gnoweb table. Render is reachable by
28 // any viewer, so its cost lands on third parties rather than on
29 // whoever grew the state (pearl audit Y3). Complete data comes from
30 // the bounded queries named in the truncation notice.
31 MaxRenderServices = 25
32
33 // renderDescLen is the per-row description budget, applied to the
34 // RAW text before escaping so an escape sequence is never split.
35 renderDescLen = 60
36)