Skip to content

Pw/check nullifiers#112

Merged
PhilWindle merged 4 commits into
masterfrom
pw/check-nullifiers
Apr 4, 2023
Merged

Pw/check nullifiers#112
PhilWindle merged 4 commits into
masterfrom
pw/check-nullifiers

Conversation

@PhilWindle

Copy link
Copy Markdown
Collaborator

Description

Please provide a paragraph or two giving a summary of the change, including relevant motivation and context.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • The branch has been rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

@spalladino spalladino force-pushed the pw/check-nullifiers branch from aa5a4a1 to 1883764 Compare April 4, 2023 10:30
Comment on lines 138 to 144
public findContractIndex(leafValue: Buffer): Promise<bigint | undefined> {
return this.merkleTreeDB.findLeafIndex(MerkleTreeId.CONTRACT_TREE, leafValue);
return this.merkleTreeDB.findLeafIndex(MerkleTreeId.CONTRACT_TREE, leafValue, false);
}

public getContractPath(leafIndex: bigint): Promise<SiblingPath> {
return this.merkleTreeDB.getSiblingPath(MerkleTreeId.CONTRACT_TREE, leafIndex);
return this.merkleTreeDB.getSiblingPath(MerkleTreeId.CONTRACT_TREE, leafIndex, false);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhilWindle can you confirm if the AztecNode is supposed to use committed data only?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, committed data only.

// TODO(AD): this is an exhaustive search currently
if ((await this.worldState.findLeafIndex(MerkleTreeId.NULLIFIER_TREE, nullifier.toBuffer())) !== undefined) {
if (
(await this.worldState.getLatest().findLeafIndex(MerkleTreeId.NULLIFIER_TREE, nullifier.toBuffer())) !==

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhilWindle I understand txDoubleSpend check should use latest, but please confirm.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically it shouldn't matter. At the point of validating the new set of txs the sequencer shouldn't have started modifying any of the trees. Using getLatest is fine.

@PhilWindle PhilWindle merged commit 354b469 into master Apr 4, 2023
@PhilWindle PhilWindle deleted the pw/check-nullifiers branch April 4, 2023 14:09
ludamad pushed a commit that referenced this pull request Jul 14, 2023
Implements RAM/ROM stuff and dynamic arrays as well as separated all fixed_base operation in standard plonk into a separate file, so that it is no longer part of composer
codygunton pushed a commit that referenced this pull request Jan 23, 2024
Implements RAM/ROM stuff and dynamic arrays as well as separated all fixed_base operation in standard plonk into a separate file, so that it is no longer part of composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants