-
Notifications
You must be signed in to change notification settings - Fork 219
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
Transaction builder over validates #4813
Comments
It seems worthwhile to investigate this, but I would be really cautious in analysing the validation dependency chain. |
The only place where a transaction really needs to be validated for chain security is on the base nodes when accepting a transaction to be put into the mempool, and when accepting a new block. The rest are all just sanity checks. |
And from the wallet's perspective? |
Its all just sanity checks, and not even complete checks as the wallet cannot check consensus rules such as duplicate outputs etc. |
Description --- This removes extra validation from transaction protocols. Motivation and Context --- The transaction protocols do a lot of extra unnecessary validation. For example: The code will run add_output(output), which will validate the range_proof and signatures. The next line will run tx.build(), which will again validate the range_proof and signatures. While these tests are not expensive, they are not free either. The second problem is that when we do aggregate transactions such as with branch: `feature-m-of-n` these validations fail as the signatures are partial until right before we build the final transaction How Has This Been Tested? --- Passes all unit tests Fixes: #4813
The transaction builder seems to validate every single time we add an output, add a signature etc.
It also validates at the end when it builds.
We can either remove the final validation check, or the individual checks as it does not seem performant to validate everything every single time.
The text was updated successfully, but these errors were encountered: