Skip to content

Commit

Permalink
feat(tests|fw): verkle genesis test-vectors (ethereum#659)
Browse files Browse the repository at this point in the history
* osaka folder

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: init

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: add 6800 transfer test

* whitelist: add verkle related keywords

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka: add verkle helpers

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: fix tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* whitelist: add more keywords

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/vkt: add contract creation test and more vkt_* helpers

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 init

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: eip4762 transfer witness checks

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add simpel contract exec witness test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: fix comments

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: set that conversion ended

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: t8n limitations adjustements

Co-authored-by: spencer <[email protected]>

* osaka/verkle: more adjustements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-6800 storage slot writes

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-6800 code chunking tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 generalize eth transfer test and include tx failing case

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: rely on fork to configure verkle genesis tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add *CALL tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add *CALL insufficient gas for dynamic cost tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add *CALL revert  tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add *CALL warm cost tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add EXTCODESIZE normal test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add EXTCODESIZE warm test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add CODECOPY basic test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add CODECOPY in initcode test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 add CODECOPY with insufficient gas test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support EXTCODECOPY in existing CODECOPY test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support EXTCODECOPY in existing CODECOPY initcode test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 file renamings

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support EXTCODECOPY in existing CODECOPY insufficient gas test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support CODECOPY & EXTCODECOPY WARM test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support EXTCODECOPY precompile test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 fix Initcode missing .bytecode

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support *CREATE witness test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support *CREATE with insufficient dynamig gas cases test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support *CREATE with address collision test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support BALANCE witness test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support BALANCE insufficient dynamig gas test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support BALANCE warm test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support SELFDESTRUCT test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support SELFDESTRUCT insufficient gas test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support EXTCODEHASH test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support SLOAD test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support SLOAD with insufficient gas test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support SSTORE test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support SSTORE with insufficient gas test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support withdrawals test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 support coinbase test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 more code execution tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 more code execution tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 *CALL insufficient gas for 63/64 tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 CREATE* insufficient gas for 63/64 tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 CREATE* calldata bigger than returned code test

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: redesign witness helpers

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 contract execution with new witness helpers

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 BALANCE improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: witness helper support None witness values

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 *CALL improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 coinbase rewards improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 code execution improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 tx creation and *CREATE improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 EXTCODEHASH improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 EXTCODESIZE improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 *CODECOPY improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 SELFDESTRUCT improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 SLOAD improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 SSTORE improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 tx events improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-4762 withdrawals improvements

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-7709 init

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-7709 BLOCKHASH tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: EIP-7709 filling file

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka: fixes

Signed-off-by: Ignacio Hagopian <[email protected]>

* osaka/verkle: fix balance value

Signed-off-by: Ignacio Hagopian <[email protected]>

* rebase

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: comment test with failing compilation

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: fix fork naming

Signed-off-by: Ignacio Hagopian <[email protected]>

* fix(fw): fill verkle genesis with input vkt & env conv ended.

* verkle/6800: fix test

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle/6800: fix test

Signed-off-by: Ignacio Hagopian <[email protected]>

* feat(fw): add verkle state root geth t8n sub-command.

* feat(fw): add verkle state root sub-command.

* feat(fw): fix genesis state root for conversion tests.

* verkle: fix precompile address to avoid requiring valid calldata

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: initcode fixes

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: fix tests naming

Signed-off-by: Ignacio Hagopian <[email protected]>

* feat(fw): add pre alloc to t8n input alongside vkt.

* verkle: fix balance tests

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: fixes

Signed-off-by: Ignacio Hagopian <[email protected]>

* feat(fw): create verkle types.

* chore: typo.

* wip(fw): add the witness to fixture from t8n output result.

* fix(fw): witness in fixtures from t8n output result.

* fix(fw): add basic test for witness model.

* fix(fw): fix tests for witness model.

* adjustement for filling

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: fix sstore test

Signed-off-by: Ignacio Hagopian <[email protected]>

* verkle: fixes

Signed-off-by: Ignacio Hagopian <[email protected]>

* feat: add release configs for genesis & conv tests.

---------

Signed-off-by: Ignacio Hagopian <[email protected]>
Co-authored-by: spencer <[email protected]>
Co-authored-by: Spencer Taylor-Brown <[email protected]>
  • Loading branch information
3 people committed Sep 3, 2024
1 parent a148fec commit 281bb88
Show file tree
Hide file tree
Showing 43 changed files with 3,544 additions and 41 deletions.
8 changes: 7 additions & 1 deletion .github/configs/evm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ eip7692:
eip7692-prague:
impl: besu
repo: hyperledger/besu
ref: main
ref: main
evm-bin: evmone-t8n
verkle:
impl: geth
repo: gballet/go-ethereum
ref: jsign-t8n-verkle-genesis-rebased
evm-bin: evm
10 changes: 9 additions & 1 deletion .github/configs/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ eip7692:
eip7692-prague:
evm-type: eip7692-prague
fill-params: --fork=PragueEIP7692 ./tests/prague -k "not slow"
solc: 0.8.21
solc: 0.8.21
verkle-genesis:
evm-type: verkle
fill-params: --fork=Verkle -m blockchain_test
solc: 0.8.24
verkle-conversion-stride-0:
evm-type: verkle
fill-params: --fork=EIP6800Transition -m blockchain_test
solc: 0.8.24
2 changes: 2 additions & 0 deletions src/ethereum_test_base_types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
HexNumber,
Number,
NumberBoundTypeVar,
PaddedFixedSizeBytes,
ZeroPaddedHexNumber,
)
from .composite_types import Account, Alloc, Storage, StorageRootType
Expand Down Expand Up @@ -53,6 +54,7 @@
"HexNumber",
"Number",
"NumberBoundTypeVar",
"PaddedFixedSizeBytes",
"ReferenceSpec",
"Storage",
"StorageRootType",
Expand Down
15 changes: 15 additions & 0 deletions src/ethereum_test_base_types/base_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,21 @@ def __ne__(self, other: object) -> bool:
return not self.__eq__(other)


class PaddedFixedSizeBytes(FixedSizeBytes):
"""
Class that represents fixed-size bytes with padded hex output.
"""

def hex(self, *args, **kwargs) -> str:
"""
Returns the hexadecimal representation of the bytes with padding.
"""
hex_str = super().hex(*args, **kwargs)[2:]
if len(hex_str) % 2 != 0:
hex_str = "0" + hex_str
return "0x" + hex_str.zfill(self.byte_length * 2)


class Address(FixedSizeBytes[20]): # type: ignore
"""
Class that helps represent Ethereum addresses in tests.
Expand Down
1 change: 1 addition & 0 deletions src/ethereum_test_base_types/pydantic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base pydantic classes used to define the models for Ethereum tests.
"""

from typing import TypeVar

from pydantic import BaseModel, ConfigDict
Expand Down
16 changes: 16 additions & 0 deletions src/ethereum_test_fixtures/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
WithdrawalRequest,
WithdrawalRequestGeneric,
)
from ethereum_test_types.verkle import Witness

from .base import BaseFixture
from .formats import FixtureFormats
Expand Down Expand Up @@ -412,6 +413,19 @@ def from_consolidation_request(
return cls(**d.model_dump())


class FixtureWitness(Witness):
"""
Structure to represent a single verkle block witness.
"""

@classmethod
def from_witness(cls, w: Witness) -> "FixtureWitness":
"""
Returns a FixtureWitness from a Witness.
"""
return cls(**w.model_dump())


class FixtureBlockBase(CamelModel):
"""Representation of an Ethereum block within a test Fixture without RLP bytes."""

Expand All @@ -423,6 +437,8 @@ class FixtureBlockBase(CamelModel):
withdrawal_requests: List[FixtureWithdrawalRequest] | None = None
consolidation_requests: List[FixtureConsolidationRequest] | None = None

witness: FixtureWitness | None = None

@computed_field(alias="blocknumber") # type: ignore[misc]
@cached_property
def block_number(self) -> Number:
Expand Down
3 changes: 2 additions & 1 deletion src/ethereum_test_specs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from ethereum_test_base_types import to_hex
from ethereum_test_fixtures import BaseFixture, FixtureFormats
from ethereum_test_forks import Fork
from ethereum_test_types import Alloc, Environment, Transaction, VerkleTree, Withdrawal
from ethereum_test_types import Alloc, Environment, Transaction, Withdrawal
from ethereum_test_types.verkle import VerkleTree
from evm_transition_tool import Result, TransitionTool


Expand Down
63 changes: 46 additions & 17 deletions src/ethereum_test_specs/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
HeaderNonce,
HexNumber,
Number,
to_json,
)
from ethereum_test_exceptions import BlockException, EngineAPIError, TransactionException
from ethereum_test_fixtures import BaseFixture, FixtureFormats
Expand All @@ -34,6 +33,7 @@
FixtureTransaction,
FixtureWithdrawal,
FixtureWithdrawalRequest,
FixtureWitness,
InvalidFixtureBlock,
)
from ethereum_test_forks import EIP6800Transition, Fork, Verkle
Expand All @@ -45,10 +45,10 @@
Removable,
Requests,
Transaction,
VerkleTree,
Withdrawal,
WithdrawalRequest,
)
from ethereum_test_types.verkle import VerkleTree, Witness
from evm_transition_tool import TransitionTool

from .base import BaseTest, verify_result, verify_transactions
Expand Down Expand Up @@ -328,6 +328,7 @@ class BlockchainTest(BaseTest):
def make_genesis(
self,
fork: Fork,
t8n: TransitionTool,
) -> Tuple[Alloc, FixtureBlock]:
"""
Create a genesis block from the blockchain test definition.
Expand All @@ -346,7 +347,14 @@ def make_genesis(
)
if empty_accounts := pre_alloc.empty_accounts():
raise Exception(f"Empty accounts in pre state: {empty_accounts}")
state_root = pre_alloc.state_root()

state_root: bytes
# TODO: refine, currently uses `evm verkle state-root` to get this.
if fork < Verkle or fork is EIP6800Transition:
state_root = pre_alloc.state_root()
else:
state_root = t8n.get_verkle_state_root(mpt_alloc=pre_alloc)

genesis = FixtureHeader(
parent_hash=0,
ommers_hash=EmptyOmmersRoot,
Expand Down Expand Up @@ -404,6 +412,7 @@ def generate_block_data(
Alloc,
Optional[Requests],
Optional[VerkleTree],
Optional[Witness],
]:
"""
Generate common block data for both make_fixture and make_hive_fixture.
Expand Down Expand Up @@ -436,7 +445,7 @@ def generate_block_data(
txs=txs,
env=env,
fork=fork,
vkt=to_json(previous_vkt) if previous_vkt is not None else None,
vkt=previous_vkt,
chain_id=self.chain_id,
reward=fork.get_reward(env.number, env.timestamp),
eips=eips,
Expand All @@ -446,13 +455,17 @@ def generate_block_data(
try:
rejected_txs = verify_transactions(txs, transition_tool_output.result)
verify_result(transition_tool_output.result, env)
# TODO: add verify witness (against vkt)
# verify_witness(transition_tool_output.witness, transition_tool_output.vkt)
except Exception as e:
print_traces(t8n.get_traces())
pprint(transition_tool_output.result)
pprint(previous_alloc)
pprint(transition_tool_output.alloc)
if transition_tool_output.vkt is not None:
pprint(transition_tool_output.vkt)
if transition_tool_output.witness is not None:
pprint(transition_tool_output.witness)
raise e

if len(rejected_txs) > 0 and block.exception is None:
Expand Down Expand Up @@ -525,6 +538,11 @@ def generate_block_data(
)
)
transition_tool_output.alloc = previous_alloc
# TODO: hack for now
transition_tool_output.witness = Witness(
verkle_proof=transition_tool_output.result.verkle_proof,
state_diff=transition_tool_output.result.state_diff,
)

return (
env,
Expand All @@ -533,6 +551,7 @@ def generate_block_data(
transition_tool_output.alloc,
requests,
transition_tool_output.vkt,
transition_tool_output.witness,
)

def network_info(self, fork: Fork, eips: Optional[List[int]] = None):
Expand All @@ -556,7 +575,7 @@ def verify_post_state(
Verifies the post state after all block/s or payload/s are generated.
"""
try:
if env.verkle_conversion_started:
if env.verkle_conversion_started or env.verkle_conversion_ended:
if vkt is not None:
pass # TODO: skip exact account verify checks
# verify_post_vkt(t8n=t8n, expected_post=self.post, got_vkt=vkt)
Expand All @@ -579,13 +598,19 @@ def make_fixture(
"""
fixture_blocks: List[FixtureBlock | InvalidFixtureBlock] = []

pre, genesis = self.make_genesis(fork)
pre, genesis = self.make_genesis(fork, t8n)

alloc = pre
env = environment_from_parent_header(genesis.header)
head = genesis.header.block_hash
vkt: Optional[VerkleTree] = None

# Filling for verkle genesis tests
if fork is Verkle:
env.verkle_conversion_ended = True
# convert alloc to vkt
vkt = t8n.from_mpt_to_vkt(alloc)

# Hack for filling naive verkle transition tests
if fork is EIP6800Transition:
# Add a dummy block before the fork transition
Expand All @@ -603,14 +628,16 @@ def make_fixture(
# This is the most common case, the RLP needs to be constructed
# based on the transactions to be included in the block.
# Set the environment according to the block to execute.
new_env, header, txs, new_alloc, requests, new_vkt = self.generate_block_data(
t8n=t8n,
fork=fork,
block=block,
previous_env=env,
previous_alloc=alloc,
previous_vkt=vkt,
eips=eips,
new_env, header, txs, new_alloc, requests, new_vkt, witness = (
self.generate_block_data(
t8n=t8n,
fork=fork,
block=block,
previous_env=env,
previous_alloc=alloc,
previous_vkt=vkt,
eips=eips,
)
)
fixture_block = FixtureBlockBase(
header=header,
Expand Down Expand Up @@ -645,6 +672,7 @@ def make_fixture(
if requests is not None
else None
),
witness=FixtureWitness.from_witness(witness) if witness is not None else None,
).with_rlp(txs=txs, requests=requests)
if block.exception is None:
fixture_blocks.append(fixture_block)
Expand Down Expand Up @@ -699,7 +727,7 @@ def make_hive_fixture(
"""
fixture_payloads: List[FixtureEngineNewPayload] = []

pre, genesis = self.make_genesis(fork)
pre, genesis = self.make_genesis(fork, t8n)
alloc = pre
env = environment_from_parent_header(genesis.header)
head_hash = genesis.header.block_hash
Expand All @@ -718,7 +746,8 @@ def make_hive_fixture(
self.blocks.append(Block())

for block in self.blocks:
new_env, header, txs, new_alloc, requests, new_vkt = self.generate_block_data(
# TODO: fix witness for hive fixture? Do we need it?
new_env, header, txs, new_alloc, requests, new_vkt, _ = self.generate_block_data(
t8n=t8n,
fork=fork,
block=block,
Expand Down Expand Up @@ -762,7 +791,7 @@ def make_hive_fixture(
# Most clients require the header to start the sync process, so we create an empty
# block on top of the last block of the test to send it as new payload and trigger the
# sync process.
_, sync_header, _, _, requests, _ = self.generate_block_data(
_, sync_header, _, _, requests, _, _ = self.generate_block_data(
t8n=t8n,
fork=fork,
block=Block(),
Expand Down
2 changes: 0 additions & 2 deletions src/ethereum_test_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
Storage,
TestParameterGroup,
Transaction,
VerkleTree,
Withdrawal,
WithdrawalRequest,
add_kzg_version,
Expand Down Expand Up @@ -139,7 +138,6 @@
"TransactionException",
"Withdrawal",
"WithdrawalRequest",
"VerkleTree",
"Yul",
"YulCompiler",
"add_kzg_version",
Expand Down
2 changes: 0 additions & 2 deletions src/ethereum_test_types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
Requests,
Storage,
Transaction,
VerkleTree,
Withdrawal,
WithdrawalRequest,
)
Expand All @@ -54,7 +53,6 @@
"TestPrivateKey",
"TestPrivateKey2",
"Transaction",
"VerkleTree",
"Withdrawal",
"WithdrawalRequest",
"ZeroPaddedHexNumber",
Expand Down
9 changes: 0 additions & 9 deletions src/ethereum_test_types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,12 +1259,3 @@ def consolidation_requests(self) -> List[ConsolidationRequest]:
Returns the list of consolidation requests.
"""
return [c for c in self.root if isinstance(c, ConsolidationRequest)]


# TODO: use a type like HashInt but that doesn't pad zero. DO NOT PAD THE ZEROS. KEEP ALL ZEROS.
class VerkleTree(RootModel[Dict[str, str]]):
"""
Definition of a verkle tree return from the geth t8n.
"""

root: Dict[str, str] = Field(default_factory=dict)
14 changes: 14 additions & 0 deletions src/ethereum_test_types/verkle/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Ethereum Verkle Test Types.
"""

from .types import IpaProof, StateDiff, SuffixStateDiff, VerkleProof, VerkleTree, Witness

__all__ = (
"IpaProof",
"StateDiff",
"SuffixStateDiff",
"VerkleProof",
"VerkleTree",
"Witness",
)
Loading

0 comments on commit 281bb88

Please sign in to comment.