-
Notifications
You must be signed in to change notification settings - Fork 106
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
change(consensus): Add lockbox funding stream #8694
Conversation
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.
Left some comments and questions.
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.
added some minor comments
…6 height ranges to constants, updates TODO
…tream from `fundingstreams` field
…s instead of an option of an iterator, updates a comment quoting the coinbase transaction balance consensus rule to note that the current code is inconsistent with the protocol spec, adds a TODO for updating the quote there once the protocol spec has been updated.
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.
Looks good, I unresolved one conversation since I think you might have missing one change that you wanted to do, but I don't think it's required, so feel free to address it or mark as resolved
Motivation
We likely want to add a lockbox funding stream.
Will close #8686, and close #8687 once parameters/addresses are updated.
Part of #8695.
This PR will need to be updated once there's more information about which dev fund proposal we should implement, and, if it's alternative 2 in this draft ZIP, also what funding stream addresses to use for ZCG.
Specifications & References
Alternatives 2 and 3 in https://zips.z.cash/draft-nuttycom-funding-allocation
https://zips.z.cash/draft-nuttycom-lockbox-streams
Solution
block_subsidy + miner_fees - expected_lockbox_funding_stream_amount
lockbox_input_value()
functionRelated changes:
Halving(height)
calculation into its ownnum_halvings()
functionblock::check::subsidy_is_valid()
:halving_div.count_ones() == 1
height > slow_start_shift
num_halvings()
instead ofhalving_divisor()
Tests
check_lockbox_input_value()
test for thelockbox_input_value()
fnFollow Up Work
Blocked on ZIP-253 status being changed to 'Proposed':
This PR also adds some TODOs for documentation updates that should be addressed promptly.
PR Author's Checklist
PR Reviewer's Checklist