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

[FR] - Reject non-key-locked collateral inputs #3112

Closed
JaredCorduan opened this issue Aug 21, 2021 · 2 comments · Fixed by #3151
Closed

[FR] - Reject non-key-locked collateral inputs #3112

JaredCorduan opened this issue Aug 21, 2021 · 2 comments · Fixed by #3151
Labels
API&CLI-Backlog enhancement New feature or request

Comments

@JaredCorduan
Copy link
Contributor

Internal/External
Internal

Area
Alonzo

Describe the feature you'd like
It would be helpful if the transaction build command on the CLI rejected using collateral inputs which are not key locked. The ledger rejects them.

In order to do this, we will need to lookup the collateral inputs in the UTxO, and inspect the addresses. If the cardano-api doesn't already have a function for determining if an address is key-locked, we can use this one:

https://github.com/input-output-hk/cardano-ledger-specs/blob/91e1c199c31ad3d93e4ac4715b3e7bb8526e97cd/alonzo/impl/src/Cardano/Ledger/Alonzo/Rules/Utxo.hs#L224-L227

@JaredCorduan JaredCorduan added the enhancement New feature or request label Aug 21, 2021
@Jimbo4350
Copy link
Contributor

Related #3018

@catch-21
Copy link
Contributor

catch-21 commented Sep 2, 2021

Proven that #3151 fixes this by throwing error like:
Command failed: transaction build Error: Expected key witnessed tx inputs but got script witnessed tx inputs: 49e462b220ddfe932447c32fd75f47d57b5e4392e37d13b3b8e2b3fe030b4ac5#1

@catch-21 catch-21 linked a pull request Sep 2, 2021 that will close this issue
iohk-bors bot added a commit that referenced this issue Sep 2, 2021
3151: Update build cmd to check tx inputs r=Jimbo4350 a=Jimbo4350

Solves #2996 and #3112

Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
iohk-bors bot added a commit that referenced this issue Sep 2, 2021
3151: Update build cmd to check tx inputs r=Jimbo4350 a=Jimbo4350

Solves #2996 and #3112

Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
@iohk-bors iohk-bors bot closed this as completed in #3151 Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API&CLI-Backlog enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants