Add more domains to domain cache (#5726)

This commit is contained in:
terence tsao 2020-05-03 17:34:25 -07:00 committed by GitHub
parent af5b9222da
commit 17df25f3d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -160,8 +160,8 @@ func (v *ValidatorService) Start() {
v.conn = conn v.conn = conn
cache, err := ristretto.NewCache(&ristretto.Config{ cache, err := ristretto.NewCache(&ristretto.Config{
NumCounters: 1280, // number of keys to track. NumCounters: 1920, // number of keys to track.
MaxCost: 128, // maximum cost of cache, 1 item = 1 cost. MaxCost: 192, // maximum cost of cache, 1 item = 1 cost.
BufferItems: 64, // number of keys per Get buffer. BufferItems: 64, // number of keys per Get buffer.
}) })
if err != nil { if err != nil {

View File

@ -472,6 +472,8 @@ func (v *validator) UpdateDomainDataCaches(ctx context.Context, slot uint64) {
params.BeaconConfig().DomainRandao[:], params.BeaconConfig().DomainRandao[:],
params.BeaconConfig().DomainBeaconAttester[:], params.BeaconConfig().DomainBeaconAttester[:],
params.BeaconConfig().DomainBeaconProposer[:], params.BeaconConfig().DomainBeaconProposer[:],
params.BeaconConfig().DomainSelectionProof[:],
params.BeaconConfig().DomainAggregateAndProof[:],
} { } {
_, err := v.domainData(ctx, helpers.SlotToEpoch(slot), d) _, err := v.domainData(ctx, helpers.SlotToEpoch(slot), d)
if err != nil { if err != nil {