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

fix: add time to the sdk.Context used in PrepareProposal (backport #2515) #2534

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 18, 2023

This is an automatic backport of pull request #2515 done by Mergify.
Cherry-pick of 9617549 has failed:

On branch mergify/bp/v1.x/pr-2515
Your branch is up to date with 'origin/v1.x'.

You are currently cherry-picking commit 9617549.
  (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:   Makefile
	modified:   app/prepare_proposal.go
	new file:   app/test/prepare_proposal_context_test.go
	modified:   app/test/prepare_proposal_test.go
	modified:   app/test/process_proposal_test.go
	modified:   go.mod
	modified:   go.sum

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

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


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

## Overview

I'm not sure if this fixes all of #2454, but it at least fixes one bug
similar to it.

The fix in this PR allows for the antehandlers that are ran during
prepare proposal to have access to a time close to the actual block
time. It does this by simply adding `time.Now` to the header used for
antehandler state access.

## Checklist

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords

---------

Co-authored-by: Rootul P <[email protected]>
(cherry picked from commit 9617549)

# Conflicts:
#	app/test/fuzz_abci_test.go
@mergify mergify bot added the conflicts label Sep 18, 2023
@celestia-bot celestia-bot requested a review from a team September 18, 2023 20:35
@github-actions github-actions bot added the bot item was created by a bot label Sep 18, 2023
rootulp
rootulp previously approved these changes Sep 18, 2023
evan-forbes
evan-forbes previously approved these changes Sep 18, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2534 (b3408bf) into v1.x (10574fa) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             v1.x    #2534      +/-   ##
==========================================
- Coverage   20.36%   20.35%   -0.01%     
==========================================
  Files         138      138              
  Lines       15881    15885       +4     
==========================================
  Hits         3234     3234              
- Misses      12339    12343       +4     
  Partials      308      308              
Files Changed Coverage Δ
app/prepare_proposal.go 0.00% <0.00%> (ø)

@evan-forbes evan-forbes merged commit af17626 into v1.x Sep 19, 2023
21 checks passed
@evan-forbes evan-forbes deleted the mergify/bp/v1.x/pr-2515 branch September 19, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot item was created by a bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants