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

Split ArithmeticError into more granular errors #625

Merged
merged 11 commits into from
Nov 9, 2023

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Nov 7, 2023

Use ArithmeticError only for arithmetic operations, and introduce new errors like BalanceOverflow for others. Whenever an error is internally caused by a type conversion to usize, so that an overflowing value wouldn't map to a valid index anyway, return the missing item error instead.

@Dentosal Dentosal added breaking A breaking api change tech-debt fuel-asm Related to the `fuel-asm` crate. labels Nov 7, 2023
@Dentosal Dentosal self-assigned this Nov 7, 2023
Dentosal and others added 4 commits November 9, 2023 10:56
# Conflicts:
#	CHANGELOG.md
#	fuel-asm/src/panic_reason.rs
#	fuel-tx/src/transaction/validity/error.rs
#	fuel-vm/src/checked_transaction.rs
#	fuel-vm/src/checked_transaction/balances.rs
#	fuel-vm/src/interpreter.rs
#	fuel-vm/src/interpreter/balances.rs
@xgreenx xgreenx marked this pull request as ready for review November 9, 2023 15:24
@xgreenx xgreenx added this pull request to the merge queue Nov 9, 2023
Merged via the queue into master with commit 187b60d Nov 9, 2023
37 checks passed
@xgreenx xgreenx deleted the dento/overflow-rework branch November 9, 2023 15:36
@xgreenx xgreenx mentioned this pull request Nov 13, 2023
xgreenx added a commit to FuelLabs/fuel-core that referenced this pull request Nov 20, 2023
Closes #1414. Also does some
upgrades for latest `fuel-vm` version. Targets
FuelLabs/fuel-vm#625 currently, needs new
`fuel-vm` release after that is merged.


This also mostly reverts #1457
which was not working correctly, especially with regards to `call`
instruction.

---------

Co-authored-by: xgreenx <xgreenx9999@gmail.com>
crypto523 added a commit to crypto523/fuel-core that referenced this pull request Oct 7, 2024
Closes FuelLabs/fuel-core#1414. Also does some
upgrades for latest `fuel-vm` version. Targets
FuelLabs/fuel-vm#625 currently, needs new
`fuel-vm` release after that is merged.


This also mostly reverts FuelLabs/fuel-core#1457
which was not working correctly, especially with regards to `call`
instruction.

---------

Co-authored-by: xgreenx <xgreenx9999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change fuel-asm Related to the `fuel-asm` crate. tech-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants