Codex Storage
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • 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
    • Engagement control
    • Transfer ownership
    • Delete this note
    • 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 Sharing URL Help
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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • 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
    # Altruistic Mode - List of Problems ## Churn & repair Altruism seems to carry no incentives to maintain uptime. _Active repair under heavy churn_ is probably a bad idea. To state this as research questions, we can say: - In an altruistic mode, how to balance repair frequency and bandwidth costs under high churn, while still maintaining (some) acceptable data durability? - How to design a repair system so that it distinguishes between temporary churn (peers logging off briefly but still hold data) and permanent churn (peers leaving the network entirely)? ## Incentives **Reputation/slashing.** Lightweight verification works well for ensuring that we trigger repair when required, even under byzantine assumptions. Curbing bad peers however requires a reputation mechanism as otherwise peers can just keep re-offending. They could, for instance, purposefully keep triggering repair to destabilize the system. - In an altruistic setting, how should repair be triggered? Who can initiate repair, and how can the system validate/ensure that repair is genuinely required? - What attack vectors can malicious peers do to overwhelm the system with repair, and how can a reputation mechanism prevent these attacks? - When using reputation/slashing to prevent frequent repair, we need to consider false positives and false negatives, how to handle such scenarios without over-punishing honest peers? **Tokenomics** Tokens can be use for rewarding/punishing storage providers for storing the data. This requires consensus for how the rewards are distributed? We probably need to re-visit the old tokenomics design to account for rewards based on: - file size (since we would probably have different sizes or tiers), - the work done on erasure coding (if outsourced), - the durability guarantee provided, i.e. number of proofs and how frequent these are submitted (this is the case if we design Codex with multiple durability options/tiers). ## Sybil resistance Another vector of abuse would be trying to fill the system with garbage to deplete resources (bandwidth or storage). Peers with bad reputation must be banned. This also leads to the need to avoid Sybils. - Is a rate-limiting mechanism (e.g. RLN) suitable in an altruistic mode? Which attack vectors does it prevent, how does it work in practice, and how can it be enforced? We might need RLN to prevent DDOS especially if we support lightweight devices (mobile phones) that only sents requests and don't participate in storage. ## Replication & Erasure Coding **Repair under compaction.** Outsourcing erasure coding and doing compaction of small files solves the problem of increased proof costs and traffic, but it needs to play well with the network-level erasure coding for repair. **Replication vs Erasure coding** Can we support both? which use-cases/settings make one option more favourable than the other (e.g. small vs large files)? ## Lightweight Verification & Proofs In order to have any sort of durability guarantees, we need to have some verification (periodic checks) to detect missing data even if it is through light-weight proofs that provide probabilistic or low durability guarantees. We can have different tiers of durability, starting with best-effort (light-weight verification, e.g. Merkle proofs) to full durability (e.g. original codex storage proofs), and we can rollout these proving systems over-time with increasing levels of durability guarantees and efficiency. However, for each tiers, we must be clear on few things: - What is the threat model that we assume in each tier? What is the guarantees that this proving system provide? How efficient is it (size? Bandwidth required?)? How does it scale with the number of (small/large) files? - Depending of the setting/use-case & durability & other factors, there is a large menu of zk systems that can be used, research is needed to decide which one we can use? - The choice of proof system also depends on who is verifying (proof size matters), is it off-chain/on-chain? - Choice of field & hash function? - Choice of commitment? Merkle tree construction/organization? - Do we require proof aggregation? How expensive? And who is performing the aggregation? Do we need proof compression? - Data availability vs retrievability, clarify what the proofs are guaranteeing? - Merging/bundling small files? Proving such merge? and updating the DHT entry with every merge, and does that require a proof of merge? merging might require erasure coding to amplify the power of the proofs (so it doesn't miss files - less proofs). - Outsourcing erasure coding? And proving correctness of erasure coding? - Entropy/randomness sources? ## Validator Network & Consensus A validator network is a set of nodes that does the periodic checks for data availability. This would require consensus and incentives which can be the same consensus layer as the one used to reward storage providers or it can be a seperate one. There were previous attemps at this: [Decentralised Validator Network](https://hackmd.io/@codex-storage/Hy-Kb7bweg) and Proof Aggregation Network [V1](https://hackmd.io/@mghazwi/SyEu4E1Wel), [V2](https://hackmd.io/@mghazwi/ryiC2Xe7xx) However, the following questions remain open for research: - How would nodes/validators reach consensus on which proofs failed or which datasets/slots require repair? - What are the incentives for being a validator given it requires cpu and bandwidth (for proof verification)? - ## DHT Scaling & Security Considering the use-cases that Codex would like to aim for, we might see a need for storing large number of small files. These would need (if not bundled somehow) metadata DHT entries for each causing scaling issues for the DHT. Can a DHT like the one used in Codex handle this? - How many entries/content keys can a DHT with say $10^4 - 10^5$ nodes handle? What would be the expected bandwidth for a peer in such network? We have some [results](https://hackmd.io/@codex-storage/HkGRPTTYlg) on this for the specific case of BitTorrent replacement of the status community history archive. - Can we use a trie (= prefix tree) bundling structure to reduce the number of DHT entries, so instead of say 1 billion DHT entries, you have let's say 10 million "bundled entries", and each of those entries contain on average 100 "actual entries"? - Given the possiblity of poisoning the DHT with false entries, what type of validations/proofs can be required prior to updating the DHT entries? ## Privacy, Encryption, Anonymity & Plausible deniablity For data privacy, we need encryption and we have a [proposal](https://github.com/codex-storage/codex-docs-obsidian/blob/main/10%20Notes/Codex%20Encryption%20Basis.md) and [design](https://github.com/codex-storage/codex-docs-obsidian/blob/main/10%20Notes/Codex%20Encryption%20Design.md) for this. Anonymity especially in the status and Waku use-cases is something we need to look into. Ideally we would like the ability for any participant in the protocol to connect the data sender/receiver to the data, this I would assume is specially needed in the Waku sending large msgs use-case. The same research problem related to plausible deniablity as described in: [Plausible Deniability in Storage Networks](https://medium.com/@ramsesfv/plausible-deniability-in-storage-networks-e449dbc66160) ## Dynamic Data The same old [research problem](https://hackmd.io/@codex-storage/S1THTouPlg) of supporting dynamic data, but with the different assumptions that we have for the altruistic mode. We need to adjust the research and design to support this. The move to supporting small files that can be appended might simplify the problem especially if we have an idea/design for merging/bundling small files, proving this merge, proving erasure coding, and then proving availability. If these components work, I would assume that we can support dynamic data from append-only files, but more research and design is needed here.

    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