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

Rust bindings are incompatible with EIP-2003 #318

Closed
axic opened this issue Jun 6, 2019 · 2 comments · Fixed by #350
Closed

Rust bindings are incompatible with EIP-2003 #318

axic opened this issue Jun 6, 2019 · 2 comments · Fixed by #350
Assignees

Comments

@axic
Copy link
Member

axic commented Jun 6, 2019

EIP-2003 states that code and (host) context is not mandatory for precompiles and can be null, but the Rust bindings assert for the presence of both.

@jakelang jakelang self-assigned this Jun 6, 2019
@chfast
Copy link
Member

chfast commented Jul 3, 2019

For code, we don't disallow null pointers. We can clarify that the pointer cannot be if the size is non-zero. You will be always allowed to pass empty code.

Context is actually two things:

  • the pointer to additional data Host wants to keep with given execution (the real context), this can always be empty,
  • the Host interface (vtable with methods).
    These two are going to be split in the next version of EVMC, but it still do not solve the problem entirely.

Anyway, I think this is fine for now while we don't have any EVMC precompiles.

@axic
Copy link
Member Author

axic commented Jul 3, 2019

It should be clarified in evmc.h because it doesn't say anything about these fields.

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 a pull request may close this issue.

3 participants