const Day, MaxClaims, MaxIDs, PageLines, PullPage, MaxRangeClaims, guardianSeats, maxGuardianSeats, Open, Withheld, Forged, Done, BySigners, ByVote, KindCapFloor, KindMaximum, KindFee, KindFeeFloor, KindRouter, KindVoid, KindRestore, KindCredit, KindSweep, KindRefund, KindApplyRefund, KindWriteOff, KindMigrate, KindCancel, one, maxInt64, maxHeight
1const (
2 Day = decisions.Day
3 // MaxClaims is the most claims one Claim call pays (§5.4: n ≤ 20).
4 MaxClaims = 20
5 // MaxIDs is the most message ids one void, restore, credit or refund names.
6 MaxIDs = 256
7 // PageLines is how many waiting claims, and how many sweep entries, the route's page lists; the rest are
8 // counted there and read by hundreds at claims/<from> and sweeps/<from>, so a flood of dust can never make
9 // the page a member reads exceed a query's gas.
10 PageLines = 100
11 // PullPage is how many records one Pull hands to a successor (R13): the migration moves the claims, the sweep
12 // entries and the sends a page at a time, so no page outgrows a block however long the route ran.
13 PullPage = 500
14 // MaxRangeClaims is the most credits (claims and sweep entries, voidable or not, R23) a range void's scan may
15 // visit when it is made (R14): at ≈0.4M gas a credit on chain a thousand is ≈0.4B, inside a block with room;
16 // GovDAO splits a bigger range by heights, from the last height a decision's note says it voided. The range is
17 // closed at the height the proposal is made, so what it covers never grows after.
18 MaxRangeClaims = 1000
19 // guardianSeats are seats 1–4 (hlmailbox's numbering); a void's unpause option vacates at most maxGuardianSeats
20 // of them (§5.3: two guardians at most per proposal).
21 guardianSeats = 4
22 maxGuardianSeats = 2
23
24 // Claim states.
25 Open = "open" // credited, unpaid or paying
26 Withheld = "withheld" // voided as withheld: the remainder stays booked, restorable at once
27 Forged = "forged" // voided as forged: the remainder dropped, the paid part lost; restorable after 7 days
28 Done = "done" // paid in full
29
30 // Who credited a claim.
31 BySigners = "signers" // the verifier (the signers until Proposal 2)
32 ByVote = "vote" // GovDAO's credit by id
33
34 // Decision kinds.
35 KindCapFloor = "set cap floor"
36 KindMaximum = "set maximum"
37 KindFee = "set fee and minimum"
38 KindFeeFloor = "set fee floor"
39 KindRouter = "set router"
40 KindVoid = "void"
41 KindRestore = "restore"
42 KindCredit = "credit"
43 KindSweep = "sweep"
44 KindRefund = "refund"
45 // KindApplyRefund is GovDAO's own at-once apply of a queued refund decision (AT2): a refund is never Execute's.
46 KindApplyRefund = "apply refund"
47 KindWriteOff = "write off"
48 KindMigrate = "migrate"
49 KindCancel = "cancel"
50
51 one = int64(1_000_000) // 6 decimals on both sides
52
53 maxInt64 = int64(1<<63 - 1)
54 maxHeight = int64(9_999_999_999_999_999) // the height index's keys are 16 digits
55)