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

refactor(core): abci 2.0 integration #15960

Merged
merged 9 commits into from
May 1, 2023

Conversation

tac0turtle
Copy link
Member

Description

integrates abci2.0 outside of baseapp


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)

@github-actions github-actions bot added the C:CLI label Apr 26, 2023
Comment on lines +175 to +178
app.FinalizeBlock(context.TODO(), &abci.RequestFinalizeBlock{
Height: app.LastBlockHeight() + 1,
AppHash: app.LastCommitID().Hash,
ValidatorsHash: valSet.Hash(),
NextValidatorsHash: valSet.Hash(),
}})
})

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
)

// commit genesis changes
if !startupConfig.AtGenesis {
app.Commit()
app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{
app.Commit(context.TODO(), &abci.RequestCommit{})

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
bApp.InitChain(cmtabcitypes.RequestInitChain{ChainId: appName})
bApp.Commit()
bApp.InitChain(context.Background(), &cmtabcitypes.RequestInitChain{ChainId: appName})
bApp.Commit(context.TODO(), &cmtabcitypes.RequestCommit{})

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
@@ -71,8 +71,8 @@
panic(fmt.Errorf("failed to load application version from store: %w", err))
}

bApp.InitChain(cmtabcitypes.RequestInitChain{ChainId: appName})
bApp.Commit()
bApp.InitChain(context.Background(), &cmtabcitypes.RequestInitChain{ChainId: appName})

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
@@ -127,8 +134,11 @@
require.Nil(t, res)
}

app.EndBlock(types2.RequestEndBlock{})
app.Commit()
app.Commit(context.TODO(), &types2.RequestCommit{})

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
// app.BeginBlock(types2.RequestBeginBlock{Header: header})
// gInfo, res, err := app.SimDeliver(txCfg.TxEncoder(), tx)

bz, err := txCfg.TxEncoder()(tx)

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This definition of err is never used.
func (a *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) (abci.ResponseBeginBlock, error) {
return a.ModuleManager.BeginBlock(ctx, req)
func (a *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) {
return a.ModuleManager.BeginBlock(ctx)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call
Base automatically changed from marko/abci-2.0-3 to bez/feature/abci-2.0-base April 28, 2023 12:34
@github-actions github-actions bot added the C:Rosetta Issues and PR related to Rosetta label Apr 28, 2023
ValidatorsHash: valSet.Hash(),
NextValidatorsHash: valSet.Hash(),
}})
app.Commit(context.TODO(), &abci.RequestCommit{})

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
return appBuilder.app.BaseApp.DeliverTx(tx)
}
}
// func ProvideDeliverTx(appBuilder *AppBuilder) func(abci.RequestDeliverTx) abci.ResponseDeliverTx { // TODO: what to do here?
Copy link
Member Author

Choose a reason for hiding this comment

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

doing this here #15999

@tac0turtle tac0turtle marked this pull request as ready for review May 1, 2023 10:50
@tac0turtle tac0turtle requested a review from a team as a code owner May 1, 2023 10:50
@alexanderbez alexanderbez merged commit 279c7af into bez/feature/abci-2.0-base May 1, 2023
@alexanderbez alexanderbez deleted the marko/abci-2.0-4 branch May 1, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:Rosetta Issues and PR related to Rosetta C:Simulations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants