@@ -156,8 +156,13 @@ interface IProofMarket {
156
156
event RequestSubmitted(ProvingRequest request, bytes clientSignature);
157
157
/// Event logged when a request is locked in by the given prover.
158
158
event RequestLockedin(uint192 indexed requestId, address prover);
159
- /// Event logged when a request is fulfilled, outside of a batch.
160
- event RequestFulfilled(uint192 indexed requestId, bytes journal, bytes seal);
159
+ /// Event logged when a request is fulfilled.
160
+ event RequestFulfilled(uint192 indexed requestId);
161
+ /// @notice Event logged when a proof is delivered that satisfies the requests requirements.
162
+ /// @dev It is possible for this event to be logged multiple times for a single request. This
163
+ /// is usually logged as part of order fulfillment, however it can also be logged by a prover
164
+ /// sending the proof without payment.
165
+ event ProofDelivered(uint192 indexed requestId, bytes journal, bytes seal);
161
166
/// Event when prover stake is burned for failing to fulfill a request by the deadline.
162
167
event LockinStakeBurned(uint192 indexed requestId, uint96 stake);
163
168
/// Event when a deposit is made to the proof market.
@@ -200,14 +205,14 @@ interface IProofMarket {
200
205
/// @notice Submit a request such that it is publicly available for provers to evaluate and bid on.
201
206
/// Any `msg.value` sent with the call will be added to the balance of `msg.sender`.
202
207
/// @dev Submitting the transaction only broadcasting it, and is not a required step.
203
- function submitRequest(ProvingRequest calldata request, bytes memory clientSignature) external payable;
208
+ function submitRequest(ProvingRequest calldata request, bytes calldata clientSignature) external payable;
204
209
205
210
/// @notice Lock the proving request to the prover, giving them exclusive rights to be paid to
206
211
/// fulfill this request, and also making them subject to slashing penalties if they fail to
207
212
/// deliver. At this point, the price for fulfillment is also set, based on the reverse Dutch
208
213
/// auction parameters and the block at which this transaction is processed.
209
214
/// @dev This method should be called from the address of the prover.
210
- function lockin(ProvingRequest calldata request, bytes memory clientSignature) external;
215
+ function lockin(ProvingRequest calldata request, bytes calldata clientSignature) external;
211
216
212
217
/// @notice Lock the proving request to the prover, giving them exclusive rights to be paid to
213
218
/// fulfill this request, and also making them subject to slashing penalties if they fail to
@@ -216,16 +221,46 @@ interface IProofMarket {
216
221
/// @dev This method uses the provided signature to authenticate the prover.
217
222
function lockinWithSig(
218
223
ProvingRequest calldata request,
219
- bytes memory clientSignature,
224
+ bytes calldata clientSignature,
220
225
bytes calldata proverSignature
221
226
) external;
222
227
223
- /// Fulfill a locked request by delivering the proof for the application.
224
- /// Upon proof verification, the prover will be paid.
225
- function fulfill(Fulfillment calldata fill, bytes calldata assessorSeal) external;
226
-
227
- /// Fulfills a batch of locked requests
228
- function fulfillBatch(Fulfillment[] calldata fills, bytes calldata assessorSeal) external;
228
+ /// @notice Fulfill a locked request by delivering the proof for the application.
229
+ /// Upon proof verification, the prover that locked the request will be paid.
230
+ /// @param fill The fulfillment information, including the journal and seal.
231
+ /// @param assessorSeal The seal from the Assessor guest, which is verified to confirm the
232
+ /// request's requirements are met.
233
+ /// @param prover The address of the prover that produced the fulfillment.
234
+ /// Note that this can differ from the address of the prover that locked the
235
+ /// request. When they differ, the locked-in prover is the one that received payment.
236
+ function fulfill(Fulfillment calldata fill, bytes calldata assessorSeal, address prover) external;
237
+ /// @notice Fulfills a batch of locked requests. See IProofMarket.fulfill for more information.
238
+ function fulfillBatch(Fulfillment[] calldata fills, bytes calldata assessorSeal, address prover) external;
239
+
240
+ /// @notice Delivers a proof satisfying a referenced request, without modifying contract state.
241
+ /// In particular, calling this method will not result in payment being sent to the prover, or
242
+ /// marking the request as fulfilled.
243
+ /// @dev This method is useful for when an interested third party wants to delivery a proof for
244
+ /// a request even if they will not be paid for doing so.
245
+ /// @param fill The fulfillment information, including the journal and seal.
246
+ /// @param assessorSeal The seal from the Assessor guest, which is verified to confirm the
247
+ /// request's requirements are met.
248
+ /// @param prover The address of the prover that produced the fulfillment.
249
+ /// Note that this can differ from the address of the prover that locked the
250
+ /// request.
251
+ function deliver(Fulfillment calldata fill, bytes calldata assessorSeal, address prover) external;
252
+ /// @notice Delivers a batch of proofs. See IProofMarket.deliver for more information.
253
+ function deliverBatch(Fulfillment[] calldata fills, bytes calldata assessorSeal, address prover) external;
254
+
255
+ /// @notice Combined function to submit a new merkle root to the set-verifier and call fulfillBatch.
256
+ /// @dev Useful to reduce the transaction count for fulfillments
257
+ function submitRootAndFulfillBatch(
258
+ bytes32 root,
259
+ bytes calldata seal,
260
+ Fulfillment[] calldata fills,
261
+ bytes calldata assessorSeal,
262
+ address prover
263
+ ) external;
229
264
230
265
/// When a prover fails to fulfill a request by the deadline, this method can be used to burn
231
266
/// the associated prover stake.
0 commit comments