-
Notifications
You must be signed in to change notification settings - Fork 637
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
fix: Move pure methods out of External crate #3030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but am confused with the spacing e.g.
use sha2::Digest;
let value_hash = sha2::Sha256::digest(&value);
self.internal_write_register(register_id, value_hash.as_ref().to_vec())
I separated |
Also as a Rust noob, is there a reason to import so late? |
I think we import |
External crate should only contain methods that requires something external to complete. E.g. when interacting with the blockchain.
Pure functions such as sha256 and keccak hashes can go directly to vm-logic.
Bumping versions to
1.1.0
Fixes: #3019
Test plan: