fanquake
6af9b31bfc
Merge #19107 : p2p: Move all header verification into the network layer, extend logging
...
deb52711a1 Remove header checks out of net_processing (Troy Giorshev)
52d4ae46ab Give V1TransportDeserializer CChainParams& member (Troy Giorshev)
5bceef6b12 Change CMessageHeader Constructor (Troy Giorshev)
1ca20c1af8 Add doxygen comment for ReceiveMsgBytes (Troy Giorshev)
890b1d7c2b Move checksum check from net_processing to net (Troy Giorshev)
2716647ebf Give V1TransportDeserializer an m_node_id member (Troy Giorshev)
Pull request description:
Inspired by #15206 and #15197 , this PR moves all message header verification from the message processing layer and into the network/transport layer.
In the previous PRs there is a change in behavior, where we would disconnect from peers upon a single failed checksum check. In various discussions there was concern over whether this was the right choice, and some expressed a desire to see how this would look if it was made to be a pure refactor.
For more context, see https://bitcoincore.reviews/15206.html#l-81 .
This PR improves the separation between the p2p layers, helping improvements like [BIP324](https://github.com/bitcoin/bitcoin/pull/18242 ) and #18989 .
ACKs for top commit:
ryanofsky:
Code review ACK deb52711a1 just rebase due to conflict on adjacent line
jnewbery:
Code review ACK deb52711a1 .
Tree-SHA512: 1a3b7ae883b020cfee1bef968813e04df651ffdad9dd961a826bd80654f2c98676ce7f4721038a1b78d8790e4cebe8060419e3d8affc97ce2b9b4e4b72e6fa9f
2020-09-29 16:14:40 +08:00
..
2020-09-06 18:35:23 -07:00
2020-05-20 08:27:07 -04:00
2020-09-10 10:47:40 +09:00
2020-01-28 17:00:01 +01:00
2020-09-28 12:27:08 -07:00
2020-08-21 12:48:46 +08:00
2020-09-22 11:34:30 -04:00
2020-01-28 16:59:07 +01:00
2020-04-30 18:02:04 +08:00
2020-09-16 06:30:57 +08:00
2020-09-05 11:45:16 +02:00
2020-09-17 22:17:17 +02:00
2020-09-23 20:35:54 +02:00
2020-09-29 15:14:08 +08:00
2020-09-28 12:14:19 +10:00
2020-09-11 12:44:08 -07:00
2020-08-20 17:55:06 +00:00
2020-09-29 16:14:40 +08:00
2020-02-09 07:44:29 -08:00
2020-09-28 12:27:08 -07:00
2020-09-29 15:14:08 +08:00
2020-09-22 11:34:30 -04:00
2020-07-06 03:52:37 +02:00
2020-06-22 12:12:22 +02:00
2020-07-03 20:43:55 -07:00
2020-08-12 09:22:07 +01:00
2020-08-12 09:22:07 +01:00
2019-12-30 10:42:20 +13:00
2019-12-30 10:42:20 +13:00
2020-07-08 21:44:45 +08:00
2020-07-03 20:43:55 -07:00
2020-08-28 16:50:57 +02:00
2020-08-28 16:50:57 +02:00
2019-10-16 08:56:57 -07:00
2019-09-05 13:25:11 +12:00
2020-09-25 15:23:01 +03:00
2020-09-22 22:32:25 +02:00
2020-09-22 22:32:25 +02:00
2020-09-22 22:32:25 +02:00
2020-05-28 09:55:39 +03:00
2020-05-28 09:55:39 +03:00
2020-07-30 13:57:54 -07:00
2020-05-26 17:27:15 -04:00
2020-06-21 06:41:55 -04:00
2020-05-20 07:30:29 -04:00
2019-12-30 10:42:20 +13:00
2020-08-27 20:07:27 -04:00
2020-09-18 10:19:42 +09:00
2020-08-20 18:20:27 +00:00
2020-09-25 15:23:01 +03:00
2020-09-18 09:37:57 +09:00
2020-04-03 16:29:26 +02:00
2020-04-16 13:33:09 -04:00
2020-05-04 19:53:58 +03:00
2020-07-01 14:44:28 -04:00
2020-07-01 14:44:28 -04:00
2020-08-20 17:55:06 +00:00
2019-12-30 10:42:20 +13:00
2020-04-16 13:33:09 -04:00
2019-12-30 10:42:20 +13:00
2020-05-22 01:40:31 +09:00
2020-09-04 10:25:44 +01:00
2020-04-08 14:45:27 +00:00
2019-12-30 10:42:20 +13:00
2020-07-08 14:26:14 +03:00
2020-09-01 09:26:28 +08:00
2020-05-20 07:30:29 -04:00
2020-06-16 15:15:46 -04:00
2019-12-30 10:42:20 +13:00
2020-08-06 16:28:26 -07:00
2020-08-06 16:28:26 -07:00
2020-05-21 06:53:39 -04:00
2020-05-13 16:20:13 -04:00
2020-06-27 11:49:28 -04:00
2020-04-16 13:33:09 -04:00
2020-04-16 13:33:09 -04:00
2020-09-29 14:04:25 +08:00
2020-08-27 14:33:00 -04:00
2019-12-30 10:42:20 +13:00
2020-08-18 18:03:57 +00:00
2019-12-30 10:42:20 +13:00
2020-06-07 17:03:49 +02:00
2020-05-28 09:54:24 +03:00
2020-09-21 22:33:00 +02:00
2020-09-14 16:35:09 +08:00
2020-01-28 17:01:48 +01:00
2020-05-12 18:03:39 +03:00
2020-04-01 12:49:15 +02:00
2020-09-14 16:35:09 +08:00
2020-09-14 16:35:09 +08:00
2020-04-05 01:01:13 +02:00
2020-04-05 10:46:24 +08:00
2020-09-21 22:33:00 +02:00
2020-04-16 13:33:09 -04:00
2020-07-30 13:57:54 -07:00
2020-03-30 16:09:51 -07:00
2020-06-15 08:08:19 -04:00
2020-09-04 09:46:44 -07:00
2020-07-30 14:38:50 +03:00
2020-07-30 14:38:50 +03:00
2020-09-29 16:14:40 +08:00
2020-09-08 07:55:11 +02:00
2019-10-29 11:30:12 +02:00
2020-09-29 16:14:40 +08:00
2020-09-29 16:14:40 +08:00
2020-09-21 10:13:34 +02:00
2020-09-21 10:13:34 +02:00
2020-08-24 21:50:59 +02:00
2020-01-08 12:35:59 +00:00
2020-05-11 00:20:57 +02:00
2020-06-27 11:49:28 -04:00
2020-05-05 04:45:59 +03:00
2019-12-30 10:42:20 +13:00
2020-07-01 18:03:12 -04:00
2020-07-01 18:02:38 -04:00
2020-04-30 18:02:03 +08:00
2020-09-22 22:05:18 -04:00
2020-09-22 22:05:18 -04:00
2020-06-24 16:32:19 -04:00
2020-06-24 16:32:19 -04:00
2020-08-18 18:03:56 +00:00
2020-07-30 13:57:54 -07:00
2020-08-10 21:30:42 +08:00
2020-04-30 09:19:14 -04:00
2020-04-16 13:33:09 -04:00
2019-11-12 14:50:44 -08:00
2020-09-22 17:08:08 +02:00
2020-06-21 06:02:59 -04:00
2020-06-21 06:02:59 -04:00
2020-06-22 12:12:22 +02:00
2020-09-22 22:31:31 +02:00
2020-09-22 22:31:31 +02:00
2020-07-30 13:57:09 -07:00
2020-07-26 22:46:28 +03:00
2020-08-29 20:46:47 +03:00
2020-09-19 18:02:42 +03:00
2019-12-30 10:42:20 +13:00
2020-08-18 10:46:53 +03:00
2020-06-27 11:49:28 -04:00
2019-12-06 10:02:08 +01:00
2020-08-07 14:55:02 +02:00
2019-12-30 10:42:20 +13:00
2020-07-29 07:53:19 +02:00
2020-07-01 14:44:24 -04:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-09-28 12:14:19 +10:00
2020-09-28 12:14:19 +10:00
2020-04-16 13:33:09 -04:00
2020-09-23 20:35:54 +02:00
2020-09-23 20:35:54 +02:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-09-17 22:17:17 +02:00
2019-12-30 10:42:20 +13:00
2019-12-30 10:42:20 +13:00
2019-12-30 10:42:20 +13:00
2020-07-29 16:36:44 +07:00
2020-06-10 15:01:20 +03:00
2020-06-10 15:01:20 +03:00