Andreas Fackler
    • 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
      • 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
    • 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 Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync 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
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
# Node Ageing ## Benefits and drawbacks ### Benefits 1. Node ageing should effectively prevent Sybil attacks. Since a new node in a section will have a low age, targetting that section with further nodes won't give any advantages, as succeeding in adding new malicious nodes to a section will result in relocating nodes that we previously managed to put there. On the other hand, it is unfeasible to wait for all our nodes in a section to age - firstly because it will take a long time for high ages, and secondly because they will be redistributed across random sections during the ageing process. ### Drawbacks 1. Relocating nodes causes additional churn, and data relocation. 2. Loss of age (or safecoin) upon disconnection might encourage centralisation (centralised farming would provide better internet connections and more reliable power). ## Potential issues, proposals for extensions ### Zero-cost attacks If it is profitable to run a node and the payment in Safecoin can be withdrawn at any time, running a large share of the network is effectively free, and an attacker could earn and sell Safecoin at a profit and then, once they have lots of nodes with sufficient age, perform the attack. It might make sense to reduce the age or even require a complete restart whenever Safecoin are withdrawn, so that it is guaranteed that an old node still has a large stake in the network, and is actually risking its own investment by attacking. TBD: Is it feasible to even merge the notions of the age of the node and the amount of Safecoin farmed by that node? Or would proof-of-stake even make more sense, instead of node ageing? If it is about the stakes in the network anyway, you could e.g. be required to pay a collateral before joining. You would need to commit that and whether you joined the network or not you would only get it back after e.g. a month. If you join, you are relocated only once. After the month, you are removed from the network, receive your collateral and the earned Safecoin, and can start again. ### Double votes and 50% quorum If contradictory votes can cause harm, as is the case with the [current mechanism in data manager](https://gist.github.com/michaelsproul/aac77a71f737633d603461932bd915fc) as well as the consensus mechanism proposed in [Data Chains, Part 1](https://forum.safedev.org/t/data-chains-part-1/597/31), then the intersection of two quora can already exploit that: If both sets `Q` and `R` of nodes are quora, then if `Q ∩ R` votes for _both_ contradictory messages/blocks `a` and `b`, and the correct nodes of `Q \ R` vote for `a`, and the correct nodes of `R \ Q` vote for `b`, then both accumulate. So the choice of the quorum definition must take into account that, given an attacker controlling a subset `A` of a group or section `S`: * If `A` is a quorum, the attacker can choose any decision. * If `S \ A` is not a quorum, the attacker can prevent any decision. * If there are quora `Q` and `R` such that `Q ∩ R` is a subset of `A`, the attacker can potentially cause conflicting decisions to be both accepted. That means that the definition needs to be chosen such that it is unfeasible to control either a quorum, or the complement of a quorum or the intersection of two quora. With ">50% node count _and_ >50% weight" there is still a chance that such an intersection contains only a single node. E.g. if there are nodes 1 to 9, with weights 1 to 9, then the sum of the weights is 45, then {1, 2, 4, 7, 9} and {1, 3, 5, 6, 8} are both quora, and intersect only in {1} (so the attacker doesn't even need to control an old node). There are alternative consensus algorithms, however, in which double-voting cannot cause harm, e.g. [Practical Synchronous Byzantine Consensus](https://arxiv.org/pdf/1704.02397.pdf), although those make synchronicity assumptions about the network. With that kind of algorithm, the only requirement is that there cannot be two disjoint quora. That would be satisfied by the proposed 50% value. ### Using node ages as weights in voting While the idea itself seems to be good, we need to take care not to allow an attacker to gain a quorum in a section by just letting a small number of nodes sit around ageing. This means that any notion of a quorum using ages as weights will need to independently take into account the plain number of nodes that are voting (as already suggested in the RFC). However, placing thresholds on *both* age and node count does increase the likelihood of stalling. If *either* of the age total or node total for a vote is insufficient, it will fail. This is an instance of the classic safety vs. liveness tradeoff. One option might be to require >1/2 or >2/3 of nodes, and a *smaller* proportion of age. On the other hand there is an argument for using 2<sup>A</sup> instead of the node age A itself as the weight, since that is what is proportional to the performed work: Getting a node to age 10 is 50 times more work than getting 10 nodes to age 1. ### Joining and relocation message flow The RFC text isn't fully up-to-date with the current resource proof implementation. But extending that to take relocation into account shouldn't be difficult: Essentially, relocation should work in exactly the same way as joining, except that no proxy is needed (the old section takes its place) and the node age is increased. The old section `S` would send an `ExpectCloseNode(age, old_pub_key)` message to the new section `T`, which would respond with a `RelocateResponse`. The node would then disconnect, generate a name in the required range, restart and in its `CandidateIdentify` include a signature of its new name with its old key. ### Measuring a node The RFC suggests that neighbouring groups can evaluate a node's performance. However, messages are always forwarded to only one member of the neighbouring group, which can prove that it received the message, but not that it didn't receive the message. This should still even out, however: If the neighbouring nodes each measure their subjective perception of the node's performance, the median of that value should then be hard to manipulate. ### Influencing the block hash with a new node's name A joining node can now freely choose its name from a given interval, and can thereby influence the link block's hash, which is used as a source of randomness to determine who is relocated to which other section. It would be safer to include more randomness to determine who relocates from where to where. By getting all the nodes in the section to sign something like the joining node's ID or the latest block hash, and taking the XOR of all the signatures we should be able to generate a better random value that can't be predicted by the attacker. In general, deriving randomness from the *structure* of the network is insufficient protection from an attacker with good knowledge of the network as they may have a node in every section. ### Other minor suggested changes * Possibly the age should not be part of the name itself but of the link blocks, since it is only meaningful in the context of the whole section or group. * Halving the age after failing to relocate seems harsh; since the age only grows logarithmically, it might be fairer to just subtract 1, which already halves the corresponding proof of work. ## Conclusions * Node ageing is compatible with the Data Chains Part 1 proposal. * Depending on the exact consensus algorithm used, the quorum definition should be: * **Sync BFT**: Majority of nodes AND majority of age. * **Async BFT (PBFT)**: 2/3 supermajority of nodes AND 2/3 supermajority of age.

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