Skip to content
Discussions/App Development/Interpretation of OK on the command completion streamForum ↗

Interpretation of OK on the command completion stream

App Development7 posts306 views1 likesLast activity Aug 2020
GE
georgOP
Aug 2020

In a distributed setup, does an OK response on the completion stream mean that the transaction has successfully committed to the network (ie. consensus has happened)? Or does it merely indicate that the command as been successfully validated on my node and has been submitted to the network for committing?

ST
stefanobaghino-da
Aug 2020

The latter, it means that the command has been validated and executed on the local participant node. A transaction is produced, sent to the ledger for the distributed commit and once the participant receives an update on its status the completion service will tell you the actual outcome.

GE
georg
Aug 2020

So I first get an OK upon successful submission and then again OK upon successful transaction commit? Or do they have different status? I thought only one success response is produced per submitted command.

ST
stefanobaghino-da
Aug 2020

You have a successful result coming back from the submission service and you can observe the successful commit on the completion service.

ST
stefanobaghino-da
Aug 2020

At least in the happy path, a successful submission of course does not imply a successful completion. :smiley:

GE
georg
Aug 2020

Ok I see. So as per my original question (I specifically ask about the completion stream), the answer is actual the former: an OK on the command completion means the transaction has been committed.

ST
stefanobaghino-da
Aug 2020

Exactly, that’s why I added the detail that to observe a successful commit you have to track the outcome of the command via the completion service.

← Back to Discussions