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

[Bug]: server/v2/stf always returns TxResult.Code = 0 #21881

Closed
1 task done
kocubinski opened this issue Sep 24, 2024 · 1 comment · Fixed by #21539
Closed
1 task done

[Bug]: server/v2/stf always returns TxResult.Code = 0 #21881

kocubinski opened this issue Sep 24, 2024 · 1 comment · Fixed by #21539
Labels
C:server/v2 Issues related to server/v2 T:Bug

Comments

@kocubinski
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

This was surfaced while adapting integration tests for server/v2. STF.deliverTx always returns TxResult.Code as the default value (0) regardless of transactions execution status. Relevant code snippet below.

execResp, execGas, execEvents, err := s.execTx(ctx, state, gasLimit-validateGas, tx, execMode, hi)
return server.TxResult{
Events: append(validationEvents, execEvents...),
GasUsed: execGas + validateGas,
GasWanted: gasLimit,
Resp: execResp,
Error: err,
}

Cosmos SDK Version

main

How to reproduce?

run a failing transaction, the result should be non zero and contain the correct error code as defined in cosmossdk.io/error

@julienrbrt
Copy link
Member

As just discussed in our runtime sync, we'll remove Code from TxResult, as the consensus is filling it (by parsing the abci error from the error being returned)

@julienrbrt julienrbrt moved this from 📋 Backlog to 👀 Waiting / In review in Cosmos-SDK Sep 24, 2024
@julienrbrt julienrbrt added the C:server/v2 Issues related to server/v2 label Sep 26, 2024
@github-project-automation github-project-automation bot moved this from 👀 Waiting / In review to 🥳 Done in Cosmos-SDK Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:server/v2 Issues related to server/v2 T:Bug
Projects
Status: 🥳 Done
2 participants