Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 21, 2024
1 parent af0b1d5 commit b86a4b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('e2e_inclusion_proofs_contract', () => {
// This should fail because we choose a block number before the contract was deployed
const blockNumber = deploymentBlockNumber - 1;
const contractData = new NewContractData(contract.address, portalContractAddress, contractClassId);
const leaf = contractData.computeLeaf();
const leaf = contractData.hash();

await expect(
contract.methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('sequencer/solo_block_builder', () => {

// Updates the expectedDb trees based on the new commitments, contracts, and nullifiers from these txs
const updateExpectedTreesFromTxs = async (txs: ProcessedTx[]) => {
const newContracts = txs.flatMap(tx => tx.data.end.newContracts.map(cd => cd.computeLeaf()));
const newContracts = txs.flatMap(tx => tx.data.end.newContracts.map(cd => cd.hash()));
for (const [tree, leaves] of [
[
MerkleTreeId.NOTE_HASH_TREE,
Expand Down Expand Up @@ -235,7 +235,7 @@ describe('sequencer/solo_block_builder', () => {
tx.data.combinedData.newNullifiers.map((n: SideEffectLinkedToNoteHash) => n.value),
tx.data.combinedData.newL2ToL1Msgs,
tx.data.combinedData.publicDataUpdateRequests.map(t => new PublicDataWrite(t.leafSlot, t.newValue)),
tx.data.combinedData.newContracts.map(cd => cd.computeLeaf()),
tx.data.combinedData.newContracts.map(cd => cd.hash()),
tx.data.combinedData.newContracts.map(cd => new ContractData(cd.contractAddress, cd.portalContractAddress)),
tx.encryptedLogs || new TxL2Logs([]),
tx.unencryptedLogs || new TxL2Logs([]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class SoloBlockBuilder implements BlockBuilder {
tx.data.combinedData.newNullifiers.map((n: SideEffectLinkedToNoteHash) => n.value),
tx.data.combinedData.newL2ToL1Msgs,
tx.data.combinedData.publicDataUpdateRequests.map(t => new PublicDataWrite(t.leafSlot, t.newValue)),
tx.data.combinedData.newContracts.map(cd => cd.computeLeaf()),
tx.data.combinedData.newContracts.map(cd => cd.hash()),
tx.data.combinedData.newContracts.map(cd => new ContractData(cd.contractAddress, cd.portalContractAddress)),
tx.encryptedLogs || new TxL2Logs([]),
tx.unencryptedLogs || new TxL2Logs([]),
Expand Down Expand Up @@ -602,7 +602,7 @@ export class SoloBlockBuilder implements BlockBuilder {

// Update the contract and note hash trees with the new items being inserted to get the new roots
// that will be used by the next iteration of the base rollup circuit, skipping the empty ones
const newContracts = tx.data.combinedData.newContracts.map(cd => cd.computeLeaf());
const newContracts = tx.data.combinedData.newContracts.map(cd => cd.hash());
const newCommitments = tx.data.combinedData.newCommitments.map(x => x.value.toBuffer());

await this.db.appendLeaves(
Expand Down

0 comments on commit b86a4b1

Please sign in to comment.