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

Send looked up UTXOs to the transaction verifier #2849

Merged
merged 5 commits into from
Oct 12, 2021

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Oct 8, 2021

Motivation

We need to calculate the transaction fee to implement ZIP-401.
We need to get the UTXOs to calculate the values of transparent inputs.

Consensus Rules

low_fee_penalty is 16000 if the transaction pays a fee less than the conventional fee, otherwise 0

https://zips.z.cash/zip-0401#specification

Solution

Closes #2440

Review

@upbqdn needs this for ticket #2779.
@oxarbitrage might be interested as well.

Reviewer Checklist

  • Code implements Specs and Designs
  • Tests for Expected Behaviour
  • Tests for Errors

Follow Up Work

Use these UTXOs to calculate the transaction fee #2779
Replace the temporary double-spend error with the actual check #2787

@teor2345 teor2345 added A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement P-Medium labels Oct 8, 2021
@teor2345 teor2345 requested review from upbqdn and oxarbitrage October 8, 2021 00:35
@teor2345 teor2345 self-assigned this Oct 8, 2021
@teor2345 teor2345 added P-High and removed P-Medium labels Oct 11, 2021
Copy link
Member

@upbqdn upbqdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually reviewed all the code today and it looks good to me.

@teor2345 teor2345 enabled auto-merge (squash) October 11, 2021 23:47
@teor2345
Copy link
Contributor Author

This change shouldn't conflict with any open PRs, so I've set it to auto-merge.

@teor2345 teor2345 merged commit 5d997e9 into main Oct 12, 2021
@teor2345 teor2345 deleted the utxo-lookup-tx-verifier branch October 12, 2021 00:25
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Look up the UTXOs in the transaction verifier, then pass them to verify_transparent_inputs_and_outputs
4 participants