Willem Olding
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # The Holochain Visual Glossary Holochain development has a lot of specialised vocabulary. At the begining this can be very confusing. This document can act as a quick reference with visual aids to help with understanding. It also introduces the visual language used throughout the devcamp. <details> <summary>Network</summary> A group of *nodes* all running the same *DNA* connected together. Together they form a *DHT* for that *DNA* and validate each other entries to provide data integrity and persistence. ![](https://i.imgur.com/gnw3Kxx.png) </details> <details> <summary>DNA</summary> Much like the DNA in cells defines the characteristics of an organism, the Holochain DNA defines the shared validation rules and characteristics of a single DHT. Every node/agent who is part of a Holochain DHT must have an identical copy of the DNA. In fact the DNA must be the first entry on every agents local chain in order to prove they have an identical copy. ![](https://i.imgur.com/75jyNMo.png) The DNA file (.dna.json) is what is produced by running `hc package` for a Holochain project. It contains the definitions and WASM bytecode for all of the zomes plus some metadata and DNA specific properties. Changing a single character in the DNA file will result in a different hash and therefore a whole new DHT network is created. This is called *forking* a DNA. </details> <details> <summary>Zome</summary> A DNA is composed of one or more Zomes (short for Chromosomes) which are pieces of WASM code plus definitions of the *entries* and *functions* the zome contains. ![](https://i.imgur.com/ZrCEY9F.png) #### Zome: Entry An entry is like a schema for data that can be stored in the DHT. Any string of data that is stored in the DHT must be a type of entry that is defined in one of the zomes of the DNA. An entry is defined by its *type* and its *validation callback*. The validation callback is a WASM function that determines if a particular string is valid as as the given entry type. When you attempt to add a particular type entry to the DHT it must first pass the validation locally and also by any node that stored the entry in their DHT shard. Entries also define if the data should be stored in the DHT or local chain only and what data should be available to the validation function. The validation function may have access to: - Just the entry data and author address - The authors local chain headers - The entire authors local chain #### Zome: Function A zome function is the primary way to interact with a Holochain DNA running in the conductor. These are special WASM functions exposed by the conductor to the outside world. They provide an extra layer of code between any data modification or retrieval actions in Holochain. Zome functions accept a string and return a string. Using the Rust HDK this is handled as stringified JSON allowing structured data to be passed. Zome functions are essentially a layer for convenience only and can not be relied upon to ensure data integrity. </details> <details> <summary>DHT - Distributed Hash Table</summary> A DHT is a data structure for storing and retrieving data in a peer-to-peer network. It is a hash table where different parts of the hash space (shards) are stored by different nodes (typically with a high level of redundency). Knowing the hash of the data you wish to store/retrieve it is possible to discover which agents you must communicate with to store/retrieve your data. The Holochain DHT is combined with a gossip protocol so that changes can be propagated to the correct nodes and agents can join/leave the network while maintaining the correct levels of redundency. It is also special in that it is a **validated** DHT. Nodes must run new data through the validation functions in the network DNA before adding it to the DHT. This is required for maintaining data integrity and preventing certain attacks. </details> <details> <summary>Local Chain</summary> The local chain is an immutable record of every action an agent has taken for a particular DNA. It is immutable as every action must reference the hash of the previous (hash chained) and the *header* of every action is published to the DHT. Each header is also signed with the private key of the agent. ![](https://i.imgur.com/qY4rPg3.png) Every local chain begins with a special entry which contains the DNA itself. This makes it possible to prove that the agent is running the exact same DNA as everyone else on the network. The second entry is also special. This is where the agent registers themselves on the network by publishing their public key and grants themselves the capability to add further entries to the chain. Each agent must store their own local chain and is responsible for ensuring its safety and integrity. ### Local Chain: Header A chain header for an *entry* contains: - The entry type string - Hash of the entry data - public key and Signature of the entry data by the authoring agent - Hash of previous header - timestamp by the authors local clock ![](https://i.imgur.com/02Y6QeO.png) </details> <details> <summary>Conductor/Node</summary> The conductor is the runtime environment for DNAs. It is comparable to a tracker for bitTorrent. A single conductor can host many agents and many DNAs. ![](https://i.imgur.com/1WqCbFP.png) It is responsible for providing: - Networking functionality - WASM execution environment - Data persistence for the DHT and local chain - key management - exposing an interface for calling zome functions In fact the conductor does practically everything which is why our reference implementation conductor is simply called `holochain`. Much like there can be different trackers for bitTorrent there can be different conductors for Holochain. </details> <details> <summary>Links</summary> Links are a system entry type that can be used in a zome. They contains a base address, a target address and some additional tag data. They are handled in a special way such that agents who hold the base will also hold a list of the addresses that are linked to the base. These agents are responsible for responding to *get_links* requests for that base. Links must be defined on either the base or target entry. They also have their own validation callbacks. Links themselves have a *link_type* which, much like an entry type, is used to refer to a particular base, target and validation callback combination. ### Anchors Anchors are just regular entries but they serve a special purpose. Anchors themselves carry no real information but serve as bases for links that are easy to locate by hash. For example an entry containing the string `"posts_anchor"` can be hardcoded into the DNA. This entry address can be easily looked up by any agent by calculating the hash. This provides a shared, known location to discover linked posts. Warning: While this pattern seems nice it may not be the most scaleable. Recall that the holders of the base entry are required to store all the links on that base. In the prior example that means that holders of the posts anchor would need to store a link to every post. This can lead to DHT hotspots where some agents must store more data and handle more requests than others. </details> ![](https://i.imgur.com/CrDfAiM.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully