Skip to content

Commit

Permalink
Update EIP-7792: Change LogEntry to number + tx index
Browse files Browse the repository at this point in the history
  • Loading branch information
etan-status committed Nov 13, 2024
1 parent 8915c39 commit 4dfa6e0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions EIPS/eip-7792.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4dfa6e0

Please sign in to comment.