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

SEP-23: Add strkey type for CAP-40 signed payload signers #1014

Merged
merged 9 commits into from
Apr 11, 2022
Merged

SEP-23: Add strkey type for CAP-40 signed payload signers #1014

merged 9 commits into from
Apr 11, 2022

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jul 24, 2021

What

Introduces a new strkey type to represent ed25519 signed payload signers introduced by CAP-40.

Why

CAP-40 introduces a new signer for disclosing transaction signatures in transactions. Some ecosystem services, such as Horizon, only refer to signers in string form. Stellar SDKs also use strings to pass around signers. A string form for the signer introduced by CAP-40 is required for these services.

The leading P prefix for the new strkey was chosen to indicate that the signer is a signed payload because the word payload begins with p.

The 4-byte length prefix is to ensure that a truncated signed payload that has a valid CRC is not considered valid.

The 4-byte length prefix and the payload zero padding to a multiple of 4 bytes makes the raw bytes encoded in the strkey identical to the signer key when XDR encoded, a property of existing strkeys, excluding muxed accounts that match their XDR encoding with fields reversed.

Close stellar-deprecated/starlight#191

Merging

This is intended for merging if CAP-40 is accepted.

@github-actions

This comment has been minimized.

Copy link
Contributor

@stanford-scs stanford-scs left a comment

Choose a reason for hiding this comment

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

This looks good except for the one nit I put in an annotation of the diff.

ecosystem/sep-0023.md Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

stanford-scs
stanford-scs previously approved these changes Oct 21, 2021
@github-actions
Copy link

This pull request is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@Shaptic
Copy link
Contributor

Shaptic commented Mar 9, 2022

@leighmcculloch Will this get merged soon? I'd like to start the relevant SDK work but don't want something to change in the middle of it.

@leighmcculloch leighmcculloch marked this pull request as ready for review March 9, 2022 01:13
@leighmcculloch
Copy link
Member Author

leighmcculloch commented Mar 9, 2022

@Shaptic This is unlikely to be merged until the core implementation is complete, otherwise we'll have no room to make breaking changes if necessary. For the same reason it would be ideal if one SDK and Horizon is near complete too.

However, I don't think this will change substantially as strkeys are opaque so any change is likely to require only tweaks in the SDK and not changes downstream to Horizon.

Also, at the moment the PR has only one approval. It would be great if @stellar/horizon-committers, and anyone else, could review also.

Shaptic
Shaptic previously approved these changes Mar 9, 2022
Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Some minor optional comments ⬇️, but LGTM as-is 👍

ecosystem/sep-0023.md Outdated Show resolved Hide resolved
ecosystem/sep-0023.md Show resolved Hide resolved
ecosystem/sep-0023.md Show resolved Hide resolved
ecosystem/sep-0023.md Outdated Show resolved Hide resolved
Shaptic
Shaptic previously approved these changes Mar 10, 2022
@Lippertt
Copy link

Lippertt commented Mar 11, 2022 via email

Copy link
Contributor

@stanford-scs stanford-scs 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.

@leighmcculloch
Copy link
Member Author

@Shaptic @sisuresh Are you okay with us merging this at this point? Merging is locking it in.

@leighmcculloch leighmcculloch merged commit 0943c19 into stellar:master Apr 11, 2022
@leighmcculloch leighmcculloch deleted the sep23payload branch April 11, 2022 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

sep: write a proposal for augmenting strkey to support CAP-40 signer
5 participants