mirror of https://github.com/hyperledger/besu
Update RPCs for yParity (#6119)
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>pull/6136/head
parent
83ae69a6fa
commit
228424215c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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 |
||||
} |
@ -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 |
||||
} |
@ -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 |
||||
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,71 @@ |
||||
{ |
||||
"request": { |
||||
"id": 174, |
||||
"jsonrpc": "2.0", |
||||
"method": "eth_getBlockByNumber", |
||||
"params": [ |
||||
"0x22", |
||||
true |
||||
] |
||||
}, |
||||
"response": { |
||||
"jsonrpc": "2.0", |
||||
"id": 174, |
||||
"result": { |
||||
"number": "0x22", |
||||
"hash": "0x4859ea10d276f6df988eabd48a02e0696cfd3deb769d2a5e0e416a5f3191028a", |
||||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", |
||||
"parentHash": "0x30e688f50392780a71899dcb4c35997f5c1d168cf90306d8e6919ea805097810", |
||||
"nonce": "0x0000000000000000", |
||||
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", |
||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", |
||||
"transactionsRoot": "0x16661f63605269a46ad0c5ad8596e5417310a641563d3aa9b74f70cea0e48b49", |
||||
"stateRoot": "0x34727aff24d1c51cd63fdc14515b15ddaa156fa0671c58a96c72b1553819945d", |
||||
"receiptsRoot": "0xb56f5313fa6822e1ee3f84487b5b2f12c5e1746778ad39f9a89e5f0239cc9b83", |
||||
"miner": "0x0000000000000000000000000000000000000000", |
||||
"difficulty": "0x0", |
||||
"totalDifficulty": "0x427c00", |
||||
"extraData": "0x", |
||||
"baseFeePerGas": "0x3437004a", |
||||
"size": "0x308", |
||||
"gasLimit": "0x5fdfb0", |
||||
"gasUsed": "0x5b22", |
||||
"timestamp": "0x561bc351", |
||||
"uncles": [], |
||||
"transactions": [ |
||||
{ |
||||
"accessList": [], |
||||
"blockHash": "0x4859ea10d276f6df988eabd48a02e0696cfd3deb769d2a5e0e416a5f3191028a", |
||||
"blockNumber": "0x22", |
||||
"chainId": "0x1", |
||||
"from": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", |
||||
"gas": "0xc350", |
||||
"gasPrice": "0x6fd1ca4a", |
||||
"maxPriorityFeePerGas": "0x3b9aca00", |
||||
"maxFeePerGas": "0xb2d05e00", |
||||
"maxFeePerBlobGas": "0x3b9aca00", |
||||
"hash": "0x7c80f35a47f1d432d46add30f262c45f9578e2b1352dbaca0256af1ff3235532", |
||||
"input": "0x12a7b914", |
||||
"nonce": "0x21", |
||||
"to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", |
||||
"transactionIndex": "0x0", |
||||
"type": "0x3", |
||||
"value": "0x0", |
||||
"yParity": "0x0", |
||||
"r": "0x6ae0612cfda43a9b464b10b4881c6fc2e4c24533cf89bbe07934da65c3ae49ce", |
||||
"s": "0x125387aeb222ec51130cf99cbdabf24bd4a881914faed69f254e4a3f4bc507fc", |
||||
"blobVersionedHashes": [ |
||||
"0x0100000000000000000000000000000000000000000000000000000000000000", |
||||
"0x0102000000000000000000000000000000000000000000000000000000000000" |
||||
] |
||||
} |
||||
], |
||||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", |
||||
"withdrawals": [], |
||||
"blobGasUsed": "0x40000", |
||||
"excessBlobGas": "0x0", |
||||
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000" |
||||
} |
||||
}, |
||||
"statusCode": 200 |
||||
} |
@ -0,0 +1,78 @@ |
||||
{ |
||||
"request": { |
||||
"id": 174, |
||||
"jsonrpc": "2.0", |
||||
"method": "eth_getBlockByNumber", |
||||
"params": [ |
||||
"0x21", |
||||
true |
||||
] |
||||
}, |
||||
"response": { |
||||
"jsonrpc": "2.0", |
||||
"id": 174, |
||||
"result": { |
||||
"number": "0x21", |
||||
"hash": "0x30e688f50392780a71899dcb4c35997f5c1d168cf90306d8e6919ea805097810", |
||||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", |
||||
"parentHash": "0x71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53", |
||||
"nonce": "0x0000000000000000", |
||||
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", |
||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", |
||||
"transactionsRoot": "0x319d63b103c713c43e4e9912731ea36906079597e53b128894e8c09d21a5ffad", |
||||
"stateRoot": "0x0d3c456bb68669bad05da3a1a766daab236c9df1da8f74edf5ebe9383f00084c", |
||||
"receiptsRoot": "0xd8f831982345c98e4189e8e76c303d833d1dc22f51efa20d717e31b9337a43cb", |
||||
"miner": "0x0000000000000000000000000000000000000000", |
||||
"difficulty": "0x0", |
||||
"totalDifficulty": "0x427c00", |
||||
"extraData": "0x", |
||||
"baseFeePerGas": "0x3b9aca00", |
||||
"size": "0x2f0", |
||||
"gasLimit": "0x5fdfb0", |
||||
"gasUsed": "0x641e", |
||||
"timestamp": "0x561bc347", |
||||
"uncles": [], |
||||
"transactions": [ |
||||
{ |
||||
"accessList": [ |
||||
{ |
||||
"address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", |
||||
"storageKeys": [ |
||||
"0x0000000000000000000000000000000000000000000000000000000000000000" |
||||
] |
||||
} |
||||
], |
||||
"blockHash": "0x30e688f50392780a71899dcb4c35997f5c1d168cf90306d8e6919ea805097810", |
||||
"blockNumber": "0x21", |
||||
"chainId": "0x1", |
||||
"from": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", |
||||
"gas": "0xc350", |
||||
"gasPrice": "0x77359400", |
||||
"maxPriorityFeePerGas": "0x3b9aca00", |
||||
"maxFeePerGas": "0xb2d05e00", |
||||
"hash": "0x3ecd2ca6cf26c864d0ea5f038a58d4cd4a46a3e242fe92f446f392fdc232dd98", |
||||
"input": "0x12a7b914", |
||||
"nonce": "0x20", |
||||
"to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", |
||||
"transactionIndex": "0x0", |
||||
"type": "0x2", |
||||
"value": "0x0", |
||||
"yParity": "0x0", |
||||
"v" : "0x0", |
||||
"r": "0x8abbfbd4c5f2a13a8d5ed394ac50bac7d678f83a23f645818492f76e8ee17ab3", |
||||
"s": "0x7bd38c6929235f775d68b45bd7dea7981264f9a265b6bea97b070e15be88389c" |
||||
} |
||||
], |
||||
"withdrawalsRoot": "0x37945ab58d2712a26df2a38d217e822694927e29b30d5993d7a53ccea618d1f3", |
||||
"withdrawals": [ |
||||
{ |
||||
"index": "0x0", |
||||
"validatorIndex": "0xa", |
||||
"address": "0x0000000000000000000000000000000000000dad", |
||||
"amount": "0x2540be400" |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
"statusCode": 200 |
||||
} |
Loading…
Reference in new issue