mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 00:27:38 +00:00
4030614df0
* `getChunk` ==> `getChunkFromDatabase`. * `loadChunks`: Rename variables. * `Update`: Use explicit arguments. * `detect_attestations.go`: Reduce abstraction layers. * `loadAndUpdateChunks`: Change arguments order. * `updatedChunkByChunkIndex`: Update all known validators in the chunk. * `LastEpochWrittenForValidators`: Avoid avoidable `for`loop. * `chunks.go`: Ensure implementations respect the interface. * `LastEpochWrittenForValidators`: Stop considering lack of epoch as genesis epoch. * `updatedChunkByChunkIndex`: Don't update latest updated epoch. And add a bunch of tests. * Improve slasher cold boot duration. Before this commit, on a slasher cold boot (aka, without any db), the `updatedChunkByChunkIndex` function looped for all validators AND for all epochs between the genesis epoch and the current epoch. This could take several dozen of minutes, and it is useless since the min/max spans are actually a circular buffer with a limited lenght. Cells of min/max spans can be overwritten (with the same value) plenty of times. After this commit, the `updatedChunkByChunkIndex` function loops for all validators AND AT most 'historyLength' lenght. Every cell of min/max spans are written AT MOST once. Time needed for slasher boot goes from `O(nm)` to "only" `O(m)`, where: - `n` is the number of epochs since the genesis. - `m` is the number of validators. |
||
---|---|---|
.. | ||
blockchain | ||
builder | ||
cache | ||
core | ||
das | ||
db | ||
deterministic-genesis | ||
execution | ||
forkchoice | ||
gateway | ||
monitor | ||
node | ||
operations | ||
p2p | ||
package | ||
rpc | ||
slasher | ||
startup | ||
state | ||
sync | ||
verification | ||
README.md |
Prysmatic Labs Beacon Chain Implementation
This is the main project folder for the beacon chain implementation of Ethereum written in Go by Prysmatic Labs.
You can also read our main README and join our active chat room on Discord.
Also, read the official beacon chain specification, this design spec serves as a source of truth for the beacon chain implementation we follow at Prysmatic Labs.