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

Problem: v0.50.x is outdated #1722

Merged
merged 8 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
### Bug Fixes

* [#1720](https://github.com/crypto-org-chain/cronos/pull/1720) Include the fix of performance regression after upgrade in iavl.
* [#1722](https://github.com/crypto-org-chain/cronos/pull/1722) Include a security patch from cosmos sdk.

*Dec 9, 2024*

v1.4.1
## v1.4.1

### Bug Fixes

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ require (

// release/v0.50.x
replace (
cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241205052910-142c0afa4948
cosmossdk.io/x/tx => github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241205052910-142c0afa4948
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.43.0-beta1.0.20241205052910-142c0afa4948
cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254
cosmossdk.io/x/tx => github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.43.0-beta1.0.20241217090828-cfbca9fe8254
)

replace (
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,12 @@ github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c h1:MOgfS4+F
github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/crypto-org-chain/cometbft v0.0.0-20241106091515-ce418f845d9a h1:0EN1TkzHTAxpgpGaZJY3G7L4jf4+sYnI7FOmBFLCg4U=
github.com/crypto-org-chain/cometbft v0.0.0-20241106091515-ce418f845d9a/go.mod h1:khbgmtxbgwJfMqDmnGY4rl2sQpTdzpPb1f9nqnfpy1o=
github.com/crypto-org-chain/cosmos-sdk v0.43.0-beta1.0.20241205052910-142c0afa4948 h1:hX86EeDInLGJnWIR3PZ5ymp6/xaHtk+8E5pA9ZuwEfs=
github.com/crypto-org-chain/cosmos-sdk v0.43.0-beta1.0.20241205052910-142c0afa4948/go.mod h1:JwwsMeZldLN20b72mmbWPY0EV9rs+v/12hRu1JFttvY=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241205052910-142c0afa4948 h1:3GPO2XItxofWxxj2exoaz9Ki+cixakumachnqHvmLHQ=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241205052910-142c0afa4948/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241205052910-142c0afa4948 h1:lb8Mztnt2bpCowKbZMHosyQtXN0QtX/MITH9y5DVNkU=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241205052910-142c0afa4948/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w=
github.com/crypto-org-chain/cosmos-sdk v0.43.0-beta1.0.20241217090828-cfbca9fe8254 h1:qmTKLerKyvXGxIt4lThZ9QPpZYw9w8e4Bm36CNPI5S8=
github.com/crypto-org-chain/cosmos-sdk v0.43.0-beta1.0.20241217090828-cfbca9fe8254/go.mod h1:JwwsMeZldLN20b72mmbWPY0EV9rs+v/12hRu1JFttvY=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254 h1:NEgy0r3otU/O+0OAjMdEhbn4VotQlg+98hHbD7M23wU=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254 h1:JzLOFRiKsDtLJt5h0M0jkEIPDKvFFyja7VEp7gG6O9U=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w=
github.com/crypto-org-chain/ethermint v0.6.1-0.20241118003049-cd93407bcf05 h1:4mewSJnWOTwRbBntlAtOj5ZevujX4PGwn57QcO99+Bo=
github.com/crypto-org-chain/ethermint v0.6.1-0.20241118003049-cd93407bcf05/go.mod h1:9FNO9k70szJ7CEge4tnJraWu3baTbwNxjpZhZBqlMok=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 h1:OvD5Rm0B6LHUJk6z858UgwdP72jU2DuUdXeclRyKpDI=
Expand Down
12 changes: 6 additions & 6 deletions gomod2nix.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/configs/default.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
},
validators: [{
coins: '1000000000000000000stake,10000000000000000000000basetcro',
coins: '2000000000000000000stake,10000000000000000000000basetcro',
staked: '1000000000000000000stake',
mnemonic: '${VALIDATOR1_MNEMONIC}',
client_config: {
Expand Down
60 changes: 59 additions & 1 deletion integration_tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from hexbytes import HexBytes
from pystarport import cluster, ports

from .cosmoscli import CosmosCLI, module_address
from .cosmoscli import DEFAULT_GAS_PRICE, CosmosCLI, module_address
from .network import Geth
from .utils import (
ADDRS,
Expand Down Expand Up @@ -946,6 +946,64 @@ def test_submit_send_enabled(cronos, tmp_path):
assert cli.query_bank_send(*denoms) == send_enable


def test_join_validator(cronos):
mmsqe marked this conversation as resolved.
Show resolved Hide resolved
chain_id = cronos.config["chain_id"]
data = Path(cronos.base_dir).parent
clustercli = cluster.ClusterCLI(data, cmd="cronosd", chain_id=chain_id)
moniker = "new joined"
base_port = 26800
i = clustercli.create_node(base_port=base_port, moniker=moniker)
home = cronos.node_home(i=i)
cli1 = clustercli.cosmos_cli(i)
staked = 1000000000000000000
amt = 50000000000000000
coin = f"{staked}stake,{amt}basetcro"
cli = cronos.cosmos_cli()
addr = cli1.address("validator")
res = cli.transfer(cli.address("validator"), addr, coin)
assert res["code"] == 0
assert cli.balance(addr) == amt
cluster.edit_app_cfg(
Path(home) / "config/app.toml",
base_port,
{
"json-rpc": {
"address": f"127.0.0.1:{ports.evmrpc_port(base_port)}",
"ws-address": f"127.0.0.1:{ports.evmrpc_ws_port(base_port)}",
},
},
)
# start the node
clustercli.supervisor.startProcess(f"{chain_id}-node{i}")
wait_for_block(clustercli.cosmos_cli(i), cli.block_height() + 1)
# wait for the new node to sync
wait_for_block(cli1, cli1.block_height())
mmsqe marked this conversation as resolved.
Show resolved Hide resolved
count1 = len(cli1.validators())
# create validator tx
res = cli1.create_validator(
f"{staked}stake",
{
"moniker": moniker,
},
gas_prices=DEFAULT_GAS_PRICE,
)
assert res["code"] == 0
assert (
len(cli1.validators()) == count1 + 1
), "new validator should joined successfully"
val_addr = cli1.address("validator", bech="val")
val = cli1.validator(val_addr)
assert not val.get("jailed")
assert val["status"] == "BOND_STATUS_BONDED"
assert val["tokens"] == f"{staked}"
assert val["description"]["moniker"] == moniker
assert val["commission"]["commission_rates"] == {
"rate": "100000000000000000",
"max_rate": "200000000000000000",
"max_change_rate": "10000000000000000",
}


def test_block_stm_delete(cronos):
"""
this test case revealed a bug in block-stm,
Expand Down
Loading