# Verkle Testing Ideas A quick braindump of ideas gathered during Devconnect. There are two EL reference implementations: 1. geth. 2. nethermind. 3. ethereumjs. ### Quick, high-level test solution - Generate test fixtures for **existing EVM test cases** in blockchain test format: Not Verkle specific! - But these could be used by geth/nethermind/... to cross-check implementations via an EVM module test. It would test the correct Verkle Trie state via the block's `stateRoot`. - High-level tests: Good for verification, but not so useful for debugging. - Geth can use its `evm blocktest` sub-command to consume these fixtures. #### TODO Prio 1: - [ ] *Geth*: Enable Shanghai+6800/Cancun+6800 in geth's `evm t8n` tool in order to generate test vectors from the geth reference implementation. - [ ] *Testing*: Ensure that the Verkle Trie `stateRoot` is written to the fixtures (and not MPT). - [ ] *Testing*: Generate the fixtures (easy!). - [x] *Nethermind*: Ensure that Nethermind can consume these fixtures: https://github.com/NethermindEth/nethermind/issues/6236 #### TODO Prio 2: - [ ] *Nethermind*: Enable test vector generation from the Nethermind reference implementation (i.e., implement a `t8n` interface): https://github.com/NethermindEth/nethermind/issues/5044 ### Split Implementations (and test efforts) into two Steps: 1. Verkle, 2. Gas Amendment During the Devconnnect Verkle Workshop, Peter Davies (EELS), suggested splitting the Verkle implementation into two steps: 1. Verkle Trie Migration only (no gas changes). 2. (Verkle Trie +?) Gas Amendment. This would allow implementers to verify these steps individually/incrementally. ## Test the Witness (for all existing blockchain test fixtures) Aim: Test the witness generated by clients for all existing test fixtures in the blockchain test format. Idea for Verkle specific tests: Extend pre-state with other accounts that aren't strictly required by the test's transactions and ensure that the correct pre-state is returned by the witness. - Add a way for the test framework to retrieve the witness from an EVM implementation. - Perhaps this needs something similar to geth's `evm t8n` or `evm b11r` commands: `evm getWitness`. ## Develop Verkle Trie Specific Vectors Help drive Ignacio's effort to define test vectors for Verkle Trie operations: https://github.com/jsign/verkle-test-vectors #### TODO - [ ] Define test vector file format. Json? - [ ] Decide how clients use this file format: Parse json as for StateTest and BlockchainTests? ## Take blocks from Testnet and Replay on Clients An idea from Ignacio.