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

A contract invocation that fails with a trap or error results in a successful operation / transaction result #522

Closed
leighmcculloch opened this issue Oct 4, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@leighmcculloch
Copy link
Member

Something that @paulbellamy noticed while testing against stellar-core is that when a invocation fails with an error, the operation and transaction result are success.

This is unintuitive. It's very easy to write tools and applications that think everything worked as expected.

cc @graydon

@leighmcculloch leighmcculloch added the bug Something isn't working label Oct 4, 2022
@graydon graydon self-assigned this Feb 9, 2023
@anupsdf
Copy link
Contributor

anupsdf commented Jun 22, 2023

Setting target milestone to Testnet Phase 1 after discussing with @graydon

@graydon
Copy link
Contributor

graydon commented Jul 18, 2023

@paulbellamy the error-propagation path in core has changed quite a bit since this was filed, and I'm not 100% sure if it's been fixed or not. Can you elaborate a bit here? Like, specifically, what you mean by "invocation fails". Do you mean when a contract successfully returns a value that happens to be a Rust Val::Error / XDR SCError? Or do you mean like if the host fails execution due to running out of gas or an illegal operation or something like that?

graydon added a commit to graydon/stellar-core that referenced this issue Aug 4, 2023
latobarita added a commit to stellar/stellar-core that referenced this issue Aug 4, 2023
…s-fail-transaction

Confirm soroban errors fail ops and txs, fix stellar/rs-soroban-env#522

Reviewed-by: sisuresh
@graydon
Copy link
Contributor

graydon commented Aug 4, 2023

I've made some end-to-end tests that "returning Val::Error causes the transaction to fail" and it all looks like it works, so I think this was solved some time ago. Please reopen if you see anything fishy here in the future.

@graydon graydon closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants