5.4.5 Local Steps
On this page:
5.4.5.1 Statements
5.4.5.2 Expressions
5.4.5.2.1 this
5.4.5.2.2 interact
interact
5.4.5.2.3 assume
assume
5.4.5.2.4 fail
fail
5.4.5.2.5 declassify
declassify
5.4.5.2.6 make  Commitment
make  Commitment
5.4.5.2.7 did  Publish
did  Publish
0.1.5
5.4.5 Local Steps

A Reach local step occurs in the body of only or each statements. It represents the actions taken by a single participant in an application.

5.4.5.1 Statements

Any statements valid for a computation are valid for a local step.

5.4.5.2 Expressions

Any expressions valid for a computation are valid for a local step. However, some additional expressions are allowed.

5.4.5.2.1 this

Inside of a local step, this refers to the participant performing the step. This is useful when the local step was initiated by an each expression.

5.4.5.2.2 interact

interact.amount
interact.notify(handA, handB)
interact.chooseAmount(heap1, heap2) 

An interaction expression, written interact.METHOD(EXPR_0, ..., EXPR_n), where METHOD is an identifier bound in the participant interact interface to a function type, and EXPR_0 through EXPR_n are expressions that evaluate to the result of an interaction with a frontend that receives the evaluation of the n expressions and sends a value.

An interaction expression may also be written interact.KEY, where KEY is bound in the participant interact interface to a non-function type.

An interaction expression may only occur in a local step.

5.4.5.2.3 assume

assume( claim, [msg] ) 

An assumption where claim evaluates to true with honest frontends. This may only appear in a local step. It accepts an optional bytes argument, which is included in any reported violation.

5.4.5.2.4 fail

fail() 

is a convenience method equivalent to assume(false). This may only appear in a local step.

5.4.5.2.5 declassify

declassify( arg ) 

The declassify primitive performs a declassification of the given argument.

5.4.5.2.6 makeCommitment

makeCommitment( interact, x ) 

Returns two values, [ commitment, salt ], where salt is the result of calling interact.random(), and commitment is the digest of salt and x. This is used in a local step before checkCommitment is used in a consensus step.

5.4.5.2.7 didPublish

didPublish() 

Returns a boolean that indicates whether the last publication was made by this principal.