Skip to content

Conversation

mani99brar
Copy link
Contributor

@mani99brar mani99brar commented Aug 27, 2025

  • Introduced snapshot saving period (1 m 30s) for devnet similar to testnet.
  • Epoch period for devnet updated to 5 mins.
  • Transaction status check fixed for all transactions, earlier a "FINAL" transaction had to be waited till expiration limit which was not the intended behaviour.

PR-Codex overview

This PR primarily focuses on enhancing the snapshot saving mechanism for different networks, particularly DEVNET, by introducing a time limit for saving snapshots and modifying the logic around epoch periods.

Detailed summary

  • Renamed test case from "should save snapshot if snapshot is needed at anytime for devnet" to "should save snapshot in time limit for devnet".
  • Added snapshotSavingPeriod constant for DEVNET and TESTNET.
  • Adjusted epochPeriod from 1800 to 300 seconds for DEVNET and TESTNET.
  • Updated logic in saveSnapshot to check against snapshotSavingPeriod for saving snapshots.
  • Modified isSnapshotNeeded to align with new snapshot logic.
  • Refactored transaction handlers to use toSubmitTransaction function for better readability and maintainability.
  • Changed the Bridge interface to be exported.
  • Ensured consistent use of toSubmitTransaction across various transaction handlers for status checking.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features

    • Per-network snapshot saving window with tailored thresholds for DEVNET and TESTNET.
    • Devnet-specific transaction paths added for state advancement.
  • Improvements

    • Shorter DEVNET epoch for faster cycles.
    • Snapshotting now applies across networks with dynamic timing.
    • Unified transaction gating: actions allowed in more states (blocked only when pending/not-final), reducing delays.
    • Improved gas-price handling for one bridge path to better cap fees.
  • Tests

    • Tests updated to use dynamic saving periods instead of hard-coded timestamps.
  • Chores

    • Public API exports and signatures updated.

Copy link

netlify bot commented Aug 27, 2025

Deploy Preview for veascan ready!

Name Link
🔨 Latest commit 7d472b2
🔍 Latest deploy log https://app.netlify.com/projects/veascan/deploys/68b2d61001f02e0008485ff7
😎 Deploy Preview https://deploy-preview-431--veascan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

coderabbitai bot commented Aug 27, 2025

Walkthrough

Per-network snapshot timing was added (snapshotSavingPeriod) and DEVNET epochPeriod reduced; bridgeRoutes exports were reorganized. Snapshot decision logic and tests now use the network-specific threshold. Transaction handlers and BaseTransactionHandler now gate submissions via a new toSubmitTransaction rule (skip when PENDING or NOT_FINAL).

Changes

Cohort / File(s) Summary of changes
Bridge routes config & exports
validator-cli/src/consts/bridgeRoutes.ts
DEVNET epochPeriod reduced to 300; added snapshotSavingPeriod mapping (DEVNET=90, TESTNET=600); reorganized declarations and public export list to expose bridges, getBridgeConfig, Network, and snapshotSavingPeriod (and Bridge via its exported interface).
Snapshot logic & tests
validator-cli/src/helpers/snapshot.ts, validator-cli/src/helpers/snapshot.test.ts
Snapshot gating now uses snapshotSavingPeriod[network]; removed DEVNET-only guard; unconditional time calculations and early-return when timeLeftForEpoch > threshold; isSnapshotNeeded signature now includes count; test updated to compute now from epochPeriod and snapshotSavingPeriod.
Base transaction handler
validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
Added toSubmitTransaction(trnx, contract, currentTime): Promise<boolean> and refactored multiple flows to use it; semantics changed to block submits only when status is PENDING or NOT_FINAL.
Arb→Eth transaction handlers
validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
Replaced per-method status checks with toSubmitTransaction gating for makeClaim, challengeClaim, sendSnapshot, resolveChallengedClaim, and devnetAdvanceState; added DevnetTransactions type and devnetAdvanceStateTxn tracking.
Arb→Gnosis transaction handlers
validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
Same gating change using toSubmitTransaction across methods; added gas-price clamping logic in challengeClaim; introduced GnosisDevnetTransactions, veaOutboxDevnet, and devnetAdvanceStateTxn for devnet support.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Validator
  participant SnapshotHelper as snapshot.ts
  participant BridgeRoutes as bridgeRoutes.ts
  participant Storage as SnapshotStore

  Validator->>SnapshotHelper: saveSnapshotIfNeeded(params)
  SnapshotHelper->>BridgeRoutes: read epochPeriod, snapshotSavingPeriod[network]
  SnapshotHelper->>SnapshotHelper: compute timeLeftForEpoch
  alt timeLeftForEpoch > snapshotSavingPeriod[network]
    SnapshotHelper-->>Validator: SNAPSHOT_WAITING (early return)
  else proceed
    SnapshotHelper->>Storage: fetchLastSavedMessage()
    SnapshotHelper->>SnapshotHelper: isSnapshotNeeded(count, ...)
    alt snapshot needed
      SnapshotHelper-->>Validator: toSaveSnapshot = true (proceed to save)
    else
      SnapshotHelper-->>Validator: toSaveSnapshot = false
    end
  end

  note over SnapshotHelper: isSnapshotNeeded now receives `count`
Loading
sequenceDiagram
  autonumber
  actor Bot
  participant BaseHandler
  participant Chain as L1/L2 Chain

  Bot->>BaseHandler: performAction(trnx, contract, currentTime)
  BaseHandler->>BaseHandler: toSubmitTransaction(trnx, contract, currentTime)
  alt toSubmitTransaction == false (PENDING / NOT_FINAL)
    BaseHandler-->>Bot: return (skip submission)
  else
    BaseHandler->>Chain: estimate/call tx
    Chain-->>BaseHandler: receipt/events
    BaseHandler-->>Bot: emit status update
  end

  note over BaseHandler: Applied to ArbToEth and ArbToGnosis handlers (devnet paths included)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

Type: Feature🗿, Package: Bots

Suggested reviewers

  • alcercu
  • jaybuidl

Poem

I nibble code and count the ticks,
DEVNET hops fast, TESTNET licks its lips.
I wait when "pending" clouds the day,
Save snapshots only when time says "stay."
Hop, commit — the bridges hum away. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/snapshot-period

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts (1)

165-167: ROUTER provider can be undefined; add explicit guard

If veaRouterProvider isn’t configured, provider.getTransactionReceipt will throw with a vague error. Fail fast with a clear message.

Apply:

-      case ContractType.ROUTER:
-        provider = this.veaRouterProvider;
-        break;
+      case ContractType.ROUTER:
+        if (!this.veaRouterProvider) {
+          throw new Error(`Router provider not configured for chainId=${this.chainId}`);
+        }
+        provider = this.veaRouterProvider;
+        break;
validator-cli/src/consts/bridgeRoutes.ts (1)

14-23: Type export bug: Bridge is a type, not a value — current export breaks compilation

export { …, Bridge, … } attempts to re-export a type as a value. Export the interface at declaration or use export type.

Apply either of these fixes (pick one):

Option A — export at declaration, drop from list:

-interface Bridge {
+export interface Bridge {
   chain: string;
   minChallengePeriod: number;
   sequencerDelayLimit: number;
   inboxRPC: string;
   outboxRPC: string;
   routerRPC?: string;
   routeConfig: { [key in Network]: RouteConfigs };
   depositToken?: string;
 }
@@
-export { bridges, getBridgeConfig, Bridge, Network, snapshotSavingPeriod };
+export { bridges, getBridgeConfig, Network, snapshotSavingPeriod };

Option B — keep declaration local, export as type:

-export { bridges, getBridgeConfig, Bridge, Network, snapshotSavingPeriod };
+export { bridges, getBridgeConfig, Network, snapshotSavingPeriod };
+export type { Bridge };

Also applies to: 102-102

🧹 Nitpick comments (7)
validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts (1)

192-297: DRY the status gating to avoid 5 copy-pastes

Centralize “should submit?” logic to keep handlers consistent and easy to tweak.

Example:

// inside BaseTransactionHandler
private shouldSubmit(status: TransactionStatus) {
  return status === TransactionStatus.NOT_MADE || status === TransactionStatus.EXPIRED;
}

Then replace each:

if (status === TransactionStatus.PENDING || status === TransactionStatus.NOT_FINAL || status === TransactionStatus.FINAL) return;

with:

if (!this.shouldSubmit(status)) return;
validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts (1)

108-119: Optional: make exec function injection consistent with the base/interface

This method adds an injectable execFn (good for tests) but the abstract signature doesn’t expose it. Either add an optional execFn to the abstract method or keep resolution logic in a helper.

Possible base change:

-  public abstract resolveChallengedClaim(sendSnapshotTxn: string): Promise<void>;
+  public abstract resolveChallengedClaim(
+    sendSnapshotTxn: string,
+    execFn?: typeof messageExecutor
+  ): Promise<void>;
validator-cli/src/consts/bridgeRoutes.ts (1)

90-95: Annotate snapshotSavingPeriod for safer keyed access

Add an explicit Record type to catch missing keys at compile time.

-const snapshotSavingPeriod = {
+const snapshotSavingPeriod: Record<Network, number> = {
   [Network.DEVNET]: 90, // 1m 30s
   [Network.TESTNET]: 600, // 10 mins
 };
validator-cli/src/helpers/snapshot.test.ts (1)

188-198: Update misleading comment to match dynamic savingPeriod

The comment says “60 seconds…” but savingPeriod is pulled from config (90s for devnet now).

-      const now = epochPeriod + epochPeriod - savingPeriod; // 60 seconds before the second epoch ends
+      const now = epochPeriod + epochPeriod - savingPeriod; // savingPeriod seconds before the second epoch ends
validator-cli/src/helpers/snapshot.ts (3)

5-5: Consolidate duplicate import from bridgeRoutes

Minor cleanup: import both Network and snapshotSavingPeriod in one statement.

-import { Network } from "../consts/bridgeRoutes";
+import { Network, snapshotSavingPeriod } from "../consts/bridgeRoutes";
...
-import { snapshotSavingPeriod } from "../consts/bridgeRoutes";

36-41: Per-network gate: add safe default and clamp to epochPeriod

Good move applying the time-gate across networks. Add a defensive default so unknown/missing keys don’t disable the gate unintentionally, and clamp to epochPeriod to avoid odd configs. Also consider including network in the WAITING payload for observability.

-  const timeElapsed = now % epochPeriod;
-  const timeLeftForEpoch = epochPeriod - timeElapsed;
-
-  if (timeLeftForEpoch > snapshotSavingPeriod[network]) {
-    emitter.emit(BotEvents.SNAPSHOT_WAITING, timeLeftForEpoch);
+  const timeElapsed = now % epochPeriod;
+  const savingPeriod =
+    Math.min(epochPeriod, snapshotSavingPeriod[network] ?? epochPeriod); // default: allow immediate snapshot
+  const timeLeftForEpoch = epochPeriod - timeElapsed;
+
+  if (timeLeftForEpoch > savingPeriod) {
+    emitter.emit(BotEvents.SNAPSHOT_WAITING, { timeLeftForEpoch, savingPeriod, network });
     return { transactionHandler, latestCount: count };
   }

Verification checklist:

  • Ensure snapshotSavingPeriod is typed as Record<Network, number> and has entries for all live networks.
  • Add a boundary test for timeLeftForEpoch === savingPeriod (should proceed to snapshot checks).

71-73: Stale “+1” comment; verify off-by-one semantics for Graph fallback

The comment says “adding 1,” but the code no longer does. Clarify intent to avoid regressions (duplicate snapshots or missed saves).

Option A — fix the comment (current logic kept):

-    // adding 1 to the message index to get the last saved count
-    lastSavedCount = messageIndex;
+    // Graph returns last included message index; use it as-is for lastSavedCount
+    lastSavedCount = messageIndex;

Option B — if contract semantics require count === index + 1, restore +1:

-    // adding 1 to the message index to get the last saved count
-    lastSavedCount = messageIndex;
+    // Convert last included message index to count
+    lastSavedCount = messageIndex + 1;

Suggested tests:

  • Mock queryFilter to throw, set fetchLastSavedMessage → "msg-12", and assert:
    • When veaInbox.count() === 13, snapshotNeeded is false if using +1; true if using index (confirm desired behavior).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ffb594f and df5821b.

📒 Files selected for processing (6)
  • validator-cli/src/consts/bridgeRoutes.ts (5 hunks)
  • validator-cli/src/helpers/snapshot.test.ts (2 hunks)
  • validator-cli/src/helpers/snapshot.ts (3 hunks)
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts (5 hunks)
  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts (5 hunks)
  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts (5 hunks)
🧰 Additional context used
🧠 Learnings (20)
📚 Learning: 2024-12-02T10:16:56.825Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:829-840
Timestamp: 2024-12-02T10:16:56.825Z
Learning: In the `validator-cli/src/ArbToEth/watcherArbToGnosis.ts` file, avoid adding redundant error handling in functions like `reconstructChallengeProgress` when error handling is already adequately managed.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-02T10:08:28.998Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:625-648
Timestamp: 2024-12-02T10:08:28.998Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToGnosis.ts`, the function `findLatestL2BatchAndBlock` already handles the case when `fromArbBlock > latestBlockNumber`, so additional error handling for this case is unnecessary.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-26T08:37:47.591Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:829-1112
Timestamp: 2024-11-26T08:37:47.591Z
Learning: Refactoring the `reconstructChallengeProgress` function in `validator-cli/src/ArbToEth/watcherArbToGnosis.ts` into smaller functions is considered unnecessary abstraction.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2025-06-05T12:17:22.931Z
Learnt from: mani99brar
PR: kleros/vea#424
File: validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts:128-131
Timestamp: 2025-06-05T12:17:22.931Z
Learning: In the BaseTransactionHandler class, all transaction properties are expected to be initialized to null. When subclasses like ArbToEthDevnetTransactionHandler use spread syntax to extend the transactions object (e.g., `{ ...this.transactions, devnetAdvanceStateTxn: null }`), there's no issue with state loss since the base transactions are null initially.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2024-12-09T09:42:34.067Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:64-77
Timestamp: 2024-12-09T09:42:34.067Z
Learning: In the `TransactionHandler` class (`bridger-cli/src/utils/transactionHandler.ts`), it's acceptable to let methods like `makeClaim` fail without additional error handling.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2024-12-02T10:08:22.848Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:1128-1131
Timestamp: 2024-12-02T10:08:22.848Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToGnosis.ts`, adding graceful shutdown handling is unnecessary because the bot only has TCP connections to be closed, and both client and server are already resilient regarding TCP connections.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-27T04:18:05.872Z
Learnt from: mani99brar
PR: kleros/vea#344
File: validator-cli/src/ArbToEth/watcherArbToEth.ts:732-745
Timestamp: 2024-11-27T04:18:05.872Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToEth.ts`, input validation inside the `hashClaim` function is unnecessary because the upper layer ensures valid input before calling it.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-25T09:05:35.087Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:342-351
Timestamp: 2024-11-25T09:05:35.087Z
Learning: The `retryOperation` function in `watcherArbToGnosis.ts` acts as the retry mechanism for the challenge transaction, so additional retry logic is unnecessary.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
📚 Learning: 2024-11-25T09:05:40.703Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:454-457
Timestamp: 2024-11-25T09:05:40.703Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToGnosis.ts`, when calculating `arbAverageBlockTime`, it's acceptable not to add error handling for division by zero when `blockLatestArb.timestamp` equals `blockoldArb.timestamp` because if it occurs, it indicates a major issue that requires investigation.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-02T10:08:28.998Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:625-648
Timestamp: 2024-12-02T10:08:28.998Z
Learning: Avoid adding logging within loops in `validator-cli/src/ArbToEth/watcherArbToGnosis.ts` that could lead to excessive log output.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2025-06-05T12:17:21.782Z
Learnt from: mani99brar
PR: kleros/vea#424
File: validator-cli/src/helpers/claimer.ts:72-76
Timestamp: 2025-06-05T12:17:21.782Z
Learning: In validator-cli/src/helpers/claimer.ts, the outboxStateRoot captured at the beginning of the checkAndClaim function won't change for the epoch being claimed, so there's no race condition concern when reusing it in makeClaim/makeClaimDevnet functions.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2024-11-20T11:50:15.304Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: contracts/src/test/ArbToGnosis/VeaInboxArbToGnosisMock.sol:27-38
Timestamp: 2024-11-20T11:50:15.304Z
Learning: In `VeaInboxArbToGnosisMock.sendSnapshot`, `epochPeriod` is guaranteed to be non-zero, so a check for `epochPeriod > 0` is unnecessary.

Applied to files:

  • validator-cli/src/helpers/snapshot.test.ts
📚 Learning: 2024-11-19T10:59:44.618Z
Learnt from: fcanela
PR: kleros/vea#344
File: validator-cli/src/ArbToEth/watcherArbToEth.ts:411-414
Timestamp: 2024-11-19T10:59:44.618Z
Learning: In the TypeScript codebase, particularly in `validator-cli/src/ArbToEth/watcherArbToEth.ts`, when there is no error fallback operation, errors should not be caught; they should be allowed to bubble up to enable proper error propagation and handling at higher levels.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-09T09:42:51.590Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:79-101
Timestamp: 2024-12-09T09:42:51.590Z
Learning: In the `bridger-cli/src/utils/transactionHandler.ts` file, within the `TransactionHandler` class, it's acceptable to let methods like `startVerification` fail without additional error handling.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2024-12-09T09:40:49.098Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:131-144
Timestamp: 2024-12-09T09:40:49.098Z
Learning: In the `TransactionHandler` class, it's acceptable to let methods like `withdrawClaimDeposit` fail without additional error handling.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2024-12-09T09:40:28.400Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:13-13
Timestamp: 2024-12-09T09:40:28.400Z
Learning: In `bridger-cli/src/utils/transactionHandler.ts`, the `veaOutbox` implementations differ for each chain, but a common interface should be defined for type checks to enhance type safety.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2025-01-06T06:27:38.796Z
Learnt from: mani99brar
PR: kleros/vea#388
File: validator-cli/src/utils/ethers.ts:67-72
Timestamp: 2025-01-06T06:27:38.796Z
Learning: A custom error named `TransactionHandlerNotDefinedError` is now thrown for unsupported chain IDs in `getTransactionHandler` within `validator-cli/src/utils/ethers.ts`.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2024-12-10T08:00:35.645Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/consts/bridgeRoutes.ts:28-30
Timestamp: 2024-12-10T08:00:35.645Z
Learning: In `bridger-cli/src/consts/bridgeRoutes.ts`, additional validation in the `getBridgeConfig` function is unnecessary because error handling and validation are managed by upper layers in the application.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2024-12-09T10:53:55.715Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/bridger.ts:25-109
Timestamp: 2024-12-09T10:53:55.715Z
Learning: In the `bridger-cli/src/bridger.ts` file, refactoring the main loop and adding additional error handling are not needed unless deemed necessary by the developer.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2025-01-06T06:24:17.556Z
Learnt from: mani99brar
PR: kleros/vea#388
File: validator-cli/src/utils/ethers.ts:32-38
Timestamp: 2025-01-06T06:24:17.556Z
Learning: We only support chain IDs 11155111 and 10200 for bridging in the current bot. For future bridges, chain IDs will be added as needed, and environment validation (fallback handling) will be addressed in a future PR.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
🧬 Code graph analysis (2)
validator-cli/src/helpers/snapshot.test.ts (1)
validator-cli/src/consts/bridgeRoutes.ts (1)
  • snapshotSavingPeriod (102-102)
validator-cli/src/helpers/snapshot.ts (1)
validator-cli/src/consts/bridgeRoutes.ts (1)
  • snapshotSavingPeriod (102-102)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts (1)

97-105: Router provider dependency: ensure Base null-check covers this path

resolveChallengedClaim uses ContractType.ROUTER; the Base null-check I suggested will make failures explicit if routerRPC/env is missing.

If you want, I can add a small test harness to simulate missing router provider and assert the error message.

validator-cli/src/consts/bridgeRoutes.ts (1)

42-49: Epoch period changes vs PR summary — confirm intended TESTNET values

PR summary says TESTNET epoch reduced to 300s; current code keeps TESTNET at 7200 (Arb→Eth) and 3600 (Arb→Gnosis). Clarify which is correct and update summary or code accordingly.

Would you like me to prepare a follow-up diff if TESTNET should also be 300s?

Also applies to: 57-65

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (14)
validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts (5)

207-209: Guard relies on toSubmitTransaction — fix there prevents duplicate StartVerification after FINAL

No change needed here once the base guard is corrected to skip FINAL.


235-237: Same: avoid re-verifying after FINAL via base guard

Proceed safely once toSubmitTransaction blocks FINAL.


259-265: Same: prevent duplicate withdrawClaimDeposit after FINAL

Covered by the base fix.


279-285: Same: prevent duplicate withdrawChallengeDeposit after FINAL

Covered by the base fix.


192-201: Do not submit when a prior tx is FINAL — include FINAL in the early-return

Allowing submissions after FINAL risks revert loops, wasted gas, and noisy logs. Only submit when status is NOT_MADE or EXPIRED.

Apply:

   public async toSubmitTransaction(
     trnx: Transaction | null,
     contract: ContractType,
     currentTime: number
   ): Promise<boolean> {
     const status = await this.checkTransactionStatus(trnx, contract, currentTime);
-    if (status === TransactionStatus.PENDING || status === TransactionStatus.NOT_FINAL) return false;
-    return true;
+    return status === TransactionStatus.NOT_MADE || status === TransactionStatus.EXPIRED;
   }
validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts (5)

29-31: Avoid re-claim after FINAL via base guard

Once toSubmitTransaction returns false for FINAL, this won’t resubmit.


53-55: Avoid re-challenge after FINAL via base guard

Covered by the base fix.


92-94: Avoid re-sending snapshot after FINAL via base guard

Covered by the base fix.


106-108: Avoid re-executing snapshot after FINAL via base guard

Covered by the base fix.


138-140: Avoid duplicate devnetAdvanceState after FINAL via base guard

Covered by the base fix.

validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts (4)

44-46: Avoid re-claim after FINAL via base guard

Covered by the base fix.


60-62: Avoid re-challenge after FINAL via base guard

Covered by the base fix.


88-90: Avoid re-sending snapshot after FINAL via base guard

Covered by the base fix.


137-139: Avoid duplicate devnetAdvanceState after FINAL via base guard

Covered by the base fix.

🧹 Nitpick comments (2)
validator-cli/src/consts/bridgeRoutes.ts (1)

90-95: Strongly type snapshotSavingPeriod to avoid index errors

Prevents TS from complaining when indexing by a Network variable and documents intent.

-const snapshotSavingPeriod = {
+const snapshotSavingPeriod: Record<Network, number> = {
   [Network.DEVNET]: 90, // 1m 30s
   [Network.TESTNET]: 600, // 10 mins
 };
validator-cli/src/helpers/snapshot.test.ts (1)

187-197: Fix misleading comment and simplify expression

The comment says “60 seconds” but DEVNET savingPeriod is 90s. Also, 2*epochPeriod reads clearer.

-      const now = epochPeriod + epochPeriod - savingPeriod; // 60 seconds before the second epoch ends
+      const now = 2 * epochPeriod - savingPeriod; // savingPeriod seconds before the second epoch ends
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between df5821b and deeb431.

📒 Files selected for processing (6)
  • validator-cli/src/consts/bridgeRoutes.ts (6 hunks)
  • validator-cli/src/helpers/snapshot.test.ts (2 hunks)
  • validator-cli/src/helpers/snapshot.ts (3 hunks)
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts (5 hunks)
  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts (5 hunks)
  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • validator-cli/src/helpers/snapshot.ts
🧰 Additional context used
🧠 Learnings (23)
📚 Learning: 2024-12-09T09:42:34.067Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:64-77
Timestamp: 2024-12-09T09:42:34.067Z
Learning: In the `TransactionHandler` class (`bridger-cli/src/utils/transactionHandler.ts`), it's acceptable to let methods like `makeClaim` fail without additional error handling.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-09T09:42:51.590Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:79-101
Timestamp: 2024-12-09T09:42:51.590Z
Learning: In the `bridger-cli/src/utils/transactionHandler.ts` file, within the `TransactionHandler` class, it's acceptable to let methods like `startVerification` fail without additional error handling.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
📚 Learning: 2025-06-05T12:17:22.931Z
Learnt from: mani99brar
PR: kleros/vea#424
File: validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts:128-131
Timestamp: 2025-06-05T12:17:22.931Z
Learning: In the BaseTransactionHandler class, all transaction properties are expected to be initialized to null. When subclasses like ArbToEthDevnetTransactionHandler use spread syntax to extend the transactions object (e.g., `{ ...this.transactions, devnetAdvanceStateTxn: null }`), there's no issue with state loss since the base transactions are null initially.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-09T09:40:28.400Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/transactionHandler.ts:13-13
Timestamp: 2024-12-09T09:40:28.400Z
Learning: In `bridger-cli/src/utils/transactionHandler.ts`, the `veaOutbox` implementations differ for each chain, but a common interface should be defined for type checks to enhance type safety.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
  • validator-cli/src/consts/bridgeRoutes.ts
  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2025-06-05T12:17:21.782Z
Learnt from: mani99brar
PR: kleros/vea#424
File: validator-cli/src/helpers/claimer.ts:72-76
Timestamp: 2025-06-05T12:17:21.782Z
Learning: In validator-cli/src/helpers/claimer.ts, the outboxStateRoot captured at the beginning of the checkAndClaim function won't change for the epoch being claimed, so there's no race condition concern when reusing it in makeClaim/makeClaimDevnet functions.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-20T11:50:15.304Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: contracts/src/test/ArbToGnosis/VeaInboxArbToGnosisMock.sol:27-38
Timestamp: 2024-11-20T11:50:15.304Z
Learning: In `VeaInboxArbToGnosisMock.sendSnapshot`, `epochPeriod` is guaranteed to be non-zero, so a check for `epochPeriod > 0` is unnecessary.

Applied to files:

  • validator-cli/src/helpers/snapshot.test.ts
📚 Learning: 2024-12-10T08:00:35.645Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/consts/bridgeRoutes.ts:28-30
Timestamp: 2024-12-10T08:00:35.645Z
Learning: In `bridger-cli/src/consts/bridgeRoutes.ts`, additional validation in the `getBridgeConfig` function is unnecessary because error handling and validation are managed by upper layers in the application.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2024-12-09T10:53:55.715Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/bridger.ts:25-109
Timestamp: 2024-12-09T10:53:55.715Z
Learning: In the `bridger-cli/src/bridger.ts` file, refactoring the main loop and adding additional error handling are not needed unless deemed necessary by the developer.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2024-12-09T09:04:04.819Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/graphQueries.ts:36-58
Timestamp: 2024-12-09T09:04:04.819Z
Learning: In `bridger-cli/src/utils/graphQueries.ts` (TypeScript), the `getVerificationStatus` function is no longer needed and has been removed.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2024-12-11T08:52:17.062Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/epochHandler.ts:13-13
Timestamp: 2024-12-11T08:52:17.062Z
Learning: In `bridger-cli/src/utils/epochHandler.ts`, the `veaOutbox` parameter is intentionally typed as `any` because the script is designed to be agnostic for multiple contracts.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2024-12-16T09:22:57.434Z
Learnt from: mani99brar
PR: kleros/vea#383
File: contracts/test/integration/ArbToGnosis.ts:114-114
Timestamp: 2024-12-16T09:22:57.434Z
Learning: In the local Hardhat deployment for testing, `VeaInboxArbToGnosisMock` is deployed with the identifier name `VeaInboxArbToGnosis`, so it's appropriate to retrieve it using `getContract("VeaInboxArbToGnosis")` and cast it to `VeaInboxArbToGnosisMock` in `ArbToGnosis.ts`.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2025-01-27T04:12:05.847Z
Learnt from: mani99brar
PR: kleros/vea#388
File: validator-cli/src/ArbToEth/validator.ts:16-17
Timestamp: 2025-01-27T04:12:05.847Z
Learning: In the validator-cli, `any` type is intentionally used for `veaInbox` and `veaOutbox` parameters to maintain chain agnosticism. This is because different chains have their own specific contract types (e.g., VeaInboxArbToEth, VeaOutboxArbToEth, VeaOutboxArbToGnosis) and using union types would make the code more complex and less maintainable.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2025-01-06T06:24:17.556Z
Learnt from: mani99brar
PR: kleros/vea#388
File: validator-cli/src/utils/ethers.ts:32-38
Timestamp: 2025-01-06T06:24:17.556Z
Learning: We only support chain IDs 11155111 and 10200 for bridging in the current bot. For future bridges, chain IDs will be added as needed, and environment validation (fallback handling) will be addressed in a future PR.

Applied to files:

  • validator-cli/src/consts/bridgeRoutes.ts
📚 Learning: 2024-12-02T10:16:56.825Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:829-840
Timestamp: 2024-12-02T10:16:56.825Z
Learning: In the `validator-cli/src/ArbToEth/watcherArbToGnosis.ts` file, avoid adding redundant error handling in functions like `reconstructChallengeProgress` when error handling is already adequately managed.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-02T10:08:28.998Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:625-648
Timestamp: 2024-12-02T10:08:28.998Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToGnosis.ts`, the function `findLatestL2BatchAndBlock` already handles the case when `fromArbBlock > latestBlockNumber`, so additional error handling for this case is unnecessary.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-02T10:08:22.848Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:1128-1131
Timestamp: 2024-12-02T10:08:22.848Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToGnosis.ts`, adding graceful shutdown handling is unnecessary because the bot only has TCP connections to be closed, and both client and server are already resilient regarding TCP connections.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-25T09:05:40.703Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:454-457
Timestamp: 2024-11-25T09:05:40.703Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToGnosis.ts`, when calculating `arbAverageBlockTime`, it's acceptable not to add error handling for division by zero when `blockLatestArb.timestamp` equals `blockoldArb.timestamp` because if it occurs, it indicates a major issue that requires investigation.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
📚 Learning: 2024-11-25T09:05:35.087Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:342-351
Timestamp: 2024-11-25T09:05:35.087Z
Learning: The `retryOperation` function in `watcherArbToGnosis.ts` acts as the retry mechanism for the challenge transaction, so additional retry logic is unnecessary.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
📚 Learning: 2024-12-02T10:08:28.998Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:625-648
Timestamp: 2024-12-02T10:08:28.998Z
Learning: Avoid adding logging within loops in `validator-cli/src/ArbToEth/watcherArbToGnosis.ts` that could lead to excessive log output.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts
  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-27T04:18:05.872Z
Learnt from: mani99brar
PR: kleros/vea#344
File: validator-cli/src/ArbToEth/watcherArbToEth.ts:732-745
Timestamp: 2024-11-27T04:18:05.872Z
Learning: In `validator-cli/src/ArbToEth/watcherArbToEth.ts`, input validation inside the `hashClaim` function is unnecessary because the upper layer ensures valid input before calling it.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-11-26T08:37:47.591Z
Learnt from: madhurMongia
PR: kleros/vea#359
File: validator-cli/src/ArbToEth/watcherArbToGnosis.ts:829-1112
Timestamp: 2024-11-26T08:37:47.591Z
Learning: Refactoring the `reconstructChallengeProgress` function in `validator-cli/src/ArbToEth/watcherArbToGnosis.ts` into smaller functions is considered unnecessary abstraction.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2025-01-06T06:27:38.796Z
Learnt from: mani99brar
PR: kleros/vea#388
File: validator-cli/src/utils/ethers.ts:67-72
Timestamp: 2025-01-06T06:27:38.796Z
Learning: A custom error named `TransactionHandlerNotDefinedError` is now thrown for unsupported chain IDs in `getTransactionHandler` within `validator-cli/src/utils/ethers.ts`.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
📚 Learning: 2024-12-09T10:54:09.943Z
Learnt from: mani99brar
PR: kleros/vea#370
File: bridger-cli/src/utils/claim.ts:42-51
Timestamp: 2024-12-09T10:54:09.943Z
Learning: In the `bridger-cli/src/utils/claim.ts` file, within the `fetchClaim` function, explicit error handling for provider calls and event queries is not required; errors should be allowed to propagate naturally.

Applied to files:

  • validator-cli/src/utils/transactionHandlers/arbToEthHandler.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: test
  • GitHub Check: dependency-review
🔇 Additional comments (8)
validator-cli/src/consts/bridgeRoutes.ts (5)

14-23: Public Bridge interface export: OK

Interface shape is clear and minimal.


33-36: Enum re-export pattern is fine

Declaring locally and re-exporting below keeps the public surface explicit.


69-88: Bridges mapping looks correct

Chain IDs, RPC/env usage, and route selections align with our supported networks (11155111, 10200).


102-102: Export surface: OK

Named exports are consistent and minimal.


42-42: Align TESTNET epochPeriod settings with PR specification

The current epochPeriod values in validator-cli/src/consts/bridgeRoutes.ts do not match the PR description (which specifies a 300 s epoch for TESTNET). Please confirm the intended TESTNET settings and update either the code or the PR description/tests accordingly.

• validator-cli/src/consts/bridgeRoutes.ts
– Arbitrum→Ethereum TESTNET (line 48): epochPeriod: 7200
– Arbitrum→Gnosis TESTNET (line 64): epochPeriod: 3600

• DEVNET entries are correctly set to 300 s (lines 42 and 57).

Suggested diff to apply if TESTNET should indeed be 300 s:

-   // Arbitrum→Ethereum TESTNET
-   epochPeriod: 7200,
+   // Arbitrum→Ethereum TESTNET (per PR: 300 s)
+   epochPeriod: 300,

-   // Arbitrum→Gnosis TESTNET
-   epochPeriod: 3600,
+   // Arbitrum→Gnosis TESTNET (per PR: 300 s)
+   epochPeriod: 300,
validator-cli/src/helpers/snapshot.test.ts (1)

1-1: Importing snapshotSavingPeriod: OK

Keeps tests aligned with per-network config.

validator-cli/src/utils/transactionHandlers/baseTransactionHandler.ts (1)

298-300: Same: prevent duplicate saveSnapshot after FINAL; also confirm snapshotSavingPeriod is applied upstream

Base fix handles FINAL. Verify that snapshotSavingPeriod-based timing is enforced by the caller, since this method doesn’t enforce it.

validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts (1)

101-103: Router-based status check: ensure veaRouterProvider is defined

resolveChallengedClaim passes ContractType.ROUTER into toSubmitTransaction; checkTransactionStatus will use veaRouterProvider — confirm it’s always set for this path.

@mani99brar mani99brar marked this pull request as ready for review August 27, 2025 07:01
@mani99brar mani99brar requested a review from jaybuidl as a code owner August 27, 2025 07:01
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant