HackMD
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • 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
    • More (Comment, Invitee)
    • Publishing
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions and GitHub Sync
    • Transfer ownership
    • Delete this note
    • Template
    • Save as template
    • Insert from template
    • Export
    • Google Drive Export to Google Drive
    • Gist
    • Import
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Sharing Help
Menu
Options
Versions and GitHub Sync Transfer ownership Delete this note
Export
Google Drive Export to Google Drive Gist
Import
Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
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
More (Comment, Invitee)
Publishing
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with GitHub
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Revisiting Proto's DHT -- the "Peer DHT" - Nodes use discv5 to find other nodes "in some range" - They then create an overlay table that covers the key space, so that they have someone to ask for each part of the key space - The nodes in the overlay table are scored according to how they reply to one's request - This means we can see this as a second type of "light" peer, only used for samples # Special properties of our problem compared to generic DHT - The data is equally distributed in key space by design - There is a fixed amount of data (spamming the table with data is impossible) - We know what data a node should have. We can downscore nodes that are not able/willing to provide data that they should have # The "T" Peer network Say we also want to use the same DHT table structure in order to distribute the samples. Then we should additionally connect with peers with nearby keys so that we can share samples with them: ![](https://storage.googleapis.com/ethereum-hackmd/upload_38542854b2e630f95de01889e33483df.png) Each node thus maintains two sets of light peers: - Global peers that evenly cover the keyspace and are used for querying the DHT - Global peers are scored on how well they reply to sample requests - Local peers that are used to disseminate samples - Local peers are scored based on how early they will first send relevant samples # Total load thought experiment Assumption: We need at least 10 nodes in each bucket, so we need to make the probability of having less than 10 extremely small. 5000 nodes (~ current network size): - 100 buckets @ 50 nodes average - Each node responsible for 1% of samples - Dissemination load: - 7 * 1% * 64 MB = 4.48 MB/block (!!!) - Storage load: - 1% * 64 MB * (30 days / 12 s) = 138 GB (!!!) 100,000 nodes: - 1000 buckets @ 100 nodes average - Each node responsible for .1% of samples - Dissemination load: - 7 * .1% * 64 MB = 0.45 MB/block - Storage load: - .1% * 64 MB * (30 days / 12 s) = 13.8 GB We can probably design dissemination more efficiently? - Reduce replication factor because "local peer" network is tiny - places larger responsibility on initial distribution (Remark: With an indivitual validator being currently responsible for 4 lines out of 1024 or ca. 0.4%, the DHT load for sample dissemination is high :( ) # Open Questions - How to allow "light nodes" that only query but cannot provide data - If we do this, how can these light nodes reconstruct data in case of data censorship? - How to handle imbalances in the node table - Nodes need to have a high tolerance for peer table coverage - What if an adversary spams some part of the key space with "good" nodes? Other nodes in the same key space would then find it difficult to find peers - How to handle discv5 spamming -- can we somehow "gate" it to only allow good nodes in? - How to automatically detect a good radius? # Key space ideas - We probably don't need to hash samples at all to derive a key but simply use a function of sample (row, column) as the key. This has the advantage that one node always has the same coordinates in sample space - We can use this property to allow "subscriptions" to a node. For example a validator can simply subscribe to a number of nodes to always get one row or column - This obviates the need for any subnets for sample dissemination - We can also design the key space to be "compatible" with the 2d structure - Make nodes responsible for samples in the same row or same column - This also makes row/column subscriptions cheaper -- you only need to ask very few light peers to cover a whole row/column - Allow nodes to choose their ID rather than deriving it by hash; allow multiple IDs - The adversary has this ability, so why not make normal nodes use it to the advantage of the network? - Use case 1: During discovery, you find no good peers in some keyspace area (or only very few). Or all peers turn out to be unreliable. Enter that keyspace yourself - Use case 2: You expect to download much more than other nodes; e.g. you run many validators. Due to reciprocity, other nodes will decrease your score if you try to download all this data from them as they get too many requests from you. So you enter with many different IDs rather than just one,

Import from clipboard

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 lost 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?

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

Sign in via SAML

or

Sign in via GitHub

Help

  • English
  • 中文
  • 日本語

Documents

Tutorials

Book Mode Tutorial

Slide Example

YAML Metadata

Resources

Releases

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

Versions and GitHub Sync

Sign in to link this note to GitHub Learn more
This note is not linked with GitHub Learn more
 
Add badge Pull Push GitHub Link Settings
Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

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. Learn more

       Sign in to GitHub

      HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

      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
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

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

      Syncing

      Push failed

      Push successfully