Skip to content
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

net processing: Move block inventory state to net_processing #19829

Merged
merged 7 commits into from
Dec 22, 2020

Conversation

jnewbery
Copy link
Contributor

This continues the work of moving application layer data into net_processing, by moving all block inventory state into the new Peer object added in #19607.

For motivation, see #19398.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 28, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Contributor

@ariard ariard left a comment

Choose a reason for hiding this comment

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

Just calls for better comments.

src/net_processing.cpp Outdated Show resolved Hide resolved
src/net.h Show resolved Hide resolved
src/net_processing.cpp Outdated Show resolved Hide resolved
@jnewbery
Copy link
Contributor Author

Thanks for the review @ariard . I've addressed your comments.

@jnewbery
Copy link
Contributor Author

jnewbery commented Sep 2, 2020

Rebased

@jnewbery jnewbery force-pushed the 2020-08-blocks-in-peer branch from f07c765 to 1cc4d31 Compare September 2, 2020 15:26
@jonatack
Copy link
Member

jonatack commented Sep 2, 2020

Concept ACK

@jnewbery
Copy link
Contributor Author

jnewbery commented Sep 3, 2020

rebased

@hebasto
Copy link
Member

hebasto commented Sep 5, 2020

Concept ACK.

src/net_processing.cpp Outdated Show resolved Hide resolved
src/net_processing.cpp Outdated Show resolved Hide resolved
@jnewbery jnewbery force-pushed the 2020-08-blocks-in-peer branch from aafa89b to 0684152 Compare September 5, 2020 09:42
@jnewbery
Copy link
Contributor Author

jnewbery commented Sep 5, 2020

Thanks for the review @hebasto . I've addressed both of your comments.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK 0684152, tested on Linux Mint 20 (x86_64).

@jnewbery
Copy link
Contributor Author

jnewbery commented Sep 7, 2020

rebased

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

ACK 9aad3e4 modulo the RPC fields/help order (see comment below)

src/net_processing.cpp Show resolved Hide resolved
src/net_processing.cpp Show resolved Hide resolved
src/net_processing.h Show resolved Hide resolved
src/rpc/net.cpp Outdated Show resolved Hide resolved
src/net_processing.h Outdated Show resolved Hide resolved
@practicalswift
Copy link
Contributor

Concept ACK

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

review ACK 9aad3e4 🔱

Changes since previous review:

  • Add lock-order docs
  • Pass in Peer& to ProcessHeadersMessage
  • Shuffle order in RPC doc
  • Rebase
  • Doc fixups
  • New commit with a lock
Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

review ACK 9aad3e4f33 🔱

Changes since previous review:

* Add lock-order docs
* Pass in Peer& to ProcessHeadersMessage
* Shuffle order in RPC doc
* Rebase
* Doc fixups
* New commit with a lock

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUhhwgv+M611eBCdMzaHcsl/tL05mOFVC94Nc9F7t5MCW8iuNlEWaT7yzpQaPV5g
8L9MZqFGi7YpPVrL2y12ky0MYBfG9MdploG2F53O4WvLnyEa6PXw04HZKqlv9yfS
qcJEwjJc+XvKPohl6NZg91GDyofVttKI8bqCqjPhEbZYCi2+RQ9o0OZ1PJEr8b6L
KgtXpj+YgtpRwpH5ny/E/mR5LwfLFmxYNmgQlEpMvjIqyxcSUgrYXn77vxMJI//T
Y2g5NowkMo43S12fT6KWJk9eMoRy+L2kgrCD9LI0r/wuY1B+9rCamBgzeBKIuk6f
EfFnS33FIG8xcT21+x5g38J6jlHz6HlSy/huA31ALBhDItMTR+dm7VI+1KXKTTag
nhN9S/ZVWXjjPaZKzbAmKguPRbJWdOcoWdyAlZy+S4qeC+wdEqT+GBGvhj0TZ3du
56VMY6sNhdG8kUQr4KuwugereUtKQDJvHMehBH6ki6br/G6W71kdpCYPhxK5fZkx
khylqj75
=v6fJ
-----END PGP SIGNATURE-----

Timestamp of file with hash 431bceaaa7cf87a17743f11d77f4a61c5cdf9d1374a5f4fcd4e5683b564af330 -

src/net_processing.h Show resolved Hide resolved
src/net_processing.h Show resolved Hide resolved
src/net_processing.cpp Outdated Show resolved Hide resolved
Not done as a scripted diff to avoid misnaming the local variable in
ProcessMessage().
-BEGIN VERIFY SCRIPT-
sed -i 's/vBlockHashesToAnnounce/m_blocks_for_headers_relay/g' src/net_processing.*
sed -i 's/vInventoryBlockToSend/m_blocks_for_inv_relay/g' src/net_processing.*
-END VERIFY SCRIPT-
Also rename to m_continuation_block to better communicate meaning.
@jnewbery jnewbery force-pushed the 2020-08-blocks-in-peer branch from 9aad3e4 to 3002b4a Compare December 20, 2020 10:08
@jnewbery
Copy link
Contributor Author

