refactor: remove deprecated zklogin variants from public signature enums#1195
Open
Thoralf-M wants to merge 3 commits into
Open
refactor: remove deprecated zklogin variants from public signature enums#1195Thoralf-M wants to merge 3 commits into
Thoralf-M wants to merge 3 commits into
Conversation
Drop ZkLoginAuthenticatorDeprecated from the public UserSignature and SignatureScheme enums. Neither is serialized by variant index (UserSignature uses a custom flag-byte encoding, SignatureScheme uses an explicit #[repr(u8)]), so removing them does not shift any BCS discriminants and needs no serde-specific placeholder. The 0x05 flag is left documented as reserved. The index-locked placeholders on the private BinaryPublicKey / MemberSignature serde structs are kept, since removing those would shift the on-chain wire format. https://claude.ai/code/session_01GKkvevz4vSZike1ryqCQMz
Round-trip tests can't catch a shifted discriminant (encode and decode move together), so add hardcoded-value anchors: - signature_scheme_flag_values: pins every SignatureScheme flag byte and asserts the reserved 0x05 (zklogin) is rejected. - user_signature_rejects_zklogin_flag: a bare 0x05 flag must no longer decode. - member_signature_bcs_tags: pins the multisig MemberSignature tags, guarding the retained ZkLoginDeprecated placeholder that keeps Passkey at tag 0x04. https://claude.ai/code/session_01GKkvevz4vSZike1ryqCQMz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the deprecated
ZkLoginAuthenticatorDeprecatedvariant from the publicUserSignatureandSignatureSchemeenums (and the FFI mirror). Follow-up to #1076.Neither enum is serialized by variant index —
UserSignatureuses a custom flag-byte encoding,SignatureSchemean explicit#[repr(u8)]— so this changes no BCS bytes for any supported signature;0x05is now a reserved/rejected flag. The index-locked placeholders (BinaryPublicKey,MemberSignature,TransactionKind) are deliberately kept, since removing those would shift the on-chain wire format.Tests: added hardcoded-tag anchors (round-trips can't catch a discriminant shift):
signature_scheme_flag_valuespins every flag byte and that0x05is rejected;user_signature_rejects_zklogin_flag;member_signature_bcs_tagspins the multisig member tags (passkey = 0x04).https://claude.ai/code/session_01GKkvevz4vSZike1ryqCQMz