This repository has been archived by the owner on Jan 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
fix: Use MaxTxBytes
on the PrepareProposal
request
#269
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davidterpay
requested review from
nivasan1,
aljo242 and
Eric-Warehime
as code owners
December 6, 2023 16:55
davidterpay
added
backport/v1.x.x
Backport your PR to the v1.x.x release
backport/v2.x.x
Backport your PR to the v2.x.x release
labels
Dec 6, 2023
aljo242
approved these changes
Dec 6, 2023
nivasan1
approved these changes
Dec 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -74,9 +74,13 @@ func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { | |||
return &abci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err | |||
} | |||
|
|||
// Get the max gas limit and max block size for the proposal. | |||
_, maxGasLimit := proposals.GetBlockLimits(ctx) | |||
proposal := proposals.NewProposal(h.logger, req.MaxTxBytes, maxGasLimit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shld we take the min of the req.MaxTxBytes, and the ctx.ConsensusParams().MaxBytes? Or do we know that req.MaxTxBytes is always less?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always less
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comet deducts the val set size and evidence size before requesting
mergify bot
pushed a commit
that referenced
this pull request
Dec 6, 2023
(cherry picked from commit 43d6b04) # Conflicts: # abci/abci.go # abci/abci_test.go
mergify bot
pushed a commit
that referenced
this pull request
Dec 6, 2023
(cherry picked from commit 43d6b04) # Conflicts: # abci/abci.go
davidterpay
added a commit
that referenced
this pull request
Dec 6, 2023
#270) * req size check (#269) (cherry picked from commit 43d6b04) # Conflicts: # abci/abci.go # abci/abci_test.go * merge conflict fix --------- Co-authored-by: David Terpay <[email protected]> Co-authored-by: David Terpay <[email protected]>
davidterpay
added a commit
that referenced
this pull request
Dec 6, 2023
#271) * req size check (#269) (cherry picked from commit 43d6b04) # Conflicts: # abci/abci.go * merge conflict --------- Co-authored-by: David Terpay <[email protected]> Co-authored-by: David Terpay <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
backport/v1.x.x
Backport your PR to the v1.x.x release
backport/v2.x.x
Backport your PR to the v2.x.x release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.