-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Chainparams: Rename IsTestChain() to AllowAcceptNonstd() #16770
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
utACK e1960b1 |
e1960b1 to
b3cd182
Compare
|
After #16524 has been merged, this doesn't decouple anything anymore, it's just a rename. Which means we can also remove the old names: updated. |
|
I know this has been discussed in the meeting and everyone was meh or +1 for this and I was the only one against it. But to be consistent, shouldn't you update the |
|
I asumed MineBlocksOnDemand() was renamed to the equivalent for fPowNoRetargeting against my deepest bike-shedding wishes, but, no, not the getter, only the internal variable. Why do we even have "candidates for IsTestChain"? I understand the desire to simplify chainparams, but I don't think the best path is to group them and couple them but to try to document them so it gets more obvious which ones aren't really needed. For example, IMO we don't need Params().RequireStandard() as per #16527 |
Those checks are there to prevent users from shooting themselves in the foot. Non std txs could mean they accidentally created an malformed tx, making all their funds go to miners. Incorrect mocktime means they get out of consensus (among other things, like braking tx relay). Same goes for a fallbackfee default, ... However the question "can you shoot yourself in the foot on regtest or testnet?" can always be answered with "no" for a test chain. |
|
Sorry, I don't see how that says anything against what I'm saying. The checks and functionalities can be the same independently of them being documented in different chainparams fields or grouped and coupled into a single field named IsTestChain despite being unrelated functionalities. |
|
Right, the only difference is the amount of code needed in chainparams |
|
Long-term I don't care which option we pick, but we should be consistent. That means that the |
Perhaps CanSetMockTime(), but not IsTestChain, I think. That should be false for testnet, no? |
Fine with me.
Fine with me. (off-topic: While I think there is no risk to enable it for testnet) |
|
@jtimon Are you working on the |
|
No, I'm not working on CanSetMockTime. I'm still not sure what do you want to do about it or what's the relation to this PR. |
|
What is the high level goal of this pull request then? |
|
Get rid of IsTestChain renaming it to something that describes what it does better. |
|
There's a label that says "waiting for author". I don't understand, waiting for author to do what? |
|
I think @MarcoFalke and I agreed on IRC his nits would be solved with something like this: Therefore we can focus on what's at hand here, which is much less. @instagibbs you gave your utACK before #16524 when in my opinion it was more important, (because there was a functional coupling right there) it was actually decoupling rather than a simple rename, so feel free to re-utACK or meh or -0 or nack or whatever. |
|
@MarcoFalke Do you agree with what I said or did I misunderstood our chat discussion? |
b3cd182 to
698c6e6
Compare
|
Rebased. @MarcoFalke note it seems #18037 decouples whether the chain is mockable or not from MineBlocksOnDemand like #17106 (and it does more things), so if I understood you well, your concerns should be solved, right? |
|
Closing due to lack of interest. |
|
I think there was agreement to do this in the meeting when the topic was discussed, but I think no one had interest to review. I hereby commit to reviewing this if at least one other person reviews this :) |
|
I think it takes very little time to review this, probably even less time than in answering my last question to you. I mean, how much time does it get to give an utACK or even a concept ACK to this? But I'm not interested in this myself anymore, so don't bother. I would be more interested in getting review for #17037 or even #17032 Thanks anyway. |
Refactor, this shouldn't change functionality.
This is a step to get rid of Params().IsTestChain() which is currently used for 2 unrelated things.
Rename related to #16526