Deletion is best effort. It holds on peers that follow the protocol. A peer
that already received an entry key can keep it, and old copies of a disk can
still hold a deleted key. See Deletion.
Kolo is IPv4 only: IPv6 addresses are refused, the v4-mapped form included.
Every library is experimental.
kolo-id
Limit
Value
Seed
exactly 32 bytes
Key file
regular file of exactly 32 bytes
Signing context
1 to 255 bytes
Public key for Verify
32 bytes
Small-order keys refused by Verify
all 14 encodings
Key file mode
0600
New parent directory mode
0700
Recovery phrase
exactly 24 words of the BIP-39 English list, ASCII only; ParsePhrase reads at most 1024 bytes
Certificate
at most 256 bytes, or 514 with an approver parent
Certificate offer
at most 450 bytes, 192 without a parent
Revocation
at most 472 bytes, 182 when the person key or the device itself signs it
Certificate file
1 to 514 bytes, mode 0600
Certificate chain
at most 2 certificates (person, approver, device); an approver cannot issue an approver
Certificate serial
at least 1
Contexts that start with kolo-id/device-
refused by Sign (ErrInvalidContext) and by VerifyDevice
Work of one VerifyDevice
at most 4 certificate signatures and 1 message signature, plus work linear in the revocation list
created with mode 0700, group or other access refused
Pebble file mode
0600 for every file Pebble creates in the directory
PebbleOptions.MemTableSize
0 (Pebble's 4 MiB) or 1 MiB to 1 GiB, ErrInvalidOptions otherwise; memory up to twice the size
Open logs per log ID
1 per backend in a process (ErrLogInUse)
Logs per log ID in a store
1, whatever the owner; an ID held for another owner returns kololog.ErrBadLogHeader
Memory per open log or replica
about 250 bytes per entry, whatever the entry size
Batch of one Adopt
under 2 GiB (1 GiB on 32-bit), counted as Pebble counts a batch; ErrTooLarge from 2 GiB on. It holds the entries it adds, and Pebble a second copy
Pebble batch
under 4 GiB - 1 bytes (2 GiB - 1 on 32-bit); ErrTooLarge otherwise
Stored record, head or delete marker
at most 1024 bytes
Stored entry key
exactly 32 bytes; absent on a deleted entry and on a replica entry received without its key (only an own log's live entry without its key is ErrCorrupt)
Entry whose padded ciphertext does not fit in one message
cannot be synced or fetched (ErrTooLarge), deleted or not, and the log does not sync past it
MaxStreams
16 per connection, pull and fetch streams alike, more answered busy
ServerOptions.MaxTotalStreams
256 (DefaultMaxTotalStreams) over all connections, more answered busy (ErrBusy for the client)
ServerOptions.MaxAnswerBytes
256 MiB (DefaultMaxAnswerBytes), at least 2 x MaxMessageSize, over all connections; an answer counts twice its size, and one that does not fit is answered busy
Timeout
60s to open a stream, for the start of each message read or write, and per wait for a request; a message of n bytes may take another n at MinRate
MinRate
16 KiB/s, the slowest average speed of a message
Answer to a request for entries
about 1 MiB; a larger entry goes alone, up to MaxMessageSize
PullOptions.InFlight
1 to 8 (MaxInFlight); any other value is ErrInvalidArgument. For a peer that streams, the most requests of credit a pull keeps waiting, 8 if 0; for an older peer, the answers asked for and not stored, 3 (DefaultInFlight) if 0
Credit of a streamed pull
2 MiB a request, from 2 requests up to InFlight waiting; a server holds at most 64 MiB of credit for one stream
Answers a pull holds that are not stored yet
6 MiB at most; one commit stores the waiting answers up to 4 MiB
Entries one STATE answer looks at
at most 32768 (MaxMessageSize / 128), then the puller asks for the rest; it reads only delete markers and keys, never a ciphertext
A zero field takes its default. A value outside its range returns ErrInvalidConfig for GroupConfig, fixed by the genesis entry, or ErrInvalidArgument for the local Limits.
Limit
Value
GroupConfig.MaxMembers
64, from 2 to 1024
GroupConfig.MaxSettlers
7 or MaxMembers if smaller, from 1 to 64
GroupConfig.MinSettlers
4 or MaxSettlers if smaller, from 1 to MaxSettlers
GroupConfig.MaxBody
1 MiB, from 1 KiB to 3 MiB
GroupConfig.CheckpointEvery
1024 settled positions, from 64 to 2^20
Limits.MaxTail
2048 entries, from 64 to 2^20
Limits.MaxPendingBytes
16 MiB, from 1 MiB to 1 GiB; one strand holds at most MaxPendingBytes / MaxMembers of it, one entry always fits
Limits.MaxForks
4, from 1 to 64: the second histories of one strand a peer keeps; the entries of the next are refused and no longer fetched
Limits.PulseGap
500 ms, from 10 ms to 1 min
Limits.PivotWait
3 s, from 100 ms to 5 min
Limits.AnnounceGap
100 ms, from 10 ms to 10 s
Limits.ConfirmWait
10 s, from 1 s to 5 min
Limits.MaxEvents
1024, from 16 to 2^16
View key and value
32 KiB and 1 MiB
Writes of one entry
16 x MaxBody, each operation costing its key and value plus 256 bytes
App tag
1 to 64 bytes of UTF-8
Join request and welcome
64 KiB and 1 MiB
Stream message
4 MiB
Pulls at once
16, one per strand
Answer to a request, unknown key
60 s, then the connection is closed
Disk per entry
about 600 bytes on every peer; history is never pruned
The devices package takes devices.Options. The first three are bounds of apply, so every peer of a group must use the same values.
Limit
Value
MaxCertsPerPerson
1024, 1 to 2^20: the certificates of one person in a view
PersonCertReserve
an eighth of MaxCertsPerPerson (128), 0 to MaxCertsPerPerson, -1 for none: slots kept for certificates the person key issued
MaxRevocationsPerDevice
64, 1 to 2^16: approver revocations of one device key
MaxDevices
none by default (the group's MaxMembers seats are the only bound); an opt-in ceiling on the devices of one person that Admit lets in, ErrTooManyDevices past it
A zero field takes the default, and a value outside the range is ErrInvalidConfig.
Limit
Value
SetupTimeout, RequestTimeout
10s each, 1s to 10m
MaxRequests, MaxSubscriptions
1000 each, 1 to 1000000; more get EXCESSIVE_LOAD
MaxObjectSize (a payload received from the peer)
16 MiB, 1 KiB to 1 GiB
MaxControlMessageSize
65535, 8192 to 65535
MaxNamespaceFields, MaxNameLength
32 fields, 4096 bytes: the draft limits, which can only be lowered
MaxBufferedGroups (one subscription, both sides)
64, 1 to 1000000
MaxBufferedBytes (one subscription, both sides)
32 MiB, or MaxObjectSize if larger, up to 64 GiB
MaxNamespaces (one namespace subscription)
1000, 1 to 1000000
MaxFetchBytes
MaxBufferedBytes, from MaxObjectSize to 64 GiB; a FETCH beyond it is refused with EXCESSIVE_LOAD, a fill is skipped and a forwarded FETCH is reset
OriginConfig.MaxTracks
1000, 1 to 1000000
OriginConfig.MaxObjectSize (a payload written to the origin)
16 MiB, 1 KiB to 1 GiB
TrackOptions.Priority
128 (DefaultPriority), 0 to 255; lower is more urgent
TrackOptions.CacheGroups, CacheBytes
16 groups, 32 MiB; 1 to 1000000 groups, 1 KiB to 64 GiB
Delivery timeouts
none; a value below 1 ms is rounded up to 1 ms
RelayConfig.MaxTracks
1000, 1 to 1000000
RelayConfig.MaxSessionTracks
MaxTracks divided by 10, at least 1; more get EXCESSIVE_LOAD
RelayConfig.MaxSessionFetches
16, 1 to 1000000; more get EXCESSIVE_LOAD
RelayConfig.Resume
0 (off), 1s to 1h: how long a relay keeps the announcements of a publisher whose connection was lost or that called Session.Suspend
RelayConfig.MaxResumeHeld
10000, 1 to 1000000: announcements held for ended sessions at once; one that does not fit is withdrawn with its session
RelayConfig.MaxPeerResumeHeld
the session's MaxRequests (1000), or MaxResumeHeld if lower, 1 to MaxResumeHeld: announcements held for one peer key
NewGroupRequestInterval
1s per subscription between two RequestNewGroup calls; a sooner one is ErrNewGroupTooSoon; a track signals TrackWriter.NewGroupRequests at most once every 1s, whatever the number of subscriptions
RelayConfig.CacheGroups, CacheBytes
as in TrackOptions, for each relayed track
KeyringConfig.Retain, RetainMax
450 ms, up to 1 m; Retain plus 400 ms, from Retain to 2 m. How long a replaced key still opens objects
KeyringConfig.MaxSenders
64, 1 to 1024; more Receive calls fail with ErrTooManySenders
KeyringConfig.MaxKeyRate
64 key messages per namespace per second, 1 to 1024; more are dropped and counted
KeyringConfig.ReplayGroups, ReplayObjects
64 groups and 8192 entries per Opener, 1 to 1000000
SenderConfig.MaxTracks
1024, 1 to 1000000; one more track rotates the key
Plaintext sealed under one track key
2^24 units of 16 KiB, then the Sender rotates
Object ID of a sealed object, namespace of a protected broadcast
below 2^32; 1 to 31 fields, with the key track's full name within 4096 bytes
Reason phrase and PeerImplementation from a peer
at most 1024 bytes, escaped; the reason is never in Error()
Cost of an object toward MaxBufferedBytes and the cache
its payload, 48 bytes per property and 64 bytes
Payload over 64 KiB
read as it arrives
Request IDs checked for repeats
the last 65536 numbers; older ones count as repeats
Stream with no progress
reset after RequestTimeout
kolo-transport MaxIncomingStreams
16 by default, 1 to 1000; raise it to match the subscriptions you expect
65508 bytes, the largest config that fits one object property
Catalog size
must fit the origin's MaxObjectSize, 16 MiB in kolo-moq; else ErrInvalidCatalog
Media tracks of a default origin
999, since the catalog track counts against the origin's MaxTracks; then ErrTooManyTracks
CatalogPriority, AudioPriority, VideoPriority
28, 48, 68; a lower number is sent first
MediaGroupTimeout
30s
PlayoutConfig.MinDelay
100 ms
PlayoutConfig.MaxDelay
400 ms, or MinDelay if larger
PlayoutConfig.MaxBehind
50 ms
PlayoutConfig.MaxFrames
8192 per track
PlayoutConfig.MaxBytes
16 MiB per track
Held video objects
the same two bounds again, counted separately: up to twice each, 32 MiB by default
Audio tracks in one Playout
1
Reference window
the last 2 s of arrivals, at most 8192
Frame ahead of the reference
dropped when more than 2 s ahead
Wait of a protected object for its key
MaxDelay, 400 ms by default
Held objects of a protected track
the same two bounds again, up to three times each with the group assembler and the playout, 48 MiB by default
Held catalog object of a protected watch
1, until its key arrives or a newer version replaces it
Overhead of a protected audio object
24 bytes, 9.6 kbit/s at 50 objects per second; under 1 percent for video
Memory of a protected remote participant with audio and video
up to 80 MiB in kolo-media, plus kolo-moq's MaxBufferedBytes for each of its subscriptions
First frame stamped far ahead
its track is silent for 2 to 3 s, then plays
Keyframe requests (WatchOptions.RequestKeyframes)
after 500 ms with no frame, then 1 s, 2 s, 4 s and 8 s; after five requests for silence, none until 30 frames in a row or a loss. An unanswered request is repeated after 1 s, 2 s, 4 s and 8 s, five in a row end the asking until a frame plays
DefaultMaxOwners, 100,000; a new owner past it is ErrOwnerLimit, owners already kept are never refused
AddTimeout, -add-timeout
none; past it an Add is ErrBusy and what was stored is kept
-max-conns, -max-conns-per-ip
100 (1 to 10000) and 4 (at most -max-conns), kolo-transport's connection limits
One entry
must fit in one kolo-sync message of 4 MiB with its record and encryption overhead; else ErrTooLarge
Log IDs in a capability
MaxLogs, 256, or none for all of the owner's logs
Capability
at most MaxCapabilitySize, 8353 bytes
Request
at most MaxRequestSize, 8389 bytes, one at a time per connection
Reading a request, writing an answer
Timeout, 60s
Issue time in the peer's future
at most 60s
Capability times
whole Unix seconds, up to 2^53-1
Check for expired capabilities
every minute
Unused open log
closed after a minute
Open logs
at most 64; the least recently used are closed first
Memory of an open log
about 250 bytes per entry; worst case about 0.42 times MaxBytes for 64 open logs
Connecting to a pinning peer
10s, then ErrUnreachable
DefaultCopies, MaxFallback
2, 2
Retrying a failed log delete
after 1 minute, then twice as long each time, up to 64 minutes
Data directory, identity.key
0700, 0600
-listen
127.0.0.1:7450
-health
127.0.0.1:7451
-metrics
127.0.0.1:7452
Both byte limits count stored keys and values, not disk blocks, and are
checked before anything is stored. Nothing is evicted, and deletes always
pass. See kolo-pin, Good to know.