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

Storage Slot Validation not performed during validateTransaction #359

Open
cpb8010 opened this issue Oct 25, 2024 · 2 comments
Open

Storage Slot Validation not performed during validateTransaction #359

cpb8010 opened this issue Oct 25, 2024 · 2 comments
Labels
bug 🐛 Something isn't working

Comments

@cpb8010
Copy link

cpb8010 commented Oct 25, 2024

🐛 Bug Report for zkSync Era In-Memory Node

📝 Description

When attempting to access storage slots belonging to another address, era-test-node is less restrictive than eraVM.
https://docs.zksync.io/build/developer-reference/account-abstraction/extending-4337#extending-the-set-of-slots-that-belong-to-a-user

🔄 Reproduction Steps

  1. During the Native Account Abstraction validation method, call a contract that performs a storage access
  2. Have that contract access storage not linked to the validating account's address
  3. era-test-node allows the validation

🤔 Expected Behavior

The documented behavior requires that storage slot access only come from storage slots with solidity like mappings to account addresses.

😯 Current Behavior

era-test-node doesn't look like it performs any validation

🖥️ Environment

  • As of 0.1.0-alpha.28

📋 Additional Context

We're also looking at making eraVM less restrictive, but not as permissive as era-test-node here: matter-labs/zksync-era#3166

📎 Log Output

Paste any relevant log output here.
@MexicanAce
Copy link
Collaborator

MexicanAce commented Oct 25, 2024

This comes from ValidationTracer -and this isn't run in era_test_node: https://github.com/matter-labs/era-test-node/blob/ceee937055a5a373e27b0ff9bf2e42391de78c59/src/node/in_memory.rs#L1353

@MexicanAce
Copy link
Collaborator

But also, implementing this tracer as-is would break console.log (just FYI to whomever fixes this)

@cpb8010 cpb8010 added the bug 🐛 Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants