Consensus: MOVEONLY: Move functions for header verification #8337

pull jtimon wants to merge 2 commits into bitcoin:master from jtimon:0.12.99-consensus-moveonly-header changing 7 files +82 −44
  1. jtimon commented at 1:28 pm on July 13, 2016: contributor

    Moves code for header verification out of main, to consensus.

    EDIT: Partially replaces #7310, only for the header verification part. Like in core_io.h we can separate the cpp files instead of using a single consensus.cpp.

    Continues #8329 It’s analogous to #8329 but with the functions necessary for VerifyHeader().

  2. jtimon force-pushed on Jul 14, 2016
  3. jtimon renamed this:
    Consensus: MOVEONLY: Move functions for tx verification
    Consensus: MOVEONLY: Move functions for header verification
    on Jul 14, 2016
  4. jonasschnelli added the label Refactoring on Jul 14, 2016
  5. jonasschnelli commented at 11:50 am on July 14, 2016: contributor
    This PR contains identical commits then #8328 and #8329. Can you explain why there are multiple PRs? IMO opening a single small PR and trying to get this merge would be more efficient (and only open/PR further work when the first part has been merged).
  6. jtimon commented at 1:20 pm on July 14, 2016: contributor

    Each PR contains more things than the previous one. I could make them independent for easier review instead of each one building on top of the previous, but that would more work. Or I can just close them. Only the first one seems to be getting any review anyway… On Jul 14, 2016 1:52 PM, “Jonas Schnelli” notifications@github.com wrote:

    This PR contains identical commits then #8328 #8328 and #8329 #8329. Can you explain why there are multiple PRs? IMO opening a single small PR and trying to get this merge would be more efficient (and only open/PR further work when the first part has been merged).

    — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #8337 (comment), or mute the thread https://github.com/notifications/unsubscribe/AA9jSkECkHcKe1bhOGYzTNkqWpxVKaa2ks5qViK9gaJpZM4JLak4 .

  7. afk11 commented at 6:15 pm on July 14, 2016: contributor
  8. jtimon force-pushed on Jul 14, 2016
  9. jtimon commented at 11:12 pm on July 14, 2016: contributor
    Updated as independent from #8329 and #8328 (closed). @afk11 Thanks for the selected diffs, I think they’re very useful for review. Perhaps I should do the same on any PR I make dependent on another one. But please keep looking for diffs you think you’re interesting, I’m always open to squashes and interactive rebasing for things that have not been merged.
  10. jtimon force-pushed on Jul 15, 2016
  11. btcdrak commented at 11:57 am on August 29, 2016: contributor
    needs rebase
  12. jtimon force-pushed on Aug 30, 2016
  13. jtimon commented at 12:23 pm on August 30, 2016: contributor
    Rebased.
  14. jtimon force-pushed on Aug 31, 2016
  15. jtimon force-pushed on Sep 1, 2016
  16. CodeShark commented at 2:15 pm on October 10, 2016: contributor
    Verified it is move only. ACK
  17. btcdrak commented at 7:20 pm on October 10, 2016: contributor
    utACK, move only 6d559b2af4925404ba2542d3c644da15a337dbc7
  18. jtimon force-pushed on Oct 20, 2016
  19. jtimon commented at 1:37 am on October 20, 2016: contributor
    Sorry for breaking the reviews, but it was suggested that declaring the functions in consensus/header_verify.h instead of consensus/consensus.h would be more clear.
  20. in src/main.cpp: in d324e016ad outdated
    10@@ -11,7 +11,7 @@
    11 #include "chainparams.h"
    12 #include "checkpoints.h"
    13 #include "checkqueue.h"
    14-#include "consensus/consensus.h"
    


    morcos commented at 1:28 am on November 27, 2016:
    same issue here. this should not be removed.
  21. morcos commented at 1:41 am on November 27, 2016: member
    utACK d324e016a
  22. jtimon force-pushed on Nov 27, 2016
  23. jtimon commented at 7:02 pm on November 27, 2016: contributor
    Fixed @morcos ’s nit.
  24. NicolasDorier commented at 4:35 pm on November 29, 2016: contributor
    utACK 6a66d7a242387ea73bf5f40154ef011b246c1a02
  25. jtimon force-pushed on Dec 3, 2016
  26. jtimon commented at 6:17 am on December 3, 2016: contributor
    Needed rebase after renaming main.o, see #9260 (although needed, the rebase was clean in this case)
  27. dcousens commented at 5:56 am on March 21, 2017: contributor
    utACK 4d17675
  28. jtimon force-pushed on Mar 23, 2017
  29. jtimon commented at 7:05 pm on March 23, 2017: contributor
    Needed rebase after #9908 and after [some other PR to locate that introduces the assert in ContextualCheckBlockHeader]. After #9908 , added a commit to move MAX_FUTURE_BLOCK_TIME from chain.h to consensus/consensus.h
  30. jtimon commented at 8:36 pm on May 18, 2017: contributor
    Needed trivial rebase in the makefile after #8329 was merged. For next rebase (which will hopefully be needed soon, see #9717 and #10339 ), I’m thinking of directly moving CheckBlockHeader to pow.o instead of consensus/header_verify.o. People are even talking about removing it. Thoughts?
  31. MOVEONLY: Header verification to consensus/header_verify.o 3eade5454c
  32. MOVEONLY: MAX_FUTURE_BLOCK_TIME to consensus/consensus.h dd7836a156
  33. jtimon force-pushed on May 18, 2017
  34. in src/consensus/consensus.h:15 in dd7836a156
     7@@ -8,6 +8,12 @@
     8 
     9 #include <stdint.h>
    10 
    11+/**
    12+ * Maximum amount of time that a block timestamp is allowed to exceed the
    13+ * current network-adjusted time before the block will be accepted.
    14+ */
    15+static const int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60;
    


    ryanofsky commented at 9:15 pm on May 18, 2017:

    In commit “MOVEONLY: MAX_FUTURE_BLOCK_TIME to consensus/consensus.h”

    Not sure if if it’s exactly right to make this a consensus constant, because even in the worst case if this is set inconsistently, consensus should eventually be reached when system clock times catch up. IIRC, this was the reasoning @morcos gave me for not defining this constant in consensus.h.


    jtimon commented at 9:32 am on May 20, 2017:
    The goal is more to take it out of chain.h than to put it in consensus/consensus.h. consensus/header_verify would be fine as well. As an example, #8493 puts the check in libconsensus without putting chain.o in libconsensus too. Whether blocks eventually become valid when violating this rule or not, I think the question that should be asked is “in a hypothetical finished libconsensus, is this check included or not?”, and I also think the answer is yes.
  35. ryanofsky commented at 9:18 pm on May 18, 2017: member
    utACK dd7836a15664b93ca523e6a60fcbaec4a268e187 confirmed move only.
  36. jtimon commented at 6:57 am on June 19, 2017: contributor
    Needs rebase again and this was for #8493 anyway, closing.
  37. jtimon closed this on Jun 19, 2017

  38. fanquake moved this from the "In progress" to the "Plans and discussion" column in a project

  39. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-04 19:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me