Incoming Transaction Endpoint¶
Before the operator can execute the transaction, it MUST first check that the transaction is correctly formatted by attempting to decode the transaction.
If decoding fails, the operator MUST return an Invalid Transaction Encoding error response.
Once the operator has determined that the transaction was correctly encoded, they can attempt to execute the transaction against the local state.
State Update Resolution¶
The operator MUST resolve the set of state updates that the transaction operates on. The operator uses the
end values from the transaction and finds all state updates the range overlaps with.
Once the operator finds all overlapping state updates, they MUST assert that the entire range described by the transaction is covered by existing state updates. If this is not the case, the operator MUST return an Invalid Transaction error response.
State Transition Execution¶
For each state update resolved in the previous step, the operator then MUST call the executeStateTransition method of the plugin that corresponds to the predicate address specified in the state update. This function call will return a new resulting state update. If any of these calls throw an error, the operator MUST return an Invalid Transaction error response.
The operator MUST then validate that all of the resulting state updates are identical. If any state update is not identical, the operator MUST return an Invalid Transaction error response.
Once the transaction has been verified, the operator can add the resulting state update to the queue of state updates to be published in the next block. If the queue already contains a state update on the range specified in the transaction, the operator MUST return a Duplicate Transaction error response.