Add Blend v2 integration test suite#664
Open
aditya1702 wants to merge 11 commits into
Open
Conversation
aditya1702
force-pushed
the
blend/pr5-graphql
branch
from
July 15, 2026 20:52
ca9546f to
0caadc2
Compare
aditya1702
force-pushed
the
blend/pr6-integration-tests
branch
from
July 15, 2026 20:52
6f67e5f to
39422d7
Compare
aditya1702
force-pushed
the
blend/pr5-graphql
branch
from
July 16, 2026 16:56
0caadc2 to
b67919d
Compare
aditya1702
force-pushed
the
blend/pr6-integration-tests
branch
from
July 16, 2026 16:56
39422d7 to
a98eef2
Compare
…or tables Read blend_pool_claimed/blend_backstop_claimed via the new GetByAccount readers after phase-2 live ingestion and assert the supplier's pool claim and whale's backstop claim folded positive totals. Guard that phase-1 (no claims) leaves both accumulator tables empty.
aditya1702
force-pushed
the
blend/pr5-graphql
branch
from
July 16, 2026 20:07
b67919d to
ddde2c9
Compare
aditya1702
force-pushed
the
blend/pr6-integration-tests
branch
from
July 16, 2026 20:07
a98eef2 to
8cc6a07
Compare
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.
Deploys the full Blend v2 protocol stack (Comet BLND:USDC LP, mock SEP-40 oracle, emitter, pool factory, backstop, one pool with USDC/XLM reserves) on the standalone integration-test network — replicating blend-utils'
mock-example.tsdeployment order (pinned commitb05242df, wasm provenance + sha256s ininfrastructure/testdata/blend/README.md) — then executes real Blend operations and asserts DB state and GraphQL responses through both ingestion paths.Coverage
new_auction→ 50% fill; both counterparty rows + auction position folds), BACKSTOP_DEPOSIT, BACKSTOP_WITHDRAW_QUEUE, BACKSTOP_WITHDRAW_CANCEL.claimedBlnd,backstopClaimedLp,token_id = -1backstop streams), exactnet_supplied/net_borrowedcost-basis folds, Q4W JSONB with the ~17-day expiration observed live over GraphQL while queued.BlendMigrationTestSuiterunsprotocol-setup→protocol-migrate current-state→protocol-migrate history(datastore backend, MinIO-fed by the ledger exporter) with cursor-handoff pre/post assertions — the history mode's first automated coverage.BlendLiveIngestionTestSuiterestarts ingest withBLEND_PRICE_INTERVAL/BLEND_BACKSTOP_LP_CONTRACT_IDand asserts the full Freighter-facing GraphQL surface (blendPools,blendPool,blendEarnOptions,account.blendPositions, LENDING state changes).Not covered end-to-end (unit tests only)
ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTINGonly accelerates ledger cadence, not close time, so the lockup cannot elapse on standalone.Production changes
blndTokenAddress(internal/services/blend/validator.go) gains a standalone-network case: the suite issues BLND from the network master account (keypair.Rootof the passphrase), so its SAC address is a fixed constant, letting pool-CLAIM rows carry the real BLNDtoken_idon standalone. Pinned by a unit test and asserted at deploy time in the test setup.pkg/wbclientgains Blend query methods (GetBlendPools,GetBlendPool,GetBlendEarnOptions,GetAccountBlendPositions) andLendingChangestate-change decoding, with unit tests.Test infrastructure added
executeSorobanOperationAs): arbitrary tx source, RPC-fresh sequences, simulation-provided auth nonces (the existing helper hardcodes nonce 0, safe only for the master account's first use).Blend phase adds ~100s to
make integration-test(total run ~4.5 min, well under the 30m timeout). Verified green twice, including aFORCE_REBUILD=truefrom-scratch run.🤖 Generated with Claude Code
Update — assert claimed totals
Adds assertions that the supplier's pool claim and the whale's backstop claim fold positive totals into
blend_pool_claimed/blend_backstop_claimed(via the new readers, after phase-2 ingestion), plus a guard that phase-1 (no claims) leaves both tables empty.