LocalTerra: 10× genesis and swarm funding for QA gas headroom (#372) #894
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!894
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "verify/issue-372-localterra-funding-10x"
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
test1survives full-daymake swarm-launchQA.--preflight-gasWARN andscripts/qa/verify-localterra-funding-headroom.sh.make reset(freshlocalterra-data) before deploy picks up new genesis.Verification checklist
test1≥ 8M LUNC (LCD)curl -s http://127.0.0.1:1317/cosmos/bank/v1beta1/balances/terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v | jq '.balances[] | select(.denom=="uluna")'→ 8996102973663 (~9.0M LUNC) aftermake reset && make deploy-local-no-buildVERIFY_FUNDING_SOAK_SEC=120 ./scripts/qa/verify-localterra-funding-headroom.sh→ 8879102973663 uluna after 33 workersmake test-contractsmake test-frontendmake test-swarm-liquiditypackages/localnet-trading-swarmtestsfunding.test.ts)docs/localterra-sdk53.md,docker/init-chain.sh,deploy-dex-local.shmake test-qa-fresh-volumesmake test-qa-verify-deploymake verify-issue-2931M LUNCdocs/docker/init-chain.sh/ LocalTerra pathspython3 scripts/bots/swarm.py --preflight-gas→ logs ~9M LUNC;launch-swarm.shcalls preflight before workersFollow-ups
make swarm-launchon QA server to close the long-soak acceptance item.ghcr.io/plasticdigits/localterra-cl8yimage init when digest is next bumped (LT2 parity).--fees 500000000ulunaif ante allows (#115).changed the description
changed the description
Stale Security Review comment
Stale Security Review comment
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
f16bc032fa. Configure here.Bot LUNC top-up exceeds test1
Medium Severity
The default
SWARM_ULUNA_TOPUPwas raised to20000000000000uluna (20M LUNC) per bot, butfundBotWalletssends that full amount to each of five bot addresses fromtest1in sequence. After the #372 genesis and treasury send,test1typically holds about 9M LUNC, so the first bank send fails and non–dry-run TypeScriptlocalnet-trading-swarmstartup aborts.Reviewed by Cursor Bugbot for commit
f16bc032fa. Configure here.Security review — MR !894
Commit reviewed:
f16bc032fad006a749234b9a341a5d6431fe8767Scope: LocalTerra-only dev/QA funding headroom (#372) — genesis balance 10× bump (
docker/init-chain.sh), deploy seed/treasury defaults (scripts/deploy-dex-local.sh), swarm/E2E funding defaults (packages/localnet-trading-swarm,scripts/e2e-provision-dev-wallet.sh), Python swarm--preflight-gasread-only LCD check, andscripts/qa/verify-localterra-funding-headroom.sh. Docs/agent playbooks only otherwise.Method: Diff review with attacker-input tracing on new code paths (
preflight_gas_balance, verify script LCD queries, env-overridable funding constants). Cross-checked existing LocalTerra guards (validateLocalnet.tschain-id gate,deploy-dex-local.shCHAIN_ID=localterra, swarm--chain-id localterraon broadcasts).Outcome:
FINDINGS: 0medium+No inline threads — nothing to block on.
Areas examined (no exploitable path)
init-chain.shand deploy paths are LocalTerra-only; mainnet genesis unchangedtest1minter/admin is pre-existing localnet test identitySWARM_*/VERIFY_FUNDING_*env overrides; no new user-controlled sinksTERRA_LCD_URLpreflight_gas_balanceissues a GET to/cosmos/bank/v1beta1/balances/{hardcoded test1}— same operator-controlled env pattern as existing swarm LCD helpers; not attacker-driven in this threat modeltest1wallet (swarm + Simulated Wallet)Label:
block:securitynot applied.added 1 commit
a6902516- fix(swarm): cap bot LUNC top-up by test1 balance (#372)Compare with previous version
changed the description
resolved all threads
Stale Security Review comment
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
a69025163c. Configure here.Fair share leaves bots underfunded
Medium Severity
topUpBankDenommakes at most one bank send per bot per call and uses integerremaining / slotsLeftfor sizing. When deficits differ orremainingis modest, later bots can reach their target while earlier ones stay short and spendable faucet coins remain unused, with order inbotAddressesdeciding who is skipped whenfairSharetruncates to zero.Reviewed by Cursor Bugbot for commit
a69025163c. Configure here.added 1 commit
d0060fb2- fix(swarm): loop fair-share bank top-up until funds exhaustedCompare with previous version
changed the description
resolved all threads
added 92 commits
main4cd75e04- Merge branch 'main' into verify/issue-372-localterra-funding-10xCompare with previous version
Resolved merge conflicts with
main(commit4cd75e0).Kept from this branch (#372): 11M LUNC genesis (
11000000000000uluna), post-deploy ~9M LT4/LT8 docs, Pythonlaunch-swarm.shsoak in the verify script, and fair-share bot top-up logic.Integrated from main: structured
verify-localterra-funding-headroom.sh(static grep + LCD + soak layers,localterra-host-curl), doc cross-links,funding.test.tsenv-restore pattern, and all other main changes from the merge.Sanity:
packages/localnet-trading-swarmtests (16/16) and verify script static layer PASS.changed the description
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
4cd75e0478. Configure here.Hybrid stale gate blocks multihop
Medium Severity
Submit stale detection treats the limit-book amount as part of the quote snapshot whenever
useHybridBookis on, but multi-hop and indexer-only quotes never apply that book leg—only debounced max makers affectgetRouteSolve. After a direct swap or mid-debounce book edits, a multi-hop swap can stay disabled with “Calculating…” even though pay size and the active quote already match.Reviewed by Cursor Bugbot for commit
4cd75e0478. Configure here.Security review — MR !894
Commit reviewed:
4cd75e04781de8194d671f1da4882eaeb6f24a25Scope: LocalTerra-only dev/QA funding headroom (#372) — genesis 11M LUNC bump (
docker/init-chain.sh), TypeScript swarm balance-awaretopUpBankDenom(packages/localnet-trading-swarm/src/funding.ts), Python swarm--preflight-gas+launch-swarm.shwiring, andscripts/qa/verify-localterra-funding-headroom.shsoak path. Remaining diff is docs/tests.Method: Full MR diff review at current head (includes merge from
main). Traced attacker-controlled input on new sinks:preflight_gas_balance,topUpBankDenom/bankBalance, verify-script LCD queries, and env-overridableSWARM_*/VERIFY_FUNDING_*knobs. Cross-checked existing LocalTerra guards (validateLocalnet.tschain-id gate, hardcodedCHAIN_ID=localterraonterrad tx, operator-only script entrypoints).Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
No inline threads — nothing to block on.
Areas examined (no exploitable path)
test1remains the documented public localnet test identityexecFileSyncargv arrays; amounts areBigInt-computed or operator env literals;denomis hardcodeduluna/uusd; bot addresses come from generated HD wallets, not external inputTERRA_LCD_URL/VITE_TERRA_LCD_URLnetwork === localterrabefore fundingtest1balance and LCD base URL only; no mnemonic/key material addedtest1wallet (swarm + Simulated Wallet)Label:
block:securitynot applied.added 1 commit
26a4b7b6- fix: skip hybrid book stale gate on multihop swap routes (#360)Compare with previous version
changed the description
mentioned in commit
d0217aa954