Skip to content

Instantly share code, notes, and snippets.

@justusranvier
justusranvier / bitcoin dht.md
Last active February 26, 2022 21:53
An Efficiently Searchable Network for Transactions

#Basis

OpenDHT

OpenDHT is a Kademlia-based DHT which creates a key-value store. Keys can be arbitrary, and values are allowed to collide. Network queries will return multiple values if more than one is associated with the same key.

#Design

The basic structure of OpenDHT can be used to create a network for efficient lookup of individual transactions by outpoint.

@justusranvier
justusranvier / fraud proofs.md
Last active July 14, 2019 16:57
Improving the ability of SPV clients to detect invalid chains

SPV clients lack the ability of full nodes to detect whether or not a chain provided to them by another source complies with the rules of the Bitcoin protocol.

SPV clients can connect to multiple full nodes in the hope that at least one of the nodes is honest and will provide them with the best valid chain, however situations may arise where the non-compliant chain contains more proof of work than the compliant chain. In this situation, there is no way for the honest full node to signal to an SPV client that it should disregard the chain with more proof of work.

Fraud proofs are a technique which provide honest full nodes the capability to conclusively demonstrate that chain is invalid regardless of the amount of proof of work backing the invalid chain.

If Bitcoin nodes implement the ability to create, propagate, and verify fraud proofs, the security of SPV clients will be improved.

Assumptions and Definitions