⌘K

Upgrade Purpose

Icon LinkUpgradePurposeType

enum UpgradePurposeType : uint8 {
    ConsensusParameters = 0,
    StateTransition = 1,
}
nametypedescription
typeUpgradePurposeType Type of upgrade purpose.
dataOne of ConsensusParameters , StateTransition Upgrade purposes.

Transaction is invalid if:

  • type is not valid UpgradePurposeType value`

Icon LinkConsensusParameters

nametypedescription
witnessIndexuint16Index of witness that contains a serialized(with postcard Icon Link) consensus parameters.
checksumbyte[32]The hash of the serialized consensus parameters.

Given helper deserialize_consensus_parameters() that deserializes the consensus parameters from a witness by using postcard Icon Link algorithm.

Transaction is invalid if:

  • witnessIndex >= tx.witnessesCount
  • checksum != sha256(tx.data.witnesses[witnessIndex])
  • deserialize_consensus_parameters(tx.data.witnesses[witnessIndex]) returns an error.

Icon LinkStateTransition

nametypedescription
bytecodeRootbyte[32]The root of the new bytecode of the state transition function.