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

Allow extended payment keys to be specified as a Plutus required signer. #3319

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

Jimbo4350
Copy link
Contributor

No description provided.

@catch-21
Copy link
Contributor

catch-21 commented Oct 28, 2021

Tested on testnet. Confirmed that it is possible to build with --required-signer using extended and normal signing keys before submitting (checked positive and negative cases).

Used this policy to test with (confirmed that key hash redeemer is required in transaction)

mkPolicy :: PubKeyHash -> ScriptContext -> Bool
mkPolicy pkh ctx = traceIfFalse "not signed by redeemer pubkeyhash" checkWitness
  where
    info :: TxInfo
    info  = scriptContextTxInfo ctx

    checkWitness :: Bool
    checkWitness  = txSignedBy info pkh

Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@nhenin
Copy link

nhenin commented Oct 28, 2021

Hi @Jimbo4350, my team and I discovered this restriction while trying to implement the vesting contract (from plutus-use-cases) via cardano-cli....as a quick hack I have made the following modifications : https://github.com/smart-chain-fr/cardano-node/pull/1/commits/3fd17aa7b285492b3f270c78f7b5a19174295d02 .I have seen you are casting into Hash PaymentKey instead of Hash PaymentExtendedKey with castVerificationKey , aren't they any consequences from doing it ?

@Jimbo4350
Copy link
Contributor Author

bors r+

@Jimbo4350
Copy link
Contributor Author

Hi @Jimbo4350, my team and I discovered this restriction while trying to implement the vesting contract (from plutus-use-cases) via cardano-cli....as a quick hack I have made the following modifications : smart-chain-fr@3fd17aa .I have seen you are casting into Hash PaymentKey instead of Hash PaymentExtendedKey with castVerificationKey , aren't they any consequences from doing it ?

There are no consequences from doing this as the public keys corresponding to PaymentKeys and PaymentExtendedKeys are the same

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 29, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 9dd31b3 into master Oct 29, 2021
@iohk-bors iohk-bors bot deleted the jordan/enable-extended-keys-in-required-signers branch October 29, 2021 15:58
mkoura added a commit to mkoura/cardano-node-tests that referenced this pull request Nov 5, 2021
mkoura added a commit to IntersectMBO/cardano-node-tests that referenced this pull request Nov 18, 2021
mkoura added a commit to IntersectMBO/cardano-node-tests that referenced this pull request Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants