erigon-pulse/consensus
milen 1f237c0aaf
borheimdall: only fetch next span when in last sprint of current span (#9096)
Heimdall prepares the next span a number of sprints before the current
span ends. Currently we always fetch the next span regardless of which
sprint we are in during the current span. This causes a liveness issue
due to how the Heimdall client works (it infinitely retries until it
fetches a span - this issue will be fixed in a separate PR). This PR
fixes this by matching what bor does - it fetches the next span only in
the last sprint of the current span.

Changes:

- Adds a unit test for the above
- Adds a new function BlockInLastSprintOfSpan
- Some code reorg and cleanup - moves the span num related functions
from the bor package to the span sub package for better logical grouping
2023-12-28 15:52:49 +00:00
..
aura Numerical instead of lexicographic sorting in borKeyValueConfigHelper (#8560) 2023-10-23 14:11:32 +02:00
bor borheimdall: only fetch next span when in last sprint of current span (#9096) 2023-12-28 15:52:49 +00:00
clique Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
ethash Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
merge Introduce extra functions for BorSpans (no-op) (#8648) 2023-11-04 10:59:07 +00:00
misc erigon-lib: remove unused constants from protocol.go (#8644) 2023-11-03 10:20:36 +01:00
mock borheimdall: add test for span persistence (#8988) 2023-12-14 22:50:59 +02:00
chain_reader.go Introduce extra functions for BorSpans (no-op) (#8648) 2023-11-04 10:59:07 +00:00
consensus.go borheimdall: add test for span persistence (#8988) 2023-12-14 22:50:59 +02:00
errors.go Don't mark blocks as bad on transient errors (#8197) 2023-09-17 11:14:36 +02:00
result.go Clean up DEBUG category logs (#2776) 2021-10-05 08:14:04 +07:00