You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the rpcv1 integration suite, assertions unchanged, against rpcv2. CI runs four legs instead of two.
leg
daemon
protocol
1
rpcv1
P27
2
rpcv1
P28
3
rpcv2
P27
4
rpcv2
P28
The only thing that may differ between the two daemons is how the harness instantiates them.
rpcv1's integration-test settings do not change.
rpcv2 starts with the stock defaults from cmd/stellar-rpc/rpcv2/rpc-v2-sample-config.toml.
Run model stays as today: one Core container per test, captive core as a subprocess, the daemon in-process.
This replaces the earlier in-process paritytest design. rpcv2 now serves every rpcv1 method natively (#908, #960), so the suite itself is the parity test.
Layout
path
holds
cmd/stellar-rpc/internal/integrationtest/
the common tests and infrastructure/ (moved up from rpcv1/)
cmd/stellar-rpc/internal/rpcv1/integrationtest/
rpcv1-only tests
cmd/stellar-rpc/internal/rpcv2/integrationtest/
home for rpcv2-only tests (rpcv2 backfill, getEventsV2), empty except doc.go
The harness picks the daemon from STELLAR_RPC_INTEGRATION_TESTS_DAEMON (rpcv1 default, rpcv2).
Each CI leg runs the common package and its own daemon's package.
mutate rpcv1/config.Config, read SQLite, or run released rpcv1 images
TestArchiveUserAgent
rpcv1-only
pins rpcv1's User-Agent; rpcv2 has none yet (follow-up below)
TestHealth
common, minus one line
LedgerRetentionWindow == 17280 moves to a per-daemon test; rpcv2 measures retention in 10 000-ledger chunks
TestUpgradeFrom20To21
common
probe changes from GetDaemon().GetDB() to getLatestLedger; assertions unchanged
TestMetrics
common
after rpcv2 registers the same process metrics (below)
everything else
common
unchanged
rpcv2 code changes (test-enabling only)
Export a minimal options entry point wrapping runDaemonWith: logger and flag overrides. The binary's behaviour does not change.
Register soroban_rpc_build_info, the logmetrics log-line counters, and the Go and process collectors on rpcv2's registry, as rpcv1/daemon/metrics.go does.
rpcv2 instantiation in the harness
Config: a test-only TOML derived from the sample, [backfill.datastore] removed, admin endpoint on, preflight debug on. Per-test values (data dir, endpoint, ports, captive-core file, archive URL, core binary) go in as flag overrides. A unit test parses it strictly.
Ports: RPC, admin, captive core admin HTTP, captive core query, captive core peer, all from getFreeTCPPorts, with a retry on bind collision.
Captive core file: the harness appends NETWORK_PASSPHRASE for rpcv2 only. The shared template stays byte-identical.
sendTransaction goes through captive core's admin port, rpcv2's stock route. First implementation step is a spike of TestSendTransactionSucceeds under rpcv2.
TestGetFeeStats is the first end-to-end check of rpcv2's fee windows against rpcv1's. A mismatch is an rpcv2 bug to fix, not an assertion to change.
CI
integration-tests.yml gains a daemon input and runs the common package plus the daemon's package.
stellar-rpc.yml replaces the two hand-written jobs with one caller job and strategy.matrix over protocol × daemon. Job names: Integration tests (P27, rpcv1) and so on. The protocol list moves with releases.
continue-on-error stays as it is for all four legs.
Part of #986.
Goal
Run the rpcv1 integration suite, assertions unchanged, against rpcv2. CI runs four legs instead of two.
cmd/stellar-rpc/rpcv2/rpc-v2-sample-config.toml.This replaces the earlier in-process
paritytestdesign. rpcv2 now serves every rpcv1 method natively (#908, #960), so the suite itself is the parity test.Layout
cmd/stellar-rpc/internal/integrationtest/infrastructure/(moved up fromrpcv1/)cmd/stellar-rpc/internal/rpcv1/integrationtest/cmd/stellar-rpc/internal/rpcv2/integrationtest/getEventsV2), empty exceptdoc.goSTELLAR_RPC_INTEGRATION_TESTS_DAEMON(rpcv1default,rpcv2).Which tests run where
TestGetLedgersFromDatastore,backfill_test.go,migrate_test.go,ingest_loadtest_test.gorpcv1/config.Config, read SQLite, or run released rpcv1 imagesTestArchiveUserAgentUser-Agent; rpcv2 has none yet (follow-up below)TestHealthLedgerRetentionWindow == 17280moves to a per-daemon test; rpcv2 measures retention in 10 000-ledger chunksTestUpgradeFrom20To21GetDaemon().GetDB()togetLatestLedger; assertions unchangedTestMetricsrpcv2 code changes (test-enabling only)
runDaemonWith: logger and flag overrides. The binary's behaviour does not change.soroban_rpc_build_info, thelogmetricslog-line counters, and the Go and process collectors on rpcv2's registry, asrpcv1/daemon/metrics.godoes.rpcv2 instantiation in the harness
[backfill.datastore]removed, admin endpoint on, preflight debug on. Per-test values (data dir, endpoint, ports, captive-core file, archive URL, core binary) go in as flag overrides. A unit test parses it strictly.getFreeTCPPorts, with a retry on bind collision.NETWORK_PASSPHRASEfor rpcv2 only. The shared template stays byte-identical.sendTransactiongoes through captive core's admin port, rpcv2's stock route. First implementation step is a spike ofTestSendTransactionSucceedsunder rpcv2.TestGetFeeStatsis the first end-to-end check of rpcv2's fee windows against rpcv1's. A mismatch is an rpcv2 bug to fix, not an assertion to change.CI
integration-tests.ymlgains adaemoninput and runs the common package plus the daemon's package.stellar-rpc.ymlreplaces the two hand-written jobs with one caller job andstrategy.matrixoverprotocol × daemon. Job names:Integration tests (P27, rpcv1)and so on. The protocol list moves with releases.continue-on-errorstays as it is for all four legs.