Skip to content

Commit

Permalink
Add in MerkleWitnesses to Batch
Browse files Browse the repository at this point in the history
  • Loading branch information
ejMina226 committed Nov 8, 2024
1 parent f125d7e commit fd12704
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/protocol/src/model/StateTransitionProvableBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ export class StateTransitionProvableBatch extends Struct({
transitions: {
transition: ProvableStateTransition;
type: ProvableStateTransitionType;
merkleWitnesses: RollupMerkleTreeWitness;
}[]
}[],
merkleWitnesses: RollupMerkleTreeWitness[]
): StateTransitionProvableBatch {
const batch = transitions.map((entry) => entry.transition);
const transitionTypes = transitions.map((entry) => entry.type);
const merkleWitnesses = transitions.map((entry) => entry.merkleWitnesses);

// Check that order is correct
let normalSTsStarted = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export class StateTransitionTask
witnessProviderReference.setWitnessProvider(witnessProvider);

const stBatch = input.stateTransitions.slice();
const merkleWitnesses = input.merkleWitnesses.slice();
// Array.from({
// length: ProtocolConstants.stateTransitionProverBatchSize - stBatch.length,
// }).forEach(() => {
Expand All @@ -78,7 +79,7 @@ export class StateTransitionTask

const output = await this.stateTransitionProver.runBatch(
input.publicInput,
StateTransitionProvableBatch.fromMappings(stBatch)
StateTransitionProvableBatch.fromMappings(stBatch, merkleWitnesses)
);
log.debug("STTask public io:", {
input: StateTransitionProverPublicInput.toJSON(input.publicInput),
Expand Down

0 comments on commit fd12704

Please sign in to comment.