-
Notifications
You must be signed in to change notification settings - Fork 85
FVM specific EVM precompiles #792
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
Conversation
- changes randomness functions to take a raw i64 since this is userspace now - add precompiles: resolve_address, lookup_address, get_actor_code_cid, get_randomness(beacon/chain)
717414f
to
e307860
Compare
|
||
fn get_actor_code_cid<RT: Runtime>(rt: &RT, input: &[u8]) -> PrecompileResult { | ||
let id = EthAddress(input[..20].try_into().unwrap()).as_id(); | ||
if id.is_none() { |
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.
We should probably just resolve this address for the user.
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.
we are just grabbing the code CID, its easy enough to call the resolve_address
precompile
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #792 +/- ##
==========================================
- Coverage 87.50% 87.03% -0.47%
==========================================
Files 125 125
Lines 22649 22806 +157
==========================================
+ Hits 19818 19850 +32
- Misses 2831 2956 +125
|
…dresses, assert reserved bytes are zeroes
fixes filecoin-project/ref-fvm#947
context will be in its own PR