rs-soroban-env
rs-soroban-env copied to clipboard
function trapped tx result when footprint is insufficient
What version are you using?
v20.0.0-rc.2.1
What did you do?
Invoked a transaction with insufficient footprint.
What did you expect to see?
An error indicating that the resources were exceeded.
What did you see instead?
"function trapped" error.
Discussion
Bundling footprints in with "function trapped" is pretty ambiguous. We return specific resource related errors when other resources are exceeded.
Fixed in https://github.com/stellar/rs-soroban-env/pull/1112
Does #1112 fix this for all insufficient footprints? or just nonce footprint? This issue is intended to be more general than the nonce case.
Does https://github.com/stellar/rs-soroban-env/pull/1112 fix this for all insufficient footprints? or just nonce footprint? This issue is intended to be more general than the nonce case.
It fixes only the nonce case because other cases have been decorated before that. Nonce case was just missed during the initial round of fixes.
Reopening the issue then because this issue is not about the nonce case not generating a diagnostic event. Rather, it's about how in general insufficient footprint errors are communicated to the user as a "function trapped" rather than a "exceeds resources" or "exceeds footprint".
The footprint errors do have the corresponding diagnostic events. I'm not sure we have time/need to change the error code to resource limit exceeded - it doesn't seem like it would significantly more information and it won't be distinguishable from CPU/mem exceeded errors without diagnostics (at which point you don't care what's the top-level error code is).