leo
leo copied to clipboard
[Bug] Make an attempt at checking for aborted transactions
🐛 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.
This also occurs with leo deploy as well. The methods I've found so far that cause this:
- User has invalid balance
- User passed in the
--base-feeoption with a value that doesn't cover the fees - User tries to deploy a program that already exists on the network
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.