From 57742fec5d21b93bcb7758c79833ba81526ea99d Mon Sep 17 00:00:00 2001 From: Leonid Tyurin Date: Mon, 4 Mar 2024 23:16:48 +0400 Subject: [PATCH] Fix RelayPool validation --- zp-relayer/configs/commitmentWatcherConfig.ts | 2 +- zp-relayer/pool/RelayPool.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zp-relayer/configs/commitmentWatcherConfig.ts b/zp-relayer/configs/commitmentWatcherConfig.ts index 6d87c6f2..31a413c4 100644 --- a/zp-relayer/configs/commitmentWatcherConfig.ts +++ b/zp-relayer/configs/commitmentWatcherConfig.ts @@ -15,7 +15,7 @@ const zSchema = z.object({ COMMITMENT_WATCHER_TX_VK_PATH: z.string().default('../params/transfer_verification_key.json'), COMMITMENT_WATCHER_FETCH_INTERVAL: z.coerce.number().default(10000), COMMITMENT_WATCHER_TX_REDUNDANCY: zBooleanString().default('false'), - COMMITMENT_WATCHER_FEE: z.coerce.number().default(50_000_000), + COMMITMENT_WATCHER_FEE: z.coerce.number().default(100_000_000), }) const config = zSchema.parse(process.env) diff --git a/zp-relayer/pool/RelayPool.ts b/zp-relayer/pool/RelayPool.ts index 49f067d2..01877a25 100644 --- a/zp-relayer/pool/RelayPool.ts +++ b/zp-relayer/pool/RelayPool.ts @@ -77,7 +77,7 @@ export class RelayPool extends BasePool { await checkAssertion(() => checkProof(proof, (p, i) => this.verifyProof(p, i))) const tokenAmount = delta.tokenAmount - const tokenAmountWithFee = tokenAmount.add(transactFee) + const tokenAmountWithFee = tokenAmount.add(transactFee).add(treeUpdateFee) const energyAmount = delta.energyAmount if (txType === TxType.WITHDRAWAL) {