Skip to content

Net processing: follow ups to #20799 (removing support for v1 compact blocks)#25147

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
jnewbery:20205_20799_follow_ups
May 19, 2022
Merged

Net processing: follow ups to #20799 (removing support for v1 compact blocks)#25147
fanquake merged 2 commits into
bitcoin:masterfrom
jnewbery:20205_20799_follow_ups

Conversation

@jnewbery

Copy link
Copy Markdown
Contributor

This implements two of the suggestions from code reviews of PR 20799:

  • Remove fUseWTXID parameter from CBlockHeaderAndShortTxIDs constructor
  • Remove segwit argument from build_block_on_tip()

@jnewbery

Copy link
Copy Markdown
Contributor Author

cc @dergoegge @MarcoFalke

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread src/net_processing.cpp Outdated
Comment thread src/net_processing.cpp Outdated
Comment thread src/net_processing.cpp Outdated
@naumenkogs

Copy link
Copy Markdown
Contributor

Concept ACK.
I will give a full ACK once you resolve Marko's suggestions, which I endorse too.

All uses of CBlockHeaderAndShortTxIDs in the product code are
constructed with fUseWTXID=true, so remove the parameter.

There is one use of the CBlockHeaderAndShortTxIDs constructor with
fUseWTXID=false in the unit tests. This is used to construct a
CBlockHeaderAndShortTxIDs for a block with only the coinbase
transaction, so setting fUseWTXID to true or false makes no difference.

Suggested in bitcoin#20799 (review)
@jnewbery jnewbery force-pushed the 20205_20799_follow_ups branch from 3ab9f69 to 97e4a5d Compare May 17, 2022 09:44
@jnewbery

Copy link
Copy Markdown
Contributor Author

Thanks for the review @MarcoFalke and @naumenkogs. I've addressed all your comments.

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still lgtm

Comment thread src/net_processing.cpp Outdated
Comment thread src/net_processing.cpp Outdated
@jnewbery jnewbery force-pushed the 20205_20799_follow_ups branch from 97e4a5d to 8184dcb Compare May 17, 2022 09:58
@naumenkogs

Copy link
Copy Markdown
Contributor

ACK 8184dcbdd18d8b732dc285a05884ecda115062e1

@fanquake fanquake requested a review from dergoegge May 18, 2022 08:36
Comment thread src/net_processing.cpp Outdated
The only place that segwit=True is for a block that contains only the
coinbase transaction. Since the witness commitment is optional if none
of the transactions have a witness, we can leave it out. This doesn't
change the test coverage, which is testing p2p compact block logic.

Suggested in bitcoin#20799 (comment)
@jnewbery jnewbery force-pushed the 20205_20799_follow_ups branch from 8184dcb to bf6526f Compare May 18, 2022 12:48
@dergoegge

Copy link
Copy Markdown
Member

Code review ACK bf6526f

@fanquake fanquake requested a review from naumenkogs May 18, 2022 14:42
@naumenkogs

Copy link
Copy Markdown
Contributor

ACK bf6526f

@fanquake fanquake merged commit fdb82a3 into bitcoin:master May 19, 2022
@jnewbery jnewbery deleted the 20205_20799_follow_ups branch May 19, 2022 09:48
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 28, 2022
@bitcoin bitcoin locked and limited conversation to collaborators May 19, 2023
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.

6 participants