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

test: update block proposer in testing (backport #7430) #7453

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 14, 2024

Description

Currently, test chains carry the same block proposer for every block. This can lead to a situation where the block proposer isn't part of the validator set, such as after being jailed. This can cause the validation of validator sets to fail in CometBFT v0.38.12, see ValidateBasic.

This PR addresses the issue by incrementing the validator proposer priority in test chains, ensuring that the block proposer is updated in line with changes to the validator set.

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

This is an automatic backport of pull request #7430 done by [Mergify](https://mergify.com).

* Introduce two following changes to the `commitBlock` method in testing:
* increment the proposer priority of validators
* update the proposer address in the current header

* fix linter

(cherry picked from commit 64f33e0)

# Conflicts:
#	testing/chain.go
@mergify mergify bot added the conflicts label Oct 14, 2024
Copy link
Contributor Author

mergify bot commented Oct 14, 2024

Cherry-pick of 64f33e0 has failed:

On branch mergify/bp/release/v8.5.x/pr-7430
Your branch is up to date with 'origin/release/v8.5.x'.

You are currently cherry-picking commit 64f33e09.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.md
	modified:   testing/chain_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   testing/chain.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@DimitrisJim DimitrisJim force-pushed the mergify/bp/release/v8.5.x/pr-7430 branch from c1e2e5e to 00bff7f Compare October 14, 2024 14:18
@DimitrisJim DimitrisJim removed their assignment Oct 14, 2024
@colin-axner
Copy link
Contributor

Thank you @DimitrisJim for picking up mergify's slack!

@damiannolan damiannolan merged commit a55c271 into release/v8.5.x Oct 14, 2024
19 checks passed
@damiannolan damiannolan deleted the mergify/bp/release/v8.5.x/pr-7430 branch October 14, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants