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

feat: introduce PreBlock #186

Merged
merged 25 commits into from
Sep 5, 2023
Merged

feat: introduce PreBlock #186

merged 25 commits into from
Sep 5, 2023

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Aug 16, 2023

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
  • added ! to 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
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • 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.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

baseapp/baseapp.go Outdated Show resolved Hide resolved
baseapp/abci.go Outdated Show resolved Hide resolved
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
types/module/module.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Outdated Show resolved Hide resolved
baseapp/abci.go Outdated Show resolved Hide resolved
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
simapp/app.go Outdated Show resolved Hide resolved
baseapp/abci.go Outdated Show resolved Hide resolved
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Fixed Show fixed Hide fixed
baseapp/abci.go Outdated Show resolved Hide resolved
baseapp/abci.go Outdated Show resolved Hide resolved
types/abci.go Outdated Show resolved Hide resolved
types/abci.go Outdated Show resolved Hide resolved
x/upgrade/module.go Outdated Show resolved Hide resolved
baseapp/abci.go Fixed Show fixed Hide fixed
if app.preBlocker != nil {
rsp, err := app.preBlocker(ctx, req)
if err != nil {
panic(fmt.Errorf("preBlock failed, height: %d, err: %w", req.Header.Height, err))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call
if app.preBlocker != nil {
rsp, err := app.preBlocker(ctx, req)
if err != nil {
panic(fmt.Errorf("preBlock failed, height: %d, err: %w", req.Header.Height, err))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
@yihuang yihuang changed the title fix: Add MigrationModuleManager to handle migration of upgrade module before other modules feat: introduce PreBlock Aug 23, 2023
@mmsqe mmsqe requested a review from yihuang September 5, 2023 03:49
mmsqe and others added 25 commits September 5, 2023 12:04
… before other modules (cosmos#16583)

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
(cherry picked from commit 0c1f6fc)

# Conflicts:
#	CHANGELOG.md
#	UPGRADING.md
#	baseapp/baseapp.go
#	docs/docs/building-modules/01-module-manager.md
#	docs/docs/core/00-baseapp.md
#	testutil/mock/types_mock_appmodule.go
#	types/module/module.go
#	types/module/module_test.go
Co-authored-by: yihuang <[email protected]>
Signed-off-by: mmsqe <[email protected]>
Co-authored-by: yihuang <[email protected]>
Signed-off-by: mmsqe <[email protected]>
Co-authored-by: yihuang <[email protected]>
Signed-off-by: mmsqe <[email protected]>
Co-authored-by: yihuang <[email protected]>
Signed-off-by: mmsqe <[email protected]>
@mmsqe mmsqe merged commit b3af559 into release/v0.47.x Sep 5, 2023
1 of 17 checks passed
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