From 4dfa6e07fc733687cbe40f5015b9f9ac31e4290d Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 13 Nov 2024 16:06:48 +0700 Subject: [PATCH] Update EIP-7792: Change `LogEntry` to number + tx index --- EIPS/eip-7792.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EIPS/eip-7792.md b/EIPS/eip-7792.md index c0ae2c04d9437c..cda69c31d2b3fc 100644 --- a/EIPS/eip-7792.md +++ b/EIPS/eip-7792.md @@ -43,11 +43,11 @@ Additional metadata about each log's origin is mixed in to each `LogEntry`. The ```python class BlockMeta(Container): timestamp: uint64 - root: Root + number: uint64 class LogMeta(Container): block: BlockMeta - transaction_root: Root + transaction_index: uint64 class Log(Container): address: ExecutionAddress @@ -113,6 +113,10 @@ The gas cost produced by this scheme is significantly higher than what `LOG#` op If the mechanism turns out to be prohibitively expensive even when optimized, it may be necessary to move the log accumulators to a separate optimized data structure (not in `state_root`), or to an out-of-protocol zk system. Even then, the gas cost for logs should still reflect the actual overall cost to update a typical out-of-protocol accumulator to deter against log spamming. +### Block number / transaction index in meta instead of hashes + +As long as the accumulators are stored in the state trie, they cannot refer to the block hash as the block hash hashes over the state trie, producing a cyclic dependency. If an external system is used, hashes may be included as in that scenario the state root is not affected by the IVC. + ## Backwards Compatibility It is still possible to process `eth_getLogs` responses from trusted servers as is, without verifying them. Client applications with strict response validation may need to be updated to allow the additional `blockTimestamp` field.