Ethereum does use an account-model and not like Bitcoin an UTXO model. Is it possible to do SPV-proofs in Ethereum and if so, can you please explain how to do it?

Correct me if I'm wong.

The state of an account is not stored on the blockchain in Ethereum, it is computed and stored in a local database on the node.

So in order to compute the state of an account you have to execute all smart contracts which this account has triggered and not only that. These smart contract may depend on an other account's state and so on and so forth. It seems pretty impossible to me to have an SPV-proof on Ethereum.

  • You might have to be more specific about what you mean by "account state." But I believe Merkle proofs are possible for pretty much everything. – smarx Apr 26 '18 at 12:06
  • Balance of an account. – Ini Apr 26 '18 at 16:23
  • 1
    That's in the state trie, so yes, an SPV proof is possible. (This is what the light client protocol uses.) – smarx Apr 26 '18 at 17:58
  • And are there any drawbacks? – Ini Apr 27 '18 at 0:09

From https://bitcoin.org/bitcoin.pdf:

8. Simplified Payment Verification

It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he's convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it's timestamped in. He can't check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it. As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker's fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user's software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.

All of the above is true for Ethereum mainnet as well. It is possible to run a light client that only checks the hashes in the headers.

From https://github.com/ethereum/wiki/wiki/Light-client-protocol, emphasis mine:

The purpose of the light client protocol is to allow users in low-capacity environments (embedded smart property environments, smartphones, browser extensions, some desktops, etc) to maintain a high-security assurance about the current state of some particular part of the Ethereum state or verify the execution of a transaction. Although full security is only possible for a full node, the light client protocol allows light nodes processing about 1KB of data per 2 minutes to receive data from the network about the parts of the state that are of concern to them, and be sure that the data is correct provided that the majority of miners are correctly following the protocol, and perhaps even only provided that at least one honest verifying full node exists.

So short answer to your question: SPV proof equivalent in Ethereum is running a light client, see for instance https://wiki.parity.io/Light-Client

  • Hashes of headers alone proof nothing about state. The parity Light client protocol link is down. – Ini Apr 26 '18 at 10:37
  • Headers prove things about belonging to the blockchain, ether transfers, as well as logs etc. things visible outside. This has the effect of "can't check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it". – Juuso Oct 11 '18 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.