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
# The rated list DHT proposal based on having a "list" of all nodes, but with some rating added in for protection ## Construction Choose a constant $T$. Compile a list of all current peers. These are the level-1 peers. Ask each of them for a list of their peers. These peers are level 2. A peer that has already appeared in a lower level cannot reappear in a higher level. Do this up to level $T$. For all peers, additionally maintain a list of their "children" (peers with a higher level) and "parents" (all peers that have this peer as one of their peers and have a higher level). A peer can have multiple parents. ## Maintainance Peers at all levels are periodically queried for their current peers and the parent/child relations updated. Peers that have zero parents are removed from the list. ## Querying/scoring Sample numbers are mapped into the node ID space. All peers within a radius $d$ are expected to maintain a given sample. All peers start in inactive status. Any peer that responds to a sample request positively is moved to active status. Any peer that does not respond to a sample request is marked as inactive. Every peer has a score that is composed of the list of all active descendants of that peer (children, children of children etc.) As a client starts querying the table, they will identify peers with low scores. Peers with very low scores will be marked as defunct, and all their descendants will now longer be queried unless they are also descendants of non-defunct peers. ## Reciprocity Membership of two nodes in their respective rated lists should be mutual after a suitable convergence time; that is, if node A is in node B's list, then node B should also be in node A's list. Nodes that are in each other's rated lists (and not in a defunct subtree) can prioritize their mutual requests in times of network congestion. ## Depth Assuming peer degree 50 $T=1$: Only direct peers, equivalent to PeerDas One node should cover 1/12.5th=8% $T=2$: Ca. 2,500 nodes One node should cover 1/100th=1% $T=3$: Current max useful for Ethereum, enough to cover 125,000 nodes One node should cover 1/400th=0.25% (at 2^18 samples: 655 samples / 367 kB) $T=4$: 6,250,000 nodes # Attacks ## Flooding the full table (random malicious nodes) Attacker seeds the table with only malicious nodes. These nodes later execute a withholding attack: Question is, how fast can the withholding attack be identified and the offending subtree be removed? ## Flooding a local keyspace Attacker adds many nodes with very similar node IDs to flood one particular key space. Withholding attack -- seems imilar to previous one ## Combined flooding to occupy one particular key space, but add enough active nodes Example: attacker adds 90% active nodes all over the keyspace, but sprinkled with 10% in a particular key space that later start a withholding attack. All the malicious nodes's scores will still be pretty high since 90% of their descendants are still active, so it is hard to identify the original malicious nodes causing this. Example: With $T=3$, attacker adds 12,500 nodes to one sample keyspace, where there are only 125,000/400=312 honest nodes. The querying node will on average have to query 40 malicious nodes before finding an honest node in the subspace. Potential remedies: 1. Construct the system such that it can tolerate a small amount of local failures 2. When querying nodes for samples, use an additional diversity metric to rank them, to e.g. prioritize querying nodes with maximally different ancestors first 3. Scan the list for any unexpected clustering of nodes with common ancestors. When such a cluster is identified, mark their common ancestor as defunct. (Problem: This could also be used to attack good nodes by flooding their tables with bad nodes) # Bandwidth to maintain the list Assuming updating the list at an interval of once per 30 minutes, 100 bytes per peer = 5 kB for querying one peer's list of peers $T=2$: 50*5000/1800 = 139 b/s $T=3$: 2500*5000/1800 = 7 kB/s $T=4$: 125000*5000/1800 = 350 kB/s Up to $T=3$ seems practical currently Bandwidth can potentially be reduced by only transmitting abbreviated node records first, and only sending the full record when the querying node hasn't seen the node in question yet.

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