Commit b2cc3fd
committed
Merge rust-bitcoin#5289: p2p: introduce consensus_encoding to the p2p package
4671923 p2p: add consensus_encoding to v1 network message (Nick Johnson)
213b85b p2p: remove io::Error from exposed API (Nick Johnson)
4c249f7 p2p: add consensus_encoding impls to CommandString (Nick Johnson)
6d95f4e p2p: add FeeFilter wrapper with consensus_encoding (Nick Johnson)
Pull request description:
These commits are not perfectly related, some are kind of standalone, but they are all a part of the larger migration discussed in rust-bitcoin#5331 to drop the `bitcoin` and `io` dependencies in the `p2p` package.
The final commit shows the new `consensus_encoding` interface for an external caller which is nice to lock in with the handshake example. I think this is ready as-is and I (or others) can follow up with the remaining work since p2p hasn't been released yet. This should allow us to drop `bitcoin` and `io`.
1. BIP-152 addressed by rustaceanrob in rust-bitcoin#5333.
2. BIP-158.
3. Some dangling deps on the `BlockExt` in `bitcoin` which might just have to be re-implemented in p2p if not primitives worthy.
4. Convert all the old encoders/decoders in `p2p` to `consensus_encoding` versions.
ACKs for top commit:
apoelstra:
ACK 4671923; successfully ran local tests
Tree-SHA512: c99662ff0d3672e041e86fe303e1627456e495a94959a345af850d8af698233fa9ca7676ad141825be5598f440408e2a24eefe3a2f78661c90bdf5c2673befb5File tree
6 files changed
+814
-49
lines changed- p2p
- examples
- src
6 files changed
+814
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
151 | | - | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
202 | 206 | | |
203 | 207 | | |
204 | 208 | | |
205 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
209 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
210 | 218 | | |
211 | 219 | | |
212 | 220 | | |
| |||
317 | 325 | | |
318 | 326 | | |
319 | 327 | | |
320 | | - | |
321 | | - | |
322 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
323 | 334 | | |
324 | 335 | | |
325 | 336 | | |
326 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
327 | 341 | | |
328 | 342 | | |
329 | 343 | | |
| |||
356 | 370 | | |
357 | 371 | | |
358 | 372 | | |
359 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
360 | 376 | | |
361 | 377 | | |
362 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
363 | 413 | | |
364 | 414 | | |
365 | 415 | | |
| |||
794 | 844 | | |
795 | 845 | | |
796 | 846 | | |
797 | | - | |
| 847 | + | |
798 | 848 | | |
799 | 849 | | |
800 | 850 | | |
| |||
803 | 853 | | |
804 | 854 | | |
805 | 855 | | |
806 | | - | |
| 856 | + | |
807 | 857 | | |
808 | 858 | | |
809 | 859 | | |
| |||
812 | 862 | | |
813 | 863 | | |
814 | 864 | | |
815 | | - | |
| 865 | + | |
816 | 866 | | |
817 | 867 | | |
818 | 868 | | |
| |||
821 | 871 | | |
822 | 872 | | |
823 | 873 | | |
824 | | - | |
| 874 | + | |
825 | 875 | | |
826 | 876 | | |
827 | 877 | | |
| |||
0 commit comments