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

baseapp: ctxCheck and ctxDeliver, begin/endBlocker #476

Merged
merged 4 commits into from
Feb 18, 2018
Merged

Conversation

ebuchman
Copy link
Member

Begin/EndBlock handlers: #346
Background context for a block: #353

@codecov
Copy link

codecov bot commented Feb 17, 2018

Codecov Report

Merging #476 into develop will increase coverage by 0.7%.
The diff coverage is 60.41%.

@@            Coverage Diff             @@
##           develop     #476     +/-   ##
==========================================
+ Coverage    53.18%   53.89%   +0.7%     
==========================================
  Files           27       27             
  Lines         1538     1542      +4     
==========================================
+ Hits           818      831     +13     
+ Misses         668      660      -8     
+ Partials        52       51      -1

// .msCheck and .ctxCheck are set on initialization and reset on Commit.
// .msDeliver and .ctxDeliver are (re-)set on BeginBlock.
// .valUpdates accumulate in DeliverTx and reset in BeginBlock.
// QUESTION: should we put valUpdates in the ctxDeliver?
Copy link
Contributor

Choose a reason for hiding this comment

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

we will not use it for the hub, everything is updated through endblock... I'd vote to remove, but maybe there are other use cases to leave it in (but then again, maybe we should just enforce val updates only in endblock)

@rigelrozanski
Copy link
Contributor

End block needs to be able to update for validator set changes, may as well add that into this PR... Also I think it may be unnecessarily confusing to introduce beginBlocker when your can extend BaseApp to execute custom EndBlock or BeginBlock... what are your thoughts on the advantage of using the proposed structure here instead?

@ebuchman
Copy link
Member Author

your can extend BaseApp to execute custom EndBlock or BeginBlock

How can you do that? Don't we need to expose SetBeginBlocker and SetEndBlocker to enable this ?

@ebuchman ebuchman changed the title WIP: baseapp: ctxCheck and ctxDeliver, begin/endBlocker baseapp: ctxCheck and ctxDeliver, begin/endBlocker Feb 18, 2018
@ebuchman ebuchman merged commit c9dd62d into develop Feb 18, 2018
@ebuchman ebuchman deleted the begin-end-block branch February 18, 2018 18:52
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this pull request Apr 19, 2021
Neoplayer pushed a commit to Neoplayer/cosmos-sdk that referenced this pull request Jul 18, 2023
…mos#465) (cosmos#476)

* Reemitting events from cache context in gov endblockers (cosmos#465)

Co-authored-by: Dev Ojha <[email protected]>
(cherry picked from commit 4c20864)

* updates

---------

Co-authored-by: Supanat <[email protected]>
Co-authored-by: Roman <[email protected]>
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.

2 participants