-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Consensus: MOVEONLY: Move functions for tx verification #8329
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
ping @MarcoFalke this time the moveonly commit should be easier to verify than in #7310. We can squash additial doc or not separately at the end as you pointed out. |
8af7c64
to
68513f9
Compare
Updated, squashed the doc commits into a single one. |
68513f9
to
cdcfecf
Compare
Slightly easier to review when compared with #8328 jtimon/bitcoin@jtimon:0.12.99-consensus-rename...0.12.99-consensus-moveonly-tx tACK |
cdcfecf
to
a50602c
Compare
Updated as independent from closed #8328. |
this #8342 would remove the dependency to boost |
I think move should be done only after we get rid of the dependencies you intend to remove. |
a50602c
to
43bfd1f
Compare
If your fix is done after the move, it will be visible in git blame. That would be a reason for moving first. What are the reasons in favor of moving later? Sorry, updated again adding a couple of lines of documentation as separators. |
needs rebase |
43bfd1f
to
ee69709
Compare
Rebased |
ee69709
to
3fc8ee2
Compare
Needed rebase again. |
3fc8ee2
to
6f8b51c
Compare
Rebased. |
6f8b51c
to
08f4cf0
Compare
Needed rebase. |
utACK, what is blocking that? Old PR, simple to review and definitively a step in right direction. |
utACK 08f4cf00daed646f25ae25d40c700bed1458f4cc |
utACK 08f4cf0 |
utACK 08f4cf00daed646f25ae25d40c700bed1458f4cc |
utACK 08f4cf00da |
08f4cf0
to
4ed0609
Compare
Fixed @morcos 's nits. |
utACK 4ed06095 |
4ed0609
to
26997cc
Compare
Needed rebase after renaming main.o, see #9260 |
Needs rebase again |
26997cc
to
af2b32f
Compare
af2b32f
to
572c528
Compare
Rebased |
Functions related to transaction verification.
572c528
to
618d07f
Compare
Needed rebase |
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.
utACK 618d07f. Confirmed this is move only, except for the EvaluateSequenceLocks changes noted.
*/ | ||
std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block); | ||
|
||
bool EvaluateSequenceLocks(const CBlockIndex& block, std::pair<int, int64_t> lockPair); |
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 declaration seems like it might have been added here by accident. It isn't neccessary, isn't documented, and wasn't in the original header file.
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.
validation.cpp uses this call, thought it would be nice if the header additions were committed separately from the moved code to make this clear and easier to review (verify moveonly) @jtimon
return std::make_pair(nMinHeight, nMinTime); | ||
} | ||
|
||
bool EvaluateSequenceLocks(const CBlockIndex& block, std::pair<int, int64_t> lockPair) |
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.
Maybe declare this static again. The declaration isn't documented, and there doesn't seem to be a reason to expose it.
This seems ready to be merged. Has like 6 acks. |
ACK Code is just a move with a few minor changes that include:
I checked that the changes were only moves, compiled, ran tests, ran bitcoind. |
utACK 618d07f, verified that the consensus function moves to |
618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
…cation 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
…cation 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
…cation 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
…cation 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
…cation 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
…ication (#3030) * Merge bitcoin#8329: Consensus: MOVEONLY: Move functions for tx verification 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497 * remove GetTransactionSigOpCost Signed-off-by: Pasta <pasta@dashboost.org> * fix, properly copy (methods moved had diverged from upstream), more fixing Signed-off-by: Pasta <pasta@dashboost.org>
…ication (dashpay#3030) * Merge bitcoin#8329: Consensus: MOVEONLY: Move functions for tx verification 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497 * remove GetTransactionSigOpCost Signed-off-by: Pasta <pasta@dashboost.org> * fix, properly copy (methods moved had diverged from upstream), more fixing Signed-off-by: Pasta <pasta@dashboost.org>
Partially replaces #7310, only for the transaction verification part.
Like in core_io.h we can separate the cpp files instead of using a single consensus.cpp. I would like to know what is preferred in that reward as soon as possible: I won't fight either way because I don't care (until something has been decided then I will become a fanatic against changing the decision because I may waste seconds renaming things while rebasing interactively with some of my outdated branches).
Based in #8328 out of laziness, it can be easily separated if necessary.