Jacek Sieka
    • 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
On ULC incentives == *Deep thought: All roads lead to Rome and staking schemes lead to Casper* ## Premises We have Ultra Light Clients (ULC:s) that download blockchain data without verifying headers, but lack a network of Light Ethereum Subprotocol (LES) servers to feed them. It's possible but not always convenient to run your own LES server. People might run a few altruistically, but historically, this has proven to be insufficient to meet demand. There's also no way for the client to tell whether these servers are supplying correct data, and no motive for the servers to stay honest, again, beyond altruism. Let's explore a scheme that would encourage the creation of a network of LES servers that could provide some security to ULC:s. It starts with a few assumptions: * We want a practical solution now that exploits existing technologies to the extent it's possible, including the existing PoW chain * ULC:s want to put a number on how much to trust any data they recieve * ULC:s, being restricted, typically want small amounts of data * We tolerate some data loss, but not invalid/fraudulent data * Clients may end up paying for data they don't receive * It is expected that data remains fairly cheap - as a practical solution, we allow some slack here * We want to support a use case where data is requested on demand, and not subscribed to - meaning that state is explicitly fetched by client instead of being broadcast by server ## Participants * `LES-Server` - provider of signed blockchain data * `ULC-Client` - consumer of blockchain data, low on resources * `Warden` - performs audit on behalf of `ULC-client` ## Functions ### LES-Server * Likely to be a full archive node * Likely to have good connectivity / resources * Puts down a stake - can be trusted up to this stake (:question: quantify) * Registers stake and pricing with `swear`, an on-chain registry of stakes and guarantees, used for discovery and channel setup * There is a bootstrap issue here - the on-chain list of servers offering this service will not be covered by any guarantees! ### Warden * Similar performance-wise to LES (in fact, likely a `LES-server` also) * Puts down a stake * Verifies signed data against its own block-chain data * When discrepancies are found, may accuse `LES-Server` and chain of other wardens by posting stake along with proof via swindle contract on behalf of client * If no discrepancies are found, adds its signature to the packet ### ULC-Client * Resource-restricted device * Wants access to partial blockchain state * Doesn't have resources to validate blockchain * Downloads blocks headers and state lazily ## Incentives ### LES-Server * Paid for delivering data via `Swap` channel / other kind of payment channel * :question: Payment negotiation - relative to stake? ### Warden * Paid for verifying signed packages and adding its own signature * Gets part of slashed stack in case of detected dishonesty ### ULC-Client * Too weak / slow to do even light client verification - SoC and other small, embedded systems, or simply old phones * In current ULC setup, can only do `M/N` type security by sampling several servers * Can trust signed packet up to combined stake? * Will ask N+1 wardens for verification, each increasing stake and cost * Last warden problematic - no way to tell if it's lying * Can we use a circular setup here? how does that affect security and stake? ## Data package * Signed data contains: * Data - haha * Signature of `ULC-Client` - to send part of slashed stake * Signature of `LES-Server` * Signatures of `Warden`:s ### `ULC-Client` flow * Request data from `LES-Server` * Request verification from `Warden` until stake req is satisfied ### Fronting service * A fronting service may receive data request on `ULC-Client`'s behalf and forward to `LES-Server` and `Warden` until target stake is reached, thus minimizing the number of requests `ULC-Client` must make * `ULC-Client` must still choose `LES-Server` and `Warden`:S to avoid collusion / eclipse ## Questions * What is fraud in this case? Publishing old data? Publishing state from a block that ends up being discarded? * Precise conditions needed - oracle? or can be in contract? * Data is correct as of a certain block height * This block is the latest block at the time - how much lag to allow? Consider this a "real-time" system? * Fork-choice - giving an uncle means slashing? * When do payments happen and how do you deal with the data availability issue? * In swarm, long-term relationship between nodes means some slack is fine / acceptable * In `LES-Server` case, server is long-term and well known but clients come and go - how to establish relationship and make service acceptable? * Slow down initial, unpaid reqs - build reputation? * Is a stake-less warden useful? * How do you verify the last warden? * If there's a global stake, a steady relationship with the server might improve security with an individual stake * see also hard and soft channel deposits * within the stake guarantees * ends up being a casper game * Can we have a fronting service that gathers sigs from multiple wardens, such that `ULC-client` doesn't have to send them all? * Can `LES-Server` and `Warden` tell from request how valuable data is? Sometimes..? ## Stuff that increases security * Random wardens and servers - prevent eclipse attack * work out some probabilities here ## In case of dishonest server * `LES-Server` sends bad data * `ULC-Client` forwards signed bad data to `Warden` * `Warden` checks and goes to smart contract proving data is wrong * Stake is slashed * 50% burn - prevent `LES Server` where it creates a fake client that intentionally causes slash condition * 25% `Warden` - reward warden for being honest * 25% `ULC-Client` - damages * numbers from thin air - do something about that * eclipse attack still possible * need _one honest_ warden ## Problematic ideas ### Pool of wardens In this solution, `LES-Server` reply goes to a pool of wardens via broadcast. wardens then compete to sign request or detect fraud. * many messages to sign, not all bring reward * what if all servers are honest? * this could be the most common case * bad equlibrium: wardens are not rewarded when everthing is fine and go away / lower stake - at this point it's easy to cheat * don't have to sign honest messages > no profit, paying wardens crucial! ### Shared / global stake * only first stake slasher gets reward! * thus, one must quickly detect invalid data * prevents solutions where bad data verification happens peridocially - even when the stake itself has a challenge period, server might have cheated multiple clients in the meantime ### Data availability * Fundamental problem * How much slack do we allow? Inevitably, packets get lost intentionally or not - balance and pragmatism needed ## David Knott * Why can't there me wardens checking each other * Can it be a circle of wardens? * W1 signs D, W2 signs D+W1, W1 signs D+W1+W2 - what happens to stake that client can trust? * Truebit paper * Forced errors? * Complacent wardens * LES injects error, wardens catch * LES publishes error beforehand, rewards working wardens, punishes bad * how would you prove stuff is wrong? * can only access few blocks from within contract * play game with state trie Many thanks to: Aron Fischer David Knott Errors all belong to: Jacek Sieka

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