Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 5, 2025

in the defer check of FinalizeBlock to avoid panic by nil pointer

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:

  • confirmed ! in the type prefix if API or client breaking change

  • targeted the correct branch (see PR Targeting)

  • provided a link to the relevant issue or specification

  • reviewed "Files changed" and left comments if necessary

  • included the necessary unit and integration tests

  • added a changelog entry to CHANGELOG.md

  • updated the relevant documentation or specification, including comments for documenting Go code

  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Bug Fixes
    • Resolved a security vulnerability in the IBC module by updating an underlying dependency. Users will need to adjust their dependency configuration accordingly.
    • Enhanced the block finalization process with improved error handling to ensure subsequent operations run only when valid responses are available, reducing the risk of runtime issues.
  • Tests
    • Added a new test to validate the block finalization process and ensure proper error handling when encountering configuration issues.

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

(cherry picked from commit 05df209)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot requested a review from a team March 5, 2025 18:00
@mergify mergify bot added the conflicts label Mar 5, 2025
Copy link
Contributor Author

mergify bot commented Mar 5, 2025

Cherry-pick of 05df209 has failed:

On branch mergify/bp/release/v0.53.x/pr-23879
Your branch is up to date with 'origin/release/v0.53.x'.

You are currently cherry-picking commit 05df209fa.
  (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:   baseapp/abci.go
	modified:   baseapp/abci_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

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

Comment on lines 855 to 861
// where they adhere to the sdk.Tx interface.
func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.ResponseFinalizeBlock, err error) {
defer func() {
if res == nil {
return
}
// call the streaming service hooks with the FinalizeBlock messages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change potentially affects state.

Call sequence:

(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/abci.go:856)

@aljo242 aljo242 merged commit b0ee102 into release/v0.53.x Mar 5, 2025
55 checks passed
@aljo242 aljo242 deleted the mergify/bp/release/v0.53.x/pr-23879 branch March 5, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants