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

Use single certificate for delegation + registration #1608

Closed
mesudip opened this issue Jul 24, 2024 · 2 comments
Closed

Use single certificate for delegation + registration #1608

mesudip opened this issue Jul 24, 2024 · 2 comments
Assignees
Labels
🖥 Frontend Frontend related

Comments

@mesudip
Copy link
Contributor

mesudip commented Jul 24, 2024

Why

  • To make delegation transaction a little smaller
  • Stake registration certificate (0) is deprecated in conway era

What

When Stake Address is not registered, We are currently creating transaction with 2 certificates (registration, delegation). But this can be done in single certificate in conway era. Furthermore, the used certificate-type (0) is deprecated.

How

Example (cert list in decoded-tx) (Current implementation)

[
    [
        0, // stake-registration cert ; Deprecated in Conway Era
        [
            0, "992D25F1234F161763F5FAAEEA857BAF06DE242547BDE90895019CDE"
        ]
    ],
    [
        9, // vote_deleg_cert
        [
            0, "992D25F1234F161763F5FAAEEA857BAF06DE242547BDE90895019CDE"
        ],
        [
            0, "001021A9B538F693F5293B9AD77E9FD2FEBE5ECD66CF8BB2844B4A8D"
        ]
    ]
]

Suggested change (certs in decoded tx)

[
    [
        12, // vote_reg_deleg_cert
        [
            0, "992D25F1234F161763F5FAAEEA857BAF06DE242547BDE90895019CDE"
        ],
        [
            0, "001021A9B538F693F5293B9AD77E9FD2FEBE5ECD66CF8BB2844B4A8D"
        ],
        2000000 // deposit amount
    ]
]

NB Refer to corresponding certificate builder in cardano-serialization-lib to create the registration_delegation_cert

@mesudip mesudip added the 🖥 Frontend Frontend related label Jul 24, 2024
@mesudip mesudip changed the title Use registration_delegation_cert instead of 2 individual cretificates when delegating to drep Use registration_delegation_cert for delegation Jul 24, 2024
@mesudip mesudip changed the title Use registration_delegation_cert for delegation Use single certificate for delegation + registration Jul 24, 2024
@Ryun1
Copy link
Member

Ryun1 commented Jul 24, 2024

@mesudip

I agree with the motivation and rationale here - great catch!
But unfortunately hardware wallets have not supported these "combination" certificates (see CIP-21 Certificates)
So by using them we could break the user flow for HWWs

Stake registration certificate (0) is deprecated in conway era

*depreciated in the era after conway
Maybe we should just move to use the new Conway reg_cert?

@Ryun1
Copy link
Member

Ryun1 commented Jul 30, 2024

we can close for now

@Ryun1 Ryun1 closed this as completed Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 Frontend Frontend related
Projects
Status: Done
Development

No branches or pull requests

3 participants