Documentation
¶
Index ¶
Constants ¶
const ( FragmentPayload = 1128 // OpenObjectBound is BRC-149's bound on an object submitted on the open // path; MaxObjectBound the authenticated path's. No plane admits more. OpenObjectBound = 1 << 20 MaxObjectBound = 8 << 20 // DefaultObjectBound is the object bound assumed when none is set. DefaultObjectBound = OpenObjectBound )
The plane's packets: an object larger than one is carried as fragments of FragmentPayload bytes (the IPv6 minimum MTU of 1280 less the IPv6, UDP and object fragment headers).
const ( DefaultTreeCount = 32 MaxTreeCount = 1000 PlaneTreeCountWarn = 100 // DefaultChainTreeCount and MaxChainTreeCount size a chain tree: a // chain's first token carries its chain tree whole. DefaultChainTreeCount = 8 MaxChainTreeCount = 32 // DefaultTreeSats is each grant or record funding output's value. A // carrier carries its funding output's whole value and is never mined, // so one satoshi is enough. DefaultTreeSats = 1 // ChainTreeSats is each chain-tree output's value: a chain's first // token spends one, and its value goes to the token's change. ChainTreeSats = 1 // DefaultAhead is how few outputs a tree has left when the next is // minted ahead. DefaultAhead = 4 )
Funding trees.
const ( // PlaneEntries and UnicastEntries are the default entries per wrap // record: an 8-entry carrier is 4 packets on the plane, and unicast has // no fragments. PlaneEntries = 8 UnicastEntries = borgrec.MaxEntries // MembersWarn is the group size above which a removal is warned about: // it costs at least 32 wrap carriers. MembersWarn = 256 // PlaneChangesWarn is the most changes one token makes on the plane // before a warning: a token and its parent then pass 4 packets. PlaneChangesWarn = 16 // DefaultExpiry is how long a grant is current unless -expiry says. DefaultExpiry = 365 * 24 * time.Hour // SignerExpiry is how long the grant of the organisation's own signer // key is current: it is renewed by the tooling, not by a person. SignerExpiry = 10 * 365 * 24 * time.Hour // ExpirySkew is the reader's allowance for clock skew (spec section // 5.2; BRC-169 section 9.6). ExpirySkew = 300 * time.Second // MaxGrantsPerSubject is the most grants one subject holds in a roll. MaxGrantsPerSubject = 8 )
Wraps and transitions.
const ( // DefaultDelay is the propagation delay after a mined object's block // is in the publisher's headers, before it is published; MaxDelay its // cap. DefaultDelay = 60 * time.Second MaxDelay = 10 * time.Minute // DefaultFreshness and MaxFreshness bound how old a writer's evidence // that a group's token is the latest may be (spec section 6.5). DefaultFreshness = 60 * time.Second MaxFreshness = 600 * time.Second )
Publication and freshness.
const ( MaxHosts = 16 UnicastHostsWarn = 5 MinTimeout = time.Second MaxTimeout = 5 * time.Minute DefaultTimeout = 15 * time.Second )
Hosts, quorum and requests.
const ( // PageSize is the most outputs one answer page holds (the spec's). PageSize = 64 // MaxPages is the most pages one question reads per host: 4096 outputs. MaxPages = 64 // DefaultMaxPrice is the most a priced question is paid without // -max-sats. DefaultMaxPrice = 1000 // MaxAnswer is the most bytes a reader takes for one lookup answer: a // full page of the largest objects the plane carries fits several // times over. MaxAnswer = 16 << 20 // SeqAnswers is the most outputs a reader takes from one answer to a // seq: a host keeps at most 8 tokens a seq, and what a hostile one // adds is not read. SeqAnswers = 16 // DefaultBudget is the most a command that asks several priced // questions pays in all without -budget. DefaultBudget = 16 * DefaultMaxPrice // MaxBEEF is the most a reader takes for one answered object. MaxBEEF = 1 << 20 // MaxUnminedPayments is how many of a payer's own payments may be // unmined at once with the next spending the change of the last: each // adds its transaction to the next payment's BEEF. MaxUnminedPayments = 16 )
Reading.
const ( DefaultSettleInFlight = 16 MaxSettleInFlight = 64 )
Settling.
Variables ¶
var PlaneWait = []time.Duration{500 * time.Millisecond, time.Second, 2 * time.Second}
PlaneWait are the waits between a publisher's lookups for a wrap it submitted to the plane, at each host it names, before it offers the wrap to that host directly: the plane delivers in well under a second.
Retries are the waits between the tries of a submission: four tries, then the host is reported missed and the object stays persisted.
Functions ¶
This section is empty.