Skip to content

Commit 8bf7261

Browse files
authored
Merge branch 'develop' into feat/vrf-seed-in-get-sortition-rpc-endpoint
2 parents 9f13e48 + 91a1398 commit 8bf7261

File tree

17 files changed

+186
-188
lines changed

17 files changed

+186
-188
lines changed

.github/workflows/bitcoin-tests.yml

Lines changed: 93 additions & 150 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1010
### Added
1111

1212
- Add `vrf_seed` to the `/v3/sortitions` rpc endpoint
13+
14+
### Changed
15+
16+
### Fixed
17+
18+
## [3.1.0.0.5]
19+
20+
### Added
21+
1322
- Add miner configuration option `tenure_extend_cost_threshold` to specify the percentage of the tenure budget that must be spent before a time-based tenure extend is attempted
1423

1524
### Changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/release-process.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ The timing of the next Stacking cycle can be found [here](https://stx.eco/dao/to
6464
- Add cherry-picked commits to the `feat/X.Y.Z.A.n-pr_number` branch
6565
- Merge `feat/X.Y.Z.A.n-pr_number` into `release/X.Y.Z.A.n`.
6666

67-
4. Open a PR to update the [CHANGELOG](../CHANGELOG.md) file in the `release/X.Y.Z.A.n` branch.
67+
4. Open a PR to update the [CHANGELOG](../CHANGELOG.md) in the `release/X.Y.Z.A.n` branch.
6868

6969
- Create a chore branch from `release/X.Y.Z.A.n`, ex: `chore/X.Y.Z.A.n-changelog`.
7070
- Add summaries of all Pull Requests to the `Added`, `Changed` and `Fixed` sections.
71+
- Update the `stacks_node_version` string in [versions.toml](../versions.toml) to match this release.
7172

7273
- Pull requests merged into `develop` can be found [here](https://github.com/stacks-network/stacks-core/pulls?q=is%3Apr+is%3Aclosed+base%3Adevelop+sort%3Aupdated-desc).
7374

libsigner/src/libsigner.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ use blockstack_lib::version_string;
5353
use clarity::codec::StacksMessageCodec;
5454
use clarity::vm::types::QualifiedContractIdentifier;
5555
use lazy_static::lazy_static;
56+
use stacks_common::versions::STACKS_SIGNER_VERSION;
5657

5758
pub use crate::error::{EventError, RPCError};
5859
pub use crate::events::{
@@ -80,7 +81,12 @@ pub trait SignerMessage<T: MessageSlotID>: StacksMessageCodec {
8081
lazy_static! {
8182
/// The version string for the signer
8283
pub static ref VERSION_STRING: String = {
83-
let pkg_version = option_env!("STACKS_NODE_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"));
84+
let pkg_version = option_env!("STACKS_NODE_VERSION").or(Some(STACKS_SIGNER_VERSION));
8485
version_string("stacks-signer", pkg_version)
8586
};
8687
}
88+
89+
#[test]
90+
fn test_version_string() {
91+
assert!(VERSION_STRING.contains(format!("stacks-signer {}", STACKS_SIGNER_VERSION).as_str()));
92+
}

stacks-common/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized"
1212
readme = "README.md"
1313
resolver = "2"
1414
edition = "2021"
15+
build = "build.rs"
1516

1617
[lib]
1718
name = "stacks_common"
@@ -73,6 +74,9 @@ serde = []
7374
bech32_std = []
7475
bech32_strict = []
7576

77+
[build-dependencies]
78+
toml = "0.5.6"
79+
7680
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies]
7781
sha2 = { version = "0.10", features = ["asm"] }
7882

stacks-common/build.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
use std::path::Path;
2+
use std::{env, fs};
3+
4+
use toml::Value;
5+
6+
fn main() {
7+
let toml_file = "../versions.toml";
8+
let toml_content = fs::read_to_string(toml_file).expect("Failed to read versions.toml");
9+
10+
let config: Value = toml::from_str(&toml_content).expect("Failed to parse TOML");
11+
12+
let mut rust_code = String::from("// Auto-generated code from versions.toml\n\n");
13+
14+
let Value::Table(table) = config else {
15+
panic!("Invalid value type in versions.toml: {config:?}");
16+
};
17+
for (key, val) in table {
18+
let Value::String(s) = val else {
19+
panic!("Invalid value type in versions.toml: {val:?}");
20+
};
21+
rust_code.push_str(&format!(
22+
"pub const {}: &str = {s:?};\n",
23+
key.to_uppercase()
24+
));
25+
}
26+
27+
let out_dir = env::var_os("OUT_DIR").unwrap();
28+
let dest_path = Path::new(&out_dir).join("versions.rs");
29+
fs::write(&dest_path, rust_code).expect("Failed to write generated code");
30+
31+
// Tell Cargo to rerun this script if the TOML file changes
32+
println!("cargo:rerun-if-changed={toml_file}");
33+
}

stacks-common/src/libcommon.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ pub mod consts {
9797
pub const MICROSTACKS_PER_STACKS: u32 = 1_000_000;
9898
}
9999

100+
pub mod versions {
101+
include!(concat!(env!("OUT_DIR"), "/versions.rs"));
102+
}
103+
100104
/// This test asserts that the constant above doesn't change.
101105
/// This exists because the constant above is used by Epoch 2.5 instantiation code.
102106
///

stacks-signer/CHANGELOG.md

Lines changed: 17 additions & 11 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.5.0]
15+
16+
### Added
17+
1218
- Add `dry_run` configuration option to `stacks-signer` config toml. Dry run mode will
1319
run the signer binary as if it were a registered signer. Instead of broadcasting
1420
`StackerDB` messages, it logs `INFO` messages. Other interactions with the `stacks-node`
@@ -17,44 +23,44 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1723

1824
## [3.1.0.0.4.0]
1925

20-
## Added
26+
### Added
2127

2228
- 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))
2329
- Introduced two new prometheus metrics:
2430
- `stacks_signer_block_validation_latencies_histogram`: the validation_time_ms reported by the node when validating a block proposal
2531
- `stacks_signer_block_response_latencies_histogram`: the "end-to-end" time it takes for the signer to issue a block response
2632

27-
## Changed
33+
### Changed
2834

2935
## [3.1.0.0.3.0]
3036

31-
## Added
37+
### Added
3238

3339
- 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.
3440

35-
## Changed
41+
### Changed
3642
- Improvements to the stale signer cleanup logic: deletes the prior signer if it has no remaining unprocessed blocks in its database
3743
- Signers now listen to new block events from the stacks node to determine whether a block has been successfully appended to the chain tip
3844

39-
# [3.1.0.0.2.1]
45+
## [3.1.0.0.2.1]
4046

41-
## Added
47+
### Added
4248

43-
## Changed
49+
### Changed
4450

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

47-
# [3.1.0.0.2.1]
53+
## [3.1.0.0.2.1]
4854

49-
## Added
55+
### Added
5056

51-
## Changed
57+
### Changed
5258

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

5561
## [3.1.0.0.2.0]
5662

57-
## Added
63+
### Added
5864

5965
- **SIP-029 consensus rules, activating in epoch 3.1 at block 875,000** (see [SIP-029](https://github.com/will-corcoran/sips/blob/feat/sip-029-halving-alignment/sips/sip-029/sip-029-halving-alignment.md) for details)
6066

stacks-signer/release-process.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ The timing of the next Stacking cycle can be found [here](https://stx.eco/dao/to
6363
- Add cherry-picked commits to the `feat/signer-X.Y.Z.A.n.x-pr_number` branch
6464
- Merge `feat/signer-X.Y.Z.A.n.x-pr_number` into `release/signer-X.Y.Z.A.n.x`.
6565

66-
4. Open a PR to update the [CHANGELOG](./CHANGELOG.md) file in the `release/signer-X.Y.Z.A.n.x` branch.
66+
4. Open a PR to update the [CHANGELOG](./CHANGELOG.md) in the `release/signer-X.Y.Z.A.n.x` branch.
6767

6868
- Create a chore branch from `release/signer-X.Y.Z.A.n.x`, ex: `chore/signer-X.Y.Z.A.n.x-changelog`.
6969
- Add summaries of all Pull Requests to the `Added`, `Changed` and `Fixed` sections.
70+
- Update the `stacks_signer_version` string in [versions.toml](../versions.toml) to match this release.
7071

7172
- Pull requests merged into `develop` can be found [here](https://github.com/stacks-network/stacks-core/pulls?q=is%3Apr+is%3Aclosed+base%3Adevelop+sort%3Aupdated-desc).
7273

0 commit comments

Comments
 (0)