-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(avm): plumb execution hints from TS to AVM prover (#6806)
- Loading branch information
Showing
21 changed files
with
452 additions
and
59 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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { randomInt } from '@aztec/foundation/crypto'; | ||
|
||
import { makeAvmCircuitInputs, makeAvmExecutionHints, makeAvmHint } from '../../tests/factories.js'; | ||
import { AvmCircuitInputs, AvmExecutionHints, AvmHint } from './avm.js'; | ||
|
||
describe('Avm circuit inputs', () => { | ||
describe('AvmHint', () => { | ||
let avmHint: AvmHint; | ||
|
||
beforeAll(() => { | ||
avmHint = makeAvmHint(randomInt(1000)); | ||
}); | ||
|
||
it(`serializes to buffer and deserializes it back`, () => { | ||
const buffer = avmHint.toBuffer(); | ||
const res = AvmHint.fromBuffer(buffer); | ||
expect(res).toEqual(avmHint); | ||
expect(res.isEmpty()).toBe(false); | ||
}); | ||
}); | ||
describe('AvmExecutionHints', () => { | ||
let avmExecutionHints: AvmExecutionHints; | ||
|
||
beforeAll(() => { | ||
avmExecutionHints = makeAvmExecutionHints(randomInt(1000)); | ||
}); | ||
|
||
it(`serializes to buffer and deserializes it back`, () => { | ||
const buffer = avmExecutionHints.toBuffer(); | ||
const res = AvmExecutionHints.fromBuffer(buffer); | ||
expect(res).toEqual(avmExecutionHints); | ||
expect(res.isEmpty()).toBe(false); | ||
}); | ||
}); | ||
describe('AvmCircuitInputs', () => { | ||
let avmCircuitInputs: AvmCircuitInputs; | ||
|
||
beforeAll(() => { | ||
avmCircuitInputs = makeAvmCircuitInputs(randomInt(2000)); | ||
}); | ||
|
||
it(`serializes to buffer and deserializes it back`, () => { | ||
const buffer = avmCircuitInputs.toBuffer(); | ||
const res = AvmCircuitInputs.fromBuffer(buffer); | ||
expect(res).toEqual(avmCircuitInputs); | ||
expect(res.isEmpty()).toBe(false); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.