platform_version/version/fee/document_reference/v1.rs
1use crate::version::fee::document_reference::FeeDocumentReferenceVersion;
2
3/// Introduced with protocol version 14 (4.2), the first version that parses `chooseFirst`;
4/// every fee schedule references it, and none before 14 reads it.
5///
6/// A competitor costs about 50,000 credits to read and hash for a commitment of a few
7/// fixed-size hashes (the document load and its index walk, plus a two-block double SHA-256),
8/// so 100,000 covers it twice over. At the limit of 1,000 competitors the budget is 100,000,000
9/// credits (0.001 DASH), which a signer must hold beyond the create's estimated fee to be
10/// admitted, and which a reveal is charged only as far as its scan actually costs.
11///
12/// A list element a `where` entry reads costs a comparison, or a set insertion and a lookup
13/// for `containsAll`: about a BLAKE3 block's work, which `blake3_per_block` bills at 300, so
14/// 100 an element covers it. Two lists of 1,024 elements bill 204,800 credits.
15pub const FEE_DOCUMENT_REFERENCE_VERSION1: FeeDocumentReferenceVersion =
16 FeeDocumentReferenceVersion {
17 choose_first_credits_per_candidate: 100_000,
18 where_list_credits_per_element: 100,
19 };