ACPs icon indicating copy to clipboard operation
ACPs copied to clipboard

[ACP-77] Message and transaction specification updates and regrouping

Open michaelkaplan13 opened this issue 5 months ago • 0 comments

This PR makes a number of relatively small tweaks to the ACP-77 messages and transaction specifications to help improve simplicity of implementation and UX. Thanks to @StephenButtolph for calling out many of the possible improvements as he's worked to provide an implementation of this ACP.

  • Updates the ConvertSubnetTx specification to only include a BLS proof-of-possession signature, which doesn't require its own type ID.
  • Renames ChangeOwner to RemainingBalanceOwner
  • Adds the RemainingBalanceOwner to the RegisterSubnetValidatorMessage to prevent possible griefing attacks where the deliverer of the message on the P-Chain can set their own value for this field. This field is removed from the RegisterSubnetValidatorTx.
  • Adds a codecID to the start of the SubnetConversionData to allow for standard serialization.
  • Replaces the convertSubnetTxID in SubnetConversionData with the SubnetID, and similarly redefines the validationID for validators added in a ConvertSubnetTx. The SubnetID is already a unique hash, so using the transaction ID was unnecessary.
  • Changes the signer in the RegisterSubnetValidatorTx to be just a BLS signature, since the BLS public key is already included in the Warp message within the transaction.
  • Moves weight to be the last field of the Warp messages, for consistency with other field orderings.
  • Removes the requirement of 5 AVAX for the initial balance of a Subnet validator, since it could be worked around by disabling the validator and then increasing its balance to a lesser amount. There are no initial balance requirements, a Subnet Validator could start with a balance of 0 and be immediately inactive.
  • Adds the disableOwner to the RegisterSubnetValidatorMessage. This owner is able to disable the validator directly on the P-Chain, rather than requiring an Ed25519 signature from the node ID. This helps improve UX and removes the requirement that 32-byte node IDs are used. Support for 32-byte node IDs can be added in a future upgrade, and the message formats specified here will not need modification since they use variable length node IDs.
  • Removes the duplicate SubnetValidatorWeightUpdateMessage serializations with different type IDs.
  • Assigns the typeIDs for the new Warp messages payloads to be sequential in the order that they are used for new Subnets.

The ACP document is also reorganized to group all of the Warp message payload serializations together in one section, and all of the new P-Chain transactions together in another. This is purely to help make the document easier to navigate as it has grown larger.

michaelkaplan13 avatar Oct 01 '24 20:10 michaelkaplan13