Skip to content

Commit 8adfff6

Browse files
authored
feat: Prepare Additional Conformity Test Scenarios (#3886) (#3887)
Signed-off-by: Michał Walczak <[email protected]>
1 parent 5312b2a commit 8adfff6

File tree

59 files changed

+1595
-392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1595
-392
lines changed

packages/server/tests/acceptance/conformityTests.spec.ts

Lines changed: 130 additions & 381 deletions
Large diffs are not rendered by default.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[
2-
{"account":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","balance":10000000000},
32
{"account":null,"balance":0,"bytecode":"0x608060405234801561001057600080fd5b50610384806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632a4c08961461005c57806378b9a1f314610078578063c670f86414610094578063c683d6a3146100b0578063d05285d4146100cc575b600080fd5b61007660048036038101906100719190610251565b6100e8565b005b610092600480360381019061008d9190610215565b61011c565b005b6100ae60048036038101906100a991906101ec565b61014e565b005b6100ca60048036038101906100c591906102a0565b61017e565b005b6100e660048036038101906100e191906101ec565b6101be565b005b8082847fa8fb2f9a49afc2ea148319326c7208965555151db2ce137c05174098730aedc360405160405180910390a4505050565b80827f513dad7582fd8b11c8f4d05e6e7ac8caaa5eb690e9173dd2bed96b5ae0e0d02460405160405180910390a35050565b807f46692c0e59ca9cd1ad8f984a9d11715ec83424398b7eed4e05c8ce84662415a860405160405180910390a250565b8183857f75e7d95cd72588af49ce2e4b7f004bce916d422999adf262a640e4239aab00c7846040516101b09190610312565b60405180910390a450505050565b806040516101cc9190610312565b60405180910390a050565b6000813590506101e681610337565b92915050565b6000602082840312156101fe57600080fd5b600061020c848285016101d7565b91505092915050565b6000806040838503121561022857600080fd5b6000610236858286016101d7565b9250506020610247858286016101d7565b9150509250929050565b60008060006060848603121561026657600080fd5b6000610274868287016101d7565b9350506020610285868287016101d7565b9250506040610296868287016101d7565b9150509250925092565b600080600080608085870312156102b657600080fd5b60006102c4878288016101d7565b94505060206102d5878288016101d7565b93505060406102e6878288016101d7565b92505060606102f7878288016101d7565b91505092959194509250565b61030c8161032d565b82525050565b60006020820190506103276000830184610303565b92915050565b6000819050919050565b6103408161032d565b811461034b57600080fd5b5056fea2646970667358221220a395344b5de9693999e0f06fc92d3f51a0cd6f30e383c9eccda35f50c04bac6364736f6c63430008040033"},
43
{"account":null,"balance":0,"bytecode":"0x6080604052348015600f57600080fd5b50607680601d6000396000f3fe608060405261ff0160003560f01c1415601e5761ffee60005260206000f35b43600052466020524160405248606052446080523260a0523460c05260e06000f3fea2646970667358221220df54ebe42ca12e658508ac87a25033e061bc8839fb14f209f8a89f2f0095e91f64736f6c63430008090033"}
54
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// retrieves the client's current block number
2+
3+
// Reason for override:
4+
// Every time the Hedera local node starts,
5+
// the mirror-node-monitor service also starts along with it.
6+
//
7+
// This service pings the node every 2ms,
8+
// consuming 0.00000001 HBAR each time,
9+
// which causes the block number to continuously increase.
10+
//
11+
// As a result, we can't be certain what the latest block number is,
12+
// making it difficult to predict the outcome in this test.
13+
14+
## wildcard: result
15+
16+
>> {"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}
17+
<< {"jsonrpc":"2.0","id":1,"result":"0x74"}

packages/server/tests/acceptance/data/conformity/overwrites/eth_call/call-callenv-options-eip1559.io

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@
2727
// 6. tx.origin — 0x14e4...58cb2 expected and returned; caller’s address passed in transaction 'from' field.
2828
// 7. msg.value — 0x17 (23 in decimal) expected and returned; actual value sent in the eth_call or transaction.
2929
//
30+
31+
## wildcard: result
32+
3033
>> {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0x14e46043e63d0e3cdcf2530519f4cfaf35058cb2","gas":"0xea60","input":"0x333435","maxFeePerGas":"0x44103f3","maxPriorityFeePerGas":"0xb","to":"0x2f2a392b4d7d2c2d3134e199295818a02535ef0a","value":"0x17"},"latest"]}
3134
<< {"jsonrpc":"2.0","id":1,"result":"0x00000000000000000000000000000000000000000000000000000000000000ac000000000000000000000000000000000000000000000000000000000000012a0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000075def97dfe5beb77b5d1de1b71cd5bddfdf47dd77af36d5fd9e6db7f5f36e1b7000000000000000000000000435d7d41d4f69f958bda7a8d9f549a0dd9b64c860000000000000000000000000000000000000000000000000000000000000001"}

packages/server/tests/acceptance/data/conformity/overwrites/eth_call/call-callenv.io

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@
2323
// 6. tx.origin — 0x00 expected and returned; tx sent from 0x0, so origin is also zero.
2424
// 7. msg.value — 0x00 expected and returned; no value was sent with the call, as expected.
2525
//
26+
27+
## wildcard: result
28+
2629
>> {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0x0000000000000000000000000000000000000000","to":"0x2f2a392b4d7d2c2d3134e199295818a02535ef0a"},"latest"]}
2730
<< {"jsonrpc":"2.0","id":1,"result":"0x00000000000000000000000000000000000000000000000000000000000008c1000000000000000000000000000000000000000000000000000000000000012a00000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000000ddef36f5bedc6b4f1ef766fd735d7cd1c7da7f675ddb5d5f7ddd3479cdb4f76d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}

packages/server/tests/acceptance/data/conformity/overwrites/eth_call/call-contract.io

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@
66
// Since we do not replay those transactions before starting the tests, we need a separate test that simulates
77
// the same scenario. This is done by pointing the `to` address to the contract already deployed on our test node.
88
//
9-
// Note: This is the original test file, modified for our test purposes: https://github.com/ethereum/execution-apis/blob/main/tests/eth_call/call-contract.io
10-
// Only the `params[0].to` field value has been changed to point to the correct deployed contract address.
9+
// Note: This is the original test file, modified for our test purposes:
10+
// https://github.com/ethereum/execution-apis/blob/main/tests/eth_call/call-contract.io
11+
//
12+
// The `params[0].to` field value has been changed to point to the correct deployed contract address.
13+
// Additionally, the expected `result` field has been modified:
14+
// Original result:
15+
// << {"jsonrpc":"2.0","id":1,"result":"0xffee"}
16+
// Updated result:
17+
// << {"jsonrpc":"2.0","id":1,"result":"0x000000000000000000000000000000000000000000000000000000000000ffee"}
18+
//
1119
// All other fields must remain unchanged to preserve the integrity of the original test case.
20+
1221
>> {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0x0000000000000000000000000000000000000000","input":"0xff01","to":"0x2f2a392b4d7d2c2d3134e199295818a02535ef0a"},"latest"]}
13-
<< {"jsonrpc":"2.0","id":1,"result":"0xffee"}
22+
<< {"jsonrpc":"2.0","id":1,"result":"0x000000000000000000000000000000000000000000000000000000000000ffee"}

packages/server/tests/acceptance/data/conformity/overwrites/eth_call/call-revert-abi-error.io

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
// Note: This is the original test file, modified for our test purposes: https://github.com/ethereum/execution-apis/blob/main/tests/eth_call/call-revert-abi-error.io
1010
// Only the `params[0].to` field value has been changed to point to the correct deployed contract address.
1111
// All other fields must remain unchanged to preserve the integrity of the original test case.
12+
1213
>> {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0x0000000000000000000000000000000000000000","gas":"0x186a0","input":"0x01","to":"0x0ee3ab1371c93e7c0c281cc0c2107cdebc8b1930"},"latest"]}
1314
<< {"result":"0x","jsonrpc":"2.0","id":1}

packages/server/tests/acceptance/data/conformity/overwrites/eth_call/call-revert-abi-panic.io

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
// Note: This is the original test file, modified for our test purposes: https://github.com/ethereum/execution-apis/blob/main/tests/eth_call/call-revert-abi-panic.io
1010
// Only the `params[0].to` field value has been changed to point to the correct deployed contract address.
1111
// All other fields must remain unchanged to preserve the integrity of the original test case.
12+
1213
>> {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0x0000000000000000000000000000000000000000","gas":"0x186a0","input":"0x00","to":"0x0ee3ab1371c93e7c0c281cc0c2107cdebc8b1930"},"latest"]}
1314
<< {"result":"0x","jsonrpc":"2.0","id":1}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// retrieves the client's current chain id
2+
//
3+
// Reason for override: The Exec API tests used the value 0xc72dd9d5e883e for the chain ID,
4+
// but this value exceeds the integer range allowed by Hedera, where the chain ID must fit within a valid integer type.
5+
// Therefore, the file was overwritten with the chain ID value that is actually used by default on our local network.
6+
7+
>> {"jsonrpc":"2.0","id":1,"method":"eth_chainId"}
8+
<< {"jsonrpc":"2.0","id":1,"result":"0x12a"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Creates an access list for a contract invocation that accesses storage.
22
// This invocation uses EIP-1559 fields to specify the gas price.
33
// Method not implemented in hedera json rpc api
4+
45
>> {"jsonrpc":"2.0","id":1,"method":"eth_createAccessList","params":[{"from":"0x0c2c51a0990aee1d73c1228de158688341557508","gas":"0xea60","input":"0x010203040506","maxFeePerGas":"0x5763d64","maxPriorityFeePerGas":"0x3","nonce":"0x0","to":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df"},"latest"]}
56
<< {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"[Request ID: 2e110bdd-1f64-474c-92f0-638782a523d0] Unsupported JSON-RPC method"}}

0 commit comments

Comments
 (0)