Skip to content

Commit

Permalink
resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 8, 2024
1 parent b667518 commit 6acc948
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 40 deletions.
1 change: 1 addition & 0 deletions cmd/cronosd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig ethermint.EncodingConfig
WrapGenTxCmd(encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome),
WrapValidateGenesisCmd(),
AddGenesisAccountCmd(app.DefaultNodeHome),
genutilcli.AddBulkGenesisAccountCmd(app.DefaultNodeHome),
tmcli.NewCompletionCmd(rootCmd, true),
ethermintclient.NewTestnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}),
debug.Cmd(),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/cometbft/cometbft-db => github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63
// release/v0.47.x
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240517084251-5ba20d99ec23
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20241008100047-e671aed24d19
github.com/crypto-org-chain/cronos/memiavl => ./memiavl
github.com/crypto-org-chain/cronos/store => ./store
github.com/crypto-org-chain/cronos/versiondb => ./versiondb
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 h1:R1QJ9a3XdYMSKo+1RdFifxb/g3lNypC52L/rpYrWoKo=
github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63/go.mod h1:rocwIfnS+kA060x64gkSIRvWB9StSppIkJuo5MWzL24=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240517084251-5ba20d99ec23 h1:pmpedXv3cd18uDwv62mfevmEVa0KCMgR/hlsTRU9p8g=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20240517084251-5ba20d99ec23/go.mod h1:vdMQLvLSGh56GqAAQP/w2R389j+g+hHOIwKcUNt9yAc=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20241008100047-e671aed24d19 h1:e45niobYERw7QF6viZe5KhIH8eLgDTtg+mT5HsVhqCs=
github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20241008100047-e671aed24d19/go.mod h1:vdMQLvLSGh56GqAAQP/w2R389j+g+hHOIwKcUNt9yAc=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240924033445-e55b15cf1494 h1:PsBCicxLYx9u8LXgqoL1DYYQXACank9z1FNkwBqz/tY=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240924033445-e55b15cf1494/go.mod h1:zJYmx1D+tDggzvXmdJ0/I62TeIykdCMfJBjBxOcniAU=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk=
Expand Down
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ schema = 3
version = "v1.0.0-beta.5"
hash = "sha256-Fy/PbsOsd6iq0Njy3DVWK6HqWsogI+MkE8QslHGWyVg="
[mod."github.com/cosmos/cosmos-sdk"]
version = "v0.46.0-beta2.0.20240517084251-5ba20d99ec23"
hash = "sha256-rmW8n5Vs2E7AVKVGiUy344uGtL8+LBDqZHOHQVF44YA="
version = "v0.46.0-beta2.0.20241008100047-e671aed24d19"
hash = "sha256-6JliyJyA6rm80kPKz3tFtfkFRPEzzQgd+otKzMCeAPI="
replaced = "github.com/crypto-org-chain/cosmos-sdk"
[mod."github.com/cosmos/go-bip39"]
version = "v1.0.0"
Expand Down
12 changes: 0 additions & 12 deletions nix/testground-cronosd.patch

This file was deleted.

11 changes: 2 additions & 9 deletions nix/testground-image.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{ dockerTools, runCommandLocal, cronos-matrix, benchmark-testcase }:
let
patched-cronosd = cronos-matrix.cronosd.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
./testground-cronosd.patch
];
});
in
let
tmpDir = runCommandLocal "tmp" { } ''
mkdir -p $out/tmp/
Expand All @@ -16,7 +9,7 @@ dockerTools.buildLayeredImage {
created = "now";
contents = [
benchmark-testcase
patched-cronosd
cronos-matrix.cronosd
tmpDir
];
config = {
Expand All @@ -26,4 +19,4 @@ dockerTools.buildLayeredImage {
"PYTHONUNBUFFERED=1"
];
};
}
}
2 changes: 1 addition & 1 deletion testground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ nix run .#stateless-testcase -- gen /tmp/data/out \
--app-patch '{"mempool": {"max-txs": -1}}' \
--config-patch '{"mempool": {"size": 100000}}' \
--tx-type erc20-transfer \
--genesis-patch '{"consensus": {"params": {"block": {"max_gas": "263000000"}}}}'
--genesis-patch '{"consensus_params": {"block": {"max_gas": "263000000"}}}'
```
* `validators`/`fullnodes` is the number of validators/full nodes.
Expand Down
14 changes: 3 additions & 11 deletions testground/benchmark/benchmark/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def init_node(
for i in range(num_accounts)
]

node_id = cli("comet", "show-node-id", **default_kwargs)
node_id = cli("tendermint", "show-node-id", **default_kwargs)
peer_id = f"{node_id}@{ip}:26656"
peer = PeerPacket(
ip=str(ip),
Expand Down Expand Up @@ -103,13 +103,12 @@ def gen_genesis(
fp.write(json.dumps(accounts, default=pydantic_encoder).encode())
fp.flush()
cli(
"genesis",
"bulk-add-genesis-account",
fp.name,
home=leader_home,
)
collect_gen_tx(cli, peers, home=leader_home)
cli("genesis", "validate", home=leader_home)
cli("validate-genesis", home=leader_home)
print("genesis validated")

evm_accounts, auth_accounts = erc20.genesis_accounts(
Expand Down Expand Up @@ -153,11 +152,6 @@ def patch_configs(home: Path, peers: str, config_patch: dict, app_patch: dict):
"cache-size": 0,
},
"mempool": {"max-txs": MEMPOOL_SIZE},
"evm": {
"block-executor": "block-stm", # or "sequential"
"block-stm-workers": 0,
"block-stm-pre-estimate": True,
},
"json-rpc": {"enable-indexer": True},
}
# update persistent_peers and other configs in config.toml
Expand All @@ -175,7 +169,6 @@ def patch_configs(home: Path, peers: str, config_patch: dict, app_patch: dict):

def gentx(cli, **kwargs):
cli(
"genesis",
"add-genesis-account",
VAL_ACCOUNT,
str(VAL_INITIAL_AMOUNT),
Expand All @@ -184,7 +177,6 @@ def gentx(cli, **kwargs):
with tempfile.TemporaryDirectory() as tmp:
output = Path(tmp) / "gentx.json"
cli(
"genesis",
"gentx",
VAL_ACCOUNT,
VAL_STAKED_AMOUNT,
Expand All @@ -205,4 +197,4 @@ def collect_gen_tx(cli, peers, **kwargs):
for i, peer in enumerate(peers):
if peer.gentx is not None:
(tmpdir / f"gentx-{i}.json").write_text(json.dumps(peer.gentx))
cli("genesis", "collect-gentxs", gentx_dir=str(tmpdir), **kwargs)
cli("collect-gentxs", gentx_dir=str(tmpdir), **kwargs)
4 changes: 2 additions & 2 deletions testground/benchmark/benchmark/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def wait_for_port(port, host="127.0.0.1", timeout=40.0):
def wait_for_block(cli, target: int, timeout=40):
height = -1
for i in range(timeout):
status = json.loads(cli("status", output="json"))
height = int(status["sync_info"]["latest_block_height"])
status = json.loads(cli("status"))
height = int(status["SyncInfo"]["latest_block_height"])

if height >= target:
break
Expand Down

0 comments on commit 6acc948

Please sign in to comment.