const PlatformFeePct, CancelFeePct, AutoRefundBlks, AutoResolveBlks, UnfundedExpiryBlks, MaxTitleLen, MaxDescLen, MaxMilestones, MinMilestoneAmount, maxMilestonesArgLen, MaxActivePerClient
1const (
2 // PlatformFeePct is only the fail-safe fallback rate (see resolveFee); the
3 // live rate is cfg.GetFeeBPS(laneService), read at each payout.
4 PlatformFeePct = 2
5 // CancelFeePct is paid to the freelancer from each funded milestone when
6 // the client cancels. Escrow-internal, not a protocol fee.
7 CancelFeePct = 5
8 // Timeouts, in blocks, as in v3 (sized at 3 s per block; at gnoland-1's
9 // ~3.3 s they are ~33 and ~31 days). Blocks inside a pause's blocking
10 // window do not count (see the pause section).
11 AutoRefundBlks = int64(864000)
12 AutoResolveBlks = int64(806400)
13 // UnfundedExpiryBlks: a contract none of whose milestones was ever funded
14 // can be cancelled by anyone after this many blocks, freeing its slot.
15 UnfundedExpiryBlks = AutoRefundBlks
16
17 MaxTitleLen = 200 // bytes, after sanitising (also bounds the input)
18 MaxDescLen = 5000 // bytes, after sanitising (also bounds the input)
19 MaxMilestones = 20
20 MinMilestoneAmount = int64(1000) // 0.001 GNOT: below ~50 ugnot a 2% fee truncates to 0
21 // maxMilestonesArgLen bounds the raw milestones argument before parsing:
22 // 20 entries of a 200-byte title, a 19-digit amount and separators, with
23 // room for surrounding spaces.
24 maxMilestonesArgLen = MaxMilestones * (MaxTitleLen + 64)
25
26 // MaxActivePerClient bounds the open contracts one client address may
27 // hold. It counts only contracts the address created, never those naming
28 // it as freelancer, so nobody can use up someone else's slots, and it
29 // bounds what one key can lock (five of the largest contracts are about
30 // 15 GNOT of storage deposit). There is no global cap: nothing iterates
31 // over every contract, so a global number would bound no gas and would
32 // only give a funded attacker a switch to turn escrow off for everyone.
33 MaxActivePerClient = 5
34)