Skip to content

Operational risk: RELAYX_STUB_MODE bypasses safety checks in production if mis-set #40

Description

@ch4r10t33r

Summary

When RELAYX_STUB_MODE is enabled, stub_mode_enabled() short-circuits RPC calls and returns synthetic data (src/utils/misc.rs, src/provider/tx.rs, fee_data.rs, etc.).

Risk

A single mis-set environment variable in production causes fake hashes, skipped balance checks, and non-authoritative fee data, which is dangerous for funds and incident response.

Suggested mitigations

  • Log a highly visible warning at startup when stub mode is on.
  • Optionally refuse to start unless RELAYX_ALLOW_STUB_IN_PRODUCTION=true is also set.

References

  • src/utils/misc.rs (stub_mode_enabled)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions