Module holochain::core

source ·
Expand description

Defines the core Holochain workflows

Modules

  • Include nice string encoding methods and From impls
  • 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<SerializedBytes>, and uses a PrimitiveHashType

Structs

  • Error converting a composite hash into a subset composite hash, due to type mismatch
  • A newtype for a collection of EntryHashes, needed for some wasm return types.
  • Error converting a composite hash into a primitive one, due to type mismatch
  • 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 Serializes 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.
  • Context information for an invalid action to make it easier to trace in errors.
  • A microsecond-precision UTC timestamp for use in Holochain’s actions.

Enums

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. 4mb limit to constrain bandwidth usage on uploading. (Assuming a baseline 5mbps upload for now… update this as consumer internet connections trend toward more upload) 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

Type Aliases