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

Implemente eos-evm gas-fee (G_codedeposit and G_txnewaccount) #127

Merged
merged 9 commits into from
Mar 5, 2024

Conversation

elmato
Copy link
Contributor

@elmato elmato commented Feb 21, 2024

No description provided.

@elmato elmato changed the title [DONT MERGE] Implemente eos-evm gas-fee (G_codedeposit only) Implemente eos-evm gas-fee (G_codedeposit only) Feb 23, 2024
Copy link
Contributor

@yarkinwho yarkinwho left a comment

Choose a reason for hiding this comment

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

Seems fine, but one question: where should we put the gas_parameters struct?

I have a similar structure in silkworm as well, we should unify them if possible.

@elmato elmato changed the title Implemente eos-evm gas-fee (G_codedeposit only) Implemente eos-evm gas-fee (G_codedeposit and G_txnewaccount) Feb 27, 2024
Copy link
Contributor

@yarkinwho yarkinwho left a comment

Choose a reason for hiding this comment

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

Looks fine. remember to test the trace result later.

evm_version = _version.has_value() ? *_version : 0;
} else {
evm_version = eosevm::nonce_to_version(header.nonce);
if(protocol_rule_set == protocol::RuleSetType::kTrust) {
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be better to simply panic if anywhere calling this function while not using kTrust?

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 preserve the old behavior in order to pass the original tests


}

evmone::gas_parameters Execution::get_gas_params(const Block& block) const{
Copy link
Contributor

Choose a reason for hiding this comment

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

Will need tx as argument. and this is the reason why i want to put a cache in block so the config can come for free in some cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we have the tx passed as argument in the forward function. I will do that in the other PR

silkworm/core/execution/evm.cpp Outdated Show resolved Hide resolved
silkworm/core/execution/evm.cpp Outdated Show resolved Hide resolved
@elmato elmato merged commit f784e3d into master Mar 5, 2024
4 checks passed
@elmato elmato deleted the elmato/implement-eos-evm-gas-fee branch March 5, 2024 04:45
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.

Implement updated gas fee algorithm (evmone #4) Pass gas parameters into ExecutionState
2 participants