Skip to content

[RELAYER] Harden RELAYER_USE_MOCK_SUBMISSION: forbid in production NODE_ENV and never skip validation #968

Description

@wheval

Feature Description

Audit all mock-submission branches. Ensure validation (signature, nonce, transfer policy) always runs; mock only replaces chain submit. Refuse to start with mock enabled when NODE_ENV=production.

Problem Statement

#937 reported mock mode bypassing validation. Current executeRelay validates first then mocks submit, but other code paths and deploy configs may still be unsafe. Need hard guarantees + tests.

Proposed Solution

  1. Startup guard: mock flag + production → fatal error.
  2. Single code path: validate → optional mock submit.
  3. Integration tests for flag matrix.
  4. Document env in relayer README and ops runbook.

Impact Area

  • Infrastructure
  • Security

Priority

  • Critical

Implementation Complexity

  • Complex

Related

#937

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions