The New Advanced Society. Группа авторовЧитать онлайн книгу.
participant who can initiate this contract. The task state is paired with this contract.
Figure 2.3 Representation of the CAT contract.
As mentioned in Figure 2.3, this contract requires zero input states and gives one output state. The signatures of the client, the main contractor, and the subcontractor are mandatory in this contract for a successful transaction. Hence, this transaction is visible to all three participants.
2.3.3.2 Request for Cash (RT) Contract
According to this contract, the main contractor can request the client for the amount required for the completion of the created task. Therefore, the main contractor is the only participant who can initiate this contract. The cash state is paired with this contract.
As mentioned in Figure 2.4, this contract requires zero input states and gives one output state. The signatures of the client and the main contractor are mandatory in this contract for a successful transaction. Hence, this transaction is visible only to the client and the main contractor.
Figure 2.4 Representation of the RT contract.
Figure 2.5 Representation of the TT contract.
2.3.3.3 Transfer of Cash (TT) Contract
According to this contract, the client can send the amount requested, in the form of cash, to the main contractor. Therefore, the client is the only participant who can initiate this contract. The cash state is paired with this contract.
As mentioned in Figure 2.5, this contract requires zero input states and gives one output state. The signatures of the client and the main contractor are mandatory in this contract for a successful transaction. Hence, this transaction is visible only to the client and the main contractor.
2.3.3.4 Updation of the Task (UOT) Contract
According to this contract, the subcontractor can update the status of the task that was assigned to him by the main contractor. Therefore, the subcontractor is the only participant who can initiate this contract. The task state is paired with this contract.
Figure 2.6 Representation of the UOT contract.
As mentioned in Figure 2.6, this contract requires one input state and gives one output state. The signatures of the client, the main contractor, and the subcontractor are mandatory in this contract for a successful transaction. Hence, this transaction is visible to all three participants.
2.3.4 Flows
A flow is a series of steps that tells a node how to attain a specific ledger update thus, automating the process of unison with ledger updates. Communication between nodes occurs only in the accordance of these flows and this happens on a peer-to-peer basis. When a flow waits for messages from other nodes, the flow is suspended, serialized, and check-pointed. If a node fails or restarts, the check-pointed flow is deserialized and started where it left-off. In this case, the flow is suspended and check-pointed until the participant gets a response from the required participants [58]. After the above-mentioned contracts are executed successfully, each contract will be associated with their respective flow.
2.3.4.1 Flow Associated With CAT Contract
The flow associated with the CAT contract describes the interactions that occur between the participants of this contract. Figure 2.7 depicts that the main contractor is the initiator and the subcontractor and the client are the responders.
Figure 2.7 Flow of the CAT contract.
Figure 2.8 Flow of the RT contract.
Figure 2.9 Flow of the TT contract.
Figure 2.10 Flow of the UOT contract.
2.3.4.2 Flow Associated With RT Contract
The flow associated with the RT contract describes the interactions that occur between the participants of this contract. Figure 2.8 depicts that the main contractor is the initiator and the client is the responder.
2.3.4.3 Flow Associated With TT Contract
The flow associated with the TT contract describes the interactions that occur between the participants of this contract. Figure 2.9 depicts that the client is the initiator and the main contractor is the responder.
2.3.4.4 Flow Associated With UOT Contract
The flow associated with the UOT contract describes the interactions that occur between the participants of this contract. Figure 2.10 depicts that the subcontractor is the initiator and the main contractor and the client are the responders.
2.4 Implementation
In the process of completing any construction-related contract, the number of actors and procedures