Configuration Immutability and Runtime Discipline

permalink SUBTC
#configuration#discipline#immutability#runtime

WAproxy execution behavior is defined by configuration.
Configuration must be explicit, controlled, and immutable during runtime.

------------------------------------------------------------
CONFIGURATION SCOPE
------------------------------------------------------------

Core runtime configuration includes:

- FEE_BPS
- ENABLE_COINS
- COIN_MIN_SEND_SAT
- RPC_HOST_MAIN / RPC_HOST_TEST
- COIN_FEE_ADDR_MAIN / TEST

These values define economic and operational boundaries.

------------------------------------------------------------
IMMUTABILITY PRINCIPLE
------------------------------------------------------------

Configuration must not change dynamically
during active execution.

If configuration changes:

- Node restart required.
- Economic boundaries reloaded cleanly.
- No mid-flight mutation allowed.

------------------------------------------------------------
WHY IMMUTABILITY MATTERS
------------------------------------------------------------

Dynamic configuration mutation may cause:

- inconsistent fee deduction
- conflicting minimum thresholds
- unexpected execution behavior
- auditing ambiguity

Deterministic systems require stable rules.

------------------------------------------------------------
ENVIRONMENT-BASED CONTROL
------------------------------------------------------------

Configuration is provided via:

- environment variables
- static config files
- deployment-level secrets

Client requests must never override:

- fee rates
- fee addresses
- minimum thresholds
- RPC endpoints

------------------------------------------------------------
RUNTIME DISCIPLINE
------------------------------------------------------------

At startup:

1. Load configuration
2. Validate configuration integrity
3. Expose boundaries via Health endpoint
4. Lock execution rules

------------------------------------------------------------
HEALTH REFLECTION
------------------------------------------------------------

Health endpoint must reflect:

- current FEE_BPS
- enabled coins
- minimum thresholds

Health is runtime truth.

------------------------------------------------------------
ARCHITECTURAL STATEMENT
------------------------------------------------------------

Execution rules must remain stable
for deterministic economic transport.

Configuration defines the boundary.
Runtime enforces it.