-
Notifications
You must be signed in to change notification settings - Fork 301
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 externalcall hints (#6890)
And rewrite (de)serialization of hints.
- Loading branch information
Showing
12 changed files
with
296 additions
and
138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,14 @@ | ||
import { randomInt } from '@aztec/foundation/crypto'; | ||
|
||
import { makeAvmCircuitInputs, makeAvmExecutionHints, makeAvmHint } from '../../tests/factories.js'; | ||
import { AvmCircuitInputs, AvmExecutionHints, AvmHint } from './avm.js'; | ||
import { makeAvmCircuitInputs } from '../../tests/factories.js'; | ||
import { AvmCircuitInputs } 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); | ||
}); | ||
it(`serializes to buffer and deserializes it back`, () => { | ||
const avmCircuitInputs = makeAvmCircuitInputs(randomInt(2000)); | ||
const buffer = avmCircuitInputs.toBuffer(); | ||
const res = AvmCircuitInputs.fromBuffer(buffer); | ||
expect(res).toEqual(avmCircuitInputs); | ||
expect(res.isEmpty()).toBe(false); | ||
}); | ||
}); |
Oops, something went wrong.
3a97f08
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.05
.nativeconstruct_proof_ultrahonk_power_of_2/20
5908.213371999992
ms/iter5594.752326999995
ms/iter1.06
This comment was automatically generated by workflow using github-action-benchmark.
CC: @ludamad @codygunton