Skip to content

Commit f465d80

Browse files
authored
Merge branch 'develop' into long-block-proposal-timeout
2 parents 8641730 + 9b48330 commit f465d80

File tree

22 files changed

+384
-211
lines changed

22 files changed

+384
-211
lines changed

.github/workflows/bitcoin-tests.yml

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

CHANGELOG.md

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

1414
### Fixed
1515

16+
- Error responses to /v2/transactions/fees are once again expressed as JSON ([#4145](https://github.com/stacks-network/stacks-core/issues/4145)).
17+
1618
## [3.1.0.0.5]
1719

1820
### Added

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/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

stackslib/src/cost_estimates/tests/fee_rate_fuzzer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::cost_estimates::fee_rate_fuzzer::FeeRateFuzzer;
1515
use crate::cost_estimates::tests::common::make_block_receipt;
1616
use crate::cost_estimates::{EstimatorError, FeeEstimator, FeeRateEstimate};
1717

18-
struct ConstantFeeEstimator {}
18+
pub struct ConstantFeeEstimator {}
1919

2020
/// Returns a constant fee rate estimate.
2121
impl FeeEstimator for ConstantFeeEstimator {

0 commit comments

Comments
 (0)