Skip to content

Commit 9b91271

Browse files
committed
Add Flashblock vs full block comparison
1 parent cdace99 commit 9b91271

File tree

3 files changed

+5203
-0
lines changed

3 files changed

+5203
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,30 @@ The actual confirmation time depends on:
123123
- Time until next Flashblock (up to 200ms)
124124
- Network travel time for confirmation response
125125

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.
147+
148+
149+
126150
## Learn more
127151

128152
- [Base Flashblocks documentation](https://docs.base.org/base-chain/flashblocks/apps)

0 commit comments

Comments
 (0)