erigon-pulse/consensus/bor/heimdall/span
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
..
span_num_test.go borheimdall: only fetch next span when in last sprint of current span (#9096) 2023-12-28 15:52:49 +00:00
span_num.go borheimdall: only fetch next span when in last sprint of current span (#9096) 2023-12-28 15:52:49 +00:00
span.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
spanner.go bor: logs prefix, grep-friendly (#8787) 2023-11-20 12:16:06 +07:00
testValidators.go move chainname and snapcfg packages to erigon-lib (#8508) 2023-10-18 13:37:39 +07:00