mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Update go to 1.19.3 (#11630)
* Update go to 1.19.3 * Update other items to 1.19 * Update golangci-lint to latest release * Run gofmt -s with go1.19 * Huge gofmt changes Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
@@ -17,25 +17,25 @@
|
||||
// with length = H where H is the amount of epochs worth of history
|
||||
// we want to persist for slashing detection.
|
||||
//
|
||||
// validator_1_min_span = [2, 2, 2, ..., 2]
|
||||
// validator_1_max_span = [0, 0, 0, ..., 0]
|
||||
// validator_1_min_span = [2, 2, 2, ..., 2]
|
||||
// validator_1_max_span = [0, 0, 0, ..., 0]
|
||||
//
|
||||
// Instead of always dealing with length H arrays, which can be prohibitively
|
||||
// expensive to handle in memory, we split these arrays into chunks of length C.
|
||||
// For C = 3, for example, the 0th chunk of validator 1's min and max spans would look
|
||||
// as follows:
|
||||
//
|
||||
// validator_1_min_span_chunk_0 = [2, 2, 2]
|
||||
// validator_1_max_span_chunk_0 = [2, 2, 2]
|
||||
// validator_1_min_span_chunk_0 = [2, 2, 2]
|
||||
// validator_1_max_span_chunk_0 = [2, 2, 2]
|
||||
//
|
||||
// Next, on disk, we take chunks for K validators, and store them as flat slices.
|
||||
// For example, if H = 3, C = 3, and K = 3, then we can store 3 validators' chunks as a flat
|
||||
// slice as follows:
|
||||
//
|
||||
// val0 val1 val2
|
||||
// | | |
|
||||
// { } { } { }
|
||||
// [2, 2, 2, 2, 2, 2, 2, 2, 2]
|
||||
// val0 val1 val2
|
||||
// | | |
|
||||
// { } { } { }
|
||||
// [2, 2, 2, 2, 2, 2, 2, 2, 2]
|
||||
//
|
||||
// This is known as 2D chunking, pioneered by the Sigma Prime team here:
|
||||
// https://hackmd.io/@sproul/min-max-slasher. The parameters H, C, and K will be
|
||||
|
||||
Reference in New Issue
Block a user