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

Governance actions silently stripped from transaction #1073

Open
mkoura opened this issue Feb 25, 2025 · 0 comments · May be fixed by IntersectMBO/cardano-api#765
Open

Governance actions silently stripped from transaction #1073

mkoura opened this issue Feb 25, 2025 · 0 comments · May be fixed by IntersectMBO/cardano-api#765

Comments

@mkoura
Copy link
Contributor

mkoura commented Feb 25, 2025

Description

Governance actions seem to be stripped from transactions built with transaction build command. There is no error when building the tx, the action is simply not present in the built tx.

The transaction build-raw command works as expected.

The last ok tests were with revision bb8b3b9. We first observed the issue in revision f614a51

Steps to Reproduce

  1. Build, sign and submit the tx
cardano-cli hash anchor-data  \
  --file-text cardano_node_tests/tests/data/governance_action_anchor.json

cardano-cli conway governance action create-info  \
  --testnet  \
  --governance-action-deposit 100000000  \
  --deposit-return-stake-verification-key-file test_info_ci0_azd_pool_user_addr_1_stake.vkey  \
  --anchor-url "https://tinyurl.com/cardano-qa-anchor"  \
  --anchor-data-hash f08cc9640136b1ae47428f646a9b5aadc0045fafb5529ca3ba1723784e6f0750  \
  --out-file test_info_ci0_jzm_info.action

cardano-cli conway transaction build  \
  --tx-in "49b7ff26d1d2243775ad766e486d791e7306b16cbb6ab196dfa0999560e8ce2d#0"  \
  --proposal-file test_info_ci0_jzm_info.action  \
  --change-address addr_test1qq7l94v0twmvw7lpd2wk5dpjr39pllwcu2qyl6dsqzeltqy5syj8jjh7ds8d90hzg262x279n2l0sg7kx2ymfwgzl07q6s0qy9  \
  --witness-override 1  \
  --out-file test_info_ci0_jzm_action_tx.body  \
  --testnet-magic 42

cardano-cli conway transaction sign  \
  --tx-body-file test_info_ci0_jzm_action_tx.body  \
  --testnet-magic 42  \
  --signing-key-file test_info_ci0_azd_pool_user_addr_1.skey  \
  --out-file test_info_ci0_jzm_action_tx.signed

cardano-cli conway transaction submit  \
  --testnet-magic 42  \
  --tx-file test_info_ci0_jzm_action_tx.signed
  1. Check that action deposit was not needed and that the action was not created.
  2. Check that the action is not present in the tx file
{
    "auxiliary scripts": null,
    "certificates": null,
    "collateral inputs": [],
    "currentTreasuryValue": null,
    "datums": [],
    "era": "Conway",
    "fee": "169681 Lovelace",
    "governance actions": [],
    "inputs": [
        "49b7ff26d1d2243775ad766e486d791e7306b16cbb6ab196dfa0999560e8ce2d#0"
    ],
    "metadata": null,
    "mint": null,
    "outputs": [
        {
            "address": "addr_test1qq7l94v0twmvw7lpd2wk5dpjr39pllwcu2qyl6dsqzeltqy5syj8jjh7ds8d90hzg262x279n2l0sg7kx2ymfwgzl07q6s0qy9",
            "address era": "Shelley",
            "amount": {
                "lovelace": 999249814
            },
            "network": "Testnet",
            "payment credential key hash": "3df2d58f5bb6c77be16a9d6a34321c4a1ffdd8e2804fe9b000b3f580",
            "reference script": null,
            "stake reference": {
                "stake credential key hash": "948124794afe6c0ed2bee242b4a32bc59abef823d63289b4b902fbfc"
            }
        }
    ],
    "redeemers": [],
    "reference inputs": [],
    "required signers (payment key hashes needed for scripts)": null,
    "return collateral": null,
    "scripts": [],
    "total collateral": null,
    "treasuryDonation": 0,
    "update proposal": null,
    "validity range": {
        "lower bound": null,
        "upper bound": null
    },
    "voters": {},
    "withdrawals": null,
    "witnesses": [
        {
            "key": "VKey (VerKeyEd25519DSIGN \"0c20e045104b14862597f1a4735cce61a4c31527e06b35e5383f7c1759957969\")",
            "signature": "SignedDSIGN (SigEd25519DSIGN \"1fccde6dde86bbd716c0082101f683622815a1bc2613d1470d1546b5811b256b4d29aba7a65c53d820bad7c3c739ae392330098edb6ec30c22628fc6e2ab2e08\")"
        }
    ]
}

The steps above are for the "Info" action, but the behavior is the same for all action types.

Additional Context

Tested with latest master of cardano-node and any cardano-cli revision >= f614a51

This is how the correct tx look like

{
    "auxiliary scripts": null,
    "certificates": null,
    "collateral inputs": [],
    "currentTreasuryValue": null,
    "datums": [],
    "era": "Conway",
    "fee": "175049 Lovelace",
    "governance actions": [
        {
            "anchor": {
                "dataHash": "f08cc9640136b1ae47428f646a9b5aadc0045fafb5529ca3ba1723784e6f0750",
                "url": "https://tinyurl.com/cardano-qa-anchor"
            },
            "deposit": 100000000,
            "governance action": {
                "tag": "InfoAction"
            },
            "return address": {
                "credential": {
                    "keyHash": "3ecd2515be468205ffba9bbf64505b5e12715ffaedaea95f679ff712"
                },
                "network": "Testnet"
            }
        }
    ],
    "inputs": [
        "6ffa36de5ecb6355ecada2cf6cec572f29fd285b350621103290412a1453ef11#0"
    ],
    "metadata": null,
    "mint": null,
    "outputs": [
        {
            "address": "addr_test1qzeswexjtdcxjtfdwek0yl4z2y30d5xgxn5pkvc3rc3xsfe7e5j3t0jxsgzllw5mhaj9qk67zfc4l7hd46547eul7ufquympu8",
            "address era": "Shelley",
            "amount": {
                "lovelace": 899244270
            },
            "network": "Testnet",
            "payment credential key hash": "b30764d25b70692d2d766cf27ea25122f6d0c834e81b33111e226827",
            "reference script": null,
            "stake reference": {
                "stake credential key hash": "3ecd2515be468205ffba9bbf64505b5e12715ffaedaea95f679ff712"
            }
        }
    ],
    "redeemers": [],
    "reference inputs": [],
    "required signers (payment key hashes needed for scripts)": null,
    "return collateral": null,
    "scripts": [],
    "total collateral": null,
    "treasuryDonation": 0,
    "update proposal": null,
    "validity range": {
        "lower bound": null,
        "upper bound": null
    },
    "voters": {},
    "withdrawals": null,
    "witnesses": [
        {
            "key": "VKey (VerKeyEd25519DSIGN \"03572c07cdfdef8394fbba33f5ec710156f2245f4dc98e13e8ccbfd6f282b94b\")",
            "signature": "SignedDSIGN (SigEd25519DSIGN \"dd3f14328c5e2976562b0016270d8a863e4405f5ae7abadac7dc90feb7367e7a0f337f7b596681227552798e4a6ee47e8504671f713e0d2c64c969b4500bc200\")"
        }
    ]
}

Files used in the test: issue_missing_gov_action.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants