On ULC incentives
*Deep thought: All roads lead to Rome and staking schemes lead to Casper*
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
* `LES-Server` - provider of signed blockchain data
* `ULC-Client` - consumer of blockchain data, low on resources
* `Warden` - performs audit on behalf of `ULC-client`
* 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!
* 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
* Resource-restricted device
* Wants access to partial blockchain state
* Doesn't have resources to validate blockchain
* Downloads blocks headers and state lazily
* Paid for delivering data via `Swap` channel / other kind of payment channel
* :question: Payment negotiation - relative to stake?
* Paid for verifying signed packages and adding its own signature
* Gets part of slashed stack in case of detected dishonesty
* 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
* 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:
Errors all belong to: