-
Notifications
You must be signed in to change notification settings - Fork 860
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the GraphQL and JSON-RPC endpoints to provide `yParity` instead of `v` for non-legacy transactions. Update the JSON-RPC tests to use the Hive data. Add tests for Shanghai and Cancun Blocks. Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
- Loading branch information
Showing
47 changed files
with
931 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 13 additions & 4 deletions
17
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/01_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
47 changes: 44 additions & 3 deletions
47
...st/resources/jsonrpc/engine/cancun/test-cases/block-production/02_cancun_get_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 13 additions & 2 deletions
15
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/03_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 13 additions & 2 deletions
15
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/04_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 13 additions & 2 deletions
15
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/05_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 14 additions & 3 deletions
17
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/06_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 14 additions & 3 deletions
17
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/07_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 14 additions & 3 deletions
17
...t/resources/jsonrpc/engine/cancun/test-cases/block-production/08_cancun_send_blob_tx.json
Large diffs are not rendered by default.
Oops, something went wrong.
45 changes: 42 additions & 3 deletions
45
.../resources/jsonrpc/engine/cancun/test-cases/block-production/09_cancun_get_chainhead.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,44 @@ | ||
{ | ||
"request" : {"jsonrpc":"2.0","id":34,"method":"eth_getBlockByNumber","params":["latest",false]}, | ||
"response" : {"jsonrpc":"2.0","id":34,"result":{"number":"0x0","hash":"0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","stateRoot":"0x11045a28efc7c00a52a201e55b8d4c312971a930432e2b5380c20d2ce217385e","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","baseFeePerGas":"0x3b9aca00","size":"0x244","gasLimit":"0x2fefd8","gasUsed":"0x0","timestamp":"0x1234","uncles":[],"transactions":[],"withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","withdrawals":[],"blobGasUsed":"0x0","excessBlobGas":"0x0","parentBeaconBlockRoot":"0x0000000000000000000000000000000000000000000000000000000000000000"}}, | ||
"statusCode" : 200 | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"id": 34, | ||
"method": "eth_getBlockByNumber", | ||
"params": [ | ||
"latest", | ||
false | ||
] | ||
}, | ||
"response": { | ||
"jsonrpc": "2.0", | ||
"id": 34, | ||
"result": { | ||
"number": "0x0", | ||
"hash": "0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"nonce": "0x0000000000000000", | ||
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"stateRoot": "0x11045a28efc7c00a52a201e55b8d4c312971a930432e2b5380c20d2ce217385e", | ||
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"miner": "0x0000000000000000000000000000000000000000", | ||
"difficulty": "0x0", | ||
"totalDifficulty": "0x0", | ||
"extraData": "0x", | ||
"baseFeePerGas": "0x3b9aca00", | ||
"size": "0x244", | ||
"gasLimit": "0x2fefd8", | ||
"gasUsed": "0x0", | ||
"timestamp": "0x1234", | ||
"uncles": [], | ||
"transactions": [], | ||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"withdrawals": [], | ||
"blobGasUsed": "0x0", | ||
"excessBlobGas": "0x0", | ||
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
} | ||
}, | ||
"statusCode": 200 | ||
} |
96 changes: 93 additions & 3 deletions
96
...sources/jsonrpc/engine/cancun/test-cases/block-production/10_cancun_build_on_genesis.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,95 @@ | ||
{ | ||
"request" : {"jsonrpc":"2.0","id":1,"method":"engine_forkchoiceUpdatedV3","params":[{"headBlockHash":"0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf","safeBlockHash":"0x0000000000000000000000000000000000000000000000000000000000000000","finalizedBlockHash":"0x0000000000000000000000000000000000000000000000000000000000000000"},{"timestamp":"0x1235","prevRandao":"0x31a3b9b03c64172b39b7fa7d35d86eaa0f9cbac30e2abbf9895a32b80ae1cd76","suggestedFeeRecipient":"0x0000000000000000000000000000000000000000","withdrawals":[{"index":"0x1","validatorIndex":"0x0","address":"0x0000000000000000000000000000000000000000","amount":"0x64"},{"index":"0x2","validatorIndex":"0x1","address":"0x0100000000000000000000000000000000000000","amount":"0x64"},{"index":"0x3","validatorIndex":"0x2","address":"0x0200000000000000000000000000000000000000","amount":"0x64"},{"index":"0x4","validatorIndex":"0x3","address":"0x0300000000000000000000000000000000000000","amount":"0x64"},{"index":"0x5","validatorIndex":"0x4","address":"0x0400000000000000000000000000000000000000","amount":"0x64"},{"index":"0x6","validatorIndex":"0x5","address":"0x0500000000000000000000000000000000000000","amount":"0x64"},{"index":"0x7","validatorIndex":"0x6","address":"0x0600000000000000000000000000000000000000","amount":"0x64"},{"index":"0x8","validatorIndex":"0x7","address":"0x0700000000000000000000000000000000000000","amount":"0x64"},{"index":"0x9","validatorIndex":"0x8","address":"0x0800000000000000000000000000000000000000","amount":"0x64"},{"index":"0xa","validatorIndex":"0x9","address":"0x0900000000000000000000000000000000000000","amount":"0x64"}],"parentBeaconBlockRoot":"0x169630f535b4a41330164c6e5c92b1224c0c407f582d407d0ac3d206cd32fd52"}]}, | ||
"response" : {"jsonrpc":"2.0","id":1,"result":{"payloadStatus":{"status":"VALID","latestValidHash":"0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf","validationError":null},"payloadId":"0x78d3b312ed5adeb5"}}, | ||
"statusCode" : 200 | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "engine_forkchoiceUpdatedV3", | ||
"params": [ | ||
{ | ||
"headBlockHash": "0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf", | ||
"safeBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"finalizedBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
}, | ||
{ | ||
"timestamp": "0x1235", | ||
"prevRandao": "0x31a3b9b03c64172b39b7fa7d35d86eaa0f9cbac30e2abbf9895a32b80ae1cd76", | ||
"suggestedFeeRecipient": "0x0000000000000000000000000000000000000000", | ||
"withdrawals": [ | ||
{ | ||
"index": "0x1", | ||
"validatorIndex": "0x0", | ||
"address": "0x0000000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x2", | ||
"validatorIndex": "0x1", | ||
"address": "0x0100000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x3", | ||
"validatorIndex": "0x2", | ||
"address": "0x0200000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x4", | ||
"validatorIndex": "0x3", | ||
"address": "0x0300000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x5", | ||
"validatorIndex": "0x4", | ||
"address": "0x0400000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x6", | ||
"validatorIndex": "0x5", | ||
"address": "0x0500000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x7", | ||
"validatorIndex": "0x6", | ||
"address": "0x0600000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x8", | ||
"validatorIndex": "0x7", | ||
"address": "0x0700000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0x9", | ||
"validatorIndex": "0x8", | ||
"address": "0x0800000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
}, | ||
{ | ||
"index": "0xa", | ||
"validatorIndex": "0x9", | ||
"address": "0x0900000000000000000000000000000000000000", | ||
"amount": "0x64" | ||
} | ||
], | ||
"parentBeaconBlockRoot": "0x169630f535b4a41330164c6e5c92b1224c0c407f582d407d0ac3d206cd32fd52" | ||
} | ||
] | ||
}, | ||
"response": { | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": { | ||
"payloadStatus": { | ||
"status": "VALID", | ||
"latestValidHash": "0x33235e7b7a78302cdb54e5ddba66c7ae49b01c1f5498bb00cd0c8ed5206784bf", | ||
"validationError": null | ||
}, | ||
"payloadId": "0x78d3b312ed5adeb5" | ||
} | ||
}, | ||
"statusCode": 200 | ||
} |
27 changes: 14 additions & 13 deletions
27
.../test/resources/jsonrpc/engine/cancun/test-cases/block-production/11_cancun_tx_count.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
{ | ||
"request" : { | ||
"jsonrpc":"2.0","method":"txpool_besuStatistics","params":[],"id":1 | ||
|
||
|
||
}, | ||
"response" : { | ||
"jsonrpc" : "2.0", | ||
"id" : 1, | ||
"result" : { | ||
"maxSize" : -1, | ||
"localCount" : 7, | ||
"remoteCount" : 0 | ||
"request": { | ||
"jsonrpc": "2.0", | ||
"method": "txpool_besuStatistics", | ||
"params": [], | ||
"id": 1 | ||
}, | ||
"response": { | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": { | ||
"maxSize": -1, | ||
"localCount": 7, | ||
"remoteCount": 0 | ||
} | ||
}, | ||
"statusCode" : 200 | ||
"statusCode": 200 | ||
} |
Oops, something went wrong.