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: add cellbase maturity verification #367
Conversation
@u2 I proposal a refactoring: move |
Agree. |
@quake updated |
Please hold until this #372 is merged, after that, we can refactor chain_state.verify_rtx(&rtx); |
let immature_spend = self.transaction.inputs().iter().any(|input| { | ||
match cell_set.get(&input.previous_output.hash) { | ||
Some(ref meta) | ||
if meta.is_cellbase() |
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.
Not every cell outpoint in cellbase need to be maturity, I think we need more discussion on this?
Consider the UDT tx fee design, maybe we should leave more rooms for upper UDT contracts?
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.
Not every cell outpoint in cellbase need to be maturity, I think we need more discussion on this?
Consider the UDT tx fee design, maybe we should leave more rooms for upper UDT contracts?
I think it should be because of the block confirmation. The UDT tx fee would be included in the cellbase?
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.
Not decide yet.
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.
Seem your implement is correct due to the explanation of maturity in this link https://bitcoin.stackexchange.com/questions/1991/what-is-the-block-maturation-time
Anyway please hold this PR until #372 merged, 372 introduce few refactoring about tx verification.
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.
Please rebase this PR to latest develop and ensure:
- Make this a configurable option in chain spec.
- Only enable it in testnet chain spec. Disable it in dev and integration.
it doesn't matter. |
Updated, |
I'm sorry but it seems that @github is not going to fix the 500 issue. The team could not open this PR in desktop browser, it is inconvenient to discuss in this PR. Could you please close this and create a new PR instead? |
Draft
https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0010-cellbase-maturity-period/0010-cellbase-maturity-period.md