fix(consensus): reject transactions that DOWN substates pledged as input refs #954
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
fix(consensus): reject substates that are DOWNed as input refs
Motivation and Context
When checking substate locked, we use the diff to determine which inputs were written and attempt to lock those.
We can determine which inputs should have been input refs from this. We should consider removing input_refs because (1) these are difficult to determine by the user, and (2) the validator node can determine which inputs are never written from the transaction result which it always has by the time we vote on proposals.
How Has This Been Tested?
Manually tested that create account and create nft still work. Other manual tests that check this specific case are difficult because the indexer (autofiller) will always fill the inputs (unless the version matches exactly). Since some of this code will change when we can submit transactions to validator nodes without autofilling, no fixes for this are in this PR.
What process can a PR reviewer use to test or verify this change?
Submit a transaction that has an input ref including the correct version that is not written to
Breaking Changes