feat: multisig support with partial signing for P-Chain operations#21
Open
owenwahlgren wants to merge 3 commits intomainfrom
Open
feat: multisig support with partial signing for P-Chain operations#21owenwahlgren wants to merge 3 commits intomainfrom
owenwahlgren wants to merge 3 commits intomainfrom
Conversation
Add support for multi-address ownership and threshold-based signing on P-Chain transactions, enabling multisig workflows where transactions can be built, partially signed by different key holders, and then submitted. New package pkg/multisig/: - TxFile JSON format for exchanging partially-signed transactions - ReadTxFile/WriteTxFile for file I/O - NewOutputOwners for creating multisig owners with threshold - IsFullySigned/CredentialSignatureStatus for tracking signature progress - ParseAddresses for parsing comma-separated P-Chain addresses New CLI commands (platform tx): - tx sign: add signatures to a tx file using available keys - tx commit: submit a fully-signed tx file to the network - tx inspect: display tx file details and signature status Updated commands with multisig flags: - subnet create: --owners, --threshold, --output-tx - subnet transfer-ownership: --owners, --threshold, --output-tx - validator add: --reward-addresses, --reward-threshold - validator delegate: --reward-addresses, --reward-threshold Updated pkg/pchain config structs with optional RewardOwner field that overrides single RewardAddr when set (backward compatible).
…flow Three new E2E tests (require network, gated behind networke2e build tag): - TestCreateSubnetWithMultisigOwner: creates subnet with 1-of-1 multisig owner - TestMultisigPartialSignFlow: build unsigned tx → file → read → verify → submit - TestMultisigTransferSubnetOwnership: create subnet then transfer to multisig
GetSubnetOwners doesn't exist on this SDK version. Use GetSubnet which returns threshold and controlKeys. All 3 multisig E2E tests verified passing on Fuji testnet.
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.
Summary
pkg/multisigpackage with JSON-based tx file format for exchanging partially-signed transactions between signersplatform tx sign|commit|inspectCLI commands for the signing workflow--owners,--threshold,--output-txflags on subnet commands--reward-addresses,--reward-thresholdflags on validator/delegator commandsWorkflow Example
Architecture
pkg/multisig/— tx file format, partial signing helpers, OutputOwners buildercmd/tx.go— sign, commit, inspect subcommandspkg/pchain/— config structs now accept optionalRewardOwner *secp256k1fx.OutputOwners(backward compatible)Test plan
go vet ./...passesstaticcheck ./...passespkg/multisigtests pass (OutputOwners creation, TxFile round-trip, signature status, address parsing)