Skip to content

Commit fa7a627

Browse files
committed
test(fast-inbox): follow the InboxParity request type through the broker and restart tests (A-1427)
The base parity and root parity request types collapsed into a single INBOX_PARITY, so the broker abort/revive tests and the prover-restart parity predicate reference it.
1 parent 2b08840 commit fa7a627

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

yarn-project/end-to-end/src/single-node/proving/prover_restart.parallel.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ const ALL_PROVING_TYPES = Object.values(ProvingRequestType).filter(
3333
(t): t is ProvingRequestType => typeof t === 'number',
3434
);
3535

36-
const isParity = (type: ProvingRequestType) =>
37-
type === ProvingRequestType.PARITY_BASE || type === ProvingRequestType.PARITY_ROOT;
36+
const isParity = (type: ProvingRequestType) => type === ProvingRequestType.INBOX_PARITY;
3837

3938
const isTxBaseRollup = (type: ProvingRequestType) =>
4039
type === ProvingRequestType.PRIVATE_TX_BASE_ROLLUP || type === ProvingRequestType.PUBLIC_TX_BASE_ROLLUP;

yarn-project/prover-client/src/proving_broker/proving_broker.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ describe.each([
222222
it('revives an aborted job when its producer re-requests it', async () => {
223223
const provingJob: ProvingJob = {
224224
id: makeRandomProvingJobId(),
225-
type: ProvingRequestType.PARITY_BASE,
225+
type: ProvingRequestType.INBOX_PARITY,
226226
epochNumber: EpochNumber(1),
227227
inputsUri: makeInputsUri(),
228228
};
@@ -239,7 +239,7 @@ describe.each([
239239
// 'in-queue', and it can then be completed.
240240
await expect(broker.enqueueProvingJob(provingJob)).resolves.toEqual({ status: 'in-queue' });
241241
await assertJobStatus(provingJob.id, 'in-queue');
242-
const returnedJob = await broker.getProvingJob({ allowList: [ProvingRequestType.PARITY_BASE] });
242+
const returnedJob = await broker.getProvingJob({ allowList: [ProvingRequestType.INBOX_PARITY] });
243243
expect(returnedJob?.job).toEqual(provingJob);
244244

245245
const retryValue = makeOutputsUri();
@@ -250,7 +250,7 @@ describe.each([
250250
it('persists the aborted state across a restart and revives on re-request', async () => {
251251
const provingJob: ProvingJob = {
252252
id: makeRandomProvingJobId(),
253-
type: ProvingRequestType.PARITY_BASE,
253+
type: ProvingRequestType.INBOX_PARITY,
254254
epochNumber: EpochNumber(1),
255255
inputsUri: makeInputsUri(),
256256
};
@@ -276,7 +276,7 @@ describe.each([
276276
// 'in-queue' status), and it can be completed.
277277
await expect(broker.enqueueProvingJob(provingJob)).resolves.toEqual({ status: 'in-queue' });
278278
await assertJobStatus(provingJob.id, 'in-queue');
279-
const returnedJob = await broker.getProvingJob({ allowList: [ProvingRequestType.PARITY_BASE] });
279+
const returnedJob = await broker.getProvingJob({ allowList: [ProvingRequestType.INBOX_PARITY] });
280280
expect(returnedJob?.job).toEqual(provingJob);
281281

282282
const value = makeOutputsUri();
@@ -287,7 +287,7 @@ describe.each([
287287
it('persists the revived (non-aborted) state, so a restart mid-revival stays revived', async () => {
288288
const provingJob: ProvingJob = {
289289
id: makeRandomProvingJobId(),
290-
type: ProvingRequestType.PARITY_BASE,
290+
type: ProvingRequestType.INBOX_PARITY,
291291
epochNumber: EpochNumber(1),
292292
inputsUri: makeInputsUri(),
293293
};
@@ -318,7 +318,7 @@ describe.each([
318318
it('revives once when the producer re-requests an aborted job concurrently', async () => {
319319
const provingJob: ProvingJob = {
320320
id: makeRandomProvingJobId(),
321-
type: ProvingRequestType.PARITY_BASE,
321+
type: ProvingRequestType.INBOX_PARITY,
322322
epochNumber: EpochNumber(1),
323323
inputsUri: makeInputsUri(),
324324
};
@@ -338,10 +338,10 @@ describe.each([
338338
expect(second).toEqual({ status: 'in-queue' });
339339
await assertJobStatus(provingJob.id, 'in-queue');
340340

341-
const returnedJob = await broker.getProvingJob({ allowList: [ProvingRequestType.PARITY_BASE] });
341+
const returnedJob = await broker.getProvingJob({ allowList: [ProvingRequestType.INBOX_PARITY] });
342342
expect(returnedJob?.job).toEqual(provingJob);
343343
await assertJobStatus(provingJob.id, 'in-progress');
344-
await expect(broker.getProvingJob({ allowList: [ProvingRequestType.PARITY_BASE] })).resolves.toBeUndefined();
344+
await expect(broker.getProvingJob({ allowList: [ProvingRequestType.INBOX_PARITY] })).resolves.toBeUndefined();
345345

346346
await broker.reportProvingJobSuccess(provingJob.id, makeOutputsUri());
347347
await assertJobStatus(provingJob.id, 'fulfilled');

yarn-project/prover-client/src/proving_broker/proving_broker_database/broker_persisted_database.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ describe('ProvingBrokerPersistedDatabase', () => {
137137
const job: ProvingJob = {
138138
id,
139139
epochNumber: EpochNumber(42),
140-
type: ProvingRequestType.PARITY_BASE,
140+
type: ProvingRequestType.INBOX_PARITY,
141141
inputsUri: makeInputsUri(),
142142
};
143143
await db.addProvingJob(job);

0 commit comments

Comments
 (0)