From 20413ad7160650d393dadd6543a342004fd19b41 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 5 Jan 2021 10:44:33 +0100 Subject: [PATCH] miner: avoid sleeping in miner (#22108) This PR removes a logic in the miner, which was originally intended to help temporary testnets based on ethash from "running off into the future". If the difficulty was low, and a few computers started mining several blocks per second, the ethash rules (which demand 1s delay between blocks) would push the blocktimes further and further away. The solution was to make the miner sleep while this happened. Nowadays, this problem is solved instead by PoA chains, and it's recommended to let testnets and devnets be based on clique instead. The existing logic is problematic, since it can cause stalls within the miner making it difficult for remote workers to submit work if the channel is blocked on a sleep. Credits to Saar Tochner for reporting this via the bug bounty # Conflicts: # miner/worker.go --- diff.txt | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/diff.txt b/diff.txt index afc576dae..7ec5e4e1b 100644 --- a/diff.txt +++ b/diff.txt @@ -1929,40 +1929,3 @@ Date: Tue Jan 5 10:44:33 2021 +0100 Nowadays, this problem is solved instead by PoA chains, and it's recommended to let testnets and devnets be based on clique instead. The existing logic is problematic, since it can cause stalls within the miner making it difficult for remote workers to submit work if the channel is blocked on a sleep. Credits to Saar Tochner for reporting this via the bug bounty - -commit 6ada9f0f38d14941ab02144319dba9482da18da5 -Merge: 1951e20d1 e4571d8c1 -Author: Péter Szilágyi -Date: Tue Jan 5 10:27:33 2021 +0200 - - Merge pull request #22107 from karalabe/faucet-twitter - - cmd: support v1.1 Twitter API in faucet, fix puppeth - -commit e4571d8c12be5aaa380ee58ea35a5617823e5324 -Author: Péter Szilágyi -Date: Mon Jan 4 13:58:46 2021 +0200 - - cmd: support v1.1 Twitter API in faucet, fix puppeth - -commit 1951e20d1040627faf3b6722c88ddf0e86ecf50e -Author: Suriyaa Sundararuban -Date: Mon Jan 4 12:42:47 2021 +0100 - - SECURITY.md: link to release page (#22067) - - Add links to go-ethereum's GitHub release page. - - Co-authored-by: Felix Lange - -commit 5c2a7ce2ccace9f453bcd320b4ac52e1f5ce3ab2 -Author: rene <41963722+renaynay@users.noreply.github.com> -Date: Mon Jan 4 12:39:25 2021 +0100 - - node: rename startNetworking to openEndpoints (#22105) - -commit 47820ef726a7b08ea2e22baff8fff64231c3046b -Author: Suriyaa Sundararuban -Date: Mon Jan 4 11:58:51 2021 +0100 - - .github: Replace wiki links with new doc pages (#22065) (#22068)