-
Notifications
You must be signed in to change notification settings - Fork 0
The Initiator Problem
In order to create or consume states on the ledger, we bundle them into transactions along with the commands that govern their evolution. These transaction need to be signed by at least the initiating node, and potentially by other counter-parties on the Corda network.
Sometimes we require transactional flows to be initiated by a particular participant of the transaction, but Corda doesn't implicitly provide a mechanism to determine who initiated the transaction; rather it will just ensure that the transaction has been sufficiently signed before finality.
SignedCommandData
provides an interface to be implemented into a contract command, adding a signature
property. When implemented correctly the contract would check that the signature has been signed by a specific participant (the initiator) of the transaction. In the flow this signature needs to be applied to the command and baked into the transaction before the transaction can be verified or any signatures can be collected.
This provides a guarantee that a particular participant initiated a transaction since they would have had to sign the transaction before collecting any counter-party signatures.