Robert Habermeier
    • 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
    • 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 Versions and GitHub Sync Note Insights 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Polkadot Kernel/Userland tags: Polkadot description: Robert Habermeier's presentation at Sub0 2023 type: slide --- ## Polkadot Kernel/Userland A new mental model for Polkadot's technology --- ## Post 1.0 * Identify generalizations of existing technology * Use generalizations to open new attachment points for building on Polkadot --- * Agile Coretime makes core procurement more flexible * The focus here is on core utilization --- ## What has been built? --- ![](https://hackmd.io/_uploads/HyU6WlLJT.png) --- ## The Relay Chain Global validator set, BFT consensus, Governance, Cores, Parachain Consensus --- Validators each bring (at least): * 500Mbps bandwidth * 16GB RAM * 8 CPUs --- ## 1. Data Availability System Ensure blobs of data remain _available_ to fetch even under adversarial conditions --- ## 2. Code Execution Validity System Ensure commitments to the outputs of Wasm code are accurate without all validators needing to check Blobs from (1) are inputs to code --- ## 3. Cores * Evenly dividing validators' bandwidth and CPU resources for usage in (1) and (2). * Each core handles one work package per RC block --- Cores on Polkadot * ~1MBps data availability each * 1500 sTPS in FRAME each * Currently 50 cores, aiming for 200+ in 2024 * \# of cores is a function of \# of validators and network protocols --- Work packages on Cores * 1 per 6s per core * 2s execution * 5MB data --- ![](https://hackmd.io/_uploads/HyU6WlLJT.png) --- ![](https://hackmd.io/_uploads/ry7qzxUyT.png) --- ## The Parachains Protocol Uses cores to progress blockchains and message queues * "This work package meant a new block was added" * "This work package meant some messages were sent" At the moment the only way to use cores. --- Core-usage retrospective --- ## 1. Data and compute workloads should be maximally full for best system utilization --- ## 2. Most core users need far less than a single core at any time. Typical core workload is ~250Kb and takes 100ms --- ## 3. Atomic composability between state machines by using a core together. --- ## Kernel / Userland --- Conceptual split. Kernel: low-level, generalized provider of data and compute resources Userland: mid-level, high-level, increasingly specialized users of data and compute. --- As the ecosystem develops, we need: 1. Good categories to identify the stack 2. Pluggable interfaces for core utilization --- ## Kernel * Chief concerns: core utilization, performance, security. * Use-case neutral * Very low-level: networking, consensus, databases, VMs * Provides data and compute resources * Stable, pluggable interface to higher-level logic * Coretime allocation primitives --- ## Userland * Chief concern: Applying cores to do useful things * Permissionlessly deploy use-case-specific code --- ## Userland Examples * System parachains (_permissioned_ but not enshrined) * Shared builders (collators) * Parachains Protocol * Cumulus --- ## Interfaces --- Interface 1: Who buys coretime? --- ![](https://hackmd.io/_uploads/ryi_PgI1T.png) --- Builder Sets: A generalization over existing _collator sets_ --- Coretime is currently sold to Parachains. This is the same as selling to a builder-set which only works on a single parachain. --- Builder sets generalize over cryptography, consensus, authorization mechanisms. --- Builders can * Build work packages which advance multiple parachains simultaneously and compose atomically * Submit an arbitrary amount of work packages for a single parachain at the same time --- ![](https://hackmd.io/_uploads/Hk2vceIyT.png) --- ![](https://hackmd.io/_uploads/ByWUN3Ud2.png) --- Interface 2: Pluggable side effects of work packages on the relay chain --- Example: Parachains Protocol --- The Relay chain runtime currently: 1. Looks at all parachain blocks landing on cores 2. Checks each parachain block descends from its parent 3. Checks each parachain block behaves correctly in messaging, respects queue buffers, etc. 4. Updates storage with the new parachain head, message queues --- These are side effects of work done on cores. What about a generalization? --- Allow anyone to register new logic on the relay chain which can update storage based on work packages submitted to cores. --- ![](https://hackmd.io/_uploads/B1VJ1ZU16.png) --- ![](https://hackmd.io/_uploads/SkIEJW8yT.png) --- ![](https://hackmd.io/_uploads/B1e4d4Iya.png) --- Most current use-cases need far less than 1 core. Core sharing within workloads is preferable to core sharing with full workloads and low frequencies. Core supply is likely to outstrip demand - many opportunities for experimentation --- ## Userland doesn't mean application-layer. There is a lot of infrastructure to be built - an entire blockspace supply chain. Most of this coordination will happen off-chain. --- ## Built in the open #### True open-source design, RFCs --- ## Build Together

    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