Thanks for the latest reviews @jonatack and @MarcoFalke. I've addressed/responded to all of your comments.

I'd like to stabilize this PR now unless any functional issues are found. We have ACKs on the code change at various times from @MarcoFalke, @jonatack, @hebasto, @sipa and @Sjors. If there are any further style suggestions, I can address them in the next PR in this series.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

re-ACK 3002b4a 🌓

only changes:

  • Move RPC help once more
  • Fix LOCK scope {} nit
  • Rename a member
Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK 3002b4af2b4fde63026f8f7c575452a5c989c662 🌓

only changes:

* Move RPC help once more
* Fix LOCK scope {} nit
* Rename a member

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUirewv/WiQMgzv/dZCAqCSBX8qa6mPZiEw4j5mOPAnylVH3P+qiQGEXrHpKVjTj
XO0rGPI+dEvej90YVSThX231sBS1VXvP4hv8JKYHVdoAVP2j3XbmEmtZrPoGqViR
eMtblmUALv5A8OfkquBDUb/PVDr9FxUycTe01tGxyxhcLtaTfoIcq+6Elh7NkWMm
tgszY1rz2S7pjYU3GH/an+v5BYOBAi3HG5vHETEICQGjabAEduMZFF2bueQZIj1Q
CkVhnj/mcFx7Fypc0J1q5LsPonuPHVfqMK38dO6iFxcpLfLZKwmcnXAJ7OFnHkQF
JJ1zXA5HRixl5UKakZqUkjhjroD71vfODzfhSLaszEZLqeGXx0+N17CAd8Vgblk2
ReLskQfzmco+aHWX6Hl7CKj7+yTszpWTMvmMvkl08EaNnAGuGBbF1TgI8oA213Ry
QwjwlP5Ohx7Iy33qtysxAq5/4jqypu/srlhxcfFCidi+AvujeZqcyXLztxw54zLj
cWdIBtpT
=PVp9
-----END PGP SIGNATURE-----

Timestamp of file with hash 03268669e27bdf510ed13b406639896a3bedb0573f1b2d13c4c88ed636966237 -

@jonatack
Copy link
Member

re-ACK 3002b4a per git diff 9aad3e4 3002b4a

@Sjors
Copy link
Member

Sjors commented Dec 22, 2020

Code review re-ACK 3002b4a

@maflcko maflcko merged commit df127ec into bitcoin:master Dec 22, 2020
@jnewbery jnewbery deleted the 2020-08-blocks-in-peer branch December 22, 2020 11:46
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 22, 2020
mjdietzx pushed a commit to mjdietzx/bitcoin that referenced this pull request Dec 26, 2020
Fabcien added a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
As per title, only comments.

Partial backport of [[bitcoin/bitcoin#19829 | core#19829]]:
bitcoin/bitcoin@717a374

Ref T1696.

Test Plan: Read the comments.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10865
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
Partial backport of [[bitcoin/bitcoin#19829 | core#19829]]:
bitcoin/bitcoin@77a2c2f

Ref T1696.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10866
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
```
Not done as a scripted diff to avoid misnaming the local variable in
ProcessMessage().
```

Partial backport of [[ bitcoin/bitcoin#19829 | core#19829 ]]:
bitcoin/bitcoin@78040f9

Depends on D10866.

Ref T1696.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10867
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
Partial backport of [[bitcoin/bitcoin#19829 | core#19829]]:
bitcoin/bitcoin@53b7ac1

Ref T1696.

Depends on D10867.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10868
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
Original rename script:
```
-BEGIN VERIFY SCRIPT-
sed -i 's/vBlockHashesToAnnounce/m_blocks_for_headers_relay/g' src/net_processing.*
sed -i 's/vInventoryBlockToSend/m_blocks_for_inv_relay/g' src/net_processing.*
-END VERIFY SCRIPT-
```

Partial backport of [[bitcoin/bitcoin#19829 | core#19829]]:
bitcoin/bitcoin@c853ef0

Ref T1696.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10870
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
```
Also rename to m_continuation_block to better communicate meaning.
```

Partial backport of [[bitcoin/bitcoin#19829 | core#19829]]:
bitcoin/bitcoin@184557e

Depends on D10870.

Ref T1696.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10871
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 24, 2022
Summary:
Completes backport of [[bitcoin/bitcoin#19829 | core#19829]]:
bitcoin/bitcoin@3002b4a

Depends on D10871.

Ref T1696.

Test Plan:
With Clang and debug:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10872
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
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.

10 participants