Geth 1.13 (Deneb/Cancun) update #7

Merged
roysc merged 9 commits from update-geth-1.13 into v5 2024-05-29 10:41:26 +00:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 060e297c14 - Show all commits

View File

@ -108,11 +108,11 @@ func validateTrie() {
WithField("storage root", storageRoot).
Debug("Validating storage trie")
if err = v.ValidateStorageTrie(stateRoot, addr, storageRoot); err != nil {
logWithCommand.Fatalf("Validation failed", err)
logWithCommand.Fatal("Validation failed", err)
}
logWithCommand.Infof("Storage trie for contract %s and root %s is complete", addr, storageRoot)
default:
logWithCommand.Fatalf("Invalid traversal level: '%s'", traversal)
logWithCommand.Fatal("Invalid traversal level:", traversal)
}
stats := v.GetCacheStats()

View File

@ -302,22 +302,22 @@ var _ = Describe("PG-IPFS Validator", func() {
err = ResetTestDB(db)
Expect(err).ToNot(HaveOccurred())
})
It("Returns an error the storage root node is missing", func() {
loadTrie(trieStateNodes, missingRootStorageNodes)
err = v.ValidateStorageTrie(stateRoot, contractAddr, storageRoot)
It("Returns an error if the storage root node is missing", func() {
loadTrie(nil, missingRootStorageNodes)
err = v.ValidateStorageTrie(common.Hash{}, contractAddr, storageRoot)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("missing trie node"))
})
It("Returns an error if the entire storage trie cannot be validated", func() {
loadTrie(trieStateNodes, missingNodeStorageNodes)
err = v.ValidateStorageTrie(stateRoot, contractAddr, storageRoot)
loadTrie(nil, missingNodeStorageNodes)
err = v.ValidateStorageTrie(common.Hash{}, contractAddr, storageRoot)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("missing trie node"))
Expect(err.Error()).To(ContainSubstring("path %x", missingStorageNodePath))
})
It("Returns no error if the entire storage trie can be validated", func() {
loadTrie(trieStateNodes, trieStorageNodes)
err = v.ValidateStorageTrie(stateRoot, contractAddr, storageRoot)
loadTrie(nil, trieStorageNodes)
err = v.ValidateStorageTrie(common.Hash{}, contractAddr, storageRoot)
Expect(err).ToNot(HaveOccurred())
})
})