-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: prep for switching AVM to checkpointed native trees - TS test cleanup and refactors #12023
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a0accc9
chore: avm TS test cleanup and refactors
dbanks12 33cf18b
new test in orchestrator
dbanks12 20397fc
Merge branch 'master' into db/testing-updates
dbanks12 0e00834
Merge branch 'master' into db/testing-updates
dbanks12 caeec38
fixes
dbanks12 504a63a
merge
dbanks12 e6b5622
fixes
dbanks12 b69a11d
fix
dbanks12 ba5fa4a
more fixes
dbanks12 8e5ac40
use new sha in benchmarking contract
dbanks12 5f05e9f
Fixes
dbanks12 4a6972c
fixes & cleanup
dbanks12 4c0c17f
Merge branch 'master' into db/testing-updates
dbanks12 41c536b
fix noir contract
dbanks12 bc5806d
fix contract updates test
dbanks12 6376465
revert incorrect type change
dbanks12 5b9afbc
fmt
dbanks12 e1adf6a
Merge branch 'master' into db/testing-updates
dbanks12 0fe5ec2
merge
dbanks12 c1e8993
fix feePayer
dbanks12 a1758ed
merge
dbanks12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,6 @@ pub contract Benchmarking { | |
// Does a bunch of heavy compute | ||
#[public] | ||
fn sha256_hash_2048(data: [u8; 2048]) -> [u8; 32] { | ||
std::hash::sha256(data) | ||
sha256::sha256_var(data, data.len() as u64) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created this fn last week and used the old stdlib sha |
||
} | ||
} |
26 changes: 7 additions & 19 deletions
26
yarn-project/bb-prover/src/avm_proving_tests/avm_check_circuit1.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
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,41 +1,24 @@ | ||
import { | ||
AztecAddress, | ||
type ContractClassPublic, | ||
type ContractInstanceWithAddress, | ||
FunctionSelector, | ||
} from '@aztec/circuits.js'; | ||
import { makeContractClassPublic, makeContractInstanceFromClassId } from '@aztec/circuits.js/testing'; | ||
import { PUBLIC_DISPATCH_SELECTOR } from '@aztec/constants'; | ||
import { type ContractInstanceWithAddress } from '@aztec/circuits.js'; | ||
import { AztecAddress } from '@aztec/foundation/aztec-address'; | ||
import { Fr } from '@aztec/foundation/fields'; | ||
import { AvmTestContractArtifact } from '@aztec/noir-contracts.js/AvmTest'; | ||
import { getAvmTestContractBytecode } from '@aztec/simulator/public/fixtures'; | ||
|
||
import { AvmProvingTester } from './avm_proving_tester.js'; | ||
|
||
const TIMEOUT = 300_000; | ||
const DISPATCH_FN_NAME = 'public_dispatch'; | ||
const DISPATCH_SELECTOR = new FunctionSelector(PUBLIC_DISPATCH_SELECTOR); | ||
|
||
describe('AVM WitGen & Circuit – check circuit', () => { | ||
const sender = AztecAddress.fromNumber(42); | ||
const avmTestContractClassSeed = 0; | ||
const avmTestContractBytecode = getAvmTestContractBytecode(DISPATCH_FN_NAME); | ||
let avmTestContractClass: ContractClassPublic; | ||
let avmTestContractInstance: ContractInstanceWithAddress; | ||
let tester: AvmProvingTester; | ||
|
||
beforeEach(async () => { | ||
avmTestContractClass = await makeContractClassPublic( | ||
/*seed=*/ avmTestContractClassSeed, | ||
/*publicDispatchFunction=*/ { bytecode: avmTestContractBytecode, selector: DISPATCH_SELECTOR }, | ||
); | ||
avmTestContractInstance = await makeContractInstanceFromClassId( | ||
avmTestContractClass.id, | ||
/*seed=*/ avmTestContractClassSeed, | ||
); | ||
tester = await AvmProvingTester.create(/*checkCircuitOnly*/ true); | ||
await tester.addContractClass(avmTestContractClass, AvmTestContractArtifact); | ||
await tester.addContractInstance(avmTestContractInstance); | ||
avmTestContractInstance = await tester.registerAndDeployContract( | ||
/*constructorArgs=*/ [], | ||
/*deployer=*/ AztecAddress.fromNumber(420), | ||
AvmTestContractArtifact, | ||
); | ||
}); | ||
|
||
it( | ||
|
@@ -58,9 +41,10 @@ describe('AVM WitGen & Circuit – check circuit', () => { | |
}, | ||
TIMEOUT, | ||
); | ||
// FIXME(dbanks12): fails with "Lookup PERM_MAIN_ALU failed." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment was accidentally removed in a previous PR |
||
it.skip('top-level exceptional halts due to a non-existent contract in app-logic and teardown', async () => { | ||
// don't insert contracts into trees, and make sure retrieval fails | ||
const tester = await AvmProvingTester.create(/*checkCircuitOnly=*/ true, /*skipContractDeployments=*/ true); | ||
const tester = await AvmProvingTester.create(/*checkCircuitOnly=*/ true); | ||
await tester.simProveVerify( | ||
sender, | ||
/*setupCalls=*/ [], | ||
|
31 changes: 7 additions & 24 deletions
31
yarn-project/bb-prover/src/avm_proving_tests/avm_check_circuit3.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
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
3 changes: 2 additions & 1 deletion
3
yarn-project/bb-prover/src/avm_proving_tests/avm_proven_token.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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
unused