Revert "More efficient way of computing skip slot cache key (#11441)" (#11535)

This reverts commit 0f0d480dbc.
This commit is contained in:
Nishant Das
2022-10-04 14:13:11 +08:00
committed by GitHub
parent 0f0d480dbc
commit 885dd2e327
11 changed files with 10 additions and 62 deletions

View File

@@ -446,7 +446,6 @@ func TestSubmitAttesterSlashing_Ok(t *testing.T) {
}
func TestSubmitAttesterSlashing_AcrossFork(t *testing.T) {
transition.SkipSlotCache.Disable()
ctx := context.Background()
params.SetupTestConfigCleanup(t)

View File

@@ -973,7 +973,6 @@ func attestationDependentRoot(s state.BeaconState, epoch types.Epoch) ([]byte, e
}
dependentRootSlot = prevEpochStartSlot.Sub(1)
}
root, err := helpers.BlockRootAtSlot(s, dependentRootSlot)
if err != nil {
return nil, errors.Wrap(err, "could not get block root")

View File

@@ -176,9 +176,6 @@ func TestGetAttesterDuties(t *testing.T) {
}
resp, err := vs.GetAttesterDuties(ctx, req)
require.NoError(t, err)
bs, err = transition.ProcessSlotsIfPossible(ctx, bs, params.BeaconConfig().SlotsPerEpoch*2)
require.NoError(t, err)
assert.DeepEqual(t, bs.BlockRoots()[31], resp.DependentRoot)
require.Equal(t, 1, len(resp.Data))
duty := resp.Data[0]
@@ -362,9 +359,6 @@ func TestGetProposerDuties(t *testing.T) {
}
resp, err := vs.GetProposerDuties(ctx, req)
require.NoError(t, err)
bs, err = transition.ProcessSlotsIfPossible(ctx, bs, params.BeaconConfig().SlotsPerEpoch*2)
require.NoError(t, err)
assert.DeepEqual(t, bs.BlockRoots()[31], resp.DependentRoot)
assert.Equal(t, 32, len(resp.Data))
// We expect a proposer duty for slot 74.

View File

@@ -15,7 +15,6 @@ import (
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/helpers"
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/signing"
prysmtime "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/time"
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/transition"
dbTest "github.com/prysmaticlabs/prysm/v3/beacon-chain/db/testing"
mockExecution "github.com/prysmaticlabs/prysm/v3/beacon-chain/execution/testing"
doublylinkedtree "github.com/prysmaticlabs/prysm/v3/beacon-chain/forkchoice/doubly-linked-tree"
@@ -529,7 +528,6 @@ func TestServer_getAndBuildHeaderBlock(t *testing.T) {
}
func TestServer_GetBellatrixBeaconBlock_HappyCase(t *testing.T) {
transition.SkipSlotCache.Disable()
db := dbTest.SetupDB(t)
ctx := context.Background()
hook := logTest.NewGlobal()

View File

@@ -19,7 +19,6 @@ import (
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/helpers"
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/signing"
coretime "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/time"
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/transition"
dbutil "github.com/prysmaticlabs/prysm/v3/beacon-chain/db/testing"
mockExecution "github.com/prysmaticlabs/prysm/v3/beacon-chain/execution/testing"
doublylinkedtree "github.com/prysmaticlabs/prysm/v3/beacon-chain/forkchoice/doubly-linked-tree"
@@ -2090,7 +2089,6 @@ func TestProposer_GetBeaconBlock_PostForkEpoch(t *testing.T) {
}
func TestProposer_GetBeaconBlock_BellatrixEpoch(t *testing.T) {
transition.SkipSlotCache.Disable()
db := dbutil.SetupDB(t)
ctx := context.Background()
hook := logTest.NewGlobal()