Change mapRelay to store CTransactions #7877

pull sipa wants to merge 1 commits into bitcoin:master from sipa:relayctransaction changing 3 files +8 −21
  1. sipa commented at 2:27 PM on April 14, 2016: member

    This is a preparation commit for segwit, but won't hurt to include ahead of time.

    It is necessary as the relayed serialization will depend on what the peer requests.

  2. Change mapRelay to store CTransactions 38c310299c
  3. btcdrak commented at 2:34 PM on April 14, 2016: contributor

    @sipa Should this also be marked as backport for 0.12?

  4. laanwj commented at 2:36 PM on April 14, 2016: member

    I think with segwit we're getting at the point we're going to need so many backports for 0.12.2 we'd better just release 0.13 early...

    utACK https://github.com/bitcoin/bitcoin/pull/7877/commits/38c310299cfef419d42744362b90c1700b598953

  5. MarcoFalke commented at 3:09 PM on April 14, 2016: member

    I'd agree with backporting this "early" (as soon as it is merged into master) to avoid confusion and cherry-pick conflicts due to "out-of-order" cherry-picks, but it seems this is already conflicting on 0.12, so better leave such conflicting cherry-picks to a separate pull request with review before merge.

  6. sipa commented at 3:17 PM on April 14, 2016: member

    @MarcoFalke My segwit-base branch is 0.12-based, and includes backports from master and other pull requests needed already.

  7. laanwj commented at 3:51 PM on April 14, 2016: member

    I'd agree with backporting this "early" (as soon as it is merged into master)

    That would rule out merging this for now - there is a release in progress on the 0.12 branch, so only things that are critical enough to warrant a rc3 should be merged there right now.

    But I'd prefer to backport this as part of other segwit changes, also to have the context clear.

  8. laanwj added the label Refactoring on Apr 14, 2016
  9. sdaftuar commented at 8:02 PM on April 14, 2016: member

    ACK 38c310299cfef419d42744362b90c1700b598953

    In case anyone else has the same thought: I was wondering what the memory usage ratio was between a CTransaction and its serialization; it seems to be about 1.4x as big, which is small enough that it should be better to store the CTransaction than both of the serializations that would generally be needed post-segwit. (Also serialization seems to be fast enough that it's not worth worrying about doing it for each peer.)

  10. jonasschnelli commented at 8:04 PM on April 14, 2016: contributor

    utACK 38c310299cfef419d42744362b90c1700b598953

  11. theuni commented at 3:01 AM on April 15, 2016: member

    nice, I had the same change locally for a different reason. Freebie :)

    utACK.

  12. laanwj commented at 6:57 AM on April 15, 2016: member

    I was wondering what the memory usage ratio was between a CTransaction and its serialization; it seems to be about 1.4x as big, which is small enough that it should be better to store the CTransaction than both of the serializations that would generally be needed post-segwit. (Also serialization seems to be fast enough that it's not worth worrying about doing it for each peer.)

    Thanks for checking this, it was in the back of my mind as well.

  13. laanwj merged this on Apr 15, 2016
  14. laanwj closed this on Apr 15, 2016

  15. laanwj referenced this in commit efc059322c on Apr 15, 2016
  16. codablock referenced this in commit 127682cf9b on Sep 16, 2017
  17. codablock referenced this in commit d597ab7d06 on Sep 19, 2017
  18. codablock referenced this in commit bef036125f on Dec 22, 2017
  19. codablock referenced this in commit b2a27c0624 on Dec 22, 2017
  20. andvgal referenced this in commit 13ba055a0f on Jan 6, 2019
  21. andvgal referenced this in commit 5d009715cf on Jan 6, 2019
  22. MarkLTZ referenced this in commit 3977804911 on Apr 27, 2019
  23. zkbot referenced this in commit 65dff184f6 on Aug 4, 2021
  24. zkbot referenced this in commit 6f38962577 on Aug 5, 2021
  25. zkbot referenced this in commit 1aa59fd4ac on Aug 5, 2021
  26. zkbot referenced this in commit 8c3d670c8a on Aug 9, 2021
  27. zkbot referenced this in commit 1dc1ababa9 on Aug 9, 2021
  28. zkbot referenced this in commit 18fe0a377b on Aug 9, 2021
  29. zkbot referenced this in commit 1cb1ed2653 on Aug 10, 2021
  30. MarcoFalke 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: 2026-04-19 09:15 UTC

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