Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

core: Implement EIP 1153 #24463

Closed
wants to merge 1 commit into from
Closed

Conversation

wbl
Copy link

@wbl wbl commented Feb 23, 2022

This implements EIP 1153: I've made it a draft because I would like guidance on the following points.

  1. This really needs some tests exercising the new logic via bytecode sequences, I'm not sure where tests like that should live
  2. I don't know if I did all the work to enable turning this on on a testnet correctly
  3. The shadowstack approach works, but relies on having an address of the contract: during creation it won't work right. This is probably OK, but should be called out in the EIP.
  4. We don't disable this feature during readonly calls.
  5. Haven't approach compiler support at all on this.

@moodysalem
Copy link

Would be great to compare with Mark Tyneway's impl here which he wrote at ETHDenver tynes/go-ethereum@master...eip1153 @tynes

@wbl
Copy link
Author

wbl commented Mar 16, 2022

So the big difference is philosophical: I treat the transient state as closely tied to the VM, Mark seems to treat it as near the storage DB. Otherwise they look pretty similar. I think Mark's costing is wrong: a transient write should be a lot cheaper than a dirty write, but that's literally a one line difference, doesn't matter too much.

@moodysalem
Copy link

moodysalem commented Mar 17, 2022

So the big difference is philosophical: I treat the transient state as closely tied to the VM, Mark seems to treat it as near the storage DB

I agree with your framing. I made a similar comment here: ethereumjs/ethereumjs-monorepo#1768 (comment)

I think Mark's costing is wrong: a transient write should be a lot cheaper than a dirty write, but that's literally a one line difference, doesn't matter too much

I think that's a separate task though because any repricing of transient writes and reads should also be applied to dirty storage writes and reads, given they otherwise have the exact same semantics.

@wbl
Copy link
Author

wbl commented Mar 25, 2022

You've convinced me on the pricing, I think I misunderstood what dirty meant. I can go edit this PR to fix that.

Pending that, do you think it's ready to open as a real PR/do you have ideas for where i can add extra tests.

@holiman
Copy link
Contributor

holiman commented Nov 15, 2022

Thanks for making this PR. In the end, we prefer the approach made in #26003, where the tracking / revertal is tied to the statedb journal. So closing this in favour of #26003

@holiman holiman closed this Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants