Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cosmos-sdk version #346

Merged
merged 11 commits into from
Jul 25, 2023
Merged

Update cosmos-sdk version #346

merged 11 commits into from
Jul 25, 2023

Conversation

calvwang9
Copy link
Contributor

@calvwang9 calvwang9 commented Jul 19, 2023

https://smartcontract-it.atlassian.net/browse/BCI-1007

Updates the Cosmos SDK to 0.47, fixes breaking changes and deprecations, and also includes some minor formatting cleanup. Summary of main changes:

  • Dependencies:
    • cosmos-sdk 0.45.11 -> 0.47.4
    • wasmd 0.30 -> 0.40.1
    • tendermint -> cometbft 0.37.2
    • other minor updates
  • Various renames across files due to deprecations
  • Linting on imports and unused fields
  • Broadcast mode 'block' was deprecated in v0.47, so need to use 'sync' mode instead and wait for the tx to be committed (added test helper fn)
  • Updated some wasmd cli commands
  • Makefile: rename relayer dir to pkg as it no longer exists, added lint-go

@calvwang9 calvwang9 temporarily deployed to integration July 19, 2023 04:29 — with GitHub Actions Inactive
@calvwang9 calvwang9 temporarily deployed to integration July 21, 2023 03:47 — with GitHub Actions Inactive
@calvwang9 calvwang9 temporarily deployed to integration July 21, 2023 05:51 — with GitHub Actions Inactive
@calvwang9 calvwang9 temporarily deployed to integration July 21, 2023 12:00 — with GitHub Actions Inactive
@calvwang9 calvwang9 temporarily deployed to integration July 21, 2023 12:31 — with GitHub Actions Inactive
@calvwang9 calvwang9 temporarily deployed to integration July 23, 2023 06:19 — with GitHub Actions Inactive
@calvwang9 calvwang9 marked this pull request as ready for review July 23, 2023 06:37
Comment on lines 218 to 229
// awaitTxCommitted waits for a transaction to be committed on chain and returns the tx receipt
func awaitTxCommitted(t *testing.T, tc *Client, txHash string) (response *txtypes.GetTxResponse, success bool) {
for i := 0; i < 9; i++ { // max poll attempts to wait for tx commitment
txReceipt, err := tc.Tx(txHash)
if err == nil {
return txReceipt, true
}
t.Logf("tx not committed yet (attempt %d)", i+1)
time.Sleep(time.Second * 1) // TODO: configure dynamically based on block times
}
return nil, false
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avg observed tx confirmation time was ~5 seconds, this polls for up to 10 seconds (arbitrary). We could set this to the default timeout defined in the Client (30 seconds) however in a testing environment 10 seconds should be sufficient, and increasing the wait duration may increase the duration of tests even more - currently the go unit tests with race detector enabled run for around 560-580 seconds, almost hitting the timeout at 600 seconds.

@calvwang9 calvwang9 temporarily deployed to integration July 24, 2023 06:13 — with GitHub Actions Inactive
Copy link
Collaborator

@cfal cfal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check out the failing CI action? it looks possibly related: https://github.com/smartcontractkit/chainlink-cosmos/actions/runs/5641454331/job/15279538660?pr=346

integration-tests/common/test_common.go Outdated Show resolved Hide resolved
scripts/wasmd.sh Show resolved Hide resolved
@calvwang9
Copy link
Contributor Author

calvwang9 commented Jul 24, 2023

can you check out the failing CI action? it looks possibly related: https://github.com/smartcontractkit/chainlink-cosmos/actions/runs/5641454331/job/15279538660?pr=346

@cfal yep I've seen this while working with the core repo, will have to fix in a follow up pr after this one is merged

@calvwang9 calvwang9 temporarily deployed to integration July 24, 2023 14:44 — with GitHub Actions Inactive
@calvwang9 calvwang9 merged commit 9007d9f into develop Jul 25, 2023
@calvwang9 calvwang9 deleted the BCI-1007/update-sdk branch July 25, 2023 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants