Skip to content

Comments

feat: storage slot setting + memory db#3216

Merged
mergify[bot] merged 10 commits intodevelopfrom
feat/storage-slot-setting
Aug 17, 2022
Merged

feat: storage slot setting + memory db#3216
mergify[bot] merged 10 commits intodevelopfrom
feat/storage-slot-setting

Conversation

@tynes
Copy link
Contributor

@tynes tynes commented Aug 13, 2022

Description
Implements basic storage slot setting. The storage slot setting still needs to support mappings and slot offsets and more thorough testing, then it will be ready to be used for the new state surgery pipeline.

Also implements a MemoryStateDB that acts on a core.Genesis so that we can build a fresh genesis from scratch to replace the hardhat task. This will allow us to use the same code used to generate the L2 genesis.json on an actual LevelDB backed StateDB instance.

Closes ENG-2586

@changeset-bot
Copy link

changeset-bot bot commented Aug 13, 2022

⚠️ No Changeset found

Latest commit: c41f072

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify
Copy link
Contributor

mergify bot commented Aug 13, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

@tynes
Copy link
Contributor Author

tynes commented Aug 15, 2022

@mslipper Will follow up with an additional PR that adds the thorough testing + final required functionality

tynes added 6 commits August 17, 2022 11:32
Move types into solc package that are associated
with solc. Add `CompilerInput` and `CompilerOutput`
types.
Implement some of smock's utils in go
@tynes tynes force-pushed the feat/storage-slot-setting branch from 1ceda88 to 20fa803 Compare August 17, 2022 18:32
@trianglesphere
Copy link
Contributor

The go code that I've read seems fine. I just don't have a great idea of the solidity ABI / slot setting / packing. If there's a good reference for that I could do a cross check & I'd be happy with that portion.

The in memory DB looks good to me.

@tynes
Copy link
Contributor Author

tynes commented Aug 17, 2022

The go code that I've read seems fine. I just don't have a great idea of the solidity ABI / slot setting / packing. If there's a good reference for that I could do a cross check & I'd be happy with that portion.

The in memory DB looks good to me.

Not super in depth but there is this: https://docs.soliditylang.org/en/v0.8.13/internals/layout_in_storage.html
I've seen a doc going around that shows the values in depth, not sure where it is though. Should keep that link handy to be honest

fwiw there is test coverage that setting the storage slots of a deployed contract works

@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify mergify bot merged commit e5fc3fc into develop Aug 17, 2022
@mergify mergify bot deleted the feat/storage-slot-setting branch August 17, 2022 20:21
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot removed the on-merge-train label Aug 17, 2022
roninjin10 pushed a commit that referenced this pull request Aug 26, 2022
* state-surgery: add solc package

Move types into solc package that are associated
with solc. Add `CompilerInput` and `CompilerOutput`
types.

* state-surgery: clean up hardhat package

Use some solc types

* state-surgery: add state package

Implement some of smock's utils in go

* state-surgery: cleanup

* state-surgery: refactor + add better test coverage

* state-surgery: cleanup

* state-surgery: add tests for merging storage slots

* state-surgery: godoc

* state-surgery: more tests

* state-surgery: more cleanup
maurelian pushed a commit that referenced this pull request Sep 15, 2022
* state-surgery: add solc package

Move types into solc package that are associated
with solc. Add `CompilerInput` and `CompilerOutput`
types.

* state-surgery: clean up hardhat package

Use some solc types

* state-surgery: add state package

Implement some of smock's utils in go

* state-surgery: cleanup

* state-surgery: refactor + add better test coverage

* state-surgery: cleanup

* state-surgery: add tests for merging storage slots

* state-surgery: godoc

* state-surgery: more tests

* state-surgery: more cleanup
sam-goldman pushed a commit that referenced this pull request Sep 15, 2022
* state-surgery: add solc package

Move types into solc package that are associated
with solc. Add `CompilerInput` and `CompilerOutput`
types.

* state-surgery: clean up hardhat package

Use some solc types

* state-surgery: add state package

Implement some of smock's utils in go

* state-surgery: cleanup

* state-surgery: refactor + add better test coverage

* state-surgery: cleanup

* state-surgery: add tests for merging storage slots

* state-surgery: godoc

* state-surgery: more tests

* state-surgery: more cleanup
theochap pushed a commit that referenced this pull request Jan 15, 2026
…-rs/kona#3229)

See: #3223 

This also reworks aspects of `EngineActor`. See referenced issues.

closes #3223, #3213, #3215, #3216, #3219, and #3072
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.

3 participants