Skip to content

Commit

Permalink
fix: use correct tree arity and import from maci-core
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlc03 authored and 0xmad committed Aug 14, 2024
1 parent 5ed30d3 commit 71bbf73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/contracts/tasks/helpers/Prover.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable no-console, no-await-in-loop */
import { STATE_TREE_ARITY, MESSAGE_TREE_ARITY } from "maci-core";
import { G1Point, G2Point } from "maci-crypto";
import { VerifyingKey } from "maci-domainobjs";

Expand All @@ -8,7 +9,6 @@ import type { BigNumberish } from "ethers";

import { asHex, formatProofForVerifierContract } from "../../ts/utils";

import { STATE_TREE_ARITY } from "./constants";
import { IProverParams } from "./types";

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ export class Prover {
]);

const numMessages = Number(numSignUpsAndMessages[1]);
const messageBatchSize = STATE_TREE_ARITY ** Number(treeDepths[1]);
const messageBatchSize = MESSAGE_TREE_ARITY ** Number(treeDepths[1]);
let totalMessageBatches = numMessages <= messageBatchSize ? 1 : Math.floor(numMessages / messageBatchSize);
let numberBatchesProcessed = numBatchesProcessed;

Expand Down
2 changes: 0 additions & 2 deletions packages/contracts/tasks/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export enum EChainId {
Coverage = 1337,
}

export const STATE_TREE_ARITY = 5;

/**
* Get network rpc urls object
*
Expand Down

0 comments on commit 71bbf73

Please sign in to comment.