Skip to content

Commit 45e3409

Browse files
authored
Merge branch 'develop' into fix/clippy-ci-stacks-lib-needless-borrow
2 parents 56c69e2 + fc92d18 commit 45e3409

File tree

34 files changed

+210
-342
lines changed

34 files changed

+210
-342
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ 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))
1420

@@ -24,6 +30,14 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
2430

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

33+
# [3.1.0.0.2.1]
34+
35+
## Added
36+
37+
## Changed
38+
39+
- Prevent old reward cycle signers from processing block validation response messages that do not apply to blocks from their cycle.
40+
2741
## [3.1.0.0.2.0]
2842

2943
## Added

stackslib/src/burnchains/bitcoin/bits.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ impl BitcoinTxInputStructured {
223223
Instruction::Op(btc_opcodes::OP_CHECKMULTISIG),
224224
) => {
225225
// op1 and op2 must be integers
226-
match (
227-
btc_opcodes::from(*op1).classify(),
228-
btc_opcodes::from(*op2).classify(),
229-
) {
226+
match (op1.classify(), op2.classify()) {
230227
(Class::PushNum(num_sigs), Class::PushNum(num_pubkeys)) => {
231228
// the "#instructions - 3" comes from the OP_m, OP_n, and OP_CHECKMULTISIG
232229
if num_sigs < 1

stackslib/src/burnchains/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ impl PoxConstants {
629629
// TODO: I *think* the logic of `== 0` here requires some further digging.
630630
// `mod 0` may not have any rewards, but it does not behave like "prepare phase" blocks:
631631
// is it already a member of reward cycle "N" where N = block_height / reward_cycle_len
632-
reward_index == 0 || reward_index > u64::from(reward_cycle_length - prepare_length)
632+
reward_index == 0 || reward_index > reward_cycle_length - prepare_length
633633
}
634634
}
635635

@@ -658,7 +658,7 @@ impl PoxConstants {
658658
} else {
659659
let effective_height = block_height - first_block_height;
660660
let reward_index = effective_height % reward_cycle_length;
661-
reward_index > u64::from(reward_cycle_length - prepare_length)
661+
reward_index > reward_cycle_length - prepare_length
662662
}
663663
}
664664

stackslib/src/burnchains/tests/db.rs

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,38 +1312,30 @@ fn test_classify_delegate_stx() {
13121312
"Only one delegate_stx op should have been accepted"
13131313
);
13141314

1315-
let expected_pre_delegate_addr = StacksAddress::from_legacy_bitcoin_address(
1316-
&LegacyBitcoinAddress {
1315+
let expected_pre_delegate_addr =
1316+
StacksAddress::from_legacy_bitcoin_address(&LegacyBitcoinAddress {
13171317
addrtype: LegacyBitcoinAddressType::PublicKeyHash,
13181318
network_id: BitcoinNetworkType::Mainnet,
13191319
bytes: Hash160([1; 20]),
1320-
}
1321-
.into(),
1322-
);
1320+
});
13231321

13241322
let expected_delegate_addr = PoxAddress::Standard(
1325-
StacksAddress::from_legacy_bitcoin_address(
1326-
&LegacyBitcoinAddress {
1327-
addrtype: LegacyBitcoinAddressType::PublicKeyHash,
1328-
network_id: BitcoinNetworkType::Mainnet,
1329-
bytes: Hash160([2; 20]),
1330-
}
1331-
.into(),
1332-
),
1323+
StacksAddress::from_legacy_bitcoin_address(&LegacyBitcoinAddress {
1324+
addrtype: LegacyBitcoinAddressType::PublicKeyHash,
1325+
network_id: BitcoinNetworkType::Mainnet,
1326+
bytes: Hash160([2; 20]),
1327+
}),
13331328
Some(AddressHashMode::SerializeP2PKH),
13341329
);
13351330

13361331
let expected_reward_addr = Some((
13371332
1,
13381333
PoxAddress::Standard(
1339-
StacksAddress::from_legacy_bitcoin_address(
1340-
&LegacyBitcoinAddress {
1341-
addrtype: LegacyBitcoinAddressType::PublicKeyHash,
1342-
network_id: BitcoinNetworkType::Mainnet,
1343-
bytes: Hash160([1; 20]),
1344-
}
1345-
.into(),
1346-
),
1334+
StacksAddress::from_legacy_bitcoin_address(&LegacyBitcoinAddress {
1335+
addrtype: LegacyBitcoinAddressType::PublicKeyHash,
1336+
network_id: BitcoinNetworkType::Mainnet,
1337+
bytes: Hash160([1; 20]),
1338+
}),
13471339
Some(AddressHashMode::SerializeP2PKH),
13481340
),
13491341
));

stackslib/src/chainstate/coordinator/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,8 +1238,8 @@ impl<
12381238
continue;
12391239
}
12401240
Err(e) => {
1241-
error!("Failed to query affirmation map: {:?}", &e);
1242-
return Err(e.into());
1241+
error!("Failed to query affirmation map: {e:?}");
1242+
return Err(e);
12431243
}
12441244
};
12451245

stackslib/src/chainstate/coordinator/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4736,7 +4736,7 @@ fn atlas_stop_start() {
47364736
TransactionVersion::Testnet,
47374737
TransactionAuth::from_p2pkh(&signer_sk).unwrap(),
47384738
TransactionPayload::ContractCall(TransactionContractCall {
4739-
address: signer_pk.clone().into(),
4739+
address: signer_pk.clone(),
47404740
contract_name: atlas_name.clone(),
47414741
function_name: "make-attach".into(),
47424742
function_args: vec![Value::buff_from(vec![ix; 20]).unwrap()],

0 commit comments

Comments
 (0)