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

Streamlining validation logic across proposal lifecycle #3193

Open
grarco opened this issue May 7, 2024 · 0 comments
Open

Streamlining validation logic across proposal lifecycle #3193

grarco opened this issue May 7, 2024 · 0 comments

Comments

@grarco
Copy link
Contributor

grarco commented May 7, 2024

Reported by Informal Systems.

Description

Several validations are redundantly executed across mempool validations, prepare proposal, process proposal, and finalize block. This redundancy is unnecessary because an invalid transaction will not be inserted into the mempool, and therefore, it will not be considered in the prepare proposal. Similarly, the relationship between process proposal and finalize block involves redundant validations.

#Problem Scenarios

Some of redundant validations:
• Redundant signature check in mempool validation (code) and prepare proposal (code),
• Redundant signature check in process proposal (code) and finalize block (code).
• Duplication of check_tx_allowed in mempool validation (code), process proposal (code), and finalize block (code).

Recommendation

Consolidate validation checks to occur only at the earliest appropriate stage (e.g., mempool validation and process proposal).

@grarco grarco added this to the Later / optional milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant