Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into top_tps
Browse files Browse the repository at this point in the history
mmsqe committed Sep 20, 2024

Verified

This commit was signed with the committer’s verified signature.
mmsqe mmsqe
2 parents be6bbcd + 3c8be96 commit 93176da
Showing 23 changed files with 93 additions and 826 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '^1.22.0'
go-version: '1.22.7'
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v23
with:
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## UNRELEASED

### Improvements

* [#1592](https://github.com/crypto-org-chain/cronos/pull/1592) Change the default parallelism of the block-stm to minimum between GOMAXPROCS and NumCPU

*Sep 13, 2024*

## v1.4.0-rc0
6 changes: 5 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
@@ -987,7 +987,7 @@ func New(
sdk.SetAddrCacheEnabled(false)
workers := cast.ToInt(appOpts.Get(srvflags.EVMBlockSTMWorkers))
if workers == 0 {
workers = stdruntime.NumCPU()
workers = maxParallelism()
}
preEstimate := cast.ToBool(appOpts.Get(srvflags.EVMBlockSTMPreEstimate))
logger.Info("block-stm executor enabled", "workers", workers, "pre-estimate", preEstimate)
@@ -1369,3 +1369,7 @@ func (app *App) Close() error {
app.Logger().Info("Application gracefully shutdown", "error", err)
return err
}

func maxParallelism() int {
return min(stdruntime.GOMAXPROCS(0), stdruntime.NumCPU())
}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@
cronosd-testnet = mkApp packages.cronosd-testnet;
stateless-testcase = {
type = "app";
program = "${pkgs.testground-testcase}/bin/stateless-testcase";
program = "${pkgs.benchmark-testcase}/bin/stateless-testcase";
};
};
defaultPackage = packages.cronosd;
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ require (
github.com/creachadair/atomicfile v0.3.1 // indirect
github.com/creachadair/tomledit v0.0.24 // indirect
github.com/crypto-org-chain/cronos/memiavl v0.0.4 // indirect
github.com/crypto-org-chain/go-block-stm v0.0.0-20240912024944-1cd89976aa5e // indirect
github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -433,8 +433,8 @@ github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240916022730-3317ca17f0f1 h
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240916022730-3317ca17f0f1/go.mod h1:RTiTs4hkXG6IvYGknvB8p79YgjYJdcbzLUOGJChsPnY=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240913100216-dbc7eb41488c h1:pJJNL+ZganmfcxzEijVNqwNDhzXsTyMk/Of1/lUvxlM=
github.com/crypto-org-chain/ethermint v0.6.1-0.20240913100216-dbc7eb41488c/go.mod h1:D2lnc8ARuVmgc2/2IWla2Ky1o8/pjmyrnIt+d46Clco=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240912024944-1cd89976aa5e h1:FFpE6+Y4o5GxkeGwUcETM6amgohh7msWvWf1MDqueVc=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240912024944-1cd89976aa5e/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 h1:OvD5Rm0B6LHUJk6z858UgwdP72jU2DuUdXeclRyKpDI=
github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7 h1:V43F3JFcqG4MUThf9W/DytnPblpR6CcaLBw2Wx6zTgE=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y=
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
@@ -216,8 +216,8 @@ schema = 3
version = "v0.0.24"
hash = "sha256-4vUukHONOjNn0qfQr4esK6TWfPWsIp+rbdz65og84lw="
[mod."github.com/crypto-org-chain/go-block-stm"]
version = "v0.0.0-20240912024944-1cd89976aa5e"
hash = "sha256-rY8W4dSciOXT29MCySbH5sw0Fp15IQVgBK9QlMX0JeU="
version = "v0.0.0-20240919080136-6c49aef68716"
hash = "sha256-krCdJz96mpIgmpmRI64W2+W1ycNg+EdLaqeVtAuaW4A="
[mod."github.com/danieljoos/wincred"]
version = "v1.2.0"
hash = "sha256-LHcvTJCc8++bFndbd8ZgMSTe4L5h2C4rN+cSWHCz54Y="
6 changes: 3 additions & 3 deletions nix/testground-image.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ dockerTools, runCommandLocal, cronos-matrix, testground-testcase }:
{ dockerTools, runCommandLocal, cronos-matrix, benchmark-testcase }:
let
patched-cronosd = cronos-matrix.cronosd.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
@@ -15,13 +15,13 @@ dockerTools.buildLayeredImage {
name = "cronos-testground";
created = "now";
contents = [
testground-testcase
benchmark-testcase
patched-cronosd
tmpDir
];
config = {
Expose = [ 9090 26657 26656 1317 26658 26660 26659 30000 ];
Cmd = [ "/bin/testground-testcase" ];
Cmd = [ "/bin/stateless-testcase" ];
Env = [
"PYTHONUNBUFFERED=1"
];
129 changes: 0 additions & 129 deletions testground/benchmark/benchmark/context.py

This file was deleted.

83 changes: 0 additions & 83 deletions testground/benchmark/benchmark/main.py

This file was deleted.

26 changes: 0 additions & 26 deletions testground/benchmark/benchmark/network.py

This file was deleted.

Loading

0 comments on commit 93176da

Please sign in to comment.