Expand description
Defines the core Holochain workflows
Modules
Include nice string encoding methods and From impls
HoloHash Error Type.
Defines the prefixes for the various HashTypes, as well as the traits which unify them
Manages the spawning of tasks which process the various work queues in the system, as well as notifying subsequent queue processors to pick up the work that was left off.
A Ribosome is a structure which knows how to execute hApp code.
Workflows are the core building block of Holochain functionality.
Macros
Helper for ensuring the the proper number of bytes is used in various situations
A default HashableContent implementation, suitable for content which
is already TryInto
Structs
A newtype for a collection of EntryHashes, needed for some wasm return types.
A HoloHash contains a vector of 36 bytes representing a 32-byte blake2b hash plus 4 bytes representing a DHT location. It also contains a zero-sized type which specifies what it is a hash of.
A wrapper around HoloHash that Serialize
s into a base64 string
rather than a raw byte array.
Represents some piece of content along with its hash representation, so that hashes need not be calculated multiple times. Provides an easy constructor which consumes the content.
Allows you to send an op to the incoming_dht_ops_workflow if you found it on the network and were supposed to be holding it.
A microsecond-precision UTC timestamp for use in Holochain’s headers.
Enums
HashableContent can be expressed as “content”, or “prehashed”, which affects how a HoloHashed type will be constructed from it.
Constants
Length of the core bytes (32)
Length of the full HoloHash bytes (39 = 3 + 32 + 4)
Length of the location bytes (4)
Length of the prefix bytes (3)
Length of the core bytes + the loc bytes (36 = 32 + 4), i.e. everything except the type prefix
16mb limit on Entries due to websocket limits. Consider splitting large entries up.
The maximum size to hash synchronously. Anything larger than this will take too long to hash within a single tokio context
1kb limit on LinkTags. Tags are used as keys to the database to allow fast lookup so they should be small.
Traits
Anything which has an owned HoloHashOf.
Every HoloHash is generic over HashType. Additionally, every HashableContent has an associated HashType. The HashType is the glue that binds together HashableContent with its hash.
Any implementor of HashableContent may be used in a HoloHashed to pair data with its HoloHash representation. It also has an associated HashType.
Adds convenience methods for constructing HoloHash and HoloHashed from some HashableContent
Adds convenience methods for constructing HoloHash and HoloHashed from some HashableContent
A PrimitiveHashType is one with a multihash prefix.
In contrast, a non-primitive hash type could be one of several primitive
types, e.g. an AnyDhtHash
can represent one of three primitive types.
Functions
Verify the author key was valid at the time of signing with dpki TODO: This is just a stub until we have dpki.
If we are not holding this entry then retrieve any element at this EntryHash and send it as a StoreEntry DhtOp to our incoming_dht_ops_workflow.
If we are not holding this header then retrieve it and send it as a RegisterAddLink DhtOp to our incoming_dht_ops_workflow.
If we are not holding this header then retrieve it and send it as a RegisterAgentActivity DhtOp to our incoming_dht_ops_workflow.
If we are not holding this header then retrieve it and send it as a StoreElement DhtOp to our incoming_dht_ops_workflow.
If we are not holding this header then retrieve it and send it as a StoreEntry DhtOp to our incoming_dht_ops_workflow.
Check the AppEntryType is valid for the zome. Check the EntryDefId and ZomeId are in range.
Check if there are other headers at this sequence number
Verify that the signature on a preflight request is valid.
Verify all the countersigning session data together.
Verify the countersigning session contains the specified header.
Check the headers entry hash matches the hash of the entry
Check the entry size is under the MAX_ENTRY_SIZE
Check the entry variant matches the variant in the headers entry type
Check the header should have an entry. Is either a Create or Update
Check the app entry type isn’t private for store entry
Check that previous header makes sense for this header. If not Dna then cannot be root of chain and must have previous header
Check the previous header is one less than the current
Check previous header timestamp is before this header
Placeholder for future spam check. Check header timestamps don’t exceed MAX_PUBLISH_FREQUENCY
Check the link tag size is under the MAX_TAG_SIZE
Check a Update’s entry type is the same for original and new entry.
Check that Dna headers are only added to empty source chains
internal PARSE for holo hash REPR
internal PARSE for holo hash REPR
internal REPR for holo hash
Validate a chain of headers with an optional starting point.
Verify the signature for this header
Type Definitions
An Agent public signing key. Not really a hash, more of an “identity hash”.
Base64-ready version of AgentPubKey
The hash of anything referrable in the DHT. This is a composite of either an EntryHash or a HeaderHash
Base64-ready version of AnyDhtHash
The hash of anything linkable.
Base64-ready version of AnyLinkableHash
The hash of a DhtOp’s “unique form” representation
Base64-ready version of DhtOpHash
The hash of a DnaDef
Base64-ready version of DnaHash
The hash of an Entry.
Base64-ready version of EntryHash
The hash of some external data that can’t or doesn’t exist on the DHT.
Base64-ready version of ExternalHash
The hash of a Header
Base64-ready version of HeaderHash
A convenience type, for specifying a hash by HashableContent rather than by its HashType
The hash of a network ID
Base64-ready version of NetIdHash
The hash of some wasm bytecode
Base64-ready version of WasmHash