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

Add missing functionality for the gas-fee algorithm #131

Merged
merged 14 commits into from
Mar 20, 2024

Conversation

elmato
Copy link
Contributor

@elmato elmato commented Mar 13, 2024

No description provided.

@elmato elmato requested a review from yarkinwho March 13, 2024 21:11
silkworm/node/db/access_layer.cpp Outdated Show resolved Hide resolved
@elmato elmato requested a review from yarkinwho March 19, 2024 00:01
@@ -259,7 +257,7 @@ evmc::Result EVM::call(const evmc_message& message) noexcept {
} else {

evmc_message revisted_message{message};
if(eos_evm_version_ > 0 && revisted_message.depth == 0 && recipient_is_dead) {
if(eos_evm_version_ > 0 && revisted_message.depth == 0 && !is_zero(evmc::bytes32{revisted_message.value}) && !recipient_exists) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems will cause a functionality change if recipient is precompiled or reserved address?
What's the reason behind this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wanted to be consistent with what the CALL instruction is doing when trying to check if the account exists.
The instruction implementation its just calling the host function account_exists on the destination address, so we are doing the same when processing the call message coming from a transaction.

silkworm/core/protocol/base_rule_set.cpp Show resolved Hide resolved
silkworm/silkrpc/core/evm_executor_test.cpp Outdated Show resolved Hide resolved
@elmato elmato merged commit d3e6ead into master Mar 20, 2024
5 checks passed
@elmato elmato deleted the elmato/implement-eos-evm-gas-fee branch March 20, 2024 01:29
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 this pull request may close these issues.

2 participants