Skip to content

Commit 38621dc

Browse files
authored
feat(specs): support transaction types in fill unit tests (#1215)
1 parent 52eb1bb commit 38621dc

11 files changed

+176
-38
lines changed

src/ethereum_test_specs/tests/fixtures/chainid_cancun_blockchain_test_engine.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_cancun_blockchain_test_engine_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Cancun": {
2+
"000/my_chain_id_test/Cancun/tx_type_0": {
33
"_info": {
44
"hash": "0x82d853aef147345cedd8eb383c3ea00c1d1c4b64222911fd2580806de1f51c15",
55
"fixture_format": "blockchain_test_engine"
@@ -122,4 +122,4 @@
122122
}
123123
}
124124
}
125-
}
125+
}

src/ethereum_test_specs/tests/fixtures/chainid_cancun_blockchain_test.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_cancun_blockchain_test_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Cancun": {
2+
"000/my_chain_id_test/Cancun/tx_type_0": {
33
"_info": {
44
"hash": "0x6e77c3ba39a0874917e9dcd7f911de1e950e82e028603a0fc39630f973579fd9",
55
"fixture_format": "blockchain_test"
@@ -140,4 +140,4 @@
140140
}
141141
}
142142
}
143-
}
143+
}

src/ethereum_test_specs/tests/fixtures/chainid_cancun_state_test.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_cancun_state_test_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Cancun": {
2+
"000/my_chain_id_test/Cancun/tx_type_0": {
33
"_info": {
44
"hash": "0x9e980ae5cce8c6222831e99c0a33facfd7b8e50be053b84e3ed357c2c1818491",
55
"fixture_format": "state_test"
@@ -91,4 +91,4 @@
9191
]
9292
}
9393
}
94-
}
94+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"000/my_chain_id_test/Cancun/tx_type_1": {
3+
"_info": {
4+
"hash": "0x5ca0b01465e00811b102c33dadc2366055d6c73684bfb67b8414fa6146b38bca",
5+
"fixture_format": "state_test"
6+
},
7+
"env": {
8+
"currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
9+
"currentGasLimit": "0x02540be400",
10+
"currentNumber": "0x01",
11+
"currentTimestamp": "0x03e8",
12+
"currentRandom": "0x0000000000000000000000000000000000000000000000000000000000000000",
13+
"currentDifficulty": "0x00",
14+
"currentBaseFee": "0x07",
15+
"currentExcessBlobGas": "0x00"
16+
},
17+
"config": {
18+
"chainid": "0x01",
19+
"blobSchedule": {
20+
"Cancun": {
21+
"max": "0x06",
22+
"target": "0x03",
23+
"baseFeeUpdateFraction": "0x32f0ed"
24+
}
25+
}
26+
},
27+
"pre": {
28+
"0x1000000000000000000000000000000000000000": {
29+
"nonce": "0x00",
30+
"balance": "0x00",
31+
"code": "0x4660015500",
32+
"storage": {}
33+
},
34+
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
35+
"nonce": "0x00",
36+
"balance": "0x3635c9adc5dea00000",
37+
"code": "0x",
38+
"storage": {}
39+
}
40+
},
41+
"transaction": {
42+
"accessLists" : [
43+
[
44+
{
45+
"address" : "0x0000000000000000000000000000000000001234",
46+
"storageKeys" : [
47+
"0x0000000000000000000000000000000000000000000000000000000000000000",
48+
"0x0000000000000000000000000000000000000000000000000000000000000001"
49+
]
50+
}
51+
]
52+
],
53+
"nonce": "0x00",
54+
"gasPrice": "0x0a",
55+
"gasLimit": [
56+
"0x05f5e100"
57+
],
58+
"to": "0x1000000000000000000000000000000000000000",
59+
"value": [
60+
"0x00"
61+
],
62+
"data": [
63+
"0x"
64+
],
65+
"sender": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
66+
"secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
67+
},
68+
"post": {
69+
"Cancun": [
70+
{
71+
"hash": "0xac58d5721514e1a25b3d952de498e835c25ad680fc6883c7cccfdb89582734dd",
72+
"logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
73+
"txbytes": "0x01f8bf01800a8405f5e1009410000000000000000000000000000000000000008080f85bf859940000000000000000000000000000000000001234f842a00000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000180a07d812c52979e6d8616538f2146e9499ca59f01b8c540d7a950ec7e695020a123a02cec47a8982651456ad416578b8792e197e4f1861bcbcfb33e3f2ef75109c322",
74+
"indexes": {
75+
"data": 0,
76+
"gas": 0,
77+
"value": 0
78+
},
79+
"state": {
80+
"0x1000000000000000000000000000000000000000": {
81+
"nonce": "0x00",
82+
"balance": "0x00",
83+
"code": "0x4660015500",
84+
"storage": {
85+
"0x01": "0x01"
86+
}
87+
},
88+
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
89+
"balance": "0x0241cb",
90+
"nonce": "0x00",
91+
"code": "0x",
92+
"storage": {}
93+
},
94+
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
95+
"nonce": "0x01",
96+
"balance": "0x3635c9adc5de987a06",
97+
"code": "0x",
98+
"storage": {}
99+
}
100+
}
101+
}
102+
]
103+
}
104+
}
105+
}

src/ethereum_test_specs/tests/fixtures/chainid_istanbul_blockchain_test.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_istanbul_blockchain_test_tx_type_0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Istanbul": {
2+
"000/my_chain_id_test/Istanbul/tx_type_0": {
33
"_info": {
44
"hash": "0x8b79023dc05fa9a4e374938ea0c6e04248cc6f30a3e2754737885901693e0c6e",
55
"fixture_format": "blockchain_test"

src/ethereum_test_specs/tests/fixtures/chainid_london_blockchain_test.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_london_blockchain_test_tx_type_0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/London": {
2+
"000/my_chain_id_test/London/tx_type_0": {
33
"_info": {
44
"hash": "0x8f3a32616f93086c33339f1d020a97103df4963edcef3a108babcc95d4cd3951",
55
"fixture_format": "blockchain_test"

src/ethereum_test_specs/tests/fixtures/chainid_paris_blockchain_test_engine.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_paris_blockchain_test_engine_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Paris": {
2+
"000/my_chain_id_test/Paris/tx_type_0": {
33
"_info": {
44
"hash": "0xf07acbb0efdbea6064fa443f0c8a74de6bb3e9895a7717759deedb99310eec4e",
55
"fixture_format": "blockchain_test_engine"
@@ -92,4 +92,4 @@
9292
"chainid": "0x01"
9393
}
9494
}
95-
}
95+
}

src/ethereum_test_specs/tests/fixtures/chainid_paris_state_test.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_paris_state_test_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Paris": {
2+
"000/my_chain_id_test/Paris/tx_type_0": {
33
"_info": {
44
"hash": "0x9de75fac42e382815fa12e0252e64b901ed1b0225446209223c8a3569e1c2857",
55
"fixture_format": "state_test"
@@ -83,4 +83,4 @@
8383
"chainid": "0x01"
8484
}
8585
}
86-
}
86+
}

src/ethereum_test_specs/tests/fixtures/chainid_shanghai_blockchain_test_engine.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_shanghai_blockchain_test_engine_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Shanghai": {
2+
"000/my_chain_id_test/Shanghai/tx_type_0": {
33
"_info": {
44
"hash": "0x361818ee5736a45c10c34ec445bf872d280b2f2ad61c297cceb14772b1393006",
55
"fixture_format": "blockchain_test_engine"
@@ -94,4 +94,4 @@
9494
"chainid": "0x01"
9595
}
9696
}
97-
}
97+
}

src/ethereum_test_specs/tests/fixtures/chainid_shanghai_state_test.json renamed to src/ethereum_test_specs/tests/fixtures/chainid_shanghai_state_test_tx_type_0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"000/my_chain_id_test/Shanghai": {
2+
"000/my_chain_id_test/Shanghai/tx_type_0": {
33
"_info": {
44
"hash": "0xdd6900920530f2ba834d659b952c023a5962c352512529da8ed9614d99a0c1b8",
55
"fixture_format": "state_test"
@@ -83,4 +83,4 @@
8383
"chainid": "0x01"
8484
}
8585
}
86-
}
86+
}

0 commit comments

Comments
 (0)