Skip to content

Commit 0d17c69

Browse files
committed
Add in default for MerkleWitness
1 parent 9d32968 commit 0d17c69

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/protocol/src/model/StateTransitionProvableBatch.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { Bool, Provable, Struct } from "o1js";
2-
import { range, RollupMerkleTreeWitness } from "@proto-kit/common";
2+
import {
3+
InMemoryMerkleTreeStorage,
4+
range,
5+
RollupMerkleTree,
6+
RollupMerkleTreeWitness,
7+
} from "@proto-kit/common";
38

49
import { constants } from "../Constants";
510

@@ -90,7 +95,11 @@ export class StateTransitionProvableBatch extends Struct({
9095
while (batch.length < constants.stateTransitionProverBatchSize) {
9196
batch.push(ProvableStateTransition.dummy());
9297
transitionTypes.push(ProvableStateTransitionType.normal);
93-
witnesses.push(new RollupMerkleTreeWitness({ path: [], isLeft: [] }));
98+
witnesses.push(
99+
new RollupMerkleTree(new InMemoryMerkleTreeStorage()).getWitness(
100+
BigInt(0)
101+
)
102+
);
94103
}
95104
return new StateTransitionProvableBatch({
96105
batch,

0 commit comments

Comments
 (0)