Paper 2020/927
A Gas-Efficient Superlight Bitcoin Client in Solidity
Stelios Daveas, Kostis Karantias, Aggelos Kiayias, and Dionysis Zindros
Abstract
Superlight clients enable the verification of proof-of-work-based blockchains by checking only a small representative number of block headers instead of all the block headers as done in simplified payment verification (SPV). Such clients can be embedded within other blockchains by implementing them as smart contracts, allowing for cross-chain verification. One such interesting instance is the consumption of Bitcoin data within Ethereum by implementing a Bitcoin superlight client in Solidity. While such constructions have demonstrated security and efficiency in theory, no practical implementation exists. In this work, we put forth the first practical Solidity implementation of a superlight client which implements the NIPoPoW superblocks protocol. Contrary to previous work, our Solidity smart contract achieves sufficient gas-efficiency to allow a proof and counter-proof to fit within the gas limit of a block, making it practical. We provide extensive experimental measurements for gas consumption. The optimizations that enable gas-efficiency heavily leverage a novel technique which we term hash-and-resubmit, which almost completely eliminates persistent storage requirements, the most expensive operation of smart contracts in terms of gas. Instead, the contract asks contesters to resubmit data and checks their veracity by hashing it. Other optimizations include off-chain manipulation of proofs in order to remove expensive look-up structures, and the usage of an optimistic schema. We show that such techniques can be used to bring down gas costs significantly and may be of independent interest. Lastly, our implementation allows us to calculate concrete cryptoeconomic parameters for the superblocks NIPoPoWs protocol and in particular to make recommendations about the monetary value of the collateral parameters. We provide such parameter recommendations over a variety of liveness settings.
Note: Add acknowledgement
Metadata
- Available format(s)
- Category
- Applications
- Publication info
- Preprint. MINOR revision.
- Keywords
- BlockchainSuperlight clientsNIPoPoWsSolidityDesign Patterns
- Contact author(s)
-
sdaveas @ gmail com
kkarantias @ gmail com
akiayias @ inf ed ac uk
dionyziz @ gmail com - History
- 2020-11-22: last of 4 revisions
- 2020-07-26: received
- See all versions
- Short URL
- https://ia.cr/2020/927
- License
-
CC BY
BibTeX
@misc{cryptoeprint:2020/927, author = {Stelios Daveas and Kostis Karantias and Aggelos Kiayias and Dionysis Zindros}, title = {A Gas-Efficient Superlight Bitcoin Client in Solidity}, howpublished = {Cryptology {ePrint} Archive, Paper 2020/927}, year = {2020}, url = {https://eprint.iacr.org/2020/927} }