Repository navigation
Add block_timestamp to EVM WriteReportReply - #486
Conversation
|
|
The latest Buf updates on your PR. Results from workflow Regenerate Protobuf Files / buf (pull_request).
|
| optional bytes tx_hash = 3; | ||
| optional values.v1.BigInt transaction_fee = 4; | ||
| optional string error_message = 5; | ||
| optional uint64 block_timestamp = 6; // block timestamp in microseconds |
There was a problem hiding this comment.
Aren't we usually using miliseconds because of unix?
There was a problem hiding this comment.
Agree microseconds isn't right here but think the format is actually seconds. I did a eth_getBlockByNumber to verify against sepolia
There was a problem hiding this comment.
EVM block timestamps are in seconds, and the capability converts them to µs before replying (header.Timestamp * 1e6). I'd implemented it in seconds at first, then switched to µs because Aptos and Stellar both define WriteReportReply.block_timestamp in microseconds. That way the SLO consumer can handle every chain the same way. Happy to revert to seconds if we'd rather keep the native unit.
What
Adds
optional uint64 block_timestamp = 6(microseconds) to the EVMWriteReportReply, plus the regeneratedembedded_gen.go.Why
Aptos and Stellar already return
block_timestampinWriteReportReply, which lets us measure tx-inclusion latency for SLOs. EVM was missing it. This uses the same field name, type and unit (µs) as Aptos and Stellar, so one SLO pipeline works across all three chains.Compatibility
New optional field: wire-compatible, and existing consumers ignore it.
Follow-ups