snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

[Bug] Integer operations panic on underflow/overflow in Aleo Instructions

Open ilitteri opened this issue 2 years ago • 1 comments

🐛 Bug Report

Integer operations panic on underflow/overflow in Aleo Instructions.

thread ‘main’ panicked at ‘Integer subtraction failed on: 0u64 and 1u64’, /Users/user/snarkVM/console/network/environment/src/environment.rs:62:9

Steps to Reproduce

Send a transfer transaction with a record with no gates for an amount greater than zero.

Expected Behavior

This error should be handled.

ilitteri avatar Oct 03 '22 18:10 ilitteri

This currently happens by design, as the halt function is an explicit panic.

CC https://github.com/AleoHQ/snarkVM/issues/1096.

ljedrz avatar Oct 04 '22 14:10 ljedrz