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

Cannot de-register Plutus stake address #299

Closed
mkoura opened this issue Sep 20, 2023 · 5 comments
Closed

Cannot de-register Plutus stake address #299

mkoura opened this issue Sep 20, 2023 · 5 comments

Comments

@mkoura
Copy link
Contributor

mkoura commented Sep 20, 2023

Description

An attempt to de-register a Plutus stake address fails on submit with MissingRedeemers. The failure is the same for both PlutusV1 and PlutusV2.

Steps to Reproduce

  1. Register Plutus stake address
  2. Create stake address de-registration cert:

cardano-cli stake-address deregistration-certificate --stake-script-file cardano_node_tests/tests/data/plutus/v1/guess-42-stake.plutus --out-file test_register_deregister_ci0_yvi_True_v1_addr0_stake_dereg.cert

  1. Build a transaction:

cardano-cli transaction build --certificate-file test_register_deregister_ci0_yvi_True_v1_addr0_stake_dereg.cert --certificate-script-file cardano_node_tests/tests/data/plutus/v1/guess-42-stake.plutus --certificate-redeemer-file cardano_node_tests/tests/data/plutus/42.redeemer --withdrawal "stake_test17r6ju53vp4xdt9cyezpuxv8hsyf5chcqmq2jmvlv5wrqz4qj3pjl8+0" --withdrawal-script-file cardano_node_tests/tests/data/plutus/v1/guess-42-stake.plutus --withdrawal-redeemer-file cardano_node_tests/tests/data/plutus/42.redeemer --tx-in-collateral "b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#2" --tx-in-collateral "b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#1" --tx-in "b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#4" --change-address addr_test1yq52jqxevyqpx3m5cx2thmnlas07wv589zhqw0p69ljd3pl49efzcr2v6ktsfjyrcvc00qgnf30spkq49ke7eguxq92q3ur60v --witness-override 1 --out-file test_register_deregister_ci0_yvi_True_v1_dereg_withdraw_tx.body --babbage-era --testnet-magic 42

  1. Sign the transaction with payment key:

cardano-cli transaction sign --tx-body-file test_register_deregister_ci0_yvi_True_v1_dereg_withdraw_tx.body --testnet-magic 42 --signing-key-file test_register_deregister_ci0_zxr_pool_user.skey --out-file test_register_deregister_ci0_yvi_True_v1_reg_deleg_tx.signed

  1. Try to submit the transaction:

cardano-cli transaction submit --testnet-magic 42 --tx-file test_register_deregister_ci0_yvi_True_v1_reg_deleg_tx.signed --cardano-mode

  1. Observe the failure:

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (AlonzoInBabbageUtxowPredFailure (MissingRedeemers [(Certifying (ShelleyTxCertDelegCert (ShelleyUnRegCert (ScriptHashObj (ScriptHash "f52e522c0d4cd59704c883c330f781134c5f00d8152db3eca3860154")))),ScriptHash "f52e522c0d4cd59704c883c330f781134c5f00d8152db3eca3860154")])),UtxowFailure (UtxoFailure (AlonzoInBabbageUtxoPredFailure (UtxosFailure (CollectErrors [NoRedeemer (Certifying (ShelleyTxCertDelegCert (ShelleyUnRegCert (ScriptHashObj (ScriptHash "f52e522c0d4cd59704c883c330f781134c5f00d8152db3eca3860154")))))]))))])

Additional Context

OS: Fedora 37
cardano-cli: d634aaf
cardano-node: 9a0898636a4ea13f720dc3c6c8789b27beeb37c9

Files used for reproduction:
test_delegation_py.zip

@carbolymer
Copy link
Contributor

carbolymer commented Sep 21, 2023

Repro script when using mkfiles.hs in cardano-node to start a testnet and attached zip:

#!/bin/env bash
set -exuo pipefail

[ -n "$CARDANO_NODE_SOCKET_PATH" ] || (echo "missing CARDANO_NODE_SOCKET_PATH env variable" ; exit 1)
export CARDANO_NODE_NETWORK_ID=42

EXAMPLE_DIR=$(dirname "$(dirname "$CARDANO_NODE_SOCKET_PATH")" )
UTXO_DIR="$EXAMPLE_DIR/utxo-keys"

cli="$(cabal list-bin cardano-cli)"

$cli \
  address build \
  --payment-verification-key-file "$UTXO_DIR/utxo1.vkey" \
  --out-file payment.addr

ADDRESS=$($cli query utxo --address $(cat payment.addr) --out-file /dev/stdout | jq -r 'keys[0]')

$cli \
  stake-address deregistration-certificate \
  --stake-script-file guess-42-stake.plutus \
  --out-file test_register_deregister_ci0_yvi_True_v1_addr0_stake_dereg.cert

$cli \
  transaction build \
  --certificate-file test_register_deregister_ci0_yvi_True_v1_addr0_stake_dereg.cert \
  --certificate-script-file guess-42-stake.plutus \
  --certificate-redeemer-file 42.redeemer \
  --withdrawal "stake_test17r6ju53vp4xdt9cyezpuxv8hsyf5chcqmq2jmvlv5wrqz4qj3pjl8+0" \
  --withdrawal-script-file guess-42-stake.plutus \
  --withdrawal-redeemer-file 42.redeemer \
  --tx-in-collateral "$ADDRESS" \
  --tx-in-collateral "$ADDRESS" \
  --tx-in "$ADDRESS" \
  --change-address addr_test1yq52jqxevyqpx3m5cx2thmnlas07wv589zhqw0p69ljd3pl49efzcr2v6ktsfjyrcvc00qgnf30spkq49ke7eguxq92q3ur60v \
  --witness-override 1 \
  --out-file test_register_deregister_ci0_yvi_True_v1_dereg_withdraw_tx.body \
  --babbage-era

$cli \
  transaction sign \
  --tx-body-file test_register_deregister_ci0_yvi_True_v1_dereg_withdraw_tx.body \
  --signing-key-file test_register_deregister_ci0_zxr_pool_user.skey \
  --out-file test_register_deregister_ci0_yvi_True_v1_reg_deleg_tx.signed

$cli \
  transaction submit \
  --tx-file test_register_deregister_ci0_yvi_True_v1_reg_deleg_tx.signed \
  --cardano-mode

mkoura added a commit to IntersectMBO/cardano-node-tests that referenced this issue Sep 22, 2023
carbolymer added a commit that referenced this issue Sep 25, 2023
carbolymer added a commit to IntersectMBO/cardano-api that referenced this issue Sep 25, 2023
carbolymer added a commit to IntersectMBO/cardano-api that referenced this issue Sep 25, 2023
carbolymer added a commit that referenced this issue Sep 25, 2023
carbolymer added a commit to IntersectMBO/cardano-api that referenced this issue Sep 26, 2023
carbolymer added a commit to IntersectMBO/cardano-api that referenced this issue Sep 26, 2023
carbolymer added a commit to IntersectMBO/cardano-api that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 26, 2023
carbolymer added a commit that referenced this issue Sep 27, 2023
carbolymer added a commit that referenced this issue Sep 27, 2023
carbolymer added a commit that referenced this issue Sep 28, 2023
@github-actions
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 Oct 22, 2023
@carbolymer
Copy link
Contributor

I think this should be fixed now. @mkoura can this issue be closed?

@github-actions github-actions bot removed the Stale label Oct 24, 2023
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 Nov 23, 2023
@mkoura
Copy link
Contributor Author

mkoura commented Dec 9, 2023

Already fixed.

@mkoura mkoura closed this as completed Dec 9, 2023
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

2 participants