Skip to content

Commit

Permalink
test: fix solo block builder
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Mar 12, 2024
1 parent 07dd34f commit 114c536
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
GlobalVariables,
Header,
MAX_NEW_L2_TO_L1_MSGS_PER_TX,
MAX_NEW_NOTE_HASHES_PER_TX,
MAX_NEW_NULLIFIERS_PER_TX,
MAX_NON_REVERTIBLE_NOTE_HASHES_PER_TX,
MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX,
Expand All @@ -25,8 +26,10 @@ import {
PublicDataUpdateRequest,
PublicKernelCircuitPublicInputs,
RootRollupPublicInputs,
SideEffect,
SideEffectLinkedToNoteHash,
StateReference,
sideEffectCmp,
} from '@aztec/circuits.js';
import {
fr,
Expand Down Expand Up @@ -128,13 +131,25 @@ describe('sequencer/solo_block_builder', () => {
await expectsDb.appendLeaves(
MerkleTreeId.NOTE_HASH_TREE,
txs.flatMap(tx =>
[...tx.data.endNonRevertibleData.newNoteHashes, ...tx.data.end.newNoteHashes].map(l => l.value.toBuffer()),
padArrayEnd(
[...tx.data.endNonRevertibleData.newNoteHashes, ...tx.data.end.newNoteHashes]
.filter(x => !x.isEmpty())
.sort(sideEffectCmp),
SideEffect.empty(),
MAX_NEW_NOTE_HASHES_PER_TX,
).map(l => l.value.toBuffer()),
),
);
await expectsDb.batchInsert(
MerkleTreeId.NULLIFIER_TREE,
txs.flatMap(tx =>
[...tx.data.endNonRevertibleData.newNullifiers, ...tx.data.end.newNullifiers].map(x => x.value.toBuffer()),
padArrayEnd(
[...tx.data.endNonRevertibleData.newNullifiers, ...tx.data.end.newNullifiers]
.filter(x => !x.isEmpty())
.sort(sideEffectCmp),
SideEffectLinkedToNoteHash.empty(),
MAX_NEW_NULLIFIERS_PER_TX,
).map(x => x.value.toBuffer()),
),
NULLIFIER_SUBTREE_HEIGHT,
);
Expand Down

0 comments on commit 114c536

Please sign in to comment.