diff --git a/.github/mergify.yml b/.github/mergify.yml index 5d98052284c..a9937d9acad 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -4,24 +4,7 @@ defaults: assignees: - "{{ author }}" -queue_rules: - - name: default - conditions: - - "#approved-reviews-by>=1" - pull_request_rules: - - name: Automerge to main - conditions: - - "#approved-reviews-by>=1" - - base=osmo/v0.37.4 - - label=S:automerge - actions: - queue: - method: squash - name: default - commit_message_template: | - {{ title }} (#{{ number }}) - {{ body }} - name: backport patches to v23 branch conditions: - base=osmo/v0.37.4 @@ -30,3 +13,11 @@ pull_request_rules: backport: branches: - osmo-v23/v0.37.4 + - name: backport patches to v24 branch + conditions: + - base=osmo/v0.37.4 + - label=S:backport/v24 + actions: + backport: + branches: + - osmo-v24/v0.37.4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e5657361fa..9212668a2b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: pull_request: push: branches: - - v0.37.x + - osmo/v0.37.4 jobs: build: diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 377f3378b7d..d7b71028e13 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -7,7 +7,7 @@ name: Check generated code on: pull_request: branches: - - v0.37.x + - osmo/v0.37.4 permissions: contents: read diff --git a/.github/workflows/docs-toc.yml b/.github/workflows/docs-toc.yml index 225b33bbdb4..4a3fcbf27c8 100644 --- a/.github/workflows/docs-toc.yml +++ b/.github/workflows/docs-toc.yml @@ -4,7 +4,7 @@ on: pull_request: push: branches: - - v0.37.x + - osmo/v0.37.4 jobs: check: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 72afabc8e7b..9bd7dfd5a62 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -6,7 +6,7 @@ on: pull_request: push: branches: - - v0.37.x + - osmo/v0.37.4 jobs: e2e-test: diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 305170a50c0..ceeef2c8b1f 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -8,7 +8,7 @@ on: pull_request: push: branches: - - v0.37.x + - osmo/v0.37.4 jobs: govulncheck: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 98d74a82b36..093a1f1d7bd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ on: pull_request: push: branches: - - v0.37.x + - osmo/v0.37.4 jobs: golangci: @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.21' + go-version: "1.21" - uses: technote-space/get-diff-action@v6 with: PATTERNS: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ada56192705..b8cff42ec2a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: paths: - "**.go" branches: - - v0.37.x + - osmo/v0.37.4 jobs: tests: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3001c71b4cd..89b65f9bef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +## v0.37.4-v24-osmo-2 + +* [#20](https://github.com/osmosis-labs/cometbft/pull/20) Fix the rollback command + +## v0.37.4-v24-osmo-1 + * [#5](https://github.com/osmosis-labs/cometbft/pull/5) Batch verification * [#11](https://github.com/osmosis-labs/cometbft/pull/11) Skip verification of commit sigs * [#13](https://github.com/osmosis-labs/cometbft/pull/13) Avoid double-saving ABCI responses diff --git a/state/rollback.go b/state/rollback.go index 6420192cf72..57ea0396820 100644 --- a/state/rollback.go +++ b/state/rollback.go @@ -65,10 +65,11 @@ func Rollback(bs BlockStore, ss Store, removeBlock bool) (int64, []byte, error) return -1, nil, err } + nextHeight := rollbackHeight + 1 valChangeHeight := invalidState.LastHeightValidatorsChanged // this can only happen if the validator set changed since the last block - if valChangeHeight > rollbackHeight { - valChangeHeight = rollbackHeight + 1 + if valChangeHeight > nextHeight+1 { + valChangeHeight = nextHeight + 1 } paramsChangeHeight := invalidState.LastHeightConsensusParamsChanged diff --git a/state/rollback_test.go b/state/rollback_test.go index dd9a2be53ea..61bce2a8929 100644 --- a/state/rollback_test.go +++ b/state/rollback_test.go @@ -262,7 +262,7 @@ func setupStateStore(t *testing.T, height int64) state.Store { LastValidators: valSet, Validators: valSet.CopyIncrementProposerPriority(1), NextValidators: valSet.CopyIncrementProposerPriority(2), - LastHeightValidatorsChanged: height + 1, + LastHeightValidatorsChanged: height + 1 + 1, ConsensusParams: *params, LastHeightConsensusParamsChanged: height + 1, }