Skip to content

chore(cli): update exception mapper for nimbus-el #1522

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spencer-tb
Copy link
Contributor

@spencer-tb spencer-tb commented May 1, 2025

🗒️ Description

Updates the exception mapper for nimbus-el.

WIP - still needs some fixes on the nimbus-el side, as a lot of the exceptions return the same "zero gasUsed but transactions present" string.

🔗 Related Issues

N/A

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.

@spencer-tb spencer-tb added type:chore Type: Chore fork:prague Prague hardfork scope:cli Scope: Changes to `ethereum_clis` labels May 1, 2025
TransactionException.TYPE_4_TX_CONTRACT_CREATION: (
"set code transaction must not be a create transaction"
# TODO: these need to be fixed / incorrectly mapped
TransactionException.INSUFFICIENT_MAX_FEE_PER_GAS: (
Copy link
Contributor

@winsvega winsvega May 5, 2025

Choose a reason for hiding this comment

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

if the exception string is different to the exception meaning. we can create another exception code for nimbus, and then in the test add this to the list of possible exceptions

TransactionException.INSUFFICIENT_MAX_FEE_PER_GAS| TransactionException.ZERO_GAS_USED

but only if the exception logic by nimbus is correct

),
TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS: (
"max fee per blob gas less than block blob gas fee"
"zero gasUsed but transactions present"
Copy link
Contributor

Choose a reason for hiding this comment

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

there must be a validation for the map that does not allow to have 2 different exception codes with the same exception string/pattern. otherwise we can invent redundant exception codes and forget.

mapping_regex: ClassVar[Dict[ExceptionBase, str]] = {
TransactionException.INSUFFICIENT_ACCOUNT_FUNDS: (
r"(invalid tx: not enough cash to send)|"
r"(zero gasUsed but transactions present)" # TODO: Needs fix.
Copy link
Contributor

@winsvega winsvega May 5, 2025

Choose a reason for hiding this comment

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

why on so many codes it falls to this error string?
perhaps nimbus shall improve their exceptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fork:prague Prague hardfork scope:cli Scope: Changes to `ethereum_clis` type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants