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

Return the transaction fee in the mempool response #2779

Closed
1 task done
Tracked by #2744 ...
teor2345 opened this issue Sep 21, 2021 · 3 comments · Fixed by #2876
Closed
1 task done
Tracked by #2744 ...

Return the transaction fee in the mempool response #2779

teor2345 opened this issue Sep 21, 2021 · 3 comments · Fixed by #2876
Assignees

Comments

@teor2345
Copy link
Contributor

teor2345 commented Sep 21, 2021

Motivation

ZIP-401 weights transactions by their transaction fee, so we need to return the transaction fee in successful mempool verification responses.

This Ticket Depends On

remaining_transaction_value needs the UTXOs spent by the block:

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

Design

This function already calculates the transaction fee - it can be easily modified to return it.

pub fn remaining_transaction_value(
prepared: &PreparedBlock,
utxos: &HashMap<transparent::OutPoint, transparent::Utxo>,
) -> Result<(), ValidateContextError> {

@teor2345
Copy link
Contributor Author

@teor2345 teor2345 added this to the 2021 Sprint 20 milestone Sep 21, 2021
@teor2345
Copy link
Contributor Author

This ticket's dependencies conflict with the NU5 block validation code freeze, so it needs to be done after NU5 testnet activation in sprint 19.

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 8, 2021

Unblocked by PR #2849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants