Alex Vlasov
    • 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
    --- tags: Time, Ethereum2.0 --- # Time as a Public Service in Byzantine context Time is a very important tool to coordinate people's activity, or to build distributed systems. In fact, clock-driven algorithm can significantly simplify fault-tolerant distributed systems (e.g. [L. Lamport, Using Time Instead of Timeout](https://lamport.azurewebsites.net/pubs/using-time.pdf)). Indeed, several blockchains explicitly rely on Time to coordinate participants (e.g. [V.Buterin, Network Adjusted Timestamps](https://ethresear.ch/t/network-adjusted-timestamps/4187)). The downside is that clocks can fail too. For example, on-board clocks of most computers are not very stable, losing or gaining up to 100 ppm (i.e. up to 8 seconds a day - [link](https://en.wikipedia.org/wiki/Real-time_clock#Timing)), most important factors being temperature changes and aging. Thus, distributed processes' clocks will inevitably diverge and a clock synchronization protocol is required. BFT system designers relying on an assumption that clocks are synchronized should validate that the resulting system is really resilient. Since additional faults can be induced via such clock synchronization protocols, e.g. it can become an attacker's target. We consider a particular case, when distributed clocks are synchronized to a common time standard, e.g. UTC, which is highly desired in many practical systems. This can introduce a dependence on a Time Service, which is necessarily centralized or relatively centralized. Thus, it can be an interesting opportunity for an attackers, since it can induces multiple correlated or coordinated faults. The goal of the post is to propose a model, which can be use to analyze security properties of protocols relying on a public Time Service. From a more generic perspective, the model can be extended to protocols accessing a generic (Public) Service, which can also become an implicit centralized dependency. ## Time Providers There can be several ways to synchronize clocks with UTC: - an atomic clock, which is synchronized to UTC initially only - GNSS receiver - Radio Wave clock - Power Grid clock - NTP serivce [Relatively cheap](https://www.microsemi.com/product-directory/clocks-frequency-references/3824-chip-scale-atomic-clock-csac) atomic clocks are available, though their cost is still prohibitive for most users. However, the option is ideal, in some sense, since one can reasonably assume an adversary cannot control such a clock, while it's stable enough to keep time without a synchronization protocol. GNSS, Radio Wave and Power Grid Clocks are also attractive, since it's possible that there are multiple correlated faults, but one can assume they are localized in some geographical area, since it will be extremely costly to suppress radio-waves world-wide. These options are not expensive, however, they can still be prohibitive, since many blockchain nodes are hosted (for example, 2/3 of Ethereum nodes at the moment of writing are hosted - [link](https://www.ethernodes.org/network-types)). So, the options are attractive for relatively wealthy node operators, e.g. in permissioned or consortium networks. But in open permissionless systems, the main option is to use NTP service, i.e. using time servers, which itself synchronized to stratum 0 Time Server, either directly or through an intermediate Time Server. Thus, a malicious adversary has a much wider range of possible attacks. ## Other Public Services Time is not the only Public Good, so the model can be adapted to other settings too. For example, nodes can use a set of root nodes to bootstrap their operation. Or they can use a common DHT service. Another example is that nodes can be hosted via the same hosting provider, so it exposes them to the similar correlated faults. The whole Internet infrastructure can be abstracted as a Service Provider too. The general idea is to model correlated faults that have some specific structure. Time Service is used as a motivating example. ## Anonymous Access One particular interesting case is that we can realistically assume a GNSS Time Provider cannot constitute a two-faced clock, e.g. providing different readings to two users at the same moment of time (within reasonable limits, ignoring precision time measurements, for example). To be able to do so, one has to distinguish different kind of users, since Public Services have to provide a qualitative service to public. While GNSS infrastructure in general assumes different categories (and different spatial locations) of users, in our case, a casual GNSS receiver is indistinguishable from many others. There can be the case that a particular GNSS receiver is faulty and thus other GNSS receivers will result in different readings. However, that can be treated as regular node fault, since such faults should be rare and uncorrelated. ## System Model The proposed model is a variation of a traditional model, popular in distributed process literature: there is a set of distributed processes (or nodes), which are connected by channels (links). Various failure models of nodes and channels can be assumed. We can model a Time Provider as a special kind of distributed process (node), which does not participate directly in the main protocol (e.g. Byzantine consensus). However, it is accessed as a server - to distinguish it from a client, which is another special kind of a distributed process, used in some models. In the Time context, we can also call the Time Providers as reference clocks. In a general case, we can call them (Public) Service Providers. The regular distributed processes (nodes) access Service Providers via special kind of links. ### Limiting Adversary Power The special kinds of processes and links form a hybrid model, where adversarial power limits can be specified independently for different kinds of parties (processes or links). For example, in a simple GPS model, the GPS service can be described as a single instance of Service Provider, which cannot fail, however, links connecting regular nodes to it can fail by omission. A more complex model would be to have several GPS Service instances, each connected to multiple nodes, so that GPS services can fail by crashing, however, the failures are independent or a small upper bound can be specified (an adversary can choose no more than $t$ GPS services to fail). This allows to introduce correlated faults (attached multiple processes will suffer from the fault). Another model can be to mix several Time Providers, e.g. GPS and Radio Clocks (or GPS+GLONASS+Galileo+BeiDou), so that Time Providers can fail, but do that independently. As noted above, we can restrict Time Service or link faults to be non-Byzantine only, e.g. crash or omission. NTP Time Servers can be modeled as a special kind of nodes too. In the case, we can assume a more powerful adversary, for example, able to make any $t < n$ NTP Time Servers behave as two-faced clocks. As vast majority of node operators are likely to be using Linux distros (e.g. Ethereum node distribution by [OS](https://www.ethernodes.org/os)), which is configured to use NTP Pool by default, there is a risk of NTP pool Sybil-like attack. We can model the possibility of the attack by specifying high percentage of NTP time servers that can be controlled by an adversary. The more powerful adversary is justified, as there exist NTP attacks (e.g. [one](https://eprint.iacr.org/2015/1020.pdf), [two](https://eprint.iacr.org/2016/1006.pdf)) or NTP pool attacks (e.g. [link](https://github.com/ethereum/eth2.0-specs/issues/1592)) As there are many Public NTP servers which can be randomly chosen by validators to set up their NTP daemons, a probabilistic model may be required in general case to model adversarial power limits. ### (Bounded) Rational Validator It's known that popular "honest majority"/"dishonest minority" models are not realistic (e.g. [link](https://notes.ethereum.org/@vbuterin/rkhCgQteN?type=view#Security-models)), since they ignore economical (dis)incentives, which can be significant, in certain cases. Node administrators can be "lazy" too. An alternative is to model validators as rational actors. In the context of Time Providers, setting up a reliable time source can require both money and skills. As pointed out, many nodes are expected to be hosted, which effectively means NTP service will be used as a Time Provider. And the easiest and cheapest option is to use default NTP configuration, which means using NTP pool in most Linux distros ([link](https://www.pool.ntp.org/en/)). Thus, hosted node deployment exposes a validator to a risk of an NTP attack, which questions whether the "rational majority" is a realistic assumption. A bounded rational model may be required. ## Conclusion The main question that such a model should answer is how security properties of a BFT protocol are affected, if it relies on public Time Providers (or Public Services). In general, if a protocol relies on a centralized or a relatively centralized service, then an attack could be possible on the latter, leading to compromising of security properties of the former protocol. We will discuss this in more details in the follow-up posts.

    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