Skip to content

Reference Contract Service

The Reference Contract Service manages contract state transitions on behalf of RUN-DSP. During a contract negotiation, RUN-DSP calls the contract service at each state transition to determine whether to proceed.

Role

The contract service acts as a hook in the RUN-DSP processing pipeline. RUN-DSP delegates the decision to accept or reject a transition to the contract service. This decoupling allows the contract logic to be replaced without modifying RUN-DSP itself.

State machine

Contract negotiation progresses through the following states:

REQUESTED → OFFERED → ACCEPTED → AGREED → VERIFIED → FINALIZED
                                                     ↘ TERMINATED (from any state)

The full state machine is defined in the IDSA Dataspace Protocol specification. The dataLOFT-specific hook behaviour is documented in the contract negotiation runtime view.

Reference implementation

The Reference Contract Service (go-dataspace/reference-contract-service) is a reference implementation. It approves all transitions without applying any policy logic. It is intended as a starting point and a demonstration of the hook interface.

For production deployments, the Reference Contract Service should be replaced with an implementation that enforces the actual data sharing policies of the Federator.