-
Notifications
You must be signed in to change notification settings - Fork 235
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
feat: Secondary miner issurance, split DAO as a separate contract #1094
Conversation
@doitian is assigned as the chief reviewer |
29bcc70
to
f1f838a
Compare
This comment has been minimized.
This comment has been minimized.
f1f838a
to
95327c7
Compare
95327c7
to
6c9262e
Compare
0a0adb5
to
15b9dc8
Compare
Right now RPC test still fails, will update the related hashes after #1119 is merged and we finished rebasing this PR. |
5017e5d
to
f05f97c
Compare
cb80855
to
6f5545d
Compare
245b39e
to
6de273b
Compare
util/dao/src/lib.rs
Outdated
|
||
let (parent_ar, parent_c, parent_u) = extract_dao_data(parent.dao())?; | ||
|
||
let parent_g2 = calculate_g2( |
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.
G1 and g2 are inconsistent. G1 uses the reward target of the parent block, while g2 uses the parent block.
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 fixed now.
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.
The comments above ISSUING_DAO_HASH
needs to be updated.
Do we still need the special |
Could you elaborate? |
That's a mistake, second thought yes we can do that. |
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.
I have no further comment for this large PR. Two improvements we should consider:
- There is no clear way to get the amount
g2 - miner_portion - dao_portion
, which is the secondary issuance for treasury/governance in future. - An integration test to 1. generate occupied capacity changes randomly for several blocks, and 2. check the
c
in header.dao is consistent with occupied/deposited/free capacities in system.
25f90b7
to
c9d0ace
Compare
@nervos-bot-user try integration |
c9d0ace
to
6a7002c
Compare
fix: Integration test broken by #1094
TODO:
This PR is still in WIP progress, it's lacking fixes for the tests so CI is doomed to fail. however it serves 2 purposes:It provides a base so we can start writing tests for the system script PR: feat: Add NervosDAO as a CKB VM script ckb-system-scripts#21Since it's a relatively large PR, publishing it earlier means we can get review process started early as well.Now all the tests have been fixed.