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

Remove total gas fee validation check in evm block construction #2273

Closed
sieniven opened this issue Aug 2, 2023 · 0 comments · Fixed by #2383
Closed

Remove total gas fee validation check in evm block construction #2273

sieniven opened this issue Aug 2, 2023 · 0 comments · Fixed by #2383

Comments

@sieniven
Copy link
Contributor

sieniven commented Aug 2, 2023

Summary

  • Total gas fees check in finalize_block should be removed, since evm transactions in the txqueue are allowed to fail or return early.
  • Tracking of the total gas fees inside the txqueue should also be removed, since this validation check should not be necessary.

ain/lib/ain-evm/src/evm.rs

Lines 343 to 356 in 54e8bc0

match self.core.tx_queues.get_total_fees(queue_id) {
Some(total_fees) => {
if (total_burnt_fees + total_priority_fees) != total_fees {
return Err(anyhow!("EVM block rejected because block total fees != (burnt fees + priority fees). Burnt fees: {}, priority fees: {}, total fees: {}", total_burnt_fees, total_priority_fees, total_fees).into());
}
}
None => {
return Err(anyhow!(
"EVM block rejected because failed to get total fees from queue_id: {}",
queue_id
)
.into())
}
}

@sieniven sieniven linked a pull request Aug 25, 2023 that will close this issue
9 tasks
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.

1 participant