Hugo Dias
    • 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

      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.
      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
    • 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 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

    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.
    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
    --- title: Exploring ways to improve ipns tags: IPFS, IPNS, DWEB description: View the slide with "Slide Mode". type: slide slideOptions: spotlight: enabled: true --- # Exploring ways to improve IPNS! slides: https://hackmd.io/@hugodias/ipns --- ## Who are we? - Hugo Dias & Adin Schmahmann - Porto, Portugal & Boston, USA :heart: - IPFS Core Developers :cat: Note: ask who knows about IPFS, IPNS and DHT --- ### IPNS :space_invader: Inter-Planetary Naming System :space_invader: --- ## IPFS is Immutable ```shell > echo 'IPNS' > test.txt > ipfs add test.txt /ipfs/Qmcpr6B63t55cMni4zsZwdfsmc76bBWPgdP8fuoaGeat4x > echo 'mutable' >> test.txt > ipfs add test.txt /ipfs/QmdfuCQQZG3ZknEcUs4vGuf8rWXFpZWD3eakTth74HbpNw ``` Note: IPFS is powered by content-addressed data, which by nature is immutable: changing an object would change its hash, and consequently its address, making it a different object altogether. However, there are several use cases where we benefit from having mutable data. This is where IPNS gets into the equation. --- ## IPNS enables the creation of mutable pointers to a content path. Note: Each time a file is modified, its content address changes. As a consequence, the address previously used for getting that file needs to be updated by who is using it. As this is not pratical, IPNS was created to solve the problem. --- ## IPNS is Mutable ```shell > echo 'IPNS' > test.txt > ipfs add test.txt /ipfs/Qmcpr6B63t55cMni4zsZwdfsmc76bBWPgdP8fuoaGeat4x > ipfs name publish /ipfs/Qmcpr6B63t55cMni4zsZwdfsmc76bBWPgdP8fuoaGeat4x /ipns/QmcjrwMdCoLLSUk4bidy8PxFdDHFJLq4dq2i3k2Z3t8esv > echo 'mutable' >> test.txt > ipfs add test.txt /ipfs/QmdfuCQQZG3ZknEcUs4vGuf8rWXFpZWD3eakTth74HbpNw > ipfs name publish /ipfs/QmdfuCQQZG3ZknEcUs4vGuf8rWXFpZWD3eakTth74HbpNw /ipns/QmcjrwMdCoLLSUk4bidy8PxFdDHFJLq4dq2i3k2Z3t8esv ``` Note: IPNS is based on Self-certifying File System (SFS). It consists of a PKI namespace, where a name is simply the hash of a public key. As a result, whoever controls the private key has full control over the name. Accordingly, records are signed by the private key and then distributed across the network. --- #### An IPNS record is a data structure containing the following fields: - **value** (eg. /ipfs/bafy...) - **sequence** - **signature** - **public key** - validity - validity type - ttl Note: - value - It can be any path, such as a path to another IPNS record, a dnslink path (eg. /ipns/example.com) or an IPFS path (eg. /ipfs/Qm...) - validity - Expiration date of the record - Signature - Concatenate value, validity field and validity type. Sign the concatenation result with the provided private key. - Validity type - Allows us to define the conditions under which the record is valid. - Sequence - Represents the current version of the record (starts at 0) - Pubkey - Ttl - A hint for how long the record should be cached before going back to, for instance the DHT, in order to check if it has been updated. --- ### Current Overview ![ipns overview](https://github.com/ipfs/specs/blob/master/img/ipns-overview.png?raw=true) Note: Routing - DHT acts as a KV store and router - Right now PubSub works mostly to get faster updates --- ### Multiple routers :tada: We don't need to choose just one router! :tada: - DNS - MDNS - Workers - PubSub - DHT Note: Strategies: fastest, guaranteed of freshness, offline only. --- ### IPNS over DNS ```shell dig TXT bafybeicagsz6fho75fzralubljnhmvayrnkzgm4vtujedd7ldsojzn3xym.dns.ipns.dev /ipfs/QmdfuCQQZG3ZknEcUs4vGuf8rWXFpZWD3eakTth74HbpNw ``` ![image alt](https://hugomrdias.keybase.pub/ipns-dns.jpg) Note: * we built a package called ipns-ns * Nameservers for a domain (ipns.dev) --- ### IPNS over DNS * Fast resolves < 100ms * Provides Origin Isolation in browser * [https://<key hash>.ipns.dev](https://) * Human readable names * https://pretty-cat.ipns.dev * DNS over HTTPS * Publishing is centralized * Resolving can be federated * Anyone can run nameservers --- ### IPNS over MDNS * Works offline * MDNS annouces ipns.local * Browser can resolve ipns.local --- ### IPNS over Cloudflare Workers * Just a HTTP API with GET and PUT * Prototype to understand how IPNS works * It's still self-certifying :dizzy_face: * Shows that any KV store can be used as a backend * Runs in the edges :dash: --- ### IPNS over DHT - Put and Get IPNS records into DHT - Resolve/Publish decentralized - On resolve ask for multiple records to confirm we have the latest version - Slow resolves since we need to find multiple records --- ### IPNS over PubSub - Publish/Resolve records to/from **interested** peers - Fast record updates - Discover peers with: - DHT - DNS or MDNS - Rendezvous servers - Resolve speed depends on peer discovery method - Enables advanced use cases (e.g. multiple writers) Note: - Publish/Resolve records to/from **interested** peers - Decentralized given interested peers - Discover peers with: - Any KV store - Resolve speed depends on peer discovery method - DHT peer discovery much faster than DHT record search --- ### TLDR - multiple routers :+1: - ipns can be fast :horse_racing: - ipns can be flexible :electric_plug: - ipns can be simple :white_circle: <br> ```cpp= IPFS = *Content => Content IPNS = **Content => *Content ``` --- ### Future work - Revocation and Rotation of IPNS keys - Multiple writers to a single IPNS key - Including access control/capabilities - Third-party republishing - Flexible strategies for multiple routers --- ### Thank you! :clap: You can find us online with the handles #### @hugomrdias @aschmahmann

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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