Cheque is widely used in neofs as a definition
of structure that connected with configuration
changing or asset withdraw. This name is used
to avoid confusion with 'check' with
verification meaning.
As the user can invoke several deposit or withdraw calls
inner ring nodes should be able to differ them even if they
have the same arguments. To do that neofs-contract notifies
about tx hash, which can be used as unique identifier of
withdraw or deposit operation.
Withdraw operation works a bit different with neo:morph.
User calls "Deposit" and "Withdraw" methods that produce
notifications for the inner ring nodes.
"Deposit" method does not produce feedback, but "Withdraw"
does. Inner ring nodes check if user eligible to withdraw
assets. If so, nodes invoke "Cheque" method. This method
collects invocations from inner ring nods. When there are
2/3n + 1 invocations, smart-contract transfers assets back
to the user and produces notifications.
Inner ring nodes do not collect signatures for the cheque now.
Instead they invoke "InnerRingUpdate" method and smart-contract
checks if method was called from inner ring node. Then it
accepts cheque if there were 2/3n+1 invokes.
With neo:morph environment, there will be no direct communication
between inner ring nodes and storage nodes. neo:morph smart-contracts
will identify inner ring nodes by their signatures.
Inner ring nodes check their presence in inner ring list during
startup. "IsInnerRing" method allows to check presence efficiently
by calling this method.