-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new proving broker implementation (#9400)
Reopening of #8609, which was closed/merged by mistake. This PR is stacked on top of #9391 This PR adds ProvingBroker which implements a new interface for distributing proving jobs to workers as specified in #8495
- Loading branch information
Showing
7 changed files
with
1,821 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 33 additions & 1 deletion
34
yarn-project/circuits.js/src/structs/kernel/private_kernel_empty_inputs.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,43 @@ | ||
import { Fr } from '@aztec/foundation/fields'; | ||
|
||
import { NESTED_RECURSIVE_PROOF_LENGTH } from '../../constants.gen.js'; | ||
import { makeHeader } from '../../tests/factories.js'; | ||
import { PrivateKernelEmptyInputData } from './private_kernel_empty_inputs.js'; | ||
import { makeRecursiveProof } from '../recursive_proof.js'; | ||
import { VerificationKeyAsFields } from '../verification_key.js'; | ||
import { | ||
EmptyNestedData, | ||
PrivateKernelEmptyInputData, | ||
PrivateKernelEmptyInputs, | ||
} from './private_kernel_empty_inputs.js'; | ||
|
||
describe('PrivateKernelEmptyInputData', () => { | ||
it('serializes and deserializes', () => { | ||
const obj = new PrivateKernelEmptyInputData(makeHeader(), Fr.random(), Fr.random(), Fr.random(), Fr.random()); | ||
expect(PrivateKernelEmptyInputData.fromString(obj.toString())).toEqual(obj); | ||
}); | ||
}); | ||
|
||
describe('PrivateKernelEmptyInputs', () => { | ||
it('serializes and deserializes', () => { | ||
const obj = new PrivateKernelEmptyInputs( | ||
new EmptyNestedData(makeRecursiveProof(NESTED_RECURSIVE_PROOF_LENGTH), VerificationKeyAsFields.makeFakeHonk()), | ||
makeHeader(), | ||
Fr.random(), | ||
Fr.random(), | ||
Fr.random(), | ||
Fr.random(), | ||
); | ||
|
||
expect(PrivateKernelEmptyInputs.fromBuffer(obj.toBuffer())).toEqual(obj); | ||
}); | ||
}); | ||
|
||
describe('EmptyNestedData', () => { | ||
it('serializes and deserializes', () => { | ||
const obj = new EmptyNestedData( | ||
makeRecursiveProof(NESTED_RECURSIVE_PROOF_LENGTH), | ||
VerificationKeyAsFields.makeFakeHonk(), | ||
); | ||
expect(EmptyNestedData.fromBuffer(obj.toBuffer())).toEqual(obj); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.