Skip to content

Commit 9f3033a

Browse files
committed
Merge branch 'develop' of https://github.com/stacks-network/stacks-core into fix/clippy-ci-stacks-lib-needless-borrow
2 parents 56c69e2 + c53b10f commit 9f3033a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+572
-641
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,10 @@ jobs:
112112
## - commit to either (development, master) branch
113113
create-cache:
114114
if: |
115-
needs.check-release.outputs.is_release == 'true' || (
116-
github.event_name == 'workflow_dispatch' ||
117-
github.event_name == 'pull_request' ||
118-
github.event_name == 'merge_group' ||
119-
(
120-
contains('
121-
refs/heads/master
122-
refs/heads/develop
123-
refs/heads/next
124-
', github.event.pull_request.head.ref) &&
125-
github.event_name == 'push'
126-
)
127-
)
115+
needs.check-release.outputs.is_release == 'true' ||
116+
github.event_name == 'workflow_dispatch' ||
117+
github.event_name == 'pull_request' ||
118+
github.event_name == 'merge_group'
128119
name: Create Test Cache
129120
needs:
130121
- rustfmt
@@ -144,19 +135,9 @@ jobs:
144135
## - commit to either (development, next, master) branch
145136
stacks-core-tests:
146137
if: |
147-
needs.check-release.outputs.is_release == 'true' || (
148-
github.event_name == 'workflow_dispatch' ||
149-
github.event_name == 'pull_request' ||
150-
github.event_name == 'merge_group' ||
151-
(
152-
contains('
153-
refs/heads/master
154-
refs/heads/develop
155-
refs/heads/next
156-
', github.event.pull_request.head.ref) &&
157-
github.event_name == 'push'
158-
)
159-
)
138+
github.event_name == 'workflow_dispatch' ||
139+
github.event_name == 'pull_request' ||
140+
github.event_name == 'merge_group'
160141
name: Stacks Core Tests
161142
needs:
162143
- rustfmt
@@ -177,19 +158,9 @@ jobs:
177158
## - commit to either (development, next, master) branch
178159
stacks-core-build-tests:
179160
if: |
180-
needs.check-release.outputs.is_release == 'true' || (
181-
github.event_name == 'workflow_dispatch' ||
182-
github.event_name == 'pull_request' ||
183-
github.event_name == 'merge_group' ||
184-
(
185-
contains('
186-
refs/heads/master
187-
refs/heads/develop
188-
refs/heads/next
189-
', github.event.pull_request.head.ref) &&
190-
github.event_name == 'push'
191-
)
192-
)
161+
github.event_name == 'workflow_dispatch' ||
162+
github.event_name == 'pull_request' ||
163+
github.event_name == 'merge_group'
193164
name: Stacks Core Build Tests
194165
needs:
195166
- rustfmt
@@ -198,42 +169,21 @@ jobs:
198169

199170
bitcoin-tests:
200171
if: |
201-
needs.check-release.outputs.is_release == 'true' || (
202-
github.event_name == 'workflow_dispatch' ||
203-
github.event_name == 'pull_request' ||
204-
github.event_name == 'merge_group' ||
205-
(
206-
contains('
207-
refs/heads/master
208-
refs/heads/develop
209-
refs/heads/next
210-
', github.event.pull_request.head.ref) &&
211-
github.event_name == 'push'
212-
)
213-
)
172+
github.event_name == 'workflow_dispatch' ||
173+
github.event_name == 'pull_request' ||
174+
github.event_name == 'merge_group'
214175
name: Bitcoin Tests
215176
needs:
216177
- rustfmt
217178
- create-cache
218179
- check-release
219180
uses: ./.github/workflows/bitcoin-tests.yml
220181

221-
222182
p2p-tests:
223183
if: |
224-
needs.check-release.outputs.is_release == 'true' || (
225-
github.event_name == 'workflow_dispatch' ||
226-
github.event_name == 'pull_request' ||
227-
github.event_name == 'merge_group' ||
228-
(
229-
contains('
230-
refs/heads/master
231-
refs/heads/develop
232-
refs/heads/next
233-
', github.event.pull_request.head.ref) &&
234-
github.event_name == 'push'
235-
)
236-
)
184+
github.event_name == 'workflow_dispatch' ||
185+
github.event_name == 'pull_request' ||
186+
github.event_name == 'merge_group'
237187
name: P2P Tests
238188
needs:
239189
- rustfmt

.github/workflows/docs-pr.yml

Lines changed: 0 additions & 114 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to the versioning scheme outlined in the [README.md](README.md).
77

8-
## [Unreleased]
8+
## [3.1.0.0.3]
99

1010
### Added
1111

1212
- Add `tenure_timeout_secs` to the miner for determining when a time-based tenure extend should be attempted.
1313
- Added configuration option `block_proposal_max_age_secs` under `[connection_options]` to prevent processing stale block proposals
1414

1515
### Changed
16-
- The RPC endpoint `/v3/block_proposal` no longer will evaluate block proposals more than `block_proposal_max_age_secs` old
1716

17+
- The RPC endpoint `/v3/block_proposal` no longer will evaluate block proposals more than `block_proposal_max_age_secs` old
1818
- When a transaction is dropped due to replace-by-fee, the `/drop_mempool_tx` event observer payload now includes `new_txid`, which is the transaction that replaced this dropped transaction. When a transaction is dropped for other reasons, `new_txid` is `null`. [#5381](https://github.com/stacks-network/stacks-core/pull/5381)
1919
- Nodes will assume that all PoX anchor blocks exist by default, and stall initial block download indefinitely to await their arrival (#5502)
2020

21+
### Fixed
22+
23+
- Signers no longer accept messages for blocks from different reward cycles (#5662)
24+
2125
## [3.1.0.0.2]
2226

2327
### Added

stacks-signer/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
99

1010
## Added
1111

12+
## Changed
13+
14+
## [3.1.0.0.3.0]
15+
16+
## Added
17+
1218
- Introduced the `block_proposal_max_age_secs` configuration option for signers, enabling them to automatically ignore block proposals that exceed the specified age in seconds.
1319
- When a new block proposal is received while the signer is waiting for an existing proposal to be validated, the signer will wait until the existing block is done validating before submitting the new one for validating. ([#5453](https://github.com/stacks-network/stacks-core/pull/5453))
20+
- Introduced two new prometheus metrics:
21+
- `stacks_signer_block_validation_latencies_histogram`: the validation_time_ms reported by the node when validating a block proposal
22+
- `stacks_signer_block_response_latencies_histogram`: the "end-to-end" time it takes for the signer to issue a block response
1423

1524
## Changed
1625
- Improvements to the stale signer cleanup logic: deletes the prior signer if it has no remaining unprocessed blocks in its database
@@ -24,6 +33,14 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
2433

2534
- Prevent old reward cycle signers from processing block validation response messages that do not apply to blocks from their cycle.
2635

36+
# [3.1.0.0.2.1]
37+
38+
## Added
39+
40+
## Changed
41+
42+
- Prevent old reward cycle signers from processing block validation response messages that do not apply to blocks from their cycle.
43+
2744
## [3.1.0.0.2.0]
2845

2946
## Added

stacks-signer/src/client/stacks_client.rs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,10 @@ impl StacksClient {
323323
block,
324324
chain_id: self.chain_id,
325325
};
326-
let timer =
327-
crate::monitoring::new_rpc_call_timer(&self.block_proposal_path(), &self.http_origin);
326+
let timer = crate::monitoring::actions::new_rpc_call_timer(
327+
&self.block_proposal_path(),
328+
&self.http_origin,
329+
);
328330
let send_request = || {
329331
self.stacks_node_client
330332
.post(self.block_proposal_path())
@@ -399,7 +401,8 @@ impl StacksClient {
399401
"{}{RPC_TENURE_FORKING_INFO_PATH}/:start/:stop",
400402
self.http_origin
401403
);
402-
let timer = crate::monitoring::new_rpc_call_timer(&metrics_path, &self.http_origin);
404+
let timer =
405+
crate::monitoring::actions::new_rpc_call_timer(&metrics_path, &self.http_origin);
403406
let send_request = || {
404407
self.stacks_node_client
405408
.get(&path)
@@ -420,7 +423,7 @@ impl StacksClient {
420423
pub fn get_current_and_last_sortition(&self) -> Result<CurrentAndLastSortition, ClientError> {
421424
debug!("StacksClient: Getting current and prior sortition");
422425
let path = format!("{}/latest_and_last", self.sortition_info_path());
423-
let timer = crate::monitoring::new_rpc_call_timer(&path, &self.http_origin);
426+
let timer = crate::monitoring::actions::new_rpc_call_timer(&path, &self.http_origin);
424427
let send_request = || {
425428
self.stacks_node_client.get(&path).send().map_err(|e| {
426429
warn!("Signer failed to request latest sortition"; "err" => ?e);
@@ -460,8 +463,10 @@ impl StacksClient {
460463
/// Get the current peer info data from the stacks node
461464
pub fn get_peer_info(&self) -> Result<PeerInfo, ClientError> {
462465
debug!("StacksClient: Getting peer info");
463-
let timer =
464-
crate::monitoring::new_rpc_call_timer(&self.core_info_path(), &self.http_origin);
466+
let timer = crate::monitoring::actions::new_rpc_call_timer(
467+
&self.core_info_path(),
468+
&self.http_origin,
469+
);
465470
let send_request = || {
466471
self.stacks_node_client
467472
.get(self.core_info_path())
@@ -485,7 +490,7 @@ impl StacksClient {
485490
debug!("StacksClient: Getting reward set signers";
486491
"reward_cycle" => reward_cycle,
487492
);
488-
let timer = crate::monitoring::new_rpc_call_timer(
493+
let timer = crate::monitoring::actions::new_rpc_call_timer(
489494
&format!("{}/v3/stacker_set/:reward_cycle", self.http_origin),
490495
&self.http_origin,
491496
);
@@ -521,7 +526,8 @@ impl StacksClient {
521526
/// Retrieve the current pox data from the stacks node
522527
pub fn get_pox_data(&self) -> Result<RPCPoxInfoData, ClientError> {
523528
debug!("StacksClient: Getting pox data");
524-
let timer = crate::monitoring::new_rpc_call_timer(&self.pox_path(), &self.http_origin);
529+
let timer =
530+
crate::monitoring::actions::new_rpc_call_timer(&self.pox_path(), &self.http_origin);
525531
let send_request = || {
526532
self.stacks_node_client
527533
.get(self.pox_path())
@@ -572,7 +578,7 @@ impl StacksClient {
572578
"address" => %address,
573579
);
574580
let timer_label = format!("{}/v2/accounts/:principal", self.http_origin);
575-
let timer = crate::monitoring::new_rpc_call_timer(&timer_label, &self.http_origin);
581+
let timer = crate::monitoring::actions::new_rpc_call_timer(&timer_label, &self.http_origin);
576582
let send_request = || {
577583
self.stacks_node_client
578584
.get(self.accounts_path(address))
@@ -628,7 +634,7 @@ impl StacksClient {
628634
"block_height" => %block.header.chain_length,
629635
);
630636
let path = format!("{}{}?broadcast=1", self.http_origin, postblock_v3::PATH);
631-
let timer = crate::monitoring::new_rpc_call_timer(&path, &self.http_origin);
637+
let timer = crate::monitoring::actions::new_rpc_call_timer(&path, &self.http_origin);
632638
let send_request = || {
633639
self.stacks_node_client
634640
.post(&path)
@@ -678,7 +684,7 @@ impl StacksClient {
678684
"{}/v2/contracts/call-read/:principal/{contract_name}/{function_name}",
679685
self.http_origin
680686
);
681-
let timer = crate::monitoring::new_rpc_call_timer(&timer_label, &self.http_origin);
687+
let timer = crate::monitoring::actions::new_rpc_call_timer(&timer_label, &self.http_origin);
682688
let response = self
683689
.stacks_node_client
684690
.post(path)

stacks-signer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl<S: Signer<T> + Send + 'static, T: SignerEventTrait + 'static> SpawnedSigner
125125
);
126126
let (res_send, res_recv) = channel();
127127
let ev = SignerEventReceiver::new(config.network.is_mainnet());
128-
crate::monitoring::start_serving_monitoring_metrics(config.clone()).ok();
128+
crate::monitoring::actions::start_serving_monitoring_metrics(config.clone()).ok();
129129
let runloop = RunLoop::new(config.clone());
130130
let mut signer: RunLoopSigner<S, T> = libsigner::Signer::new(runloop, ev, res_send);
131131
let running_signer = signer.spawn(endpoint).expect("Failed to spawn signer");

0 commit comments

Comments
 (0)