nimbus-eth2/beacon_chain/validators
Jacek Sieka efdf759cc0
avoid some slashing protection queries (#2528)
This PR reduces the number of database queries for slashing protection
from 5 reads and 1 write to 2 reads and 1 write in the optimistic case.

In the process, it removes user-level support for writing the database
in the version 1 format in order to simplify the code flow, and prevent
code rot. In particular, the v1 format was not covered by any unit tests
and has no advantages over v2. The concrete code to read and write it
remains for now, in particular to support upgrades from v1 to v2.

The branch also removes the use of concepts which doesn't work with
checked exceptions - in particular, this highlights code that both
raises exceptions and returns error codes, which could be cleaned up in
the future.

* Cache internal validator ID
* Rely on unique index to check for trivial duplicate votes
* Combine two surround vote queries into one
* Combine API for checking and registering slashing into single function

The slashing DB is normally not a bottleneck, but may become one with
high attached validator counts.
2021-05-04 15:17:28 +02:00
..
README.md Consolidate modules by areas [part 1] (#2365) 2021-03-02 11:27:45 +01:00
attestation_aggregation.nim Revamp attestation pool 2021-04-13 20:24:02 +03:00
keystore_management.nim EH cleanup (#2455) 2021-03-26 07:52:01 +01:00
slashing_protection.nim avoid some slashing protection queries (#2528) 2021-05-04 15:17:28 +02:00
slashing_protection_common.nim avoid some slashing protection queries (#2528) 2021-05-04 15:17:28 +02:00
slashing_protection_v1.nim avoid some slashing protection queries (#2528) 2021-05-04 15:17:28 +02:00
slashing_protection_v2.nim avoid some slashing protection queries (#2528) 2021-05-04 15:17:28 +02:00
validator_duties.nim avoid some slashing protection queries (#2528) 2021-05-04 15:17:28 +02:00
validator_pool.nim remove attestation/aggregate queue (#2519) 2021-04-26 22:39:44 +02:00

README.md

Validators

This folder holds all modules related to a Beacon Chain Validator besides the binaries they interact directly with (nimbus_validator_cliant and nimbus_signing_process):

  • Validator keystore
  • Validator slashing protection
  • Validator duties
  • Validator pool