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
Copy file name to clipboardExpand all lines: README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,30 @@ The actual confirmation time depends on:
123
123
- Time until next Flashblock (up to 200ms)
124
124
- Network travel time for confirmation response
125
125
126
+
## Optional eth_getBlockByNumber comparison
127
+
128
+
On a Flashblocks-enabled node, the following standard RPC methods will retrieve the Flashblocks data instead of full blocks data:
129
+
130
+
*`eth_getBlockByNumber` with `pending` tag
131
+
*`eth_getTransactionReceipt`
132
+
*`eth_getBalance` with `pending` tag
133
+
*`eth_getTransactionCount` with `pending` tag
134
+
*`eth_getTransactionByHash` with `pending` tag
135
+
*`eth_sendRawTransactionSync`
136
+
137
+
For a quick comparison, see:
138
+
139
+
*`eth-get-block-by-number-pending-examples/preconfirmed-flashblock.log` — the result of running `"method":"eth_getBlockByNumber","params":["pending",true]` on a Flashblocks-enabled node as [block 33228756](https://basescan.org/block/33228756) was forming.
140
+
*`eth-get-block-by-number-pending-examples/confirmed-block.log` — the result of running of running `"method":"eth_getBlockByNumber","params":["pending",true]` on a non-Flashblocks-enabled node as [block 33228756](https://basescan.org/block/33228756) was formed.
141
+
142
+
You will see the key differences in the results:
143
+
* Transaction count — 52 in the Flashblock vs. 167 in the fully formed block.
144
+
*`stateRoot` — empty in the Flashblock vs. computed in the fully formed block.
145
+
*`blockHash` — different in the Flashblock and the fully formed block. The finalized transactions will have the hash of the fully formed block attributed to them.
146
+
*`receiptsRoot` — different in the Flashblock and the fully formed block.
0 commit comments