Skip to content

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Jan 7, 2021

No description provided.

ucwong and others added 7 commits January 5, 2021 11:54
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
@ucwong ucwong changed the title Torrent hash Torrent hash fix in storage Jan 7, 2021
@codecov
Copy link

codecov bot commented Jan 7, 2021

Codecov Report

Merging #874 (b77a17f) into master (8579eba) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #874      +/-   ##
==========================================
- Coverage   49.30%   49.26%   -0.05%     
==========================================
  Files         420      420              
  Lines       48056    48052       -4     
==========================================
- Hits        23694    23672      -22     
- Misses      22288    22318      +30     
+ Partials     2074     2062      -12     
Impacted Files Coverage Δ
miner/worker.go 0.00% <ø> (ø)
rlp/raw.go 78.98% <0.00%> (-5.74%) ⬇️
p2p/discover/v4_udp.go 73.48% <0.00%> (-3.75%) ⬇️
p2p/discv5/table.go 57.98% <0.00%> (-1.69%) ⬇️
ctxc/downloader/statesync.go 55.03% <0.00%> (-1.17%) ⬇️
p2p/simulations/mocker.go 28.86% <0.00%> (-1.04%) ⬇️
trie/trie.go 78.24% <0.00%> (-0.77%) ⬇️
ctxc/downloader/downloader.go 76.58% <0.00%> (-0.54%) ⬇️
p2p/discover/v5_udp.go 80.53% <0.00%> (-0.54%) ⬇️
trie/proof.go 72.66% <0.00%> (-0.34%) ⬇️
... and 5 more

@ucwong ucwong merged commit 8e9f7cf into master Jan 9, 2021
@wlt-cortex wlt-cortex deleted the torrent-hash branch January 7, 2022 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants