Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed active count and shuffling cache #4266

Merged
merged 8 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions beacon-chain/blockchain/forkchoice/lmd_ghost_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/go-ssz"
"github.com/prysmaticlabs/prysm/beacon-chain/cache"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
Expand Down Expand Up @@ -132,8 +131,6 @@ func TestGetHeadFromYaml(t *testing.T) {
t.Errorf("wanted root %#x, got root %#x", wantedHead, head)
}

helpers.ClearAllCaches()
testDB.TeardownDB(t, db)

}
}
2 changes: 0 additions & 2 deletions beacon-chain/blockchain/forkchoice/process_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func (s *Store) OnBlock(ctx context.Context, b *ethpb.BeaconBlock) error {
// Prune the block cache and helper caches on every new finalized epoch.
if postState.FinalizedCheckpoint.Epoch > s.finalizedCheckpt.Epoch {
s.clearSeenAtts()
helpers.ClearAllCaches()
if err := s.db.SaveFinalizedCheckpoint(ctx, postState.FinalizedCheckpoint); err != nil {
return errors.Wrap(err, "could not save finalized checkpoint")
}
Expand Down Expand Up @@ -201,7 +200,6 @@ func (s *Store) OnBlockInitialSyncStateTransition(ctx context.Context, b *ethpb.
// Prune the block cache and helper caches on every new finalized epoch.
if postState.FinalizedCheckpoint.Epoch > s.finalizedCheckpt.Epoch {
s.clearSeenAtts()
helpers.ClearAllCaches()

startSlot := helpers.StartSlot(s.prevFinalizedCheckpt.Epoch) + 1
if featureconfig.Get().PruneEpochBoundaryStates {
Expand Down
3 changes: 0 additions & 3 deletions beacon-chain/blockchain/forkchoice/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/prysmaticlabs/go-ssz"
"github.com/prysmaticlabs/prysm/beacon-chain/cache"
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
Expand Down Expand Up @@ -206,8 +205,6 @@ func TestStore_LatestAttestingBalance(t *testing.T) {
}

func TestStore_ChildrenBlocksFromParentRoot(t *testing.T) {
helpers.ClearAllCaches()

ctx := context.Background()
db := testDB.SetupDB(t)
defer testDB.TeardownDB(t, db)
Expand Down
1 change: 0 additions & 1 deletion beacon-chain/blockchain/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func setupBeaconChain(t *testing.T, beaconDB db.Database) *Service {
}

func TestChainStartStop_Uninitialized(t *testing.T) {
helpers.ClearAllCaches()
hook := logTest.NewGlobal()
db := testDB.SetupDB(t)
defer testDB.TeardownDB(t, db)
Expand Down
2 changes: 0 additions & 2 deletions beacon-chain/cache/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = [
"active_count.go",
"attestation_data.go",
"checkpoint_state.go",
"committee.go",
Expand Down Expand Up @@ -31,7 +30,6 @@ go_test(
name = "go_default_test",
size = "small",
srcs = [
"active_count_test.go",
"attestation_data_test.go",
"checkpoint_state_test.go",
"committee_test.go",
Expand Down
102 changes: 0 additions & 102 deletions beacon-chain/cache/active_count.go

This file was deleted.

83 changes: 0 additions & 83 deletions beacon-chain/cache/active_count_test.go

This file was deleted.

Loading