Skip to content

fix: ignore key-not-found errors in testWitness #1164

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

Merged
merged 2 commits into from
Apr 2, 2025
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
5 changes: 3 additions & 2 deletions eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/scroll-tech/go-ethereum/rollup/rcfg"
"github.com/scroll-tech/go-ethereum/rpc"
"github.com/scroll-tech/go-ethereum/trie"
"github.com/syndtr/goleveldb/leveldb"
)

// PublicEthereumAPI provides an API to access Ethereum full node-related
Expand Down Expand Up @@ -384,7 +385,7 @@ func generateWitness(blockchain *core.BlockChain, block *types.Block) (*stateles
func testWitness(blockchain *core.BlockChain, block *types.Block, witness *stateless.Witness) error {
stateRoot := witness.Root()
diskRoot, err := rawdb.ReadDiskStateRoot(blockchain.Database(), stateRoot)
if err != nil {
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
return fmt.Errorf("failed to read disk state root for stateRoot %s: %w", stateRoot.Hex(), err)
}
if diskRoot != (common.Hash{}) {
Expand All @@ -409,7 +410,7 @@ func testWitness(blockchain *core.BlockChain, block *types.Block, witness *state

postStateRoot := block.Root()
diskRoot, err = rawdb.ReadDiskStateRoot(blockchain.Database(), postStateRoot)
if err != nil {
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
return fmt.Errorf("failed to read disk state root for postStateRoot %s: %w", postStateRoot.Hex(), err)
}
if diskRoot != (common.Hash{}) {
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 8 // Minor version component of the current release
VersionPatch = 34 // Patch version component of the current release
VersionPatch = 35 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down
Loading