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

PrepareProposal always passes v0 to GovSquareSizeUpperBound #3066

Closed
evan-forbes opened this issue Jan 31, 2024 · 1 comment
Closed

PrepareProposal always passes v0 to GovSquareSizeUpperBound #3066

evan-forbes opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@evan-forbes
Copy link
Member

Unlike ProcessProposal, when PreparePropsoal creates a sdk context it's not setting the version in the header. This becomes an issue when callingGovMaxSquareSize, which uses the app version found in the header.

hardMax := appconsts.SquareSizeUpperBound(ctx.BlockHeader().Version.App)

When the version changes, v0 will still be used for GovMaxSquareSize. To fix this, GovSquareSizeUpperBound should always use the paramstore/baseapp app version.

@rootulp
Copy link
Collaborator

rootulp commented Feb 8, 2024

I'm preemptively re-opening this issue based on the revert in #3089

I think we need unit tests for square_size.go that tests the behavior of this function given different contexts (i.e. what happens if app version is 0, 1, 2. What happens when the block version is 0, 1, 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants