getProof encoding fix for 4249 (#4261)

* getProof encoding fix for 4249

Signed-off-by: garyschulte <garyschulte@gmail.com>
pull/4280/head
garyschulte 2 years ago committed by GitHub
parent e0d4da2917
commit 18078337b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/proof/StorageEntryProof.java
  3. 2
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetProofTest.java
  4. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_blockHash.json
  5. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_blockHashObject.json
  6. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_blockHashObjectCanonical.json
  7. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_blockHashObjectCanonicalFalse.json
  8. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_blockNumber.json
  9. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_blockNumberObject.json
  10. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_latest.json
  11. 2
      ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getProof_pending.json

@ -10,6 +10,7 @@
### Bug Fixes
- Fixes off-by-one error for mainnet TTD fallback [#4223](https://github.com/hyperledger/besu/pull/4223)
- Fix off-by-one error in AbstractRetryingPeerTask [#4254](https://github.com/hyperledger/besu/pull/4254)
- Fix encoding of key (short hex) in eth_getProof [#4261](https://github.com/hyperledger/besu/pull/4261)
## 22.7.0

@ -39,7 +39,7 @@ public class StorageEntryProof {
@JsonGetter(value = "key")
public String getKey() {
return key.toDecimalString();
return key.toShortHexString();
}
@JsonGetter(value = "value")

@ -172,6 +172,8 @@ class EthGetProofTest {
assertThat(result).usingRecursiveComparison().isEqualTo(expectedResponse);
assertThat(result.getNonce()).isEqualTo("0xfffffffffffffffe");
assertThat(result.getStorageProof().size()).isGreaterThan(0);
assertThat(result.getStorageProof().get(0).getKey()).isEqualTo(storageKey.toShortHexString());
}
private JsonRpcRequestContext requestWithParams(final Object... params) {

@ -20,7 +20,7 @@
"nonce" : "0x0",
"storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ ]
} ]

@ -22,7 +22,7 @@
"nonce" : "0x0",
"storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ ]
} ]

@ -23,7 +23,7 @@
"nonce" : "0x0",
"storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ ]
} ]

@ -23,7 +23,7 @@
"nonce" : "0x0",
"storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ ]
} ]

@ -20,7 +20,7 @@
"nonce" : "0x0",
"storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ ]
} ]

@ -22,7 +22,7 @@
"nonce" : "0x0",
"storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ ]
} ]

@ -20,7 +20,7 @@
"nonce" : "0x0",
"storageHash" : "0xdd3fa56425f8195f314c22547243081293b3f5537cd98ed8f84d4fda3f9a515b",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ "0xf8b18080a0c7f91ee5ea67d593275fcc773a02a5e5fb37b0625ca5c5cdc783483d43f2d7c280a06672614c102b0f02e747250bae452ed105110e25761c15a2a459afbd9eb8cf2e808080a0f671e05fab19f512b16fdcbc938f5fbbfbbc2fa67fecb575bb7721c221f71cf78080a0ba2fc36b0235d7ea299126bd4d404cb38456f32a6c236b422a3868f98c69eda1a0d77552655c7b63916586a73350b1933836f2378789613b548b90fa0a44125df180808080"]
} ]

@ -20,7 +20,7 @@
"nonce" : "0x0",
"storageHash" : "0xdd3fa56425f8195f314c22547243081293b3f5537cd98ed8f84d4fda3f9a515b",
"storageProof" : [ {
"key" : "839",
"key" : "0x347",
"value" : "0x0",
"proof" : [ "0xf8b18080a0c7f91ee5ea67d593275fcc773a02a5e5fb37b0625ca5c5cdc783483d43f2d7c280a06672614c102b0f02e747250bae452ed105110e25761c15a2a459afbd9eb8cf2e808080a0f671e05fab19f512b16fdcbc938f5fbbfbbc2fa67fecb575bb7721c221f71cf78080a0ba2fc36b0235d7ea299126bd4d404cb38456f32a6c236b422a3868f98c69eda1a0d77552655c7b63916586a73350b1933836f2378789613b548b90fa0a44125df180808080"]
} ]

Loading…
Cancel
Save