Skip to content

Commit 1337bc5

Browse files
authored
Merge branch 'main' into main
2 parents 377bd75 + a3c2f70 commit 1337bc5

File tree

230 files changed

+27439
-23942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+27439
-23942
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ jobs:
7474
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
7575
- name: test & coverage report creation
7676
run: |
77-
nix develop -c make test
78-
nix develop .#rocksdb -c make test-versiondb
77+
nix develop .#rocksdb -c make test test-versiondb
7978
if: steps.changed-files.outputs.any_changed == 'true'
8079
- name: filter out proto files
8180
run: |

.github/workflows/container.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Push Testground Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/**
8+
tags:
9+
- "v*.*.*"
10+
11+
env:
12+
IMAGE_NAME: cronos-testground
13+
14+
jobs:
15+
16+
push:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
packages: write
20+
contents: read
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: cachix/install-nix-action@v23
25+
with:
26+
nix_path: nixpkgs=channel:nixos-24.05
27+
extra_nix_config: |
28+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
29+
- uses: cachix/cachix-action@v12
30+
with:
31+
name: cronos
32+
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
33+
- name: build and push image
34+
run: |
35+
# login to ghcr.io
36+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
37+
38+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,' | sed -e 's/^v//')
39+
[ "$VERSION" == "main" ] && VERSION=latest
40+
echo "VERSION: $VERSION"
41+
42+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
43+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
44+
echo "IMAGE_ID: $IMAGE_ID"
45+
46+
BUILD_TAG="$(nix eval --raw .#testground-image.imageTag)"
47+
echo "BUILD_TAG: $BUILD_TAG"
48+
49+
docker load -i "$(nix build --no-link --print-out-paths .#testground-image)"
50+
docker run --rm -e TEST_CASE=info $IMAGE_NAME:$BUILD_TAG
51+
docker tag $IMAGE_NAME:$BUILD_TAG $IMAGE_ID:$VERSION
52+
docker push $IMAGE_ID:$VERSION

.github/workflows/lint.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
golangci:
1919
name: Run golangci-lint
2020
runs-on: macos-latest
21-
timeout-minutes: 60
21+
timeout-minutes: 120
2222
steps:
2323
- uses: actions/setup-go@v3
2424
with:
25-
go-version: '^1.22.0'
25+
go-version: '1.22.7'
2626
- uses: actions/checkout@v3
2727
- uses: cachix/install-nix-action@v23
2828
with:
@@ -44,15 +44,15 @@ jobs:
4444
export CGO_CFLAGS="$(pkg-config --cflags rocksdb)" CGO_LDFLAGS="$(pkg-config --libs rocksdb)"
4545
golangci-lint version
4646
47-
BUILD_TAGS=rocksdb,grocksdb_clean_link
47+
BUILD_TAGS=rocksdb,grocksdb_clean_link,objstore
4848
go build -tags $BUILD_TAGS ./cmd/cronosd
49-
golangci-lint run --out-format=github-actions --path-prefix=./ --timeout 10m --build-tags $BUILD_TAGS
49+
golangci-lint run --out-format=github-actions --path-prefix=./ --timeout 30m --build-tags $BUILD_TAGS
5050
cd versiondb
51-
golangci-lint run --out-format=github-actions --path-prefix=./versiondb --timeout 10m --build-tags $BUILD_TAGS
51+
golangci-lint run --out-format=github-actions --path-prefix=./versiondb --timeout 30m --build-tags $BUILD_TAGS
5252
cd ../memiavl
53-
golangci-lint run --out-format=github-actions --path-prefix=./memiavl --timeout 10m
53+
golangci-lint run --out-format=github-actions --path-prefix=./memiavl --timeout 30m --build-tags objstore
5454
cd ../store
55-
golangci-lint run --out-format=github-actions --path-prefix=./store --timeout 10m
55+
golangci-lint run --out-format=github-actions --path-prefix=./store --timeout 30m --build-tags objstore
5656
# Check only if there are differences in the source code
5757
if: steps.changed-files.outputs.any_changed == 'true'
5858

@@ -102,5 +102,5 @@ jobs:
102102
extra_nix_config: |
103103
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
104104
if: steps.changed-files.outputs.any_changed == 'true'
105-
- run: nix-shell -I nixpkgs=./nix -p nixpkgs-fmt --run "make lint-nix"
105+
- run: nix-shell -I nixpkgs=./nix -p nixfmt-rfc-style --run "make lint-nix"
106106
if: steps.changed-files.outputs.any_changed == 'true'

.github/workflows/proto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
if: env.GIT_DIFF
4545
run: |
4646
make proto-gen-ci # proto-swagger-gen FIXME swagger-gen result is not reproducible in CI
47-
git checkout -- go.mod go.sum docs/api/proto-docs.md # FIXME doc gen not reproducible in CI
47+
git checkout -- go.mod go.sum # FIXME doc gen not reproducible in CI
4848
- name: check working directory is clean
4949
uses: numtide/clean-git-action@main

.github/workflows/sims.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,32 +383,32 @@ jobs:
383383
if: always() && github.event_name == 'issue_comment' && needs.member.outputs.valid == 'true'
384384
steps:
385385
- name: Download artifact pass_status_build
386-
uses: actions/download-artifact@v1
386+
uses: actions/download-artifact@v4.1.7
387387
continue-on-error: true
388388
with:
389389
name: pass_status_build
390390
- name: Download artifact pass_status_install
391-
uses: actions/download-artifact@v1
391+
uses: actions/download-artifact@v4.1.7
392392
continue-on-error: true
393393
with:
394394
name: pass_status_install
395395
- name: Download artifact pass_status_sim1
396-
uses: actions/download-artifact@v1
396+
uses: actions/download-artifact@v4.1.7
397397
continue-on-error: true
398398
with:
399399
name: pass_status_sim1
400400
- name: Download artifact pass_status_sim2
401-
uses: actions/download-artifact@v1
401+
uses: actions/download-artifact@v4.1.7
402402
continue-on-error: true
403403
with:
404404
name: pass_status_sim2
405405
- name: Download artifact pass_status_sim3
406-
uses: actions/download-artifact@v1
406+
uses: actions/download-artifact@v4.1.7
407407
continue-on-error: true
408408
with:
409409
name: pass_status_sim3
410410
- name: Download artifact pass_status_sim4
411-
uses: actions/download-artifact@v1
411+
uses: actions/download-artifact@v4.1.7
412412
continue-on-error: true
413413
with:
414414
name: pass_status_sim4

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
env:
2424
TESTS_TO_RUN: ${{ matrix.tests }}
2525
steps:
26+
- name: Create more disk space
27+
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
2628
- uses: actions/checkout@v3
2729
with:
2830
fetch-depth: 0
@@ -107,3 +109,25 @@ jobs:
107109
- name: 'instantiate integration test env'
108110
if: steps.changed-files.outputs.only_changed == 'false'
109111
run: nix-store -r $(nix-instantiate integration_tests/shell.nix)
112+
113+
testground-test:
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@v3
117+
with:
118+
fetch-depth: 0
119+
- uses: cachix/install-nix-action@v23
120+
with:
121+
nix_path: nixpkgs=channel:nixos-22.11
122+
extra_nix_config: |
123+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
124+
- uses: cachix/cachix-action@v12
125+
with:
126+
name: cronos
127+
# github don't pass secrets for pull request from fork repos,
128+
# in that case the push is disabled naturally.
129+
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
130+
- name: Run tests
131+
run: |
132+
cd testground/benchmark
133+
nix develop -c pytest -vv -s

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ result
2323
integration_tests/configs/*.yaml
2424

2525
# direnv
26-
/.envrc
27-
/.direnv
26+
.envrc
27+
.direnv

CHANGELOG.md

Lines changed: 168 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,186 @@
11
# Changelog
22

3-
## UNRELEASED
3+
*Nov 14, 2024*
4+
5+
## v1.4.0-rc4
6+
7+
### Bug Fixes
8+
9+
* [#1679](https://github.com/crypto-org-chain/cronos/pull/1679) Include no trace detail on insufficient balance fix.
10+
* [#1685](https://github.com/crypto-org-chain/cronos/pull/1685) Add command to fix versiondb corrupted data.
11+
12+
### Improvements
13+
14+
* [#1684](https://github.com/crypto-org-chain/cronos/pull/1684) versiondb NewKVStore accept string as store name.
15+
* [#1688](https://github.com/crypto-org-chain/cronos/pull/1688) Add Timestamp api to versiondb iterator.
16+
* [#1692](https://github.com/crypto-org-chain/cronos/pull/1692) Set iavl async pruning option.
17+
18+
*Nov 6, 2024*
19+
20+
## v1.4.0-rc3
21+
22+
### Bug Fixes
23+
24+
* (iavl)[#1673](https://github.com/crypto-org-chain/cronos/pull/1673) Update iavl dependency to include pruning fix.
25+
26+
### Features
27+
28+
* [#1665](https://github.com/crypto-org-chain/cronos/pull/1665) Support register for payee and counterpartyPayee in relayer precompile.
29+
30+
### Improvements
31+
32+
* [#1664](https://github.com/crypto-org-chain/cronos/pull/1664) Update cometbft to 0.38.13.
33+
* [#1660](https://github.com/crypto-org-chain/cronos/pull/1660) Support async check tx.
34+
* [#1667](https://github.com/crypto-org-chain/cronos/pull/1667) Add testnet benchmark command.
35+
* [#1669](https://github.com/crypto-org-chain/cronos/pull/1669) Add performance optimizations: a) async fireEvents, b) faster prepare proposal when using NopMempool, c) parallel check-tx
36+
* [#1676](https://github.com/crypto-org-chain/cronos/pull/1676) Update cometbft to 0.38.14 and rocksdb to 9.7.4.
37+
38+
*Oct 24, 2024*
39+
40+
## v1.4.0-rc2
41+
42+
### Bug Fixes
43+
44+
* (testground)[1649](https://github.com/crypto-org-chain/cronos/pull/1649) Fix running single validator benchmark locally.
45+
* (cli)[#1647](https://github.com/crypto-org-chain/cronos/pull/1647) Fix node can't shutdown by signal.
46+
* (testground)[#1652](https://github.com/crypto-org-chain/cronos/pull/1652) Remove unexpected conflicts in benchmark transactions.
47+
* [#1654](https://github.com/crypto-org-chain/cronos/pull/1654) Set relayer as payee for relayer caller when enabled incentivized packet.
48+
* [#1655](https://github.com/crypto-org-chain/cronos/pull/1655) Fix state overwrite in debug trace APIs.
49+
* [#1663](https://github.com/crypto-org-chain/cronos/pull/1663) Align attributes for ibc timeout event.
50+
51+
### Improvements
52+
53+
* [#1645](https://github.com/crypto-org-chain/cronos/pull/1645) Gen test tx in parallel even in single node.
54+
* (testground)[#1644](https://github.com/crypto-org-chain/cronos/pull/1644) load generator retry with backoff on error.
55+
* [#1648](https://github.com/crypto-org-chain/cronos/pull/1648) Add abort OE in PrepareProposal.
56+
* (testground)[#1651](https://github.com/crypto-org-chain/cronos/pull/1651) Benchmark use cosmos broadcast rpc.
57+
* (testground)[#1650](https://github.com/crypto-org-chain/cronos/pull/1650) Benchmark support batch mode.
58+
* [#1658](https://github.com/crypto-org-chain/cronos/pull/1658) Optimize when block-list is empty.
59+
* (testground)[#1659](https://github.com/crypto-org-chain/cronos/pull/1659) Support skip check-tx in benchmark.
60+
* [#1662](https://github.com/crypto-org-chain/cronos/pull/1662) Emit more packet info for ibc relayer event.
61+
62+
*Oct 14, 2024*
63+
64+
## v1.4.0-rc1
65+
66+
### State Machine Breaking
67+
68+
* (memiavl)[#1618](https://github.com/crypto-org-chain/cronos/pull/1618) memiavl change initial version logic to be
69+
compatible with iavl 1.2.0.
70+
71+
### Improvements
72+
73+
* [#1592](https://github.com/crypto-org-chain/cronos/pull/1592) Change the default parallelism of the block-stm to minimum between GOMAXPROCS and NumCPU
74+
* [#1600](https://github.com/crypto-org-chain/cronos/pull/1600) Update ethermint to avoid unnecessary block result in header related api call.
75+
* [#1606](https://github.com/crypto-org-chain/cronos/pull/1606) Fix pebbledb support.
76+
* [#1610](https://github.com/crypto-org-chain/cronos/pull/1610) Sync e2ee module with v1.3.x branch.
77+
* [#1612](https://github.com/crypto-org-chain/cronos/pull/1612) Support ibc channel upgrade related methods.
78+
* [#1614](https://github.com/crypto-org-chain/cronos/pull/1614) Bump cosmos-sdk to v0.50.10.
79+
* [#1613](https://github.com/crypto-org-chain/cronos/pull/1613) Check admin sender for MsgStoreBlockList in check tx.
80+
81+
### Bug Fixes
82+
83+
* [#1609](https://github.com/crypto-org-chain/cronos/pull/1609) Fix query address-by-acc-num by account_id instead of id.
84+
* [#1611](https://github.com/crypto-org-chain/cronos/pull/1611) Fix multisig account failed on threshold encode after send tx.
85+
* [#1617](https://github.com/crypto-org-chain/cronos/pull/1617) Fix unsuppored sign mode SIGN_MODE_TEXTUAL for bank transfer.
86+
* [#1621](https://github.com/crypto-org-chain/cronos/pull/1621), [1630](https://github.com/crypto-org-chain/cronos/pull/1630) Update ethermint to the fix of broken opBlockhash and tx validation.
87+
* [#1623](https://github.com/crypto-org-chain/cronos/pull/1623) Ensure expedited related gov params pass the basic validation.
88+
* [#1633](https://github.com/crypto-org-chain/cronos/pull/1633) Align acknowledgement with underlying_app_success when ack packet does not succeed.
89+
* [#1638](https://github.com/crypto-org-chain/cronos/pull/1638) sync x/tx bug fixes.
90+
91+
*Sep 13, 2024*
92+
93+
## v1.4.0-rc0
494

595
### State Machine Breaking
696

797
* [#1377](https://github.com/crypto-org-chain/cronos/pull/1377) Upgrade sdk to 0.50, and integrate block-stm parallel tx execution.
898
* [#1394](https://github.com/crypto-org-chain/cronos/pull/1394) Add icahost wirings but disable in parameters.
9-
* [#1407](https://github.com/crypto-org-chain/cronos/pull/1407) Add end-to-end encryption module.
1099
* [#1414](https://github.com/crypto-org-chain/cronos/pull/1414) Integrate new evm tx format.
11100
* [#1458](https://github.com/crypto-org-chain/cronos/pull/1458) Adjust require gas for recvPacket when ReceiverChainIsSource.
101+
* [#1519](https://github.com/crypto-org-chain/cronos/pull/1519) Upgrade ibc-go to 8.3 and remove icaauth module.
102+
* [#1518](https://github.com/crypto-org-chain/cronos/pull/1518) Keep versiondb/memiavl compatible with upstream sdk, stop supporting other streaming service.
103+
* [#1541](https://github.com/crypto-org-chain/cronos/pull/1541) Disable MsgCreatePermanentLockedAccount and MsgCreatePeriodicVestingAccount messages.
104+
* [#1552](https://github.com/crypto-org-chain/cronos/pull/1552) Avoid unnecessary GetAccount in ante handlers.
12105

13106
### Improvements
14107

15-
* (test) [#1380](https://github.com/crypto-org-chain/cronos/pull/1380) Upgrade cosmovisor to 1.5.0 in integration test.
16-
* (versiondb) [#1379](https://github.com/crypto-org-chain/cronos/pull/1379) Flush versiondb when graceful shutdown, make rocksdb upgrade smooth.
17108
* (store) [#1378](https://github.com/crypto-org-chain/cronos/pull/1378) Upgrade rocksdb to `v8.11.3`.
18109
* (versiondb) [#1387](https://github.com/crypto-org-chain/cronos/pull/1387) Add dedicated config section for versiondb, prepare for sdk 0.50 integration.
19-
* (e2ee)[#1413](https://github.com/crypto-org-chain/cronos/pull/1413) Add custom keyring implementation for e2ee module.
20-
* (e2ee)[#1415](https://github.com/crypto-org-chain/cronos/pull/1415) Add batch keys query for e2ee module.
21-
* (e2ee)[#1421](https://github.com/crypto-org-chain/cronos/pull/1421) Validate e2ee key when register.
22110
* (store) [#1448](https://github.com/crypto-org-chain/cronos/pull/1448) Upgrade rocksdb to `v9.1.1`.
23111
* [#1431](https://github.com/crypto-org-chain/cronos/pull/1431) Integrate testground to run benchmark on cluster.
112+
* [#1464](https://github.com/crypto-org-chain/cronos/pull/1464) Update cosmos-sdk to `v0.50.7`.
113+
* [#1484](https://github.com/crypto-org-chain/cronos/pull/1484), [#1487](https://github.com/crypto-org-chain/cronos/pull/1487) Respect gas that is wanted to be returned by the ante handler.
114+
* [#1488](https://github.com/crypto-org-chain/cronos/pull/1488) Enable optimistic execution.
115+
* [#1490](https://github.com/crypto-org-chain/cronos/pull/1490) Update cometbft to v0.38.8.
116+
* (versiondb) [#1491](https://github.com/crypto-org-chain/cronos/pull/1491) Free slice data in HasAtVersion.
117+
* (versiondb) [#1498](https://github.com/crypto-org-chain/cronos/pull/1498) Reduce scope of copying slice data in iterator.
118+
* [#1500](https://github.com/crypto-org-chain/cronos/pull/1500), [#1503](https://github.com/crypto-org-chain/cronos/pull/1503) Set mempool MaxTx from config (with a default value of `3000`).
119+
* (store) [#1511](https://github.com/crypto-org-chain/cronos/pull/1511) Upgrade rocksdb to `v9.2.1`.
120+
* (block-stm) [#1515](https://github.com/crypto-org-chain/cronos/pull/1515) Improve performance by cache signature verification result between incarnations of same tx.
121+
* (store) [#1526](https://github.com/crypto-org-chain/cronos/pull/1526) Cache index/filters in rocksdb application.db to reduce ram usage.
122+
* (store)[#1529](https://github.com/crypto-org-chain/cronos/pull/1529) Enable pinL0FilterAndIndexBlocksInCache.
123+
* (store)[#1547](https://github.com/crypto-org-chain/cronos/pull/1547) Disable memiavl cache if block-stm is enabled.
124+
* (app)[#1564](https://github.com/crypto-org-chain/cronos/pull/1564) Fix mempool data race.
125+
* [#1568](https://github.com/crypto-org-chain/cronos/pull/1568) Update cometbft to 0.38.12.
126+
* [#1570](https://github.com/crypto-org-chain/cronos/pull/1570) Integrate pre-estimate block-stm option to improve worst case performance.
127+
* [#1572](https://github.com/crypto-org-chain/cronos/pull/1572) Allow disable sdk mempool by setting mempool.max-txs to `-1`.
128+
129+
### Bug Fixes
130+
131+
* [#1520](https://github.com/crypto-org-chain/cronos/pull/1520) Avoid invalid chain id for signer error when rpc call before chain id set in BeginBlock.
132+
* [#1539](https://github.com/crypto-org-chain/cronos/pull/1539) Fix go-block-stm bug that causes app hash mismatch.
133+
* [#1560](https://github.com/crypto-org-chain/cronos/pull/1560) Update queries contract addresses by native denom from a query in contract_by_denom.
134+
* [#1569](https://github.com/crypto-org-chain/cronos/pull/1569) Update ethermint to fix of crash on chainID and mismatch tx hash in newHeads.
135+
136+
*Jun 18, 2024*
137+
138+
## v1.3.0-rc2
139+
140+
### Improvements
141+
142+
* (rpc) [#1467](https://github.com/crypto-org-chain/cronos/pull/1467) Avoid unnecessary tx decode in tx listener.
143+
144+
### Bug Fixes
145+
146+
* [#1466](https://github.com/crypto-org-chain/cronos/pull/1466) Fix handling of pending transactions related APIs.
147+
148+
*May 21, 2024*
149+
150+
## v1.3.0-rc1
151+
152+
### State Machine Breaking
153+
154+
* [#1407](https://github.com/crypto-org-chain/cronos/pull/1407) Add end-to-end encryption module.
155+
156+
### Improvements
157+
158+
* [#1413](https://github.com/crypto-org-chain/cronos/pull/1413) Add custom keyring implementation for e2ee module.
159+
* (e2ee)[#1415](https://github.com/crypto-org-chain/cronos/pull/1415) Add batch keys query for e2ee module.
160+
* (e2ee)[#1421](https://github.com/crypto-org-chain/cronos/pull/1421) Validate e2ee key when register.
161+
* [#1437](https://github.com/crypto-org-chain/cronos/pull/1437) Update cometbft and cosmos-sdk dependencies.
162+
163+
### Bug Fixes
164+
165+
* (rpc) [#1444](https://github.com/crypto-org-chain/cronos/pull/1444) Avoid nil pointer error when query blocks before feemarket module gets enabled.
166+
* [#1439](https://github.com/crypto-org-chain/cronos/pull/1439) Add back default prepare proposal logic.
167+
168+
*May 3, 2024*
169+
170+
## v1.2.2
171+
172+
### Bug Fixes
173+
174+
* (rpc) [#1416](https://github.com/crypto-org-chain/cronos/pull/1416) Fix parsed logs from old events.
175+
176+
*April 22, 2024*
177+
178+
## v1.2.1
179+
180+
### Improvements
181+
182+
* (test) [#1380](https://github.com/crypto-org-chain/cronos/pull/1380) Upgrade cosmovisor to 1.5.0 in integration test.
183+
* (versiondb) [#1379](https://github.com/crypto-org-chain/cronos/pull/1379) Flush versiondb when graceful shutdown, make rocksdb upgrade smooth.
24184

25185
### Bug Fixes
26186

@@ -33,6 +193,7 @@
33193

34194
*April 8, 2024*
35195

196+
## v1.2.0
36197
## v1.2.0-rc1
37198

38199
### Bug Fixes

0 commit comments

Comments
 (0)