-
Notifications
You must be signed in to change notification settings - Fork 615
feat: PXE handles reorgs #9913
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
Merged
Merged
feat: PXE handles reorgs #9913
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7cd3ec5
feat: PXE handles reorgs
spalladino 11c02c5
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Thunkar b09c6e5
implemented unnullify
Thunkar fa2e521
ensure to unnullify after provided block
Thunkar ce4b168
initial approach to blockNumber in leaf indexes
Thunkar 0568eba
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Thunkar da4a91a
tsconfig
Thunkar aea4578
fix
Thunkar fa28dab
bad merge
Thunkar b4d9f60
nullifier source approach
Thunkar 28a727f
pr comments
Thunkar 1e803bd
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Thunkar 82333fe
fixes and fmt
Thunkar 9396141
review comment
Thunkar 40b82f7
pr comments
Thunkar b72fd8b
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Thunkar e4e80ae
restore note scopes
Thunkar 11e4f25
test and fmt
Thunkar ec04f41
Merge branch 'master' into palla/pxe-reorg
nventuro 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,36 @@ | ||
| import { Fr } from '@aztec/circuits.js'; | ||
| import { schemas } from '@aztec/foundation/schemas'; | ||
|
|
||
| import { type ZodTypeAny, z } from 'zod'; | ||
|
|
||
| import { type L2Block } from './l2_block.js'; | ||
|
|
||
| export type InBlock<T> = { | ||
| l2BlockNumber: number; | ||
| l2BlockHash: string; | ||
| data: T; | ||
| }; | ||
|
|
||
| export function randomInBlock<T>(data: T): InBlock<T> { | ||
| return { | ||
| data, | ||
| l2BlockNumber: Math.floor(Math.random() * 1000), | ||
| l2BlockHash: Fr.random().toString(), | ||
| }; | ||
| } | ||
|
|
||
| export function wrapInBlock<T>(data: T, block: L2Block): InBlock<T> { | ||
| return { | ||
| data, | ||
| l2BlockNumber: block.number, | ||
| l2BlockHash: block.hash().toString(), | ||
| }; | ||
| } | ||
|
|
||
| export function inBlockSchemaFor<T extends ZodTypeAny>(schema: T) { | ||
| return z.object({ | ||
| data: schema, | ||
| l2BlockNumber: schemas.Integer, | ||
| l2BlockHash: z.string(), | ||
| }); | ||
| } |
This file contains hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.