Skip to content

Commit 1169739

Browse files
authored
Merge branch 'develop' into feat/save-mempool-caches
2 parents ae14ba5 + a58ac52 commit 1169739

File tree

19 files changed

+143
-91
lines changed

19 files changed

+143
-91
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,6 @@ jobs:
102102
signer_docker_tag: ${{ needs.check-release.outputs.signer_docker_tag }}
103103
is_node_release: ${{ needs.check-release.outputs.is_node_release }}
104104
is_signer_release: ${{ needs.check-release.outputs.is_signer_release }}
105-
secrets: inherit
106-
107-
## Build and push Debian image built from source
108-
##
109-
## Runs when:
110-
## - it is not a node or signer-only release run
111-
docker-image:
112-
if: |
113-
needs.check-release.outputs.is_node_release != 'true' ||
114-
needs.check-release.outputs.is_signer_release != 'true'
115-
name: Docker Image (Source)
116-
uses: ./.github/workflows/image-build-source.yml
117-
needs:
118-
- rustfmt
119-
- check-release
120-
secrets: inherit
121105

122106
## Create a reusable cache for tests
123107
##

.github/workflows/github-release.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ on:
2929
description: "True if it is a signer release"
3030
required: true
3131
type: string
32-
secrets:
33-
GH_TOKEN:
34-
required: true
3532

3633
concurrency:
3734
group: github-release-${{ github.head_ref || github.ref }}
@@ -41,6 +38,21 @@ concurrency:
4138
run-name: ${{ inputs.node_tag || inputs.signer_tag }}
4239

4340
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
4456
## Build arch dependent binaries from source
4557
##
4658
## Runs when the following is true:
@@ -51,7 +63,8 @@ jobs:
5163
inputs.signer_tag != ''
5264
name: Build Binaries
5365
runs-on: ubuntu-latest
54-
environment: "Build Release"
66+
needs:
67+
- andon-cord
5568
strategy:
5669
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
5770
max-parallel: 10
@@ -94,7 +107,10 @@ jobs:
94107
name: Create Release
95108
runs-on: ubuntu-latest
96109
needs:
110+
- andon-cord
97111
- build-binaries
112+
permissions:
113+
contents: write
98114
steps:
99115
## Creates releases
100116
- name: Create Release
@@ -106,8 +122,7 @@ jobs:
106122
signer_docker_tag: ${{ inputs.signer_docker_tag }}
107123
is_node_release: ${{ inputs.is_node_release }}
108124
is_signer_release: ${{ inputs.is_signer_release }}
109-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
110-
125+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111126

112127
## Builds arch dependent Docker images from binaries
113128
##
@@ -121,6 +136,7 @@ jobs:
121136
name: Docker Image (Binary)
122137
runs-on: ubuntu-latest
123138
needs:
139+
- andon-cord
124140
- build-binaries
125141
- create-release
126142
strategy:
@@ -153,12 +169,15 @@ jobs:
153169
name: Create Downstream PR (${{ github.ref_name }})
154170
runs-on: ubuntu-latest
155171
needs:
172+
- andon-cord
156173
- build-binaries
157174
- create-release
158175
- docker-image
176+
permissions:
177+
pull-requests: write
159178
steps:
160179
- name: Open Downstream PR
161180
id: create-pr
162181
uses: stacks-network/actions/stacks-core/release/downstream-pr@main
163182
with:
164-
token: ${{ secrets.GH_TOKEN }}
183+
token: ${{ secrets.GITHUB_TOKEN }}

.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

Cargo.lock

Lines changed: 2 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

libsigner/Cargo.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,8 @@ hashbrown = { workspace = true }
2121
lazy_static = "1.4.0"
2222
libc = "0.2"
2323
libstackerdb = { path = "../libstackerdb" }
24-
prometheus = { version = "0.9", optional = true }
2524
serde = "1"
26-
serde_derive = "1"
27-
serde_stacker = "0.1"
2825
slog = { version = "2.5.2", features = [ "max_level_trace" ] }
29-
slog-term = "2.6.0"
30-
slog-json = { version = "2.3.0", optional = true }
3126
stacks-common = { path = "../stacks-common" }
3227
stackslib = { path = "../stackslib"}
3328
thiserror = { workspace = true }
@@ -42,15 +37,8 @@ rand = { workspace = true }
4237
version = "1.0"
4338
features = ["arbitrary_precision", "unbounded_depth"]
4439

45-
[dependencies.secp256k1]
46-
version = "0.24.3"
47-
features = ["serde", "recovery"]
48-
4940
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies]
5041
sha2 = { version = "0.10", features = ["asm"] }
5142

5243
[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os = "windows")))'.dependencies]
5344
sha2 = { version = "0.10" }
54-
55-
[features]
56-
monitoring_prom = ["prometheus"]

libstackerdb/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ path = "./src/libstackerdb.rs"
1717

1818
[dependencies]
1919
serde = "1"
20-
serde_derive = "1"
21-
serde_stacker = "0.1"
2220
stacks-common = { path = "../stacks-common" }
2321
clarity = { path = "../clarity" }
2422

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,

0 commit comments

Comments
 (0)