Skip to content

Use timestamps from logs when they are provided - #247

Merged
peterbroadhurst merged 3 commits into
mainfrom
leverage-log-timestamp
Sep 28, 2026
Merged

peterbroadhurst merged 3 commits into
mainfrom
leverage-log-timestamp

Conversation

@Chengxuan

Copy link
Copy Markdown
Contributor

Newer Ethereum nodes provide block timestamps as part of the eth_getLogs response. Adding support in EVM Connect to save an extra call when block timestamps are already present in the returned logs.

@Chengxuan
Chengxuan requested a review from a team as a code owner September 28, 2026 09:23
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
@Chengxuan
Chengxuan force-pushed the leverage-log-timestamp branch from f339468 to 2d59875 Compare September 28, 2026 09:28
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>

@peterbroadhurst peterbroadhurst left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a non-formal support approach to this started in 2022 with geth, and has spread out to all clients: https://ethereum-magicians.org/t/proposal-for-adding-blocktimestamp-to-logs-object-returned-by-eth-getlogs-and-related-requests/11183

┌──────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│            Client            │                  First release with blockTimestamp on eth_getLogs                   │                                                                       Notes                                                                       │
├──────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Reth                         │ April 2024 (PR #7606 (https://github.com/paradigmxyz/reth/pull/7606))             │ Earliest implementer, well before the spec merged.                                                                                                │
├──────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Geth                         │ v1.16.0, June 2025 (PR #31887 (https://github.com/ethereum/go-ethereum/pull/31887)) │ Covers getLogs, filter logs, filter changes and eth_subscribe logs. Initially decimal, switched to hex in v1.16.1. Not populated in               │
│                              │                                                                                     │ eth_simulateV1 results.                                                                                                                           │
├──────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Erigon                       │ v3.2.0, October 2025 (PR #16417 (https://github.com/erigontech/erigon/pull/16417))  │ Erigon had it briefly years ago, then moved it to erigon_getLogs. eth_getFilterChanges and eth_subscribe("logs") only gained it in v3.7.0         │
│                              │                                                                                     │ (September 2026).                                                                                                                                 │
├──────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Besu                         │ 25.10.0 (PR #9278 (https://github.com/hyperledger/besu/pull/9278))                │ Receipt logs in eth_getTransactionReceipt and eth_getBlockReceipts followed in 25.11.0.                                                           │
├──────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Nethermind                   │ 1.35.0, October 2025 (PR #9379                                                    │ Documented as a hex integer in the eth namespace docs (https://docs.nethermind.io/interacting/json-rpc-ns/eth/).                                  │
│                              │ (https://github.com/NethermindEth/nethermind/pull/9379))                            │                                                                                                                                                   │
└──────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@peterbroadhurst
peterbroadhurst merged commit 6f75963 into main Sep 28, 2026
4 checks passed
@peterbroadhurst
peterbroadhurst deleted the leverage-log-timestamp branch September 28, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants