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

Unable to withdraw rewards. "Illegal Value in TxOut" #965

Open
vshybalov opened this issue Nov 11, 2024 · 6 comments
Open

Unable to withdraw rewards. "Illegal Value in TxOut" #965

vshybalov opened this issue Nov 11, 2024 · 6 comments

Comments

@vshybalov
Copy link

Description

I am unable to create transaction with cardano-cli 9.4.1.0, 10.1.1.0 to withdraw rewards. The last working version was cardano-cli 9.2.1.0.

Steps to Reproduce

The amount in variable below is 2276043199 without any negative symbols.

cardano-cli conway transaction build --mainnet --witness-override 2 --tx-in ${TXIN} --withdrawal "${STAKE_ADDRESS}+${REWARDS_AMOUNT}" --tx-out "${DSTADDRESS}+${REWARDS_AMOUNT}" --change-address ${ADDRESS} --out-file tx.raw

cardano-cli: Illegal Value in TxOut: MaryValue (Coin (-1272733348)) (MultiAsset (fromList []))
CallStack (from HasCallStack):
  error, called at src/Cardano/Ledger/Babbage/TxOut.hs:401:25 in cardano-ledger-babbage-1.9.0.0-Ek1rsoJwqvmCy8NgTgKsxr:Cardano.Ledger.Babbage.TxOut
  mkTxOut, called at src/Cardano/Ledger/Babbage/TxOut.hs:372:44 in cardano-ledger-babbage-1.9.0.0-Ek1rsoJwqvmCy8NgTgKsxr:Cardano.Ledger.Babbage.TxOut
  BabbageTxOut, called at src/Cardano/Ledger/Conway/TxOut.hs:40:26 in cardano-ledger-conway-1.16.2.0-4XQSafjZx8OK5CVEBZ7pWD:Cardano.Ledger.Conway.TxOut
  mkBasicTxOut, called at internal/Cardano/Api/Tx/Body.hs:3084:13 in cardano-api-9.3.0.0-C0QPA7dowbsCao5S5QVkzf-internal:Cardano.Api.Tx.Body
  toShelleyTxOutAny, called at internal/Cardano/Api/Tx/Body.hs:2339:41 in cardano-api-9.3.0.0-C0QPA7dowbsCao5S5QVkzf-internal:Cardano.Api.Tx.Body

Additional Context

There were no issues, before the new versions of cli, in terms of rewards claiming, nothing changed on our end.

Possible Solution

@carbolymer
Copy link
Contributor

It's not quite obvious where did the value (Coin (-1272733348)) come from. Could you provide full reproduction command with concrete values and addresses instead of shell variables?

@vshybalov
Copy link
Author

Hello @carbolymer

Please see below the latest attempt with all the values unhidden.

cardano-cli version 
cardano-cli 10.1.1.0 - linux-x86_64 - ghc-8.10
git rev 01bda2e2cb0a70cd95067d696dbb44665f1d680a

cardano-cli conway transaction build --mainnet --witness-override 2 --tx-in da8795bba4f4549b7987aac5ae240f941d2ebb93fa15eb288987851ef73b241e#1 --withdrawal stake1uxc2mze08jpandr4552xscp4vs2spe5uqeyt8jyjq3ynydcu0l6c2+2695208894 --tx-out Ae2tdPwUPEYzuiAjQwyVoweSXt9KzX3jxw4vPpCTv3Bi7o134EdPdNsbiaW+2695208894 --change-address addr1qyc9q2juznjj52hujclkt37xt99nt9p3zcys9wwkf6mlp89s4k9j70yrmx68tfg5dpsr2eq4qrnfcpjgk0yfypzfxgms22rwuh --out-file tx.raw

cardano-cli: Illegal Value in TxOut: MaryValue (Coin (-1694702387)) (MultiAsset (fromList []))
CallStack (from HasCallStack):
  error, called at src/Cardano/Ledger/Babbage/TxOut.hs:401:25 in cardano-ledger-babbage-1.10.0.0-oRnre4HZULFAKhFSl9oK6:Cardano.Ledger.Babbage.TxOut
  mkTxOut, called at src/Cardano/Ledger/Babbage/TxOut.hs:372:44 in cardano-ledger-babbage-1.10.0.0-oRnre4HZULFAKhFSl9oK6:Cardano.Ledger.Babbage.TxOut
  BabbageTxOut, called at src/Cardano/Ledger/Conway/TxOut.hs:40:26 in cardano-ledger-conway-1.17.2.0-DjShi1w51BjCHAy5SUbvk1:Cardano.Ledger.Conway.TxOut
  mkBasicTxOut, called at internal/Cardano/Api/Tx/Body.hs:3148:13 in cardano-api-10.1.0.0-Gk2qtfoAiA71gJjiX7o8yh-internal:Cardano.Api.Tx.Body
  toShelleyTxOutAny, called at internal/Cardano/Api/Tx/Body.hs:2400:41 in cardano-api-10.1.0.0-Gk2qtfoAiA71gJjiX7o8yh-internal:Cardano.Api.Tx.Body

@carbolymer
Copy link
Contributor

carbolymer commented Nov 13, 2024

@carbolymer carbolymer assigned smelc and unassigned carbolymer Nov 13, 2024
@vshybalov
Copy link
Author

@carbolymer

The only difference with the #904 issue, is that there -1 value in the arguments. However in my case there is no negative values, so it is interesting where cli take that negative number from.

@carbolymer
Copy link
Contributor

carbolymer commented Nov 14, 2024

@vshybalov Ah right, good catch. Yes indeed it looks different. Most likely related to autobalancing.

@carbolymer carbolymer assigned carbolymer and unassigned smelc Nov 14, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants