test(evm): migrate cosmos deploy bash scripts off -b block (CON-256)#3469
Draft
wen-coding wants to merge 1 commit into
Draft
test(evm): migrate cosmos deploy bash scripts off -b block (CON-256)#3469wen-coding wants to merge 1 commit into
wen-coding wants to merge 1 commit into
Conversation
Bash twin of #3406's lib.js work. Submit cosmos txs with -b sync and poll the actual on-chain side effect rather than relying on -b block — under Autobahn the KV indexer that BroadcastTxCommit polls isn't populated, so -b block can hang to its 60s timeout. New shared helper integration_test/contracts/_tx_helpers.sh: - store_wasm — submit `wasm store` -b sync, return new code_id once max wasm code_id grows (mirrors lib.js storeWasm). - instantiate_wasm — submit `wasm instantiate` -b sync, return new contract address once it appears under code_id via list-contract- by-code set-diff (mirrors lib.js instantiateWasm). - bank_send_and_wait — submit `bank send` -b sync, wait for sender's account sequence to advance. Denom-agnostic causal commit signal used between consecutive sends from the same key (mirrors lib.js getAccountSequence-based wait). - _wait_until — generic check-loop with 30s default timeout, for one-off side-effect waits not covered by typed helpers. Migrated scripts: - deploy_wasm_contracts.sh: 30 × (store + instantiate). Helpers capture the new code_id / contract address inside the wait closure so a concurrent store/instantiate from another test can't substitute its value. - create_tokenfactory_denoms.sh: 30 × create-denom. The denom is deterministic (factory/<creator>/<subdenom>); the inline create_denom_and_wait polls denom-authority-metadata for non-empty admin (matches the lib.js createTokenFactoryTokenAndMint pattern). - deploy_timelocked_token_contract.sh: 7 × bank send (admin funding 7 admin/op/dest accounts sequentially) + 2 × store + 2 × instantiate. bank_send_and_wait between consecutive funds prevents "account sequence mismatch" rejections when -b sync returns before the prior tx commits. - deploy_dex_contract.sh: store + instantiate + dex register-contract + 4 × dex register-pairs. The dex txs have no convenient single-query side effect; inline dex_tx_and_wait waits for the sender's sequence to advance. Wait-timeout cases preserve the original error contract: scripts print to stderr and exit 1, same as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
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.
Bash twin of #3406's lib.js work. Submit cosmos txs with -b sync and
poll the actual on-chain side effect rather than relying on -b block —
under Autobahn the KV indexer that BroadcastTxCommit polls isn't
populated, so -b block can hang to its 60s timeout.
New shared helper integration_test/contracts/_tx_helpers.sh:
wasm store-b sync, return new code_id oncemax wasm code_id grows (mirrors lib.js storeWasm).
wasm instantiate-b sync, return newcontract address once it appears under code_id via list-contract-
by-code set-diff (mirrors lib.js instantiateWasm).
bank send-b sync, wait for sender'saccount sequence to advance. Denom-agnostic causal commit signal
used between consecutive sends from the same key (mirrors lib.js
getAccountSequence-based wait).
one-off side-effect waits not covered by typed helpers.
Migrated scripts:
capture the new code_id / contract address inside the wait
closure so a concurrent store/instantiate from another test can't
substitute its value.
deterministic (factory//); the inline
create_denom_and_wait polls denom-authority-metadata for non-empty
admin (matches the lib.js createTokenFactoryTokenAndMint pattern).
7 admin/op/dest accounts sequentially) + 2 × store + 2 ×
instantiate. bank_send_and_wait between consecutive funds prevents
"account sequence mismatch" rejections when -b sync returns before
the prior tx commits.
single-query side effect; inline dex_tx_and_wait waits for the
sender's sequence to advance.
Wait-timeout cases preserve the original error contract: scripts
print to stderr and exit 1, same as before.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com