Gherman
    • 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
    # Truebit --- ## Outline ---- 1. Cryptography & Intro Matteo 2. Economics Bradley 3. Governance Teemo 4. Blockchain Structure German ---- 5. Blockchain Guarantees German 6. Threat Models André 7. Conclusion All --- # Introduction --- # 1. Cryptography --- ### What are the main cryptographic primitives used in this blockchain project? --- Merkle Trees - Used to store solutions to computation in an $O(log\space n)$ contestable format --- ### Does this project use any exotic primitives? If so, which ones? --- - Built for simplicity - avoids probabilistically checkable proofs (PCP), succinct non-interactive arguments of knowledge (SNARKs), and exotic primitives (e.g. zk) entirely - Relies on standard cryptography provided by the underlying chain - (hash functions, digital signatures, …) --- ### How does this project use digital signatures for security? --- Extends the hash functions & digital signatures provided by underlying Blockchain > “Participants do not need to manage cryptographic keys beyond those used in Ethereum.” (Teutsch, Reitwießner, 8) > - The protocol relies on financial deposits to provide Sybil Resistance --- ### How does this project use hashing and hash-based data structures to ensure security? --- TrueBit uses Merkle Co-paths ensure computations are valid. --- ![](https://i.imgur.com/Ss4oVxD.png) --- The Verification Game: - The *Solver* calculates the hash of their state: the Merkle Root. - If a *Verifier* calculates a different root they can choose to challenge the *Solver.* - Following images from: [https://medium.com/truebit/truebit-the-marketplace-for-verifiable-computation-f51d1726798f](https://medium.com/truebit/truebit-the-marketplace-for-verifiable-computation-f51d1726798f) --- ![](https://i.imgur.com/64WRz8B.png) --- - Each square is a leaf of the Merkle Tree (a computational step in the solution) - So far, we know only that the inputs are equivalent and the outputs disagree - We need a method to search for the point of contention. --- ![](https://i.imgur.com/O7oidSq.png) ![](https://i.imgur.com/QZbKbEn.png) ![](https://i.imgur.com/QXvZTKY.png) --- - We recursively check midpoints until the computational difference is isolated - This method ensures that challenges can be processed in O(log n) time - Once the first point of disagreement is found, the TrueBit contract initializes a virtual machine with the pre-state and runs the fragment on chain to determine computational “truth” --- **Summary:** - A Solver and Verifier disagree on the Merkle Root - Binary Search for disputed step - Run instruction on chain to establish finality --- # 2. Economics --- ## Does this project have a native coin or currency? --- Yes and No --- ## Supply and Demand Dynamics --- ### Fixed Pricing (Regulation) --- In *section 4.2* the white paper states that, > “in practice the verification tax requires a substantial cushion. We estimate the necessary verification tax to be **500% – 5000%** of the cost of performing the given task.” > --- High fees relative to the computing price are undesirable, but they are still far lower than the gas fees Ethereum would charge for an equivalent computation on chain. This is analogous to benevolent price fixing in TrueBit’s governance system. --- ### Real time response --- Unlike many historical examples of price fixing, TrueBit prices could still implement a measure of real time responsiveness to supply and demand. Instead of voting on a singular price per computation unit, participants would vote on a pricing function $f$ so that: ---- $$ f(V,S) = T $$ Where * $V$ = the average number of verifiers per task on the network * $S$ = the proportion of solver computation speed to task volume (throughput/demand) * $T$ = the tax or fee rate relative to the price of cpu cycles for the underlying computation --- ## Incentivizing Good Behavior --- ### Task Giver Incentives --- ### Task Solver Incentives --- ### Task Verifier Incentives --- ## Disincentivizing Misbehavior --- ### Nash Equilibrium --- ![](https://i.imgur.com/QqL1zL0.png) --- ### Gaming Payouts --- ## Economics Conclusion --- * Price fixing, not so good * VRF integration * Potential improvement: Unified work pool from which solvers and verifiers are randomly assigned --- # 3. Governance --- *“the user community can democratically update the interpreter as needed”* But lacks any specification and is not further elaborated in the paper. --- > The Truebit governance is led by the original founding team. The team has not communicated about how it envisions the future of its governance and if part or all of the authority will be transferred to the community. --- The authors claim to *“introduce a governance layer whose lifecycles culminates with permanent dissolution into utility tokens, thereby tending the network towards autonomous decentralization.”* --- ## The upgradability of the smart contract --- 1. a new contract is deployed (by anyone) 2. contract issues new TRU and CPU and DAO tokens, but accepts legacy ones 3. users migrate to new contract, old tokens will gradually phase out --- ## Upgradability --- # **4. Blockchain Guarantees** --- ## Liveness --- * Relies on *parent* chain * `minDeposit` and `timeOut` ensure termination --- ## However ---- * Storage problem * Possible to stale the chain * Sybil attack --- ## Fairness --- ## Censorship-resistance --- Protocols make an assumptions about the calling chain. It claims that censorships are not possible on Ethereum, because users can obfuscate the function of their transaction. That means that *“miners cannot easily see where an Ethereum transaction might call without executing it”.* --- ## Safety --- The general concept of safety is build around the incentive for network participant to build truthful. It is more profitable to receive a fair compensation that to break the safety. More of this is discussed in section 6. It is also worth mentioning that the protocol properties defined in the whitepaper align with the implementation of a protocol. --- # 5. Blockchain Structure --- Truebit is built around the goal of linking web 2 computational resources to web 3 in a trustless way. This is necessary on chains looking to handle either rich data formats or lots of traffic. Off chain actors are tied into the core smart contract via existential deposits which act as levers to ensure the contribution of compute resources without malicious behavior. --- ## What is the state transition function of this blockchain/project? --- The state transition consists of three layers: - Incentive Layer - Dispute Layer - Computation Layer --- ![](https://i.imgur.com/c6ZME8Q.png) --- ## What are the core elements of the application stack? --- The protocol relies on the **Layer 1** solution that can correctly perform small computation tasks in order to verify the correctness of the computations. The paper gives Ethereum as an example. --- 1. Off-chain interpreter which enumerates a list of states for a given computation 2. On-chain stepper which, given a state, can compute the next state. The computation tasks can be stored either on IPFS or blockchain directly. --- However, the **storage** still remains an open problem for the project. Storing data on blockchain is way too expensive whereas IPFS can not guarantee the persistency of data without an incentive. --- ## What is the anatomy of a block in this system? --- 1. initHash: initial hash of the task, so there is a deterministic starting point of the task. We are working on making this easier to do. 2. codeType: 0 is WAST, 1 is WASM. You’ll know by your file extension of the task. 3. storageType: 0 is Blockchain, 1 is IPFS. IPFS is cheaper. 4. storageAddress: Contract Address or IPFS hash 5. maxDifficulty: Determines the difficulty of the task (1 is okay for testing) 6. reward: The amount of TRU tokens offered as a reward --- ## What is the consensus algorithm that is used? How does it work? ---- ### Overview ---- * No challenge -> no challenge game -> result is published * Challenge -> challenge game -> judges make decision ---- ### Game ---- Both challenger and solver start at first computation step (i.e. `0` ) The challenger submits index `i` of the step that differs from its own and then submit it to the network. If `i` is outside the boundaries ( `i < 1 || i > (n-1)`), the challenger loses the game and deposit immediately. ---- Otherwise, the challenger selects the configuration to challenge at position between the first step `0` and the first indicated wrong computation at `i`. The solver submit the hash of the computation (or state snapshot) and submits it as a proof of the correctness of the solution. The challenger then computes its own merkle tree and compares the value with its own. ---- If they are correct, the challenger advances and selects the configuration indexed between `i - index_of_first_incorrect_configuration` and `i` The game eventually runs for $O(log(n))$ steps and converged to the first (initial) disputed **step**. The configuration is then submitted back to the calling blockchain where validators of the network (e.g. Ethereum nodes) can verify it quickly on-chain. --- ## Evaluation --- **Positives** * WASM * Dispute Layer **Negatives** * Storage * Ecosystem --- # **6. Threat Models and Security** --- ## Byzantine Generals Problem --- ## Sybil Attack --- ## How does this project provide secure transactions? --- # **7. Conclusion** --- ## How do the cryptographic elements, the economic incentives and the blockchain parameters all contribute to the core goals of this blockchain? ---- - Merkle Tree of computation steps allows for minimal on chain computation when establishinng finality - All truthful partivipants are approptiately inventivized - All byzantine participants are properly disincentivized - Pricing is chosen in a way guaranteed to cultivate security vs throughput. - This project isn’t a blockchain - Parent chains such as Ethereum guarantee the liveness and termination of Truebit contract instances. ---- > From 2.2 Assumptions - “There exists a trusted network (i.e. Ethereum) that correctly performs very small computation tasks.” (Teutsch, Reitwießner 9) --- ## Of the things that you identified you liked the *most*, what were the top two things you would highlight? ---- 1. Verification Game 2. Merkle Tree for storing computations --- ## Of the things that you identified you liked the *least*, what were the two top things you would highlight? ---- 1. The power is concentrated in the hands of creators 2. Price fixing --- ## Describe a way you would devise an attack on this system. --- * Truebit is not Sybil-proof * Register multiple verifiers * Decrease the economic incentives for honest verifiers to participate * Hence, reduce number of verifiers and hijack the protocol * The protocol becomes the weekest part of security of blockchains using it ---- * Truebit relies on external storage provider * Increases the attack surface * Unavailability of program data results in breaking the dispute game --- ## Where we would take this project? --- ### General improvements --- - More randomness so selection of verifiers - Currently, verifiers chose challenges - Random assignment verifiers -> attacks more costly - TrueBit has been dead for a few years - Arbitrum and Polygon are better solutions for increasing throughput --- ### Proof of Computation ---- - TrueBit's ideas could be repurposed to create a new consensus mechanism - Fix two problems with one solution - Dominant cloud computing solutions require the user to trust the provider - PoW consensus mechanisms waste a lot of compute power ---- - Fundamentally: runs batched computations to underlie PoW - What we theoretically get: - Decentralize cloud computing - Economical use of PoW computations

    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