Skip to content

Commit 3c6b4a7

Browse files
authored
Merge branch 'develop' into fix/considered_txs
2 parents 808ddcc + 29566bd commit 3c6b4a7

File tree

22 files changed

+419
-97
lines changed

22 files changed

+419
-97
lines changed

.github/workflows/clippy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: Clippy Checks
77
# Only run when:
88
# - PRs are (re)opened against develop branch
99
on:
10+
merge_group:
11+
types:
12+
- checks_requested
1013
pull_request:
1114
branches:
1215
- develop
@@ -34,4 +37,4 @@ jobs:
3437
components: clippy
3538
- name: Clippy
3639
id: clippy
37-
run: cargo clippy-stacks
40+
run: cargo clippy-stacks

.github/workflows/github-release.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ concurrency:
3838
run-name: ${{ inputs.node_tag || inputs.signer_tag }}
3939

4040
jobs:
41+
## This job's sole purpose is trigger a secondary approval outside of the matrix jobs below.
42+
## - If this job isn't approved to run, then the subsequent jobs will also not run - for this reason, we always exit 0
43+
## - `andon-cord` requires the repo environment "Build Release", which will trigger a secondary approval step before running this workflow.
44+
andon-cord:
45+
if: |
46+
inputs.node_tag != '' ||
47+
inputs.signer_tag != ''
48+
name: Andon Cord
49+
runs-on: ubuntu-latest
50+
environment: "Build Release"
51+
steps:
52+
- name: Check Approval
53+
id: check
54+
run: |
55+
exit 0
4156
## Build arch dependent binaries from source
4257
##
4358
## Runs when the following is true:
@@ -48,7 +63,8 @@ jobs:
4863
inputs.signer_tag != ''
4964
name: Build Binaries
5065
runs-on: ubuntu-latest
51-
environment: "Build Release"
66+
needs:
67+
- andon-cord
5268
strategy:
5369
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
5470
max-parallel: 10
@@ -91,6 +107,7 @@ jobs:
91107
name: Create Release
92108
runs-on: ubuntu-latest
93109
needs:
110+
- andon-cord
94111
- build-binaries
95112
permissions:
96113
contents: write
@@ -107,7 +124,6 @@ jobs:
107124
is_signer_release: ${{ inputs.is_signer_release }}
108125
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109126

110-
111127
## Builds arch dependent Docker images from binaries
112128
##
113129
## Note: this step requires the binaries in the create-release step to be uploaded
@@ -120,6 +136,7 @@ jobs:
120136
name: Docker Image (Binary)
121137
runs-on: ubuntu-latest
122138
needs:
139+
- andon-cord
123140
- build-binaries
124141
- create-release
125142
strategy:
@@ -147,11 +164,15 @@ jobs:
147164
## Create the downstream PR for the release branch to master,develop
148165
create-pr:
149166
if: |
150-
inputs.node_tag != '' ||
151-
inputs.signer_tag != ''
167+
!contains(github.ref, '-rc') &&
168+
(
169+
inputs.node_tag != '' ||
170+
inputs.signer_tag != ''
171+
)
152172
name: Create Downstream PR (${{ github.ref_name }})
153173
runs-on: ubuntu-latest
154174
needs:
175+
- andon-cord
155176
- build-binaries
156177
- create-release
157178
- docker-image

