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

Added ability to run without signature verification #94

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

mm-zk
Copy link
Collaborator

@mm-zk mm-zk commented Sep 5, 2023

What 💻

  • Ability to run without signature verification
  • added a new 'DefaultAccount' implementation.
  • Refactored system contracts code into separate file

Why ✋

  • mostly used by forge tests - where most of the tests are running under the account for which there is no private key.

Evidence 📷

Include screenshots, screen recordings, or console output here demonstrating that your changes work as intended
image

@mm-zk mm-zk marked this pull request as ready for review September 6, 2023 14:56
Copy link
Collaborator

@dutterbutter dutterbutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions but LGTM otherwise! 🚀

Comment on lines 159 to 162
/// @notice Validation that the ECDSA signature of the transaction is correct.
/// @param _hash The hash of the transaction to be signed.
/// @param _signature The signature of the transaction.
/// @return EIP1271_SUCCESS_RETURN_VALUE if the signaure is correct. It reverts otherwise.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these comments reflect the body comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Comment on lines +285 to +289
let system_contracts_options = if opt.dev_use_local_contracts {
system_contracts::Options::Local
} else {
system_contracts::Options::BuiltIn
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be missing this but how does one specify to make use of BuiltInWithoutSecurity option?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it only works if you include era-test-node as a library:
https://github.com/mm-zk/revm_era/blob/master/src/lib.rs#L223

We might add it as a command line option in the future for the era-test-node binary. (but that would be a separate PR)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make a GitHub Issue to track adding an option to use BuiltInWithoutSecurity from the binary

src/zks.rs Show resolved Hide resolved
Copy link
Collaborator

@MexicanAce MexicanAce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (Just have non-blocking follow-ups)

Comment on lines +285 to +289
let system_contracts_options = if opt.dev_use_local_contracts {
system_contracts::Options::Local
} else {
system_contracts::Options::BuiltIn
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make a GitHub Issue to track adding an option to use BuiltInWithoutSecurity from the binary

@mm-zk mm-zk merged commit 56ed446 into main Sep 7, 2023
7 checks passed
@mm-zk mm-zk deleted the 0905_test_node_system_contracts branch September 7, 2023 11:49
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