Skip to content

LOG abstraction #120

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
vbuterin opened this issue Jun 21, 2016 · 2 comments
Closed

LOG abstraction #120

vbuterin opened this issue Jun 21, 2016 · 2 comments
Labels

Comments

@vbuterin
Copy link
Contributor

If block.number >= SERENITY_HARDFORK_BLKNUM, we do the following:

  1. At the start of every block execution, set the storage of 0x40 at key 0 (encoded as big endian z-padded to 32 bytes as usual) to -1.
  2. At the start of every transaction execution, increment this key by 1, regardless of whether or not the transaction succeeded. Then set the storage of 0x50 at that key to equal to the RLP of [blknumber], and set the storage of 0x50 at the key 2**256 - 1 to 256 zero bytes.
  3. Create a precompile contract at storage 0x50, with the following logic: if it receives less than 128 bytes of input data, fails and throws. If it receives 128+n bytes of input data, then attach the input data as an RLP item to the list in 0x50 (ie. after the first log, the RLP would be [blknumber, data1], and so forth), and modify the bytes at key 2**256 - 1 as if you were modifying a bloom filter according to current log rules, with the first 128 bytes being the four topics.
  4. At the start of every block execution, set the storage of 0x40 at key 1 to equal the max gas limit in the block. At the end of every transaction execution, subtract the amount of gas consumed by the transaction from this value, and use this value as the store of how much gas remains usable in the block.
  5. The receipt root field of every block should now equal the empty string, and the bloom filter field of every block should now equal the empty string.
  6. All LOG opcodes are now deemed equivalent to a corresponding call to 0x50. The gas costs of 0x50 are equivalent to the current costs of LOG opcodes, except that gas is only charged for nonzero topics.

Rationale

This removes the receipt field from the blockchain as a separate object, instead merging its functionality, both for holding logs and keeping track of the gas used in the block, into the state, satisfying the goal of increasing purity and abstraction of the protocol. It also opens a path for deprecating the LOG opcodes, further simplifying the virtual machine.

@github-actions
Copy link

There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Jan 16, 2022
@github-actions
Copy link

This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants