fix(terraclassic): bound list pagination to the contract page cap (#139) #163
No reviewers
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo!163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/gl-139-migrate-gas-evidence"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
WITHDRAW_LIST_MAX_LIMIT). The frontend hash monitor (and canceler default) requested 50 and treatedlen < 50as EOF, so only the first 30 history rows were listed.next_start_afteronpending_withdrawals(all-status row semantics unchanged). Operator, canceler, and hash monitor clamp to 30 and follow the cursor.code_idwasm migrate is allowed on wasmd v0.61.8 / CosmWasm 1.5.Related #139 (kept open: first on-chain v2.1
gas_used, post-deploy operator/canceler soak, browser transfer-status against mainnet SPA)Invariants / docs
code_idcontinue, LCD batch evidence)Test plan
test_active_index_scale: 106-row production mix (batch 50 → 3, batch 100 → 2); 2000 terminal + 11 active still one active page; JSON size bound;limit=50still pages via cursortest_withdraw_flowpagination assertsnext_start_afteron full/last pages (31 tests)terra_listsoak: 106-row mix is 4 legacy pages / 1 active page; oversized request without cursor stops earlyterra_withdraw_list: clamp 30; 50-without-cursor misses later approvals; cursor repairs ithashMonitor.test.ts: never queriesactive_withdrawals; continues past a 30-row cap; clamps requested 50gas_usedof first v2.1wasm migrate(contract still v2.0 code_id 10971)Remaining issue notes (do not close #139)
PENDING_WITHDRAWS(batch 50 / cap 100)pending_withdrawals/pending_withdraw; page size 30 +next_start_after(INV-FE-TC-AW1). Unit-tested; live SPA click-through still pending deploycode_idwasm migrate: wasmd v0.61.8 does not reject samecode_id; CosmWasm 1.5ContractMigrateVersionis nil somigrateis invoked. Repeat wasm migrate untilactive_index_complete=true. Keep adminContinueActiveIndexMigrateas a fallbackNot in this MR
gas_usedand a post-deploy soak are recordedactive_withdrawals(would hide completed transfers)mentioned in issue #139
RECOMMEND: ACCEPT
Safe pagination-cap follow-up to !158 for #139. Additive
next_start_afteronpending_withdrawals(all-status row semantics unchanged); operator / canceler / hash monitor clamp to the contract cap of 30 and follow the cursor. No replay, double-payout, privilege escalation, fail-open migrate, or prompt-injection issues. Do not close #139.What this fixes
Terra list queries cap at 30 (
WITHDRAW_LIST_MAX_LIMIT). The frontend hash monitor and canceler default requested 50 and treatedlen < 50as EOF, so only the first 30 history rows were listed. On the 106-row columbus-5 mix (95 executed + 11 approved-not-executed) that meant the canceler processed one page and never saw the 11 cancel candidates. Operator was already requesting 30.Issue #139 remaining after !158
next_start_afterpending_withdrawals(INV-FE-TC-AW1)code_idwasm migrate on columbus-5migrate; keepContinueActiveIndexMigrate)gas_used!158 lifecycle / replay / RBAC / fail-closed incomplete index is intact. No silent semantic break of
pending_withdrawals.Security (no BLOCK)
ContinueActiveIndexMigratestill contract-admin only; rebuilds index, does not delete canonical rowscode_idmigrate surpriseactive_withdrawals; clients fall back topending_withdrawalslimit.min(30); peek islimit+1Deploy / ops
Ship frontend + canceler with the wasm. An old SPA that still requests 50 and treats
len < 50as EOF will keep listing only the first 30 Terra history rows even after the contract cursor exists.Keep #139 open until the first live v2.1
wasm migrategas_usedand a post-deploy soak are recorded.Nice-to-have (not merge blockers)
advance_withdraw_list_pageintomultichain-rs(copied in operator and canceler).nullnext_start_afteras EOF inhashMonitor.ts(Rust already does; frontend falls through tolen < 30and may make one extra empty LCD call).limitto1..=30(Some(0)is a footgun).mentioned in commit
5294018bf3