Suite of functional tests using Borja's new xmtpd E2E test framework#1809
Merged
api-Hypernova merged 8 commits intomainfrom Mar 15, 2026
Merged
Suite of functional tests using Borja's new xmtpd E2E test framework#1809api-Hypernova merged 8 commits intomainfrom
api-Hypernova merged 8 commits intomainfrom
Conversation
…ture - Configurable payer report worker timing via env vars (XMTPD_PAYER_REPORT_WORKER_REPEAT_INTERVAL_MINUTES, XMTPD_PAYER_REPORT_WORKER_SPREAD_MINUTES) reducing e2e test times from 60+ min to ~2-4 min per payer-report-dependent test - 11 new test cases: chaos-attestation-fault, chaos-bandwidth-throttle, chaos-compound-fault, chaos-connection-reset, chaos-network-partition, multi-payer, rate-registry-change, settlement-verification, stuck-state-detection, sustained-load, sync-verification - Background traffic generator (GenerateTraffic) for continuous envelope publishing across minute boundaries - Contract reader for on-chain rate registry operations - Enhanced observer with payer report status polling - Client payer address derivation for per-payer attribution tests - Proxy toggle (DisableProxy/EnableProxy) for true network partitions - DB cleanup with safe concurrent connection handling 16/16 tests pass in ~30 min total with 2-min worker cycles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set env.Network after createDockerNetwork so cleanup removes networks - Add cleanupStaleNetworks at startup to remove orphans from crashed runs - Allow N-wei rounding dust in fee distribution equality check (N = node count) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Observer: add connection pooling (lazy-init per connStr) to prevent ~600 connections during long polling waits - chain_ops: replace sync.Once with mutex+nil-check so transient init failures can be retried - chaos: fix RemoveAllToxics to return real errors instead of silent nil; change ProxyAddress to return (string, error) instead of panicking; extract addToxic helper eliminating 4x duplication - client: fix TOCTOU race in GenerateTraffic by holding lock through goroutine setup - environment: add observer.Close() in cleanup - gitignore: add xmtpd-e2e binary, remove accidentally committed binary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The function was added during conflict resolution but is not referenced anywhere in the test suite, and its ecdsa import was missing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use pq.QuoteIdentifier for SQL identifier safety in dropE2EDatabases - Fix multi_payer envelope count: wait for envelopesPerPayer*2 (both payers replicate to all nodes) - Guard DisableProxy/EnableProxy in NodeHandle against nil Chaos controller - Document toggle non-idempotency contract in DisableProxy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 11, 2026
Local linter rewrote fmt.Errorf to errors.New but swapped fmt for errors without updating the import block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved This PR adds E2E functional tests to the test framework with no changes to production runtime code. All modified files are owned by the author, who maintains the e2e test package. You can customize Macroscope's approvability policy. Learn more. |
fbac
reviewed
Mar 13, 2026
- Revert configurable worker timing from production code (options.go, runner.go, server.go) per fbac's feedback: e2e tests should observe the real system, not alter it - Update all payer-report-dependent test timeouts from 10min to 75min to accommodate default 60-min worker cycles - Change Client interface from PayerAddress() string to Address() common.Address, matching the GatewayHandle pattern for type safety - Simplify ClientHandle.Address() to delegate to client.Address() instead of re-parsing the key
Dismissing prior approval to re-evaluate 95fddc8
The production code no longer supports XMTPD_PAYER_REPORT_WORKER_REPEAT_INTERVAL_MINUTES and XMTPD_PAYER_REPORT_WORKER_SPREAD_MINUTES (reverted in previous commit). Passing these unknown env vars caused go-flags to reject the config and crash the node on startup.
Dismissing prior approval to re-evaluate 4c9737c
fbac
approved these changes
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add functional E2E test suite using the xmtpd E2E test framework
chain.Contractsreader in pkg/e2e/chain/contracts.go to query on-chainPayerReportManagerstate for settlement assertions.DisableProxy/EnableProxyto the chaos controller, node handles, and gateway handles to support network partition tests.observe.Observerin pkg/e2e/observe/observe.go to use pooled DB connections instead of opening/closing a connection per query.WorkerRepeatIntervalMinutesandWorkerSpreadMinutesconfig options toPayerReportOptions, plumbed through to the worker scheduler so tests can use short intervals.types.Environmentto support multiple named clients per node and anAddRatesmethod for on-chain rate registry updates during test runs.xmtpd-e2e-*Docker networks and idlee2e_*Postgres databases before each run.Changes since #1809 opened
Macroscope summarized a7c8170.