leo icon indicating copy to clipboard operation
leo copied to clipboard

[Bug] Make an attempt at checking for aborted transactions

Open mikebenfield opened this issue 9 months ago • 2 comments

🐛 Bug Report

leo execute --broadcast won't report to the user if the transaction is aborted. This seems intractable to solve in general, but we could in many cases, perhaps by querying latest stateroot for account owner's credits.aleo balance to check the transaction against.

mikebenfield avatar Mar 13 '25 21:03 mikebenfield

This also occurs with leo deploy as well. The methods I've found so far that cause this:

  1. User has invalid balance
  2. User passed in the --base-fee option with a value that doesn't cover the fees
  3. User tries to deploy a program that already exists on the network

alexanderkim11 avatar Mar 13 '25 22:03 alexanderkim11

To solve this as far as logically possible:

  • [x] Check on-chain, surfacing "aborted/rejected/accepted" https://github.com/ProvableHQ/leo/pull/28597
  • [ ] Check locally, surfacing detailed errors.
    • [x] We can at least check if the user's public credits aleo balance is enough for the proposed fee. https://github.com/ProvableHQ/leo/issues/28683
    • [ ] We can load on-chain state, simulate finalize and check if it will pass.

vicsn avatar May 24 '25 09:05 vicsn