Skip to content

Commit f6afb22

Browse files
authored
Merge branch 'develop' into test/sip-031
2 parents 87eb418 + 6168284 commit f6afb22

File tree

238 files changed

+15040
-2898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+15040
-2898
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
4-
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings -A clippy::uninlined-format-args"
4+
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
55
clippy-stackslib = "clippy -p stackslib --no-deps -- -Aclippy::all -Wclippy::indexing_slicing"
66

77
# Uncomment to improve performance slightly, at the cost of portability

.github/workflows/nix-check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Check Nix
2+
3+
on:
4+
merge_group:
5+
types:
6+
- checks_requested
7+
push:
8+
branches:
9+
- master
10+
- develop
11+
- next
12+
paths-ignore:
13+
- "**.md"
14+
- "**.yml"
15+
workflow_dispatch:
16+
pull_request:
17+
types:
18+
- opened
19+
- reopened
20+
- synchronize
21+
22+
concurrency:
23+
group: nix-${{ github.head_ref || github.ref || github.run_id }}
24+
## Always cancel duplicate jobs
25+
cancel-in-progress: true
26+
27+
run-name: ${{ github.ref_name }}
28+
29+
permissions: {}
30+
31+
jobs:
32+
build-pkg:
33+
name: Check Nix package
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
- uses: DeterminateSystems/determinate-nix-action@d4b23d0b9eeeaeba3648c24d43bcb623dcf75336 # v3.7.0
38+
- uses: DeterminateSystems/magic-nix-cache-action@e1c1dae8e170ed20fd2e6aaf9979ca2d3905d636 # v12
39+
with:
40+
use-flakehub: false # Remove error when trying to authenticate without credentials
41+
- run: nix flake check ./contrib/nix

.github/workflows/stacks-core-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,15 @@ jobs:
6161
name: OpenAPI Validation
6262
runs-on: ubuntu-latest
6363
steps:
64-
- name: OpenAPI
64+
- name: Generate OpenAPI documentation
6565
id: openapi
6666
uses: stacks-network/actions/openapi@main
6767
with:
68-
input: ./docs/rpc/openapi.yaml
69-
output: ./open-api-docs.html
68+
input: "./docs/rpc/openapi.yaml"
69+
output: "./openapi-docs.html"
70+
config: "./docs/rpc/redocly.yaml"
71+
validate: "true"
72+
redocly-version: "1.34"
7073

7174
## Disabled
7275
## - this test can take several hours to run

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,24 @@ 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.2.0.0.0]
99

10-
- The HTTP `Date` header in responses now strictly follows RFC7231.
10+
### Added
11+
12+
- Added the `clarity-serialization` crate: A lightweight crate for serializing and deserializing Clarity values. This crate decouples core data types from the Clarity VM, making it easier to build off-chain tooling, and other applications that interact with Clarity data. It includes support for `wasm32-unknown-unknown` targets via the `wasm-web` and `wasm-deterministic` features.
13+
- Added `/v3/contracts/fast-call-read/:principal/:contract_name/:func_name` api endpoint. It allows to run read-only calls faster by disabling the cost and memory trackers. This endpoint requires authentication.
14+
- **SIP-031 consensus rules, activating in epoch 3.2 at block 907_740**
1115

1216
### Changed
1317

18+
- The HTTP `Date` header in responses now strictly follows RFC7231.
1419
- When a previous block commit is unable to be RBFed, the miner will now just wait for it to be confirmed instead of submitting a new block commit which breaks the miner's UTXO chain.
20+
- When mining, only log new block proposal responses, not duplicates.
21+
22+
### Fixed
23+
24+
- Fixed tenure downloader logic on reward cycle boundaries (#6234).
25+
- Do not send events to event observers for stale StackerDB chunks.
1526

1627
## [3.1.0.0.13]
1728

Cargo.lock

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

Cargo.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,33 @@ members = [
1212
"stacks-node",
1313
"contrib/tools/config-docs-generator"]
1414

15+
exclude = ["contrib/clarity-serialization"]
16+
1517
# Dependencies we want to keep the same between workspace members
1618
[workspace.dependencies]
17-
ed25519-dalek = { version = "2.1.1", features = ["serde", "rand_core"] }
19+
ed25519-dalek = { version = "2.1.1", default-features = false }
1820
hashbrown = { version = "0.15.2", features = ["serde"] }
21+
lazy_static = "1.4.0"
1922
rand_core = "0.6.4"
2023
rand = "0.8"
2124
rand_chacha = "0.3.1"
22-
tikv-jemallocator = "0.5.4"
25+
serde = "1"
26+
serde_derive = "1"
27+
serde_json = { version = "1.0", features = ["arbitrary_precision", "unbounded_depth"] }
28+
slog = { version = "2.5.2", features = [ "max_level_trace" ] }
2329
rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] }
30+
tikv-jemallocator = "0.5.4"
2431
thiserror = "1.0.65"
2532
toml = "0.5.6"
2633

2734
# Use a bit more than default optimization for
28-
# dev builds to speed up test execution
35+
# dev builds to speed up test execution
2936
[profile.dev]
3037
opt-level = 1
3138

3239
# Use release-level optimization for dependencies
3340
# This slows down "first" builds on development environments,
34-
# but won't impact subsequent builds.
41+
# but won't impact subsequent builds.
3542
[profile.dev.package."*"]
3643
opt-level = 3
3744

clarity/Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ name = "clarity"
1818
path = "./src/libclarity.rs"
1919

2020
[dependencies]
21-
rand = { workspace = true }
22-
rand_chacha = { workspace = true }
2321
serde = "1"
2422
serde_derive = "1"
2523
serde_stacker = "0.1"
@@ -28,8 +26,8 @@ lazy_static = "1.4.0"
2826
integer-sqrt = "0.1.3"
2927
slog = { version = "2.5.2", features = [ "max_level_trace" ] }
3028
stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false }
31-
rstest = "0.17.0"
32-
rstest_reuse = "0.5.0"
29+
rstest = { version = "0.17.0", optional = true }
30+
rstest_reuse = { version = "0.5.0", optional = true }
3331
hashbrown = { workspace = true }
3432
rusqlite = { workspace = true, optional = true }
3533

@@ -40,6 +38,8 @@ features = ["arbitrary_precision", "unbounded_depth"]
4038
[dev-dependencies]
4139
assert-json-diff = "1.0.0"
4240
mutants = "0.0.3"
41+
rstest = { version = "0.17.0" }
42+
rstest_reuse = { version = "0.5.0" }
4343
# a nightly rustc regression (35dbef235 2021-03-02) prevents criterion from compiling
4444
# but it isn't necessary for tests: only benchmarks. therefore, commenting out for now.
4545
# criterion = "0.3"
@@ -49,7 +49,8 @@ default = ["rusqlite"]
4949
developer-mode = ["stacks_common/developer-mode"]
5050
slog_json = ["stacks_common/slog_json"]
5151
rusqlite = ["stacks_common/rusqlite", "dep:rusqlite"]
52-
testing = []
52+
testing = ["rstest", "rstest_reuse"]
5353
devtools = []
5454
rollback_value_check = []
5555
disable-costs = []
56+
wasm-web = ["stacks_common/wasm-web"]

clarity/src/vm/analysis/arithmetic_checker/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl std::error::Error for Error {
5858

5959
impl std::fmt::Display for Error {
6060
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
61-
write!(f, "{:?}", self)
61+
write!(f, "{self:?}")
6262
}
6363
}
6464

clarity/src/vm/analysis/arithmetic_checker/tests.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ fn test_bad_defines(#[case] version: ClarityVersion, #[case] epoch: StacksEpochI
7777
assert_eq!(
7878
arithmetic_check(contract, version, epoch),
7979
Err(error.clone()),
80-
"Check contract:\n {}",
81-
contract
80+
"Check contract:\n {contract}"
8281
);
8382
}
8483
}
@@ -120,14 +119,12 @@ fn test_variables_fail_arithmetic_check_clarity1() {
120119
assert_eq!(
121120
arithmetic_check(contract, ClarityVersion::Clarity1, StacksEpochId::Epoch2_05),
122121
result.clone(),
123-
"Check contract:\n {}",
124-
contract
122+
"Check contract:\n {contract}"
125123
);
126124
assert_eq!(
127125
arithmetic_check(contract, ClarityVersion::Clarity1, StacksEpochId::Epoch21),
128126
result.clone(),
129-
"Check contract:\n {}",
130-
contract
127+
"Check contract:\n {contract}"
131128
);
132129
}
133130

@@ -188,8 +185,7 @@ fn test_variables_fail_arithmetic_check_clarity2() {
188185
assert_eq!(
189186
arithmetic_check(contract, ClarityVersion::Clarity2, StacksEpochId::Epoch21),
190187
result.clone(),
191-
"Check contract:\n {}",
192-
contract
188+
"Check contract:\n {contract}"
193189
);
194190
}
195191
}
@@ -321,14 +317,12 @@ fn test_functions_clarity1() {
321317
assert_eq!(
322318
arithmetic_check(contract, ClarityVersion::Clarity1, StacksEpochId::Epoch2_05),
323319
result.clone(),
324-
"Check contract:\n {}",
325-
contract
320+
"Check contract:\n {contract}"
326321
);
327322
assert_eq!(
328323
arithmetic_check(contract, ClarityVersion::Clarity1, StacksEpochId::Epoch21),
329324
result.clone(),
330-
"Check contract:\n {}",
331-
contract
325+
"Check contract:\n {contract}"
332326
);
333327
}
334328
}
@@ -458,8 +452,7 @@ fn test_functions_clarity2() {
458452
assert_eq!(
459453
arithmetic_check(contract, ClarityVersion::Clarity2, StacksEpochId::Epoch21),
460454
result.clone(),
461-
"Check contract:\n {}",
462-
contract
455+
"Check contract:\n {contract}"
463456
);
464457
}
465458
}

0 commit comments

Comments
 (0)