-
Notifications
You must be signed in to change notification settings - Fork 286
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
Pass app version to CheckTx #2214
Comments
You're correct that we have to make sure that we have access to the app version, fortunately we should be able to get the app version from the checktx state, which is initialized each block during The general important thing that is missing is we have to pass the app version to all validate basic methods, and I think in most cases we should be able to do that by getting the latest value from the sdk.Contexts that are initialized from their relavant states (checktx, deliver, proposal) |
Thanks for sharing! The baseApp's checkState appears private. Do you know which getter we can use to fetch it? I couldn't find one. |
ahh sorry, by "get from the checktx state", I mean from that context. Which is passed via antehandlers and the rest of the state machine. this might mean that we have to first finish #1166 |
alternatively we could also just use the |
can we close this? or what could close this? |
We're no longer doing Option A of #2156 so maybe we close this issue for now and open a new issue when we need to plumb app version into various |
for posterity and to hopefully save a few future braincycles: the alternative to plumbing app version to validate basics which would be to keep all validate basic method stateless, and then refactor any important checks that would have been performed there to be antehandlers, along with defining a new type so we can define a new validate basic (:grimacing:) |
Context
While working on Option A of #2156 @evan-forbes and I realized that CheckTx doesn't have access to the current app version. We want access to the app version so that CheckTx can fetch the upper bound for max square size (a versioned constant) to reject blob txs that are too large.
Problem
celestia-app/app/check_tx.go
Lines 12 to 15 in 70b0624
doesn't pass app version. If we want to modify CheckTx in the future in a way that is compatible with single binary syncs, we need a way to branch control flow in CheckTx based on the current block header's app version.
Proposal
Consider passing app version. Note this likely involves changes to ABCI / Cosmos SDK so this proposal needs further investigation.
The text was updated successfully, but these errors were encountered: