-
Notifications
You must be signed in to change notification settings - Fork 273
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
fix: redo nullifier tree insertion algorithm #240
Conversation
805c75e
to
47f47b7
Compare
depends on this pr AztecProtocol/aztec3-circuits#231 |
fix: harden circuits
Looks like you're getting some of the issues I was trying to tackle here #216 |
yarn-project/sequencer-client/src/block_builder/circuit_block_builder.test.ts
Show resolved
Hide resolved
yarn-project/sequencer-client/src/block_builder/circuit_block_builder.ts
Outdated
Show resolved
Hide resolved
yarn-project/sequencer-client/src/block_builder/circuit_block_builder.ts
Outdated
Show resolved
Hide resolved
yarn-project/sequencer-client/src/block_builder/circuit_block_builder.ts
Show resolved
Hide resolved
* val 0 5 10 15 2 3 20 19 | ||
* nextIdx 5 2 3 8 6 2 0 7 | ||
* nextVal 2 10 15 19 3 5 0 20 | ||
* | ||
* TODO: this implementation will change once the zero value is changed from h(0,0,0). Changes incoming over the next sprint | ||
* @param leaves Values to insert into the tree | ||
* @returns | ||
*/ | ||
public async performBaseRollupBatchInsertionProofs(leaves: Buffer[]): Promise<LowNullifierWitnessData[] | undefined> { |
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.
I feel like we should break this function out into a seperate file, inject the db instance and create some test cases for it.
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.
+1, but I think it's part of a bigger refactor on the block builder. I can take it once this is merged.
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.
LGTM, though I didn't go in depth on the workings of the algorithm itself, so take this approval with a grain of salt.
* add config from env vars in projects + update e2e config * remove comment * Fix automatic import * remove comments * remove hardcoded addresses + reduce .isMined poll freq * more chagnes to isMined freq * fix zero EthAddress
aa14bd5
to
b95e098
Compare
Changes will be addressed as part of a wider refactor
* val 0 5 10 15 2 3 20 19 | ||
* nextIdx 5 2 3 8 6 2 0 7 | ||
* nextVal 2 10 15 19 3 5 0 20 | ||
* |
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.
Beautiful megacomment
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.
LGTM
Description
Fixes batch insertion algorithm that did not handle random test cases well enough. This pr covers most cases but further investigation is being done and more test cases written to harden the implementation
Checklist: