go-ethereum/tests
rjl493456442 a7f9523ae1
all: implement state history v2 (#30107)
This pull request delivers the new version of the state history, where
the raw storage key is used instead of the hash.

Before the cancun fork, it's supported by protocol to destruct a
specific account and therefore, all the storage slot owned by it should
be wiped in the same transition.

Technically, storage wiping should be performed through storage
iteration, and only the storage key hash will be available for traversal
if the state snapshot is not available. Therefore, the storage key hash
is chosen as the identifier in the old version state history.

Fortunately, account self-destruction has been deprecated by the
protocol since the Cancun fork, and there are no empty accounts eligible
for deletion under EIP-158. Therefore, we can conclude that no storage
wiping should occur after the Cancun fork. In this case, it makes no
sense to keep using hash.

Besides, another big reason for making this change is the current format
state history is unusable if verkle is activated. Verkle tree has a
different key derivation scheme (merkle uses keccak256), the preimage of
key hash must be provided in order to make verkle rollback functional.
This pull request is a prerequisite for landing verkle.

Additionally, the raw storage key is more human-friendly for those who
want to manually check the history, even though Solidity already
performs some hashing to derive the storage location.

---

This pull request doesn't bump the database version, as I believe the
database should still be compatible if users degrade from the new geth
version to old one, the only side effect is the persistent new version
state history will be unusable.

---------

Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
2025-01-17 02:59:02 +01:00
..
evm-benchmarks@d8b88f4046 tests: update evm-benchmarks (#26255) 2022-11-28 11:13:41 +01:00
fuzzers all: remove kilic dependency from bls12381 fuzzers (#30296) 2024-11-19 13:29:23 +01:00
solidity all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
testdata@faf33b4714 tests: update tests (#29730) 2024-05-13 21:34:29 +08:00
block_test.go all: remove forkchoicer and reorgNeeded (#29179) 2024-09-04 15:03:06 +02:00
block_test_util.go all: remove TerminalTotalDifficultyPassed (#30609) 2024-10-23 08:26:18 +02:00
difficulty_test.go all: remove TerminalTotalDifficultyPassed (#30609) 2024-10-23 08:26:18 +02:00
difficulty_test_util.go all: add whitespace linter (#25312) 2022-07-25 13:14:03 +03:00
gen_btheader.go build, tests: add execution-spec-tests (#26985) 2023-08-26 15:42:27 +02:00
gen_difficultytest.go all: simplify timestamps to uint64 (#19372) 2019-04-02 23:28:48 +03:00
gen_stauthorization.go core/types: change SetCodeTx.ChainID to uint256 (#30982) 2025-01-14 06:42:18 -07:00
gen_stenv.go tests: add currentExcessBlobGas to state tests (#28735) 2023-12-28 11:39:28 +01:00
gen_sttransaction.go all: implement eip-7702 set code tx (#30078) 2024-12-16 11:29:37 +01:00
init.go all: implement EIP-6110, execution layer triggered deposits (#29431) 2024-09-04 14:33:51 +02:00
init_test.go all: fix mismatched names in comments (#29348) 2024-03-26 21:01:28 +01:00
rlp_test.go tests: get test name from testing.T (#22941) 2021-05-25 22:47:14 +02:00
rlp_test_util.go internal,tests: replace noarg fmt.Errorf with errors.New (#27335) 2023-05-25 02:54:28 -04:00
state_test.go core, eth, internal, cmd: rework EVM constructor (#30745) 2024-11-20 12:35:52 +01:00
state_test_util.go all: implement state history v2 (#30107) 2025-01-17 02:59:02 +01:00
transaction_test.go tests: fix TransactionTest to actually run (#30272) 2024-08-08 13:50:00 +02:00
transaction_test_util.go core, core/types: rename AuthList to SetCodeAuthorizations (#30935) 2024-12-19 10:06:33 +01:00