Skip to content

Commit

Permalink
Fix sequencer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Mar 8, 2024
1 parent 429fba4 commit 8a4802d
Showing 1 changed file with 9 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
import { Body, L2Block, MerkleTreeId, Tx, TxEffect, makeEmptyLogs, mockTx } from '@aztec/circuit-types';
import {
AppendOnlyTreeSnapshot,
AztecAddress,
BaseOrMergeRollupPublicInputs,
EthAddress,
Fr,
GlobalVariables,
Header,
MAX_NEW_L2_TO_L1_MSGS_PER_TX,
MAX_NEW_NULLIFIERS_PER_TX,
MAX_NON_REVERTIBLE_NOTE_HASHES_PER_TX,
MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX,
MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX,
MAX_REVERTIBLE_NOTE_HASHES_PER_TX,
MAX_REVERTIBLE_NULLIFIERS_PER_TX,
MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
NULLIFIER_SUBTREE_HEIGHT,
NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
PUBLIC_DATA_SUBTREE_HEIGHT,
PartialStateReference,
Proof,
PublicDataTreeLeaf,
PublicDataUpdateRequest,
PublicKernelCircuitPublicInputs,
RootRollupPublicInputs,
SideEffectLinkedToNoteHash,
StateReference,
} from '@aztec/circuits.js';
import {
fr,
makeBaseOrMergeRollupPublicInputs,
makeNewSideEffect,
makeNewSideEffectLinkedToNoteHash,
makePrivateKernelTailCircuitPublicInputs,
makeProof,
makePublicCallRequest,
makeRootRollupPublicInputs,
} from '@aztec/circuits.js/testing';
import { AppendOnlyTreeSnapshot, AztecAddress, BaseOrMergeRollupPublicInputs, EthAddress, Fr, GlobalVariables, Header, MAX_NEW_L2_TO_L1_MSGS_PER_TX, MAX_NEW_NULLIFIERS_PER_TX, MAX_NON_REVERTIBLE_NOTE_HASHES_PER_TX, MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX, MAX_NON_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX, MAX_REVERTIBLE_NOTE_HASHES_PER_TX, MAX_REVERTIBLE_NULLIFIERS_PER_TX, MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, NULLIFIER_SUBTREE_HEIGHT, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, PUBLIC_DATA_SUBTREE_HEIGHT, PartialStateReference, Proof, PublicDataTreeLeaf, PublicDataUpdateRequest, PublicKernelCircuitPublicInputs, RootRollupPublicInputs, SideEffectLinkedToNoteHash, StateReference } from '@aztec/circuits.js';
import { fr, makeBaseOrMergeRollupPublicInputs, makeNewSideEffect, makeNewSideEffectLinkedToNoteHash, makePrivateKernelTailCircuitPublicInputs, makeProof, makePublicCallRequest, makeRootRollupPublicInputs } from '@aztec/circuits.js/testing';
import { makeTuple, range } from '@aztec/foundation/array';
import { toBufferBE } from '@aztec/foundation/bigint-buffer';
import { padArrayEnd, times } from '@aztec/foundation/collection';
Expand All @@ -52,17 +15,13 @@ import { type MemDown, default as memdown } from 'memdown';
import { VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js';
import { EmptyRollupProver } from '../prover/empty.js';
import { RollupProver } from '../prover/index.js';
import {
ProcessedTx,
makeEmptyProcessedTx as makeEmptyProcessedTxFromHistoricalTreeRoots,
makeProcessedTx,
toTxEffect,
} from '../sequencer/processed_tx.js';
import { ProcessedTx, makeEmptyProcessedTx as makeEmptyProcessedTxFromHistoricalTreeRoots, makeProcessedTx, toTxEffect } from '../sequencer/processed_tx.js';
import { WASMSimulator } from '../simulator/acvm_wasm.js';
import { RollupSimulator } from '../simulator/index.js';
import { RealRollupCircuitSimulator } from '../simulator/rollup.js';
import { SoloBlockBuilder } from './solo_block_builder.js';


export const createMemDown = () => (memdown as any)() as MemDown<any, any>;

describe('sequencer/solo_block_builder', () => {
Expand Down Expand Up @@ -311,13 +270,15 @@ describe('sequencer/solo_block_builder', () => {
processedTx.data.end.newNullifiers = makeTuple(
MAX_REVERTIBLE_NULLIFIERS_PER_TX,
makeNewSideEffectLinkedToNoteHash,
seed + 0x200,
seed + 0x100000,
);

processedTx.data.endNonRevertibleData.newNullifiers = makeTuple(
MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX,
makeNewSideEffectLinkedToNoteHash,
seed + 0x300,
seed + 0x100000 + MAX_REVERTIBLE_NULLIFIERS_PER_TX,
);

processedTx.data.end.newNullifiers[tx.data.end.newNullifiers.length - 1] = SideEffectLinkedToNoteHash.empty();

processedTx.data.end.newL2ToL1Msgs = makeTuple(MAX_NEW_L2_TO_L1_MSGS_PER_TX, fr, seed + 0x300);
Expand Down Expand Up @@ -424,4 +385,4 @@ describe('sequencer/solo_block_builder', () => {

// describe("Input guard tests", () => {
// })
});
});

0 comments on commit 8a4802d

Please sign in to comment.