Skip to content

Commit

Permalink
SSZ: temporarily disable roots cache until cache issues can be resolv…
Browse files Browse the repository at this point in the history
…ed (#4407)

* temporarily disable roots cache until cache issues can be resolved

* Also use custom ssz for spectests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
prestonvanloon and prylabs-bulldozer[bot] authored Jan 4, 2020
1 parent 01cf5d7 commit 784f911
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion shared/params/spectest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ go_library(
srcs = ["config.go"],
importpath = "github.com/prysmaticlabs/prysm/shared/params/spectest",
visibility = ["//visibility:public"],
deps = ["//shared/params:go_default_library"],
deps = [
"//shared/featureconfig:go_default_library",
"//shared/params:go_default_library",
],
)

go_test(
Expand Down
4 changes: 4 additions & 0 deletions shared/params/spectest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import (
"errors"
"fmt"

"github.com/prysmaticlabs/prysm/shared/featureconfig"
"github.com/prysmaticlabs/prysm/shared/params"
)

// SetConfig sets the global params for spec tests depending on the option chosen.
func SetConfig(config string) error {
c := featureconfig.Get()
c.EnableCustomStateSSZ = true
featureconfig.Init(c)
switch config {
case "minimal":
newConfig := params.MinimalSpecConfig()
Expand Down
5 changes: 4 additions & 1 deletion shared/stateutil/state_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ func init() {
// 100,000 roots will take up approximately 3 MB in memory.
BufferItems: 64, // number of keys per Get buffer.
})
globalHasher = &stateRootHasher{rootsCache: rootsCache}
// Temporarily disable roots cache until cache issues can be resolved.
//globalHasher = &stateRootHasher{rootsCache: rootsCache}
_ = rootsCache
globalHasher = &stateRootHasher{}
}

type stateRootHasher struct {
Expand Down

0 comments on commit 784f911

Please sign in to comment.