.github/workflows/image-build-source.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
image:
2222
name: Build Image
2323
runs-on: ubuntu-latest
24+
## Requires the repo environment "Push to Docker", which will trigger a secondary approval step before running this workflow.
25+
environment: "Push to Docker"
2426
steps:
2527
## Setup Docker for the builds
2628
- name: Docker setup

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
2020
- When a miner times out waiting for signatures, it will re-propose the same block instead of building a new block ([#5877](https://github.com/stacks-network/stacks-core/pull/5877))
2121
- Improve tenure downloader trace verbosity applying proper logging level depending on the tenure state ("debug" if unconfirmed, "info" otherwise) ([#5871](https://github.com/stacks-network/stacks-core/issues/5871))
2222
- Remove warning log about missing UTXOs when a node is configured as `miner` with `mock_mining` mode enabled ([#5841](https://github.com/stacks-network/stacks-core/issues/5841))
23+
- Deprecated the `wait_on_interim_blocks` option in the miner config file. This option is no longer needed, as the miner will always wait for interim blocks to be processed before mining a new block. To wait extra time in between blocks, use the `min_time_between_blocks_ms` option instead.
2324

2425
## [3.1.0.0.7]
2526

contrib/tools/block-replay.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ start_replay() {
195195
starting_block=0 # for the block counter, start at this block
196196
## use these values if `--testing` arg is provided (only replay 1_000 blocks) Note: 2.5 epoch is at 153106
197197
${TESTING} && total_blocks=153000
198-
${TESTING} && starting_block=15200
198+
${TESTING} && starting_block=152000
199199
;;
200200
esac
201201
local block_diff=$((total_blocks - starting_block)) ## how many blocks are being replayed

pox-locking/src/pox_2.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ pub fn parse_pox_increase(result: &Value) -> std::result::Result<(PrincipalData,
173173
///
174174
/// # Errors
175175
/// - Returns Error::PoxExtendNotLocked if this function was called on an account
176-
/// which isn't locked. This *should* have been checked by the PoX v2 contract,
177-
/// so this should surface in a panic.
176+
/// which isn't locked. This *should* have been checked by the PoX v2 contract,
177+
/// so this should surface in a panic.
178178
pub fn pox_lock_increase_v2(
179179
db: &mut ClarityDatabase,
180180
principal: &PrincipalData,
@@ -226,8 +226,8 @@ pub fn pox_lock_increase_v2(
226226
///
227227
/// # Errors
228228
/// - Returns Error::PoxExtendNotLocked if this function was called on an account
229-
/// which isn't locked. This *should* have been checked by the PoX v2 contract,
230-
/// so this should surface in a panic.
229+
/// which isn't locked. This *should* have been checked by the PoX v2 contract,
230+
/// so this should surface in a panic.
231231
pub fn pox_lock_extend_v2(
232232
db: &mut ClarityDatabase,
233233
principal: &PrincipalData,

pox-locking/src/pox_3.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ pub fn pox_lock_v3(
9696
///
9797
/// # Errors
9898
/// - Returns Error::PoxExtendNotLocked if this function was called on an account
99-
/// which isn't locked. This *should* have been checked by the PoX v3 contract,
100-
/// so this should surface in a panic.
99+
/// which isn't locked. This *should* have been checked by the PoX v3 contract,
100+
/// so this should surface in a panic.
101101
pub fn pox_lock_extend_v3(
102102
db: &mut ClarityDatabase,
103103
principal: &PrincipalData,
@@ -132,8 +132,8 @@ pub fn pox_lock_extend_v3(
132132
///
133133
/// # Errors
134134
/// - Returns Error::PoxExtendNotLocked if this function was called on an account
135-
/// which isn't locked. This *should* have been checked by the PoX v3 contract,
136-
/// so this should surface in a panic.
135+
/// which isn't locked. This *should* have been checked by the PoX v3 contract,
136+
/// so this should surface in a panic.
137137
pub fn pox_lock_increase_v3(
138138
db: &mut ClarityDatabase,
139139
principal: &PrincipalData,

pox-locking/src/pox_4.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ pub fn pox_lock_v4(
6969
///
7070
/// # Errors
7171
/// - Returns Error::PoxExtendNotLocked if this function was called on an account
72-
/// which isn't locked. This *should* have been checked by the PoX v4 contract,
73-
/// so this should surface in a panic.
72+
/// which isn't locked. This *should* have been checked by the PoX v4 contract,
73+
/// so this should surface in a panic.
7474
pub fn pox_lock_extend_v4(
7575
db: &mut ClarityDatabase,
7676
principal: &PrincipalData,
@@ -105,8 +105,8 @@ pub fn pox_lock_extend_v4(
105105
///
106106
/// # Errors
107107
/// - Returns Error::PoxExtendNotLocked if this function was called on an account
108-
/// which isn't locked. This *should* have been checked by the PoX v4 contract,
109-
/// so this should surface in a panic.
108+
/// which isn't locked. This *should* have been checked by the PoX v4 contract,
109+
/// so this should surface in a panic.
110110
pub fn pox_lock_increase_v4(
111111
db: &mut ClarityDatabase,
112112
principal: &PrincipalData,

stacks-common/src/deps_common/bitcoin/blockdata/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl BlockHeader {
101101

102102
/// Computes the target value in float format from Uint256 format.
103103
pub fn compact_target_from_u256(value: &Uint256) -> u32 {
104-
let mut size = (value.bits() + 7) / 8;
104+
let mut size = value.bits().div_ceil(8);
105105
let mut compact = if size <= 3 {
106106
(value.low_u64() << (8 * (3 - size))) as u32
107107
} else {

stacks-common/src/deps_common/bitcoin/util/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ pub fn bitcoin_merkle_root(data: Vec<Sha256dHash>) -> Sha256dHash {
436436
return data[0];
437437
}
438438
// Recursion
439-
let iterations = (data.len() + 1) / 2;
439+
let iterations = data.len().div_ceil(2);
440440
let mut next = Vec::with_capacity(iterations);
441441
for idx in 0..iterations {
442442
let idx1 = 2 * idx;

0 commit comments

Comments
 (0)