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

refactor: reduce usage of ForkStorage outside inner module #539

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

itegulov
Copy link
Contributor

What 💻

Smaller PR this time :)

ForkStorage basically has two sets of functionality:

  1. Key-value storage for VM
  2. Fork-related configs + calls

This PR removes external usages of ForkStorage for all purposes that fall under point 1

Related to #535 (solves first half of the issue)

Why ✋

Encapsulate mutable storage, get rid of potential race conditions (e.g. before this PR it was possible to mutate storage in the middle of tx execution).

@itegulov itegulov requested a review from a team as a code owner January 15, 2025 10:24
# Conflicts:
#	crates/core/src/node/eth.rs
#	crates/core/src/node/in_memory.rs
#	crates/core/src/node/in_memory_ext.rs
#	crates/core/src/node/inner/in_memory_inner.rs
#	crates/core/src/utils.rs
@itegulov itegulov merged commit e2fbacc into main Jan 15, 2025
14 checks passed
@itegulov itegulov deleted the daniyar/refactor/storage branch January 15, 2025 12:14
mm-zk added a commit that referenced this pull request Jan 17, 2025
* refactor: reduce usage of `ForkStorage` outside `inner` module (#539)

* reduce usage of `ForkStorage` outside `inner` module

* adapt for zkos

* fix destination path (#541)

* fix: anvil-zksync able to start even if the port is busy (#542)

* fix: closes #512 - start instance even if port is busy

* chore: apply make lint:fix

* chore: refactor test to make use of anvil-zksync instance

* chore: remove no longer needed deps

* chore: remove no longer needed deps

* chore: bump actions/upload-artifact: v3 to v4 due to CI fail

* chore: bump actions/upload-artifact / download: v3 to v4 due to CI fail

* compilation fixes

---------

Co-authored-by: Daniyar Itegulov <[email protected]>
Co-authored-by: Nisheeth Barthwal <[email protected]>
Co-authored-by: Dustin Brickwood <[email protected]>
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