Skip to content
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

verkle: verkle genesis test-vectors #659

Merged
merged 102 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
962cefe
osaka folder
jsign Jul 31, 2024
cae733f
osaka/verkle: init
jsign May 9, 2024
b35b08f
osaka/verkle: add 6800 transfer test
jsign May 9, 2024
a09b579
whitelist: add verkle related keywords
jsign May 9, 2024
2fc7397
osaka: add verkle helpers
jsign May 9, 2024
e7da063
osaka/verkle: fix tests
jsign May 9, 2024
89aae0d
whitelist: add more keywords
jsign May 9, 2024
d65a6ba
osaka/vkt: add contract creation test and more vkt_* helpers
jsign May 9, 2024
0851e2f
osaka/verkle: EIP-4762 init
jsign May 9, 2024
35b8220
osaka/verkle: eip4762 transfer witness checks
jsign May 9, 2024
12c8561
osaka/verkle: EIP-4762 add simpel contract exec witness test
jsign May 9, 2024
b9fd4f6
osaka/verkle: fix comments
jsign May 9, 2024
63be88e
osaka/verkle: set that conversion ended
jsign May 13, 2024
9f6679f
osaka/verkle: t8n limitations adjustements
jsign May 21, 2024
2c90a9f
osaka/verkle: more adjustements
jsign May 21, 2024
1c88d72
osaka/verkle: EIP-6800 storage slot writes
jsign May 21, 2024
a18f7c2
osaka/verkle: EIP-6800 code chunking tests
jsign May 22, 2024
905f08f
osaka/verkle: EIP-4762 generalize eth transfer test and include tx fa…
jsign May 22, 2024
9e64ca7
osaka/verkle: rely on fork to configure verkle genesis tests
jsign May 22, 2024
fba4478
osaka/verkle: EIP-4762 add *CALL tests
jsign May 24, 2024
5770f20
osaka/verkle: EIP-4762 add *CALL insufficient gas for dynamic cost tests
jsign May 24, 2024
685fa4a
osaka/verkle: EIP-4762 add *CALL revert tests
jsign May 24, 2024
77d42c0
osaka/verkle: EIP-4762 add *CALL warm cost tests
jsign May 24, 2024
0dbdbd1
osaka/verkle: EIP-4762 add EXTCODESIZE normal test
jsign May 24, 2024
e8e62bf
osaka/verkle: EIP-4762 add EXTCODESIZE warm test
jsign May 24, 2024
992ecdd
osaka/verkle: EIP-4762 add CODECOPY basic test
jsign May 27, 2024
8563119
osaka/verkle: EIP-4762 add CODECOPY in initcode test
jsign May 27, 2024
335c969
osaka/verkle: EIP-4762 add CODECOPY with insufficient gas test
jsign May 27, 2024
129160f
osaka/verkle: EIP-4762 support EXTCODECOPY in existing CODECOPY test
jsign May 27, 2024
28b74da
osaka/verkle: EIP-4762 support EXTCODECOPY in existing CODECOPY initc…
jsign May 27, 2024
a24417f
osaka/verkle: EIP-4762 file renamings
jsign May 27, 2024
84f5da5
osaka/verkle: EIP-4762 support EXTCODECOPY in existing CODECOPY insuf…
jsign May 27, 2024
6704362
osaka/verkle: EIP-4762 support CODECOPY & EXTCODECOPY WARM test
jsign May 27, 2024
c45682b
osaka/verkle: EIP-4762 support EXTCODECOPY precompile test
jsign May 27, 2024
aef9585
osaka/verkle: EIP-4762 fix Initcode missing .bytecode
jsign May 27, 2024
3bb6a38
osaka/verkle: EIP-4762 support *CREATE witness test
jsign May 27, 2024
babc7bb
osaka/verkle: EIP-4762 support *CREATE with insufficient dynamig gas …
jsign May 28, 2024
03e507f
osaka/verkle: EIP-4762 support *CREATE with address collision test
jsign May 28, 2024
0f63316
osaka/verkle: EIP-4762 support BALANCE witness test
jsign May 28, 2024
0345c90
osaka/verkle: EIP-4762 support BALANCE insufficient dynamig gas test
jsign May 28, 2024
9cb260c
osaka/verkle: EIP-4762 support BALANCE warm test
jsign May 28, 2024
597a1f7
osaka/verkle: EIP-4762 support SELFDESTRUCT test
jsign May 28, 2024
7f7e1e9
osaka/verkle: EIP-4762 support SELFDESTRUCT insufficient gas test
jsign May 28, 2024
6b07973
osaka/verkle: EIP-4762 support EXTCODEHASH test
jsign May 29, 2024
05f58ea
osaka/verkle: EIP-4762 support SLOAD test
jsign May 29, 2024
1ef2d15
osaka/verkle: EIP-4762 support SLOAD with insufficient gas test
jsign May 29, 2024
18f029e
osaka/verkle: EIP-4762 support SSTORE test
jsign May 29, 2024
5365511
osaka/verkle: EIP-4762 support SSTORE with insufficient gas test
jsign May 29, 2024
3b5c943
osaka/verkle: EIP-4762 support withdrawals test
jsign May 29, 2024
23d9220
osaka/verkle: EIP-4762 support coinbase test
jsign May 29, 2024
565de80
osaka/verkle: EIP-4762 more code execution tests
jsign May 29, 2024
6f8c541
osaka/verkle: EIP-4762 more code execution tests
jsign May 30, 2024
3045113
osaka/verkle: EIP-4762 *CALL insufficient gas for 63/64 tests
jsign May 30, 2024
099ebfc
osaka/verkle: EIP-4762 CREATE* insufficient gas for 63/64 tests
jsign May 30, 2024
8dbf5a2
osaka/verkle: EIP-4762 CREATE* calldata bigger than returned code test
jsign Jun 3, 2024
6f82be4
osaka/verkle: redesign witness helpers
jsign Jun 4, 2024
7324baa
osaka/verkle: EIP-4762 contract execution with new witness helpers
jsign Jun 4, 2024
b176139
osaka/verkle: EIP-4762 BALANCE improvements
jsign Jun 4, 2024
d46251f
osaka/verkle: witness helper support None witness values
jsign Jun 4, 2024
b599169
osaka/verkle: EIP-4762 *CALL improvements
jsign Jun 4, 2024
ffe5003
osaka/verkle: EIP-4762 coinbase rewards improvements
jsign Jun 5, 2024
488420b
osaka/verkle: EIP-4762 code execution improvements
jsign Jun 5, 2024
4475ee6
osaka/verkle: EIP-4762 tx creation and *CREATE improvements
jsign Jun 5, 2024
142da63
osaka/verkle: EIP-4762 EXTCODEHASH improvements
jsign Jun 6, 2024
189353d
osaka/verkle: EIP-4762 EXTCODESIZE improvements
jsign Jun 6, 2024
2552eaa
osaka/verkle: EIP-4762 *CODECOPY improvements
jsign Jun 6, 2024
6458a9c
osaka/verkle: EIP-4762 SELFDESTRUCT improvements
jsign Jun 6, 2024
0d31c68
osaka/verkle: EIP-4762 SLOAD improvements
jsign Jun 7, 2024
7e6b2a6
osaka/verkle: EIP-4762 SSTORE improvements
jsign Jun 7, 2024
014e491
osaka/verkle: EIP-4762 tx events improvements
jsign Jun 7, 2024
705e55c
osaka/verkle: EIP-4762 withdrawals improvements
jsign Jun 10, 2024
8b57d52
osaka/verkle: EIP-7709 init
jsign Jun 10, 2024
b006f2b
osaka/verkle: EIP-7709 BLOCKHASH tests
jsign Jun 10, 2024
e74f13b
osaka/verkle: EIP-7709 filling file
jsign Jun 10, 2024
fac8413
osaka: fixes
jsign Jul 1, 2024
a4ed401
osaka/verkle: fix balance value
jsign Jul 30, 2024
56f1633
rebase
jsign Jul 31, 2024
e2db680
verkle: comment test with failing compilation
jsign Jul 31, 2024
adc9c20
verkle: fix fork naming
jsign Jul 31, 2024
9fddb92
fix(fw): fill verkle genesis with input vkt & env conv ended.
spencer-tb Aug 1, 2024
95915c8
verkle/6800: fix test
jsign Aug 1, 2024
2f00c44
verkle/6800: fix test
jsign Aug 1, 2024
0775828
feat(fw): add verkle state root geth t8n sub-command.
spencer-tb Aug 2, 2024
34ace2c
feat(fw): add verkle state root sub-command.
spencer-tb Aug 2, 2024
dda885c
feat(fw): fix genesis state root for conversion tests.
spencer-tb Aug 2, 2024
970caa6
verkle: fix precompile address to avoid requiring valid calldata
jsign Aug 5, 2024
de813b1
verkle: initcode fixes
jsign Aug 5, 2024
237b9a7
verkle: fix tests naming
jsign Aug 5, 2024
1d6c3fb
feat(fw): add pre alloc to t8n input alongside vkt.
spencer-tb Aug 6, 2024
a4f6dc9
verkle: fix balance tests
jsign Aug 6, 2024
2e0b3b0
verkle: fixes
jsign Aug 6, 2024
1ea0372
feat(fw): create verkle types.
spencer-tb Aug 1, 2024
ea76635
chore: typo.
spencer-tb Aug 1, 2024
af96fb7
wip(fw): add the witness to fixture from t8n output result.
spencer-tb Aug 6, 2024
a94000f
fix(fw): witness in fixtures from t8n output result.
spencer-tb Aug 6, 2024
ed32c9e
fix(fw): add basic test for witness model.
spencer-tb Aug 6, 2024
4645bd7
fix(fw): fix tests for witness model.
spencer-tb Aug 6, 2024
be06ec7
adjustement for filling
jsign Aug 6, 2024
53fa104
verkle: fix sstore test
jsign Aug 7, 2024
81fa30f
verkle: fixes
jsign Aug 7, 2024
95c1aa0
feat: add release configs for genesis & conv tests.
spencer-tb Aug 8, 2024
fba0400
Merge pull request #6 from spencer-tb/verkle-release-conf
jsign Aug 8, 2024
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
Prev Previous commit
Next Next commit
osaka/verkle: EIP-4762 support SSTORE test
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
  • Loading branch information
jsign committed Aug 8, 2024
commit 18f029ea7252b8daed5efd0f55fab414cfa15176
98 changes: 98 additions & 0 deletions tests/osaka/eip4762_verkle_gas_witness/test_sstore.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
"""
abstract: Tests [EIP-4762: Statelessness gas cost changes]
(https://eips.ethereum.org/EIPS/eip-4762)
Tests for [EIP-4762: Statelessness gas cost changes]
(https://eips.ethereum.org/EIPS/eip-4762).
"""

import pytest

from ethereum_test_tools import (
Account,
Block,
BlockchainTestFiller,
Environment,
TestAddress,
TestAddress2,
Transaction,
)
from ethereum_test_tools.vm.opcode import Opcodes as Op

# TODO(verkle): Update reference spec version
REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4762.md"
REFERENCE_SPEC_VERSION = "2f8299df31bb8173618901a03a8366a3183479b0"


# TODO(verkle): update to Osaka when t8n supports the fork.
@pytest.mark.valid_from("Prague")
@pytest.mark.parametrize(
"storage_slot_accesses",
[
[0],
[1000],
[0, 1],
[0, 1000],
[1000, 1000],
],
ids=[
"in_account_header",
"outside_account_header",
"two_in_same_branch",
"two_in_different_branch",
"cold_plus_warm_cost",
],
)
def test_sload(blockchain_test: BlockchainTestFiller, fork: str, storage_slot_accesses):
"""
Test SLOAD witness.
"""
exp_witness = None # TODO(verkle)
_sload(blockchain_test, fork, storage_slot_accesses, exp_witness)


def _sload(
blockchain_test: BlockchainTestFiller,
fork: str,
storage_slot_accesses,
exp_witness,
gas_limit=1_000_000,
):
env = Environment(
fee_recipient="0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
difficulty=0x20000,
gas_limit=10000000000,
number=1,
timestamp=1000,
)
code = bytes()
for slot in storage_slot_accesses:
code += Op.SLOAD(slot)

pre = {
TestAddress: Account(balance=1000000000000000000000),
TestAddress2: Account(
storage={0: 0xAA, 1000: 0xBB},
code=code,
),
}

tx = Transaction(
ty=0x0,
chain_id=0x01,
nonce=0,
to=TestAddress2,
gas_limit=gas_limit,
gas_price=10,
)
blocks = [Block(txs=[tx])]

# TODO(verkle): define witness assertion
witness_keys = ""

blockchain_test(
genesis_environment=env,
pre=pre,
post={},
blocks=blocks,
witness_keys=witness_keys,
)