File tree Expand file tree Collapse file tree 6 files changed +33
-7
lines changed Expand file tree Collapse file tree 6 files changed +33
-7
lines changed Original file line number Diff line number Diff line change 29
29
id : lock_threads
30
30
uses : stacks-network/actions/lock-threads@main
31
31
with :
32
- github-token : ${{ secrets.GH_TOKEN }}
32
+ github-token : ${{ secrets.GITHUB_TOKEN }}
33
33
issue-inactive-days : 7
34
34
pr-inactive-days : 7
35
35
discussion-inactive-days : 7
Original file line number Diff line number Diff line change 12
12
workflow-ttl :
13
13
description : " How many days to keep a successful workflow (default: 30)"
14
14
required : false
15
- default : " 30 "
15
+ default : " 60 "
16
16
failed-workflow-ttl :
17
17
description : " How many days to keep failed workflows (default: 15)"
18
18
required : false
19
- default : " 15 "
19
+ default : " 60 "
20
20
schedule :
21
21
# # Run every day at 00:00:00
22
22
- cron : " 0 0 * * *"
23
23
24
+ permissions :
25
+ actions : write # to delete workflow runs and caches
26
+ contents : read # to access repo contents
27
+
24
28
# # env vars are transferred to composite action steps
25
29
env :
26
30
CACHE_TTL : 7 # # number of days to keep a cache
41
45
id : cleanup
42
46
uses : stacks-network/actions/cleanup/workflows@main
43
47
with :
44
- token : ${{ secrets.GH_TOKEN }}
48
+ token : ${{ secrets.GITHUB_TOKEN }}
45
49
cache-ttl : ${{ inputs.cache-ttl || env.CACHE_TTL}}
46
50
workflow-ttl : ${{ inputs.workflow-ttl || env.WORKFLOW_TTL}}
47
51
failed-workflow-ttl : ${{ inputs.failed-workflow-ttl || env.FAILED_WORKFLOW_TTL }}
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to the versioning scheme outlined in the [ README.md] ( README.md ) .
7
7
8
+ ## [ 3.1.0.0.11]
9
+
10
+ - Hotfix for p2p stack misbehavior in mempool syncing conditions
11
+
8
12
## [ 3.1.0.0.10]
9
13
10
14
### Added
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ pub struct StacksMemPoolStream {
97
97
pub corked : bool ,
98
98
/// Did we run out of transactions to send?
99
99
pub finished : bool ,
100
+ num_bytes : u64 ,
100
101
/// link to the mempool DB
101
102
mempool_db : DBConn ,
102
103
}
@@ -118,6 +119,7 @@ impl StacksMemPoolStream {
118
119
tx_query,
119
120
last_randomized_txid,
120
121
num_txs : 0 ,
122
+ num_bytes : 0 ,
121
123
max_txs,
122
124
coinbase_height,
123
125
corked : false ,
@@ -178,6 +180,14 @@ impl HttpChunkGenerator for StacksMemPoolStream {
178
180
if !next_txs. is_empty ( ) {
179
181
// have another tx to send
180
182
let chunk = next_txs[ 0 ] . serialize_to_vec ( ) ;
183
+ if u64:: try_from ( chunk. len ( ) )
184
+ . unwrap ( )
185
+ . saturating_add ( self . num_bytes )
186
+ >= u64:: from ( MAX_MESSAGE_LEN ) / 2
187
+ {
188
+ self . corked = true ;
189
+ return Ok ( self . last_randomized_txid . serialize_to_vec ( ) ) ;
190
+ }
181
191
if let Some ( next_last_randomized_txid) = next_last_randomized_txid_opt {
182
192
// we have more after this
183
193
self . last_randomized_txid = next_last_randomized_txid;
@@ -187,6 +197,9 @@ impl HttpChunkGenerator for StacksMemPoolStream {
187
197
self . finished = true ;
188
198
}
189
199
self . num_txs += next_txs. len ( ) as u64 ;
200
+ self . num_bytes = self
201
+ . num_bytes
202
+ . saturating_add ( u64:: try_from ( chunk. len ( ) ) . unwrap ( ) ) ;
190
203
return Ok ( chunk) ;
191
204
} else if let Some ( next_txid) = next_last_randomized_txid_opt {
192
205
// no more txs to send
Original file line number Diff line number Diff line change @@ -937,7 +937,12 @@ impl<P: ProtocolFamily> ConnectionInbox<P> {
937
937
) ;
938
938
self . inbox . push_back ( message) ;
939
939
consumed_message = true ;
940
- } ;
940
+ } else {
941
+ if bytes_consumed == 0 {
942
+ warn ! ( "0 bytes consumed, but no message parsed" ) ;
943
+ return Err ( net_error:: ConnectionBroken ) ;
944
+ }
945
+ }
941
946
942
947
bytes_consumed
943
948
} else {
Original file line number Diff line number Diff line change 1
1
# Update these values when a new release is created.
2
2
# `stacks-common/build.rs` will automatically update `versions.rs` with these values.
3
- stacks_node_version = " 3.1.0.0.10 "
4
- stacks_signer_version = " 3.1.0.0.10 .0"
3
+ stacks_node_version = " 3.1.0.0.11 "
4
+ stacks_signer_version = " 3.1.0.0.11 .0"
You can’t perform that action at this time.
0 commit comments