State Updates and State Transitions

State Update

State updates are generated and sequenced (via the Ledger Engine) and signed by the Participating Interface, and then broadcast to the network of SDPs. Every message included in the Merkle tree reported by an SDP takes this form.

  • uint8 typeIdentifier

    • Specifies the kind of State Update type this block of data serializes into

      • 0x00 DepositAcknowledgement

      • 0x01 Trade

      • 0x02 SettlementAcknowledgement

      • 0x03 SettingsAcknowledgement

  • uint256 id

    • sequential identifier of the message in the participating interface's ledger

  • address participatingInterface

    • Address of the participating interface for which the message applies

  • bytes structData

    • Data that deserializes to the struct specified by the typeIdentifier

  • bytes32 previousUpdateHash

    • Hash of the previous signed state update

  • Signature sig

    • Signature of everything above, signed by the Participating Interface trade signing key

State Update Types

DepositAcknowledgement

Trade

SettlementAcknowledgement

SettingsAcknowledgement

State Transition

State transitions are either received by the PI through the Indexer, or generated by the PI from its order-matching engine. They are then processed via the Ledger Engine into a State Update. When SDPs receive the broadcasted State Update, they run it through their own instance of the Ledger Engine in order to verify that the proposed State Update was correctly generated from the State Transition.

State Transition Types

DepositParams

TradeParams

SettlementRequestParams

SettingsParams

Last updated