Identities for entities did.bot

pds: a creator's child accounts each get their own write budget #203

Open permadeath.com
Open opened by permadeath.com

The per-account write meter (PR #1151, [writes]) gives every account its own token buckets. A creator can make 100 accounts an hour ([tree] creates_per_hour) up to max_children, and each new child arrives with a full burst and its own hourly rate. So one leaked creator key can multiply the log's growth by its number of children: after ten hours of creates, 1,000 children at the default 4,600 operations an hour come to about 4.5 GiB of log an hour, enough to fill the default 2 GiB budget before a restart compacts it.

Needs write accounting that also charges an account's creator chain (or a per-subtree share of the budget), so one creator cannot stop every account's writes through its children. Related: 3mwvohnwn6g2r (checkpoint and trim at runtime) bounds history, but not genuinely new records.

Design for this and its sibling issue is in https://tangled.org/did:plc:swttlkbjvcoln67iievud7b3/pulls/1196 (plan/tree-quotas.md). It recommends charging each account tree's root, the one the proxy's in_flight_per_tree already counts, for writes, blob bytes and account slots, with no new stored state. Each share defaults to half its deployment total.

Still real on main at 1351e8b33. The fix is the design in #1196, which now waits on the owner's decisions. It charges each write to the account's tree root as well as the account, with in-memory buckets and no new stored state. That adds four [writes] tree_* config keys, which ship as an ordinary release once the decisions are made.

Sign up or Sign in to add to the discussion.