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

MsgWirePayForData messages are validate twice by the proposer #10

Open
mpoke opened this issue Oct 10, 2022 · 5 comments
Open

MsgWirePayForData messages are validate twice by the proposer #10

mpoke opened this issue Oct 10, 2022 · 5 comments
Labels
payment Payment module in celestia-app

Comments

@mpoke
Copy link
Collaborator

mpoke commented Oct 10, 2022

MsgWirePayForData messages are validate twice by the proposer, once in CheckTx and once in PrepareProposal i.e., https://github.com/celestiaorg/celestia-app/blob/e088d61fcb6579b4bc797deefd2ceff7601aa079/app/parse_txs.go#L96.

@mpoke mpoke added the payment Payment module in celestia-app label Oct 10, 2022
@rootulp
Copy link
Collaborator

rootulp commented Nov 30, 2022

Naive question: are there negative consequences associated with calling ValidateBasic() twice? The second invocation appears only applicable to transactions that include a MsgWirePayForBlob. This may have been expensive prior to square size independent commitments but per #6 (comment) seems less expensive.

@mpoke
Copy link
Collaborator Author

mpoke commented Nov 30, 2022

Besides the extra computation, there is no negative consequence that I see.

@rootulp
Copy link
Collaborator

rootulp commented Nov 30, 2022

Thanks! I'm inclined to preserve the redundant ValidateBasic() invocation because the extra computation doesn't seem critical to remove. Please re-open if there's a compelling reason to remove the second ValidateBasic() invocation. @evan-forbes @mpoke

@rootulp rootulp closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2022
@evan-forbes
Copy link
Collaborator

Wait, I think it makes sense to remove the extra checks. That's what we're doing in the current refactor to get rid of the WirePFB

@evan-forbes
Copy link
Collaborator

You are correct that it is optional, though

@rootulp rootulp reopened this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
payment Payment module in celestia-app
Projects
None yet
Development

No branches or pull requests

3 participants