Skip to content

Conversation

jtimon
Copy link
Contributor

@jtimon jtimon commented Jul 11, 2016

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.

@jtimon
Copy link
Contributor Author

jtimon commented Jul 11, 2016

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.

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 8af7c64 to 68513f9 Compare July 13, 2016 12:39
@jtimon
Copy link
Contributor Author

jtimon commented Jul 13, 2016

Updated, squashed the doc commits into a single one.

@afk11
Copy link
Contributor

afk11 commented Jul 14, 2016

Slightly easier to review when compared with #8328 jtimon/bitcoin@jtimon:0.12.99-consensus-rename...0.12.99-consensus-moveonly-tx

tACK

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from cdcfecf to a50602c Compare July 14, 2016 21:29
@jtimon
Copy link
Contributor Author

jtimon commented Jul 14, 2016

Updated as independent from closed #8328.
Single commit now, should be easier to review.

@NicolasDorier
Copy link
Contributor

this #8342 would remove the dependency to boost

@NicolasDorier
Copy link
Contributor

NicolasDorier commented Jul 15, 2016

I think move should be done only after we get rid of the dependencies you intend to remove.

@jtimon
Copy link
Contributor Author

jtimon commented Jul 15, 2016

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.

@btcdrak
Copy link
Contributor

btcdrak commented Aug 29, 2016

needs rebase

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 43bfd1f to ee69709 Compare August 30, 2016 13:02
@jtimon
Copy link
Contributor Author

jtimon commented Aug 30, 2016

Rebased

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from ee69709 to 3fc8ee2 Compare September 1, 2016 16:17
@jtimon
Copy link
Contributor Author

jtimon commented Sep 1, 2016

Needed rebase again.

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 3fc8ee2 to 6f8b51c Compare October 19, 2016 17:57
@jtimon
Copy link
Contributor Author

jtimon commented Oct 19, 2016

Rebased.
Also moved the declarations from consensus.h to tx_verify.h as suggested by @sipa .

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 6f8b51c to 08f4cf0 Compare November 21, 2016 19:07
@jtimon
Copy link
Contributor Author

jtimon commented Nov 21, 2016

Needed rebase.

@NicolasDorier
Copy link
Contributor

NicolasDorier commented Nov 25, 2016

utACK, what is blocking that? Old PR, simple to review and definitively a step in right direction.

@maflcko
Copy link
Member

maflcko commented Nov 25, 2016

utACK 08f4cf00daed646f25ae25d40c700bed1458f4cc

@afk11
Copy link
Contributor

afk11 commented Nov 25, 2016

utACK 08f4cf0

@btcdrak
Copy link
Contributor

btcdrak commented Nov 25, 2016

utACK 08f4cf00daed646f25ae25d40c700bed1458f4cc

@morcos
Copy link
Contributor

morcos commented Nov 26, 2016

utACK 08f4cf00da

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 08f4cf0 to 4ed0609 Compare November 27, 2016 18:57
@jtimon
Copy link
Contributor Author

jtimon commented Nov 27, 2016

Fixed @morcos 's nits.

@morcos
Copy link
Contributor

morcos commented Nov 27, 2016

utACK 4ed06095

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 4ed0609 to 26997cc Compare December 3, 2016 06:11
@jtimon
Copy link
Contributor Author

jtimon commented Dec 3, 2016

Needed rebase after renaming main.o, see #9260

@jtimon
Copy link
Contributor Author

jtimon commented Jan 3, 2017

Needs rebase again

@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 26997cc to af2b32f Compare January 24, 2017 21:33
@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from af2b32f to 572c528 Compare January 31, 2017 23:28
@jtimon
Copy link
Contributor Author

jtimon commented Jan 31, 2017

Rebased

Functions related to transaction verification.
@jtimon jtimon force-pushed the 0.12.99-consensus-moveonly-tx branch from 572c528 to 618d07f Compare April 6, 2017 21:37
@jtimon
Copy link
Contributor Author

jtimon commented Apr 6, 2017

Needed rebase

Copy link
Contributor

@ryanofsky ryanofsky left a 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);
Copy link
Contributor

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.

Copy link
Contributor

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)
Copy link
Contributor

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.

@ryanofsky
Copy link
Contributor

This seems ready to be merged. Has like 6 acks.

@mchrostowski
Copy link
Contributor

ACK Code is just a move with a few minor changes that include:

  • Addition of declarations that need to be exposed from their new compilation unit
  • Removal of static keyword to change linkage for above mentioned declarations
  • Cleanup/optimization of #include's

I checked that the changes were only moves, compiled, ran tests, ran bitcoind.

@laanwj
Copy link
Member

laanwj commented May 18, 2017

utACK 618d07f, verified that the consensus function moves to tx_verify.cpp are move-only (besides some comment and namespace changes)

@laanwj laanwj merged commit 618d07f into bitcoin:master May 18, 2017
laanwj added a commit that referenced this pull request May 18, 2017
618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
@jtimon jtimon deleted the 0.12.99-consensus-moveonly-tx branch May 18, 2017 20:23
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 10, 2019
…cation

618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 20, 2019
…cation

618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 13, 2019
…cation

618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2019
…cation

618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2019
…cation

618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
UdjinM6 pushed a commit to dashpay/dash that referenced this pull request Jul 23, 2019
…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>
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
…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>
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.