-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mining progress can possibly be stunted by determined attacker if difficulty gets high enough #274
Comments
The |
This has been fixed a long time ago. Closing. |
acud
pushed a commit
to acud/go-ethereum
that referenced
this issue
Mar 1, 2018
ngtuna
pushed a commit
to ngtuna/tomochain
that referenced
this issue
Nov 12, 2018
verify masternode permission for signing
maoueh
pushed a commit
to streamingfast/go-ethereum
that referenced
this issue
Aug 13, 2021
* Correct address from which events are emitted * Use UsingOVM flag
weiihann
pushed a commit
to weiihann/go-ethereum
that referenced
this issue
Nov 30, 2023
activate proof generation on fork + remove code dups use go-verkle's post-state API to verify proofs (ethereum#262) use prague as the verkle activation fork (ethereum#263) upgrade to latest go-ipa activate verkle transition in "miner" (ethereum#265) fix: do not force cancunTime upon verkle activation workaround: do not use root translation in replay workaround: deactivate overlay transition for now fixes from trying to get the devnet to work (ethereum#267) this line was left out from the previous commit upgrade to go-verkle with fixed newvalue serialization fix: ensure point cache isn't nil in copy (ethereum#268) fix: dependency cycle in tests (ethereum#269) upgrade to latest go-verkle fix: write trie preimage data to db (ethereum#274) fix: zero-root in produced block + sync (ethereum#275) upgrade go-ipa fix build fix typo include review feedback add switch to add proofs to blocks (ethereum#278) add fee recipient to witness (ethereum#279) touch all fields in withdrawal account header (ethereum#277)
sduchesneau
pushed a commit
to streamingfast/go-ethereum
that referenced
this issue
Jan 4, 2024
…desize Rename MaxCodeSize and MaxInitCodeSize to DefaultMaxCodeSize and DefaultMaxInitCodeSize
billettc
pushed a commit
to streamingfast/go-ethereum
that referenced
this issue
May 13, 2024
…slimit add a new flag to enforce an effective block gaslimit independent of …
luanxu-mxc
pushed a commit
to MXCzkEVM/mxc-geth
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note this attack only works if the attacker can maintain himself as "best peer" for a number of nodes, which, with good standing and decent mining power, may not be unreasonable. He can then cause them to stop making progress in mining, causing him to have a greater share of the hash power, and making it possible for the attack to cascade into a 51% attack by crippling the network's hash rate.
Given a situation where the difficulty of the chain is considerably higher than at a previous point (say the difficulty is a few multiples of what it was at block 1), an attacker can halt mining progress by repeatedly mining and broadcasting NewBlocks at height 1. These blocks may have been mined in the past and kept secret, so there could be a large store of them.
This is possible because the go-eth miner resets every time a NewBlockEvent is received, whether or not the block has the highest TD. See: https://github.com/ethereum/go-ethereum/blob/develop/miner/miner.go#L153 (note it only resets if the block is already in the DB, but all forks are added to the DB)
So by continually sending new, low difficulty blocks at height 1, miners are continuously forced to reset before they find a valid pow, and hence block generation slows down and possibly stops, and the attacking miner can bootstrap himself into owning proportionately more hash power.
I suppose the simplest fix is to check in the miner if the NewBlock is of the current height and only to reset if so (or to mine a bit longer for uncles). If the NewBlock is from way back, the miner should not reset.
This might be far fetched but it works in a network of two peers and I suspect would work if the attacker is clever and best peer for some number of nodes in a larger network (though I have not tested more than 2 peers). Block pool logic may avoid this already, but probably worth not resetting the miner on just any new block anyways.
The text was updated successfully, but these errors were encountered: