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 find PubKeyHash in txInfoSignatories #3910

Closed
tdiesler opened this issue Sep 13, 2021 · 7 comments
Closed

Cannot find PubKeyHash in txInfoSignatories #3910

tdiesler opened this issue Sep 13, 2021 · 7 comments
Labels

Comments

@tdiesler
Copy link

Area

[] Plutus Foundation Related to the GHC plugin, Haskell-to-Plutus compiler, on-chain code

Summary

This snipit ...

image

fails with the usual

Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.

The Tx is signed with .../acc1/payment.skey

Generally, I don't know how to debug this. Is there an issue that I can track for basic validation logging? I feel that I'm totally in the dark with these kind of issues. The same code used to work in the emulator during the pioneer program.

Related to: input-output-hk/Alonzo-testnet#66

@tdiesler
Copy link
Author

I found a workaround like this ...

image

It seems that the signatories are not the same as the PKHs derived from the input addresses.

@catch-21
Copy link
Contributor

Hi @tdiesler, this issue concerns the node-cli.
You need to include "required signatories" in the transaction, not just an actual witness. Please note, this is not supported in 1.29. IntersectMBO/cardano-node#3123 introduces --required-signer cli option to do this.

@tdiesler
Copy link
Author

@james-iohk merci. May I ask why we need that extra option, isn't it redundant to the list of witnesses?

@catch-21
Copy link
Contributor

@tdiesler From my understanding it allows the script to still validate even if witnesses are stripped from the transaction. It allows transaction build cmd to validate before the transaction is signed too. There may be other reasons.

@tdiesler
Copy link
Author

Of course - thanks

@hasufell
Copy link

hasufell commented Sep 30, 2021

I found a workaround like this ...

What is getInputAddresses? This function doesn't exist anywhere.


Edit: something like this it seems

getInputAddresses (ScriptContext { scriptContextTxInfo = TxInfo { txInfoInputs } }) = fmap (txOutAddress . txInInfoResolved) txInfoInputs

@tdiesler
Copy link
Author

tdiesler commented Oct 1, 2021

I use this

image

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

No branches or pull requests

3 participants