-
Notifications
You must be signed in to change notification settings - Fork 741
Simplify tx verification #1654
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
Simplify tx verification #1654
Conversation
@@ -23,9 +21,8 @@ var ( | |||
_ snowstorm.Tx = (*UniqueTx)(nil) | |||
_ cache.Evictable[ids.ID] = (*UniqueTx)(nil) | |||
|
|||
errMissingUTXO = errors.New("missing utxo") | |||
errUnknownTx = errors.New("transaction is unknown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-issue now?
tx.Tx == nil
no more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tx.Tx
can only be nil
now from the UniqueTx
construction in Dependencies
. We don't actually use these txs in consensus anywhere (see followup to remove them: #1656) so this should be impossible to happen now (i.e. consensus only handles txs returned from ParseTx
).
…ce (ava-labs#1654) Co-authored-by: Stephen <stephen@avalabs.org>
Why this should be merged
Removes various caching layers and dead code.
RejectTx
.SyntacticVerification
and moves it directly intoParseTx
(before performing DB IO)SemanticVerification
- if this ever fails once the node will FATAL... and we only call it once if it passes.How this works
delete moar code
How this was tested
CI