You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update block parameter to include blockHash (#1280)
* Update block parameter to include blockHash
Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>
* lowercase block parameter
Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>
---------
Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>
The block parameter can have the following values:
266
+
The block parameter can have one of the following values:
267
267
268
-
*`blockNumber` : `quantity` - The block number, specified in hexadecimal or decimal. 0 represents
268
+
*`blockNumber` : *quantity* - The block number, specified in hexadecimal or decimal. 0 represents
269
269
the genesis block.
270
-
*`earliest` : `tag` - The earliest (genesis) block.
271
-
*`latest` : `tag` - The last block mined.
272
-
*`pending` : `tag` - The last block mined plus pending transactions. Use only with
270
+
*`blockHash` : *string* or *object* - 32-byte block hash or JSON object specifying the block hash.
271
+
If using a JSON object, you can specify `requireCanonical` to indicate whether the block must be a
272
+
canonical block.
273
+
See [this example](https://github.com/hyperledger/besu/blob/a2dedb0b2c7980cdc35db8eb4c094f2eb0dc7deb/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBalance_blockHashObjectCanonical.json).
274
+
275
+
!!! note
276
+
277
+
Only the following methods support the `blockHash` parameter:
Copy file name to clipboardExpand all lines: docs/public-networks/reference/api/objects.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,8 +61,8 @@ Used to [`filter logs`](../../how-to/use-besu-api/access-logs.md).
61
61
62
62
| Key | Type | Required/Optional | Value |
63
63
|-----|:----:|:-----------------:|-------|
64
-
|`fromBlock`| Quantity | Tag | Optional | Integer block number or `latest`, `pending`, `earliest`. See [Block Parameter](../../how-to/use-besu-api/json-rpc.md#block-parameter). Default is `latest`. |
65
-
|`toBlock`| Quantity | Tag | Optional | Integer block number or `latest`, `pending`, `earliest`. See [Block Parameter](../../how-to/use-besu-api/json-rpc.md#block-parameter). Default is `latest`. |
64
+
|`fromBlock`| Quantity | Tag | Optional | Integer block number or `latest`, `pending`, `earliest`. See [block parameter](../../how-to/use-besu-api/json-rpc.md#block-parameter). Default is `latest`. |
65
+
|`toBlock`| Quantity | Tag | Optional | Integer block number or `latest`, `pending`, `earliest`. See [block parameter](../../how-to/use-besu-api/json-rpc.md#block-parameter). Default is `latest`. |
66
66
|`address`| Data | Array | Optional | Contract address or array of addresses from which [logs](../../concepts/events-and-logs.md) originate. |
67
67
|`topics`| Array of Data, 32 bytes each | Optional | Array of topics by which to [filter logs](../../concepts/events-and-logs.md#topic-filters). |
0 commit comments