Repository navigation
Typed Transaction Fee Payers for TxV1 #756
deanmlittle
started this conversation in
SIMD Discussions
Replies: 4 comments 7 replies
|
Am I correct in saying that currently, by reading the number of signer accounts at a fixed offset from the start of the transaction, I can calculate the offset of the signature block (since the transaction size is known), and that this will no longer be possible with the proposed changes? |
1 reply
|
this should just be v2 lol |
3 replies
|
also 64 kib is crazy and can't be done without other protocol changes. lets stick to 8kib plan |
2 replies
|
Spitballing here. Would it be a good idea to add a MigrateToScheme instruction to make it easier for typed signers to move from one scheme to another in case their scheme has been broken? Or do we think it's better that apps/tooling handle any kind of migration on their own? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
We propose extending TxV1 and the System Program to support alternative signature schemes at the transaction level, including post-quantum signatures, without changing Solana's Message structure, 32-byte address format or program ABI.
Motivation
While Solana programs can already efficiently verify post-quantum signatures (see Vector), every transaction still requires an Ed25519 fee payer. Vulnerable Ed25519 keys can be griefed in a variety of ways, such as having their balance drained, or being assigned to an invalid owner, bricking them.
Signature verification precompiles cannot solve the problem, as they cannot confer top-level signer privileges, are included in the message body of the transaction creating signature digest recursion, and lack the ability to authorize fee payments. To combat these issues, we propose decoupling Solana's account model from its signature scheme by introducing typed signers.
Proposal
Typed signer accounts
Extend the System Program with a
CreateTypedSignerinstruction that initializes an account containing the following immutable metadata:The account address is derived as follows:
Each signature scheme is assigned a reserved identifier that is used to derive a unique address for either key. This ensures that:
invoke_signed.The System Program must support initialization and lamport transfers for these accounts, and the runtime must recognize them as valid fee payers.
Transaction format
Assign bit 5 of
TransactionConfigMaskto enable typed signatures.When set, every entry in the
Signaturesarray is encoded as:The scheme prefix determines both the verification algorithm and signature length.
0x000x010x02Additional signature schemes can be introduced via feature gates.
No additional configuration values, length prefixes, public keys or bumps are required in the transaction.
Signature verification
For each signature, SigVerify reads the scheme prefix.
For Ed25519, the signer's address is used directly as the public key.
For other schemes, SigVerify:
Signer metadata is immutable and cryptographically bound to the account address, allowing validators to cache public keys without key-rotation invalidation.
Upon successful verification, typed signers are treated as ordinary signers by the runtime.
RPC and Indexing
Replace the current transaction signature with its message hash. This is already how transactions are keyed and deduplicated in the validator, and would simplify indexing whilst also making transactions signing scheme agnostic.
Transaction size
Post-quantum signatures are significantly larger than Ed25519 signatures.
We propose increasing the maximum TxV1 transaction size to 64 KiB in a companion SIMD, building upon SIMD-0742.
Implementation considerations
Backwards compatibility
Legacy, v0 and TxV1 transactions without the typed signature config bit remain unchanged.
Account addresses, account locking, PDAs, CPI and the program ABI remain unchanged. Programs relying on standard signer privileges require no modifications.
Open questions
All reactions