Skip to content

test: enforce Stellar transaction envelope size limits - #1404

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
aurorabini:feat/1332-stellar-envelope-size-limits
Oct 22, 2026
Merged

mijinummi merged 1 commit into
MDTechLabs:mainfrom
aurorabini:feat/1332-stellar-envelope-size-limits

Conversation

@aurorabini

@aurorabini aurorabini commented Oct 21, 2026 •

Copy link
Copy Markdown

Implements #1332.

What

  • Adds StellarTransactionEnvelopeSizeLimiter (fail-closed, dependency-free) under src/stellar/transactions/envelope/.
  • Enforces network passphrase identity, decoded XDR envelope size (with warning threshold), sequence int64 bounds, operation/memo/Soroban data limits, simulation outcomes, and duplicate/idempotent submissions.
  • Adds an RPC passphrase verification boundary that treats responses as untrusted and denies on lookup failure by default.
  • Emits secret-free audit events plus evaluations/allowed/denied/duplicates/rpcFailures metrics.
  • Documents public interfaces, configuration, failure codes, and escalation paths in docs/STELLAR_ENVELOPE_SIZE_LIMITS.md.

Verification

  • 25 tests across unit and integration suites, covering success, exact boundary, over-limit, invalid input, unknown network, passphrase mismatch/missing, sequence/resource limits, simulation rejection, duplicates/idempotency, and RPC failure/malformed response.
  • All fixtures are synthetic; no production keys or live network state.
  • tsc --noEmit --strict clean for the new module.
  • Prettier-formatted files.

Closes #1332
closes #1327
closes #1328
closes #1329

Add a fail-closed, dependency-free envelope guard that validates network
passphrase identity, decoded XDR size (with warning threshold), sequence
bounds, operation/memo/Soroban resource limits, simulation outcomes, and
duplicate/idempotent submissions before signing or RPC verification.

RPC passphrase lookups treat responses as untrusted and deny on failure by
default. Decisions emit secret-free audit events and metrics, and a runbook
documents configuration, failure codes, and escalation paths.

closes MDTechLabs#1332
@mijinummi
mijinummi merged commit b5f1fd5 into MDTechLabs:main Oct 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants