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

[ETHSF_HACKATHON_SUBMISSION] (EIP-1153) Transient Storage in EVM #25

Conversation

epociask
Copy link

@epociask epociask commented Nov 6, 2022

Description

  • Implemented spec according to EIP-1153
  • Added /core/vm/transient_storage.go file to represent Transient Storage object with necessary inner data types:
    • Journal for tracking contextual state changes
    • Checkpointing for tracking state between call frame transitions
    • Checkpointing and journal accounting logic to ensure proper reversion upon failure of a call frame
  • Propagated Transient Storage struct throughout execution model
  • Added two new opcode instructions:
    • TLOAD (0xb3):
      • Loads value from Transient Storage given address & key
    • TSTORE (oxb4):
      • Stores value in Transient Storage given key, address, & value

Tests

  • Added /core/vm/transient_storage_test.go with minor unit tests for Transient Storage data structure
  • Added runtime test to ensure proper execution of a re-entrancy block using two contracts with TLOAD and TSTORE instructions

Please describe any tests you've added. If you've added no tests, or left important behavior untested, please explain why not.

Additional context

Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

@protolambda protolambda force-pushed the optimism branch 2 times, most recently from e383f99 to 68bfa8b Compare November 8, 2022 01:34
@protolambda protolambda changed the base branch from optimism to optimism-squashed-sep-9 November 10, 2022 18:19
@tynes
Copy link
Contributor

tynes commented Nov 29, 2022

Hey @epociask, thanks for implementing this. Upstream geth has merged 1153 in ethereum/go-ethereum#26003. We rebase on upstream every so often and will be able to pull in that implementation.

EIP 1153 has been implemented and merged into a bunch of clients:

There are some clients that are still waiting for merge, so if you are still interested in helping out, these PRs could use review/additional testing:

@tynes tynes closed this Nov 30, 2022
joeylichang pushed a commit to joeylichang/op-geth that referenced this pull request Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants