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

CIP-0021 | Conway update #687

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

janmazak
Copy link
Contributor

No description provided.

@rphair rphair changed the title CIP-0021 Conway update CIP-0021 | Conway update Dec 24, 2023
Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

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

@Ryun1 @Crypto2099 I know I said I wouldn't tag you over the holidays, but also I thought it would be better in the long run to get ahead of a merge conflict with #666 by promptly reviewing & merging either this one or that one.

@rphair rphair added the Category: Wallets Proposals belonging to the 'Wallets' category. label Dec 24, 2023
@rphair rphair requested review from Ryun1 and Crypto2099 December 24, 2023 18:38
Copy link
Collaborator

@Crypto2099 Crypto2099 left a comment

Choose a reason for hiding this comment

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

LGTM

@rphair
Copy link
Collaborator

rphair commented Jan 9, 2024

@janmazak we've updated the CIP document this is based on recently (according to new specs in #389)... can you rebase your changes on the newly merged document?

@janmazak
Copy link
Contributor Author

janmazak commented Jan 9, 2024

I've rebased it and made a couple of additional small changes, so please review it again to make sure I've not missed anything.

Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

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

@janmazak still looks good to me & matches the changes I recall from before I edited the code base.

I would be OK with merging this now whenever (#687 (comment)) but would also want @KtorZ to look it over first... maybe also with @Ryun1 double checking that key (or cert?) names and/or official descriptions aren't also about to change when #737 is merged (which should also be soon).

@rphair rphair requested a review from KtorZ January 9, 2024 19:18
@Ryun1
Copy link
Collaborator

Ryun1 commented Jan 9, 2024

Id vote to keep this PR open for a little longer, whilst the HWW implementations are being finished off.
Maybe wait until SanchoNet is feature complete?

I dont think there is a rush to merge it?

@Ryun1
Copy link
Collaborator

Ryun1 commented Mar 8, 2024

On the Conway parts, I think this addition is wholly complete.

Past that, I do have two suggestions;

  • With the app split on Ledger devices, it probably makes sense to list out the device specific restrictions here.
  • It might make sense to add a section for a light summary Changelog, using the new optional sections. This would just make it much easier to transverse the history of this document.

@rphair
Copy link
Collaborator

rphair commented Mar 11, 2024

@janmazak I would also be ready to merge this, between the CIP meetings or at the next meeting, once you can follow or refute @Ryun1's suggestions in #687 (comment).

* `stake_vote_deleg_cert`
* `stake_reg_deleg_cert`
* `vote_reg_deleg_cert`
* `stake_vote_reg_deleg_cert`

If a transaction contains a pool registration certificate, then it must not contain:
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we not add any protections like this around constitutional committee keys or DRep keys

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main reason for pool registration certificate restrictions is that pool owners are signing them with stake keys, which also sign other elements of the transaction (e.g. withdrawals and other certificates), and that's a security risk: the transactions are not created by them and so they might contain, from their viewpoint, third-party elements --- they can't easily distinguish whether a key hash used in a withdrawal belongs to them or not, and a HW wallet does not see the whole tx at once, so cannot warn them that the same stake key hash is used in several places.

With DRep or constitutional committee keys, only votes are signed, nothing else AFAIK.

Copy link
Contributor

@gitmachtl gitmachtl Apr 4, 2024

Choose a reason for hiding this comment

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

With DRep or constitutional committee keys, only votes are signed, nothing else AFAIK.

@janmazak @Ryun1
I have not tested this, but when you do a DRep deregistration, you could also sneak in a vote too. Not sure what the protocol is doing with that. Or the other way round, you just wanna vote, but a deregistration certificates gets sneaked in. So theses two things should not happen within one transaction imo.

Copy link
Collaborator

Choose a reason for hiding this comment

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

DRep keys are used for votes, registration certs, update certs and resignation certs.

CC Hot keys are only used for voting.
CC Cold keys are used for authorising hot cert and resign cert.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Ryun1 do you think its worth to check if there is a vote together with a cert in the transaction?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gitmachtl

to follow the precedent of how stake key signing is handled, yes it makes sense for the check.

But practically speaking, I don't think this is a significant issue, so IMO it is probably fine.
It is quite easy for a DRep to re-register.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Ryun1 i was more thinking in a way that if online services provide the feature to easy register as a DRep, if they could sneak in a vote for there proposal f.e. and the user would not see that directly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes this would be easy to do over a dApp.
but of course on the hardware wallet device it still shows the vote to the user, at signing time.

@janmazak
Copy link
Contributor Author

janmazak commented Apr 3, 2024

I've added commit a52b1ea as you suggested @Ryun1 . (I'll let a colleague check it, don't merge it yet.)

I know nothing about "new optional sections" you mentioned, so no changelog for now.

@rphair
Copy link
Collaborator

rphair commented Apr 21, 2024

@janmazak just following up on this for my last month's reports. @Ryun1 are you OK with this now & does a52b1ea cover your most recent recommendations?

@rphair rphair requested a review from Ryun1 April 21, 2024 17:48
Copy link
Collaborator

@Ryun1 Ryun1 left a comment

Choose a reason for hiding this comment

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

Very detailed update, looking great.

@Ryun1 Ryun1 merged commit 1c4adda into cardano-foundation:master Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Wallets Proposals belonging to the 'Wallets' category.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants