-
Notifications
You must be signed in to change notification settings - Fork 310
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
Simplify signatures of Host methods #154
Conversation
335da8b
to
40b0886
Compare
ABI stays v6? |
I think there are still some changes. I will compare later on wit v5.0.0. |
40b0886
to
4da1c68
Compare
Oh, you mean it should be v7? No, we bump it after the previous release if breaking changes are planned and it stays 6 until 6.0.0 is released. |
4da1c68
to
3eb7b05
Compare
* @return The storage value at the given storage key or null bytes | ||
* if the account does not exist. | ||
*/ | ||
typedef evmc_bytes32 (*evmc_get_storage_fn)(struct evmc_context* context, |
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.
I'm not sold this change makes sense.
I can agree with the account lookups, but storage is different.
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.
I partly agree, but also this case is exotic at the moment.
I can do the following for now:
- extract this commit to a separate PR for a reference (not to be merge soon),
- add a comment to
evmc_get_storage_fn
andevmc_set_storage_fn
that the account MUST exist.
/** | ||
* An attempt to modify storage of an non-existing account. | ||
*/ | ||
EVMC_STORAGE_NON_EXISTING_ACCOUNT = 5 |
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.
Same here.
This reverts most of the Host method changes introduced recently.
Should I also change evmc_get_block_hash_fn?
I tried the previous API in Aleth and it is very messy. Here is an example of trying to expose the information if an account exists when checking balance: ethereum/aleth#5261
This information is not useful in any of the use cases (no place where you would not to fold it to 0 balance).
Reverts #146, #140, #135.