Commit Graph

161 Commits

Author SHA1 Message Date
Conner Fromknecht
7207967135
wire/msgmerkleblock: optimize serialization by reusing small buffers 2023-12-15 16:37:36 -08:00
Conner Fromknecht
8bf07cc0bf
wire/netaddress: add optimiezed read/writeNetAddressBuf 2023-12-15 16:37:34 -08:00
Conner Fromknecht
dc4fbb04b3
wire/msgreject: optimize serialization by reusing small buffers 2023-12-15 16:37:31 -08:00
Conner Fromknecht
57daac345e
wire/common: add optimized writeVarStrBuf an readVarStrBuf 2023-12-15 16:37:29 -08:00
Conner Fromknecht
1cd5e02838
wire/invvect: remove unused readInvVect and writeInvVect 2023-12-15 16:37:26 -08:00
Conner Fromknecht
efcf964be2
wire/msgnotfound: optimize serialization by reusing small buffers 2023-12-15 16:37:24 -08:00
Conner Fromknecht
834febbb86
wire/msgcfilter: optimize serialization by reusing small buffers 2023-12-15 16:37:21 -08:00
Conner Fromknecht
ddeba60026
wiree/msggetcfilters: optimize serialization by reusing small buffers 2023-12-15 16:37:19 -08:00
Conner Fromknecht
d6594daa49
wire/msggetdata: optimize serialization by reusing small buffers 2023-12-15 16:37:16 -08:00
Conner Fromknecht
2383a04977
wire/msginv: optimize by reusing small buffers 2023-12-15 16:37:13 -08:00
Conner Fromknecht
f37f4750dc
wire/msgcfcheckpt: optimize serialization by reusing small buffers 2023-12-15 16:37:09 -08:00
Conner Fromknecht
1990555eee
wire/msggetcfcheckpt: optimize by removing read/writeElement 2023-12-15 16:37:02 -08:00
Conner Fromknecht
1c525dbd0e
wire/msgcfheaders: optimize encode/decode by using one small buffer 2023-12-15 16:36:56 -08:00
Conner Fromknecht
d042fe0586
wire/msggetcfheaders: use single small buffer for encode/decode 2023-12-15 16:36:54 -08:00
Conner Fromknecht
83675cb393
wire/msgheaders: optimize serialization by reusing small buffers 2023-12-15 16:36:51 -08:00
Conner Fromknecht
c0d35e6d92
wire/msggetheaders: optimize serialization by reusing small buffers 2023-12-15 16:36:49 -08:00
Conner Fromknecht
d8e08170bd
wire/msgblock: optimize DeserializeTxLoc by reusing small buffers 2023-12-15 16:36:46 -08:00
Conner Fromknecht
ee1f8077d8
wire/msgblock: use only one small buffer per block encode/decode 2023-12-15 16:36:44 -08:00
Conner Fromknecht
4ebc651689
wire/msggetblocks: optimize by reusing small buffer 2023-12-15 16:36:41 -08:00
Conner Fromknecht
674c2202ea
wire/invvect: add optimized readInvVectBuf and writeInvVectBuf 2023-12-15 16:36:38 -08:00
Conner Fromknecht
3cee06eaeb
wire/blockheader: introduce optimized writeBlockHeaderBuf 2023-12-15 16:36:36 -08:00
Conner Fromknecht
aa769e3da6
wire/bench_test: introduce optimized readBlockHeaderBuf 2023-12-15 16:36:33 -08:00
Conner Fromknecht
0cf8c19d5a
wire/msgtx: use readScriptBuf in txn serialization 2023-12-15 16:36:31 -08:00
Conner Fromknecht
3a91303a1a
wire/msgtx: use writeTxWitnessBuf in txn serialization 2023-12-15 16:36:28 -08:00
Conner Fromknecht
3bfd0c6cb3
wire/msgtx: introduce optimized writeTxWitnessBuf 2023-12-15 16:36:26 -08:00
Conner Fromknecht
24d42177a2
wire/msgtx: use readTxOutBuf in txn serialization 2023-12-15 16:36:23 -08:00
Conner Fromknecht
aebc74398a
wire/msgtx: introduce optimized readTxOutBuf 2023-12-15 16:36:20 -08:00
Conner Fromknecht
48d31e5926
wire/msgtx: use WriteTxOutBuf in txn serialization 2023-12-15 16:36:18 -08:00
Conner Fromknecht
7c8844f56f
wire/msgtx: introduce optimized WriteTxOutBuf 2023-12-15 16:36:15 -08:00
Conner Fromknecht
607eea193f
wire/msgtx: use readTxInBuf in txn serialization 2023-12-15 16:36:13 -08:00
Conner Fromknecht
6f4a7a142a
wire/msgtx: introduce optimized readTxInBuf 2023-12-15 16:36:10 -08:00
Conner Fromknecht
99f6488fa0
wire/msgtx: introduce optimized readScriptBuf 2023-12-15 16:36:08 -08:00
Conner Fromknecht
4829ff793b
wire/msgtx: use writeTxInBuf in txn encoding 2023-12-15 16:36:05 -08:00
Conner Fromknecht
d43d9d57a9
wire/msgtx: introduce optimized writeTxInBuf 2023-12-15 16:36:02 -08:00
Conner Fromknecht
b1710129f6
wire/msgtx: introduce optimized read/writeOutPointBuf 2023-12-15 16:36:00 -08:00
Conner Fromknecht
7951aa5a97
wire/common: add optimized Read/WriteVarBytesBuf 2023-12-15 16:35:57 -08:00
Conner Fromknecht
e12d32d41c
wire/msgtx: reuse tx-level buffer for version and locktime 2023-12-15 16:35:55 -08:00
Conner Fromknecht
e58aadc7b4
wire/msgtx: use Read/WriteVarIntBuf in tx serialization 2023-12-15 16:35:52 -08:00
Conner Fromknecht
6275db9970
wire: introduce Read/WriteVarIntBuf to reuse buffers between invocations 2023-12-15 16:35:49 -08:00
Conner Fromknecht
a371aeb945
wire/common: optimize Read/WriteVarInt 2023-12-15 16:35:47 -08:00
Conner Fromknecht
a9edc326fb
wire/bench: add witness block 2023-12-15 16:35:44 -08:00
Conner Fromknecht
b434080727
wire/bench_test: report allocs in benchmarks 2023-12-15 16:35:40 -08:00
Olaoluwa Osuntokun
55ac06b142
Merge pull request #2035 from kcalvinalvin/2023-09-25-change-is-sync-candidate-behavior
wire, netsync: change isSyncCandidate behavior
2023-12-08 16:28:18 -08:00
xiaolou86
4171854739 Fix typos 2023-11-20 12:04:31 -05:00
Calvin Kim
b4992febff netsync: change isSyncCandidate behavior to include pruned nodes
isSyncCandidate is now changed to return true even if the peer is a
pruned node if and only if our chaintip is within 288 blocks of the
peer.

Rationale:
Pruned nodes that signal NODE_NETWORK_LIMITED MUST serve 288 blocks from
their chaintip.  If our chaintip is within that range, this peer can be
a sync candidate even if they aren't an archival node.
2023-11-07 11:04:34 +09:00
Calvin Kim
a09e7b224a wire: add HasFlag method 2023-11-07 11:04:34 +09:00
Calvin Kim
1012f1e4ba wire: add NodeNetworkLimitedBlockThreshold const
NodeNetworkLimitedBlockThreshold is a constant representing how many
blocks from tip a node signaling NODE_NETWORK_LIMITED must serve.
2023-09-25 18:41:36 +09:00
Calvin Kim
0212c334ce wire, main: Add SFNodeNetworkLimited flag
This change is part of the effort to add pruning support to btcd.

Wire now supports the ability to signal NODE_NETWORK_LIMITED which
signals to peers that the node is able to serve the last 288 blocks.

Since archival nodes have all blocks, they can also signal for
NODE_NETWORK_LIMITED.  SFNodeNetworkLimited flag is added to the default
services.
2023-08-22 15:48:55 +09:00
cui fliter
e160bb6922 multi: remove repetitive the
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-26 15:40:51 +08:00
Olaoluwa Osuntokun
253b688c68
Merge pull request #1981 from kcalvinalvin/2023-05-16-run-gofmt
multi: Run gofmt on the entire repository
2023-06-21 12:00:35 -05:00