Skip to content

Commit 01d9dc6

Browse files
authored
Problem: sdk v0.47.x is outdated (#1329)
* Problem: different db are not tested when change client id * test revert * test db fix * fix hash * update deps * rm patch * Apply suggestions from code review
1 parent 76a35e8 commit 01d9dc6

File tree

7 files changed

+24
-48
lines changed

7 files changed

+24
-48
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## UNRELEASED
4+
5+
### Bug Fixes
6+
7+
- [#1329](https://github.com/crypto-org-chain/cronos/pull/1329) Update cosmos-sdk to `v0.47.10`.
8+
39
*February 19, 2024*
410

511
## v1.1.0-rc4

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ replace (
231231
// Use cosmos keyring
232232
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
233233
github.com/cometbft/cometbft-db => github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63
234-
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240220010730-59107173536d
234+
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240228013111-9bd1e035ed1d
235235
github.com/crypto-org-chain/cronos/memiavl => ./memiavl
236236
github.com/crypto-org-chain/cronos/store => ./store
237237
github.com/crypto-org-chain/cronos/versiondb => ./versiondb

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
486486
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
487487
github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 h1:R1QJ9a3XdYMSKo+1RdFifxb/g3lNypC52L/rpYrWoKo=
488488
github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63/go.mod h1:rocwIfnS+kA060x64gkSIRvWB9StSppIkJuo5MWzL24=
489-
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240220010730-59107173536d h1:f7HLmQWOUhBeR0ROlODBbNfyc+e6QImZClZCBf0A+1w=
490-
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240220010730-59107173536d/go.mod h1:cmAawe8FV/52oPKbgeHLt4UpNkrNu8R5KD+kw0kxJFc=
489+
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240228013111-9bd1e035ed1d h1:ihUBUAEwQYHZEqf7lXrJithNCUJTjB8q3oSQA6Nevco=
490+
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240228013111-9bd1e035ed1d/go.mod h1:cmAawe8FV/52oPKbgeHLt4UpNkrNu8R5KD+kw0kxJFc=
491491
github.com/crypto-org-chain/ethermint v0.6.1-0.20240215080911-ebecd4c35025 h1:lc8T/ho1MtbKydKhUfF2DB74Me8+rQnD2n1FjUKLqMo=
492492
github.com/crypto-org-chain/ethermint v0.6.1-0.20240215080911-ebecd4c35025/go.mod h1:T3Tkhw8XMu8rYObcXpeTqGUaKogS+DKsGPD3ulHN/mg=
493493
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk=

gomod2nix.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ schema = 3
139139
version = "v1.0.0-beta.4"
140140
hash = "sha256-5Kn82nsZfiEtuwhhLZqmMxdAY1tX/Fi3HJ0/MEaRohw="
141141
[mod."github.com/cosmos/cosmos-sdk"]
142-
version = "v0.46.0-beta2.0.20240220010730-59107173536d"
143-
hash = "sha256-OXWcFgNN+YwnW63S/Iw1fB9TKCiuMM1z+FthUo2yihc="
142+
version = "v0.46.0-beta2.0.20240228013111-9bd1e035ed1d"
143+
hash = "sha256-lvsMDhV9WTZ/MRFxPukGoz8hhflqpC3aPXD0tul59fc="
144144
replaced = "github.com/crypto-org-chain/cosmos-sdk"
145145
[mod."github.com/cosmos/go-bip39"]
146146
version = "v1.0.0"

integration_tests/configs/default.jsonnet

+2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
cmd: 'cronosd',
55
'start-flags': '--trace',
66
config: {
7+
db_backend: 'rocksdb',
78
mempool: {
89
version: 'v1',
910
},
1011
},
1112
'app-config': {
13+
chain_id: 'cronos_777-1',
1214
'app-db-backend': 'pebbledb',
1315
'minimum-gas-prices': '0basetcro',
1416
'index-events': ['ethereum_tx.ethereumTxHash'],
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import json
22

3+
import pytest
34
from pystarport import ports
45

5-
from .utils import wait_for_port
6+
from .utils import wait_for_block, wait_for_port
67

78

89
def test_config_client_id(cronos):
@@ -13,15 +14,22 @@ def test_config_client_id(cronos):
1314
cli = cronos.cosmos_cli(0)
1415
dir = cli.data_dir / "config"
1516

16-
def assert_chain_id(chain_id):
17+
def assert_chain_id(chain_id, timeout=None):
1718
genesis_cfg = dir / "genesis.json"
1819
genesis = json.loads(genesis_cfg.read_text())
1920
genesis["chain_id"] = f"cronos_{chain_id}-1"
2021
genesis_cfg.write_text(json.dumps(genesis))
2122
cronos.supervisorctl("start", n0)
2223
wait_for_port(ports.evmrpc_port(p0))
2324
assert w3.eth.chain_id == chain_id
25+
height = w3.eth.get_block_number() + 2
26+
# check CONSENSUS FAILURE
27+
if timeout is None:
28+
wait_for_block(cli, height)
29+
else:
30+
with pytest.raises(TimeoutError):
31+
wait_for_block(cli, height, timeout)
2432

25-
assert_chain_id(776)
33+
assert_chain_id(776, 5)
2634
cronos.supervisorctl("stop", n0)
2735
assert_chain_id(777)

nix/playtests-darwin.patch

-40
This file was deleted.

0 commit comments

Comments
 (0)