-
Notifications
You must be signed in to change notification settings - Fork 141
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
introduce a crypto::recover_secp_public_key syscall. #707
Conversation
Co-authored-by: karim <karim.dev@gmail.com>
fvm/src/call_manager/default.rs
Outdated
// prepare actor code | ||
// TODO remove once the EVM smart contract actor is integrated in the builtin-actors bundle | ||
// https://github.com/filecoin-project/ref-fvm/issues/693 | ||
self.engine() | ||
.load_code_cid(&state.code, self.blockstore()) | ||
.map_err( | ||
|_| syscall_error!(NotFound; "actor code cid does not exist {}", &state.code), | ||
)?; | ||
|
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.
Tracked in #708.
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.
Isn't this part of a separate patch?
- Introduce a secp recover syscall.
- Code loading?
Codecov Report
@@ Coverage Diff @@
## master #707 +/- ##
==========================================
- Coverage 50.92% 50.66% -0.26%
==========================================
Files 120 120
Lines 9691 9742 +51
==========================================
+ Hits 4935 4936 +1
- Misses 4756 4806 +50
|
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.
Logic LGTM. I'd do this in two PRs as one is a new syscall, and one supports EVM code loading. But I don't feel too strongly about that.
I'd also change load_code
so we don't have to clone the module on every call (we don't use the return value).
fvm/src/machine/engine.rs
Outdated
/// Attempts to load Actor Code CID from the blockstore and | ||
/// instantiate a wasmtime Module from the WASM bytecode if the | ||
/// given code CID is present, otherwise returns None. | ||
/// | ||
/// Implicitly caches instantiated modules. | ||
pub fn load_code_cid<BS: Blockstore>( |
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.
install_code
? We don't actually need to return it.
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.
SGTM. I'll move this part to a different patch and we can address there.
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.
LGTM, +1 on splitting this PR though (not the end of the world if it isnt though).
The extra feature has been moved to #711 and this PR is now strictly about the recover_secp_public_key syscall. |
Co-authored-by: karim <karim.dev@gmail.com>
…t#707) Co-authored-by: karim <karim.dev@gmail.com>
Supersedes #627 with a clean diff, refresh from master, and some small changes (check commit log).