This is the second in a series of blog posts about bugs I’ve found in go-ethereum (Geth). If you haven’t already, take a look at Part 1Â

Booby Trapping the Ethereum Blockchain

submited by
Style Pass
2021-05-28 14:30:04

This is the second in a series of blog posts about bugs I’ve found in go-ethereum (Geth). If you haven’t already, take a look at Part 1 here.

Today’s post is about a bug in Geth’s state downloader which could be used to trick it into syncing with mainnet incorrectly. If exploited, an attacker could have booby trapped the Ethereum blockchain and triggered a hard fork at will.

Whenever someone wants to run an Ethereum node, they must first synchronize with the network. This means downloading or computing all of the data needed to build a complete picture of the chain state at the latest block. Depending on the needs of the user, some tradeoffs between security and speed can be made, so Geth supported (at the time) two different sync modes: full sync and fast sync.

As the name would suggest, full sync performs a full synchronization of the Ethereum blockchain. This means that Geth will download and validate the proof-of-work seals on every single block. Geth will also execute every single transaction in the block, which allows it to generate the blockchain state locally without needing to trust other nodes. This is more secure but comes with a heavy speed tradeoff, as a full Geth sync may take anywhere from days to weeks to complete.

Leave a Comment