Skip to content

Commit b0f637f

Browse files
authored
Merge branch 'develop' into chore/fix-warnings
2 parents 80103d8 + 347c1cf commit b0f637f

File tree

424 files changed

+30556
-25139
lines changed

Some content is hidden

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

424 files changed

+30556
-25139
lines changed

.cargo/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
3+
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
34

45
# Needed by perf to generate flamegraphs.
56
#[target.x86_64-unknown-linux-gnu]

.github/actions/bitcoin-int-tests/Dockerfile.rustfmt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ WORKDIR /src
44

55
COPY ./rust-toolchain .
66
COPY ./Cargo.toml .
7+
COPY ./.cargo .
78

89
RUN rustup component add rustfmt
910

1011
COPY . .
1112

12-
RUN cargo fmt --all -- --check
13+
RUN cargo fmt-stacks --check

.github/workflows/bitcoin-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
sudo apt-get remove -y 'php.*'
3838
sudo apt-get remove -y '^mongodb-.*'
3939
sudo apt-get remove -y '^mysql-.*'
40-
sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
40+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
4141
sudo apt-get autoremove -y
4242
sudo apt-get clean
4343
docker system prune --force
@@ -139,6 +139,7 @@ jobs:
139139
- tests::neon_integrations::bad_microblock_pubkey
140140
- tests::epoch_24::fix_to_pox_contract
141141
- tests::epoch_24::verify_auto_unlock_behavior
142+
- tests::signer::test_stackerdb_dkg
142143
- tests::stackerdb::test_stackerdb_load_store
143144
- tests::stackerdb::test_stackerdb_event_observer
144145
steps:

.github/workflows/clippy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Disabled - this workflow needs more work so it's not incredibly chatty
2-
##
31
## Perform Clippy checks - currently set to defaults
42
## https://github.com/rust-lang/rust-clippy#usage
53
## https://rust-lang.github.io/rust-clippy/master/index.html
@@ -17,10 +15,10 @@ on:
1715
types:
1816
- opened
1917
- reopened
18+
- synchronize
2019

2120
jobs:
2221
clippy_check:
23-
if: ${{ false }}
2422
name: Clippy Check
2523
runs-on: ubuntu-latest
2624
steps:
@@ -41,4 +39,4 @@ jobs:
4139
uses: actions-rs/clippy-check@v1
4240
with:
4341
token: ${{ secrets.GITHUB_TOKEN }}
44-
args: --all-features
42+
args: -p clarity -p libstackerdb -p pox-locking -p stacks-common --no-deps --tests --all-features -- -D warnings

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

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ jobs:
1919
- name: Checkout the latest code
2020
id: git_checkout
2121
uses: actions/checkout@v3
22+
- name: Reclaim disk space
23+
id: cleanup
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get remove -y '^dotnet-.*'
27+
sudo apt-get remove -y '^llvm-.*'
28+
sudo apt-get remove -y 'php.*'
29+
sudo apt-get remove -y '^mongodb-.*'
30+
sudo apt-get remove -y '^mysql-.*'
31+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
32+
sudo apt-get autoremove -y
33+
sudo apt-get clean
34+
docker system prune --force
2235
- name: Single full genesis integration test
2336
id: full_genesis_test
2437
env:
@@ -125,19 +138,42 @@ jobs:
125138
# Core contract tests
126139
core-contracts-clarinet-test:
127140
name: Core Contracts Test
141+
defaults:
142+
run:
143+
working-directory: "./contrib/core-contract-tests/"
128144
runs-on: ubuntu-latest
129145
steps:
130146
- name: Checkout the latest code
131147
id: git_checkout
132148
uses: actions/checkout@v3
133-
- name: Execute core contract unit tests in Clarinet
149+
- name: Execute core contract unit tests with clarinet-sdk
134150
id: clarinet_unit_test
135-
uses: docker://hirosystems/clarinet:1.1.0
151+
uses: actions/setup-node@v3
136152
with:
137-
args: test --coverage --manifest-path=./contrib/core-contract-tests/Clarinet.toml
153+
node-version: 18.x
154+
cache: "npm"
155+
cache-dependency-path: "./contrib/core-contract-tests/package-lock.json"
156+
- run: npm ci
157+
- run: npm test
138158
- name: Export code coverage
139159
id: clarinet_codecov
140160
uses: codecov/codecov-action@v3
141161
with:
142-
files: ./coverage.lcov
162+
files: ./lcov.info
143163
verbose: true
164+
165+
# Core contract tests on Clarinet v1
166+
# Check for false positives/negatives
167+
# https://github.com/stacks-network/stacks-blockchain/pull/4031#pullrequestreview-1713341208
168+
core-contracts-clarinet-test-clarinet-v1:
169+
name: Core Contracts Test Clarinet V1
170+
runs-on: ubuntu-latest
171+
steps:
172+
- name: Checkout the latest code
173+
id: git_checkout
174+
uses: actions/checkout@v3
175+
- name: Execute core contract unit tests in Clarinet
176+
id: clarinet_unit_test_v1
177+
uses: docker://hirosystems/clarinet:1.7.1
178+
with:
179+
args: test --manifest-path=./contrib/core-contract-tests/Clarinet.toml contrib/core-contract-tests/tests/bns/name_register_test.ts

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ StackerDB replicas in their config files.
2121
- Message definitions and codecs for Stacker DB, a replicated off-chain DB
2222
hosted by subscribed Stacks nodes and controlled by smart contracts
2323
- Added 3 new public and regionally diverse bootstrap nodes: est.stacksnodes.org, cet.stacksnodes.org, sgt.stacksnodes.org
24+
- satoshis_per_byte can be changed in the config file and miners will always use
25+
the most up to date value
2426

2527
### Changed
2628

CONTRIBUTING.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ you push your code. Follow these instruction to set it up:
101101
2. Change the content of `.git/hooks/pre-commit` to be the following
102102
```sh
103103
#!/bin/sh
104-
git diff --name-only --staged | grep '\.rs$' | xargs -P 8 -I {} rustfmt {} --edition 2021 --check --config group_imports=StdExternalCrate || (
105-
echo 'rustfmt failed: run "cargo fmt --all -- --config group_imports=StdExternalCrate"';
104+
git diff --name-only --staged | grep '\.rs$' | xargs -P 8 -I {} rustfmt {} --edition 2021 --check --config group_imports=StdExternalCrate,imports_granularity=Module || (
105+
echo 'rustfmt failed: run "cargo fmt-stacks"';
106106
exit 1
107107
)
108108
```
@@ -384,19 +384,20 @@ A test should be marked `#[ignore]` if:
384384

385385
## Formatting
386386

387-
This repository uses the default rustfmt formatting style. PRs will be checked against `rustfmt` and will _fail_ if not
388-
properly formatted.
387+
PRs will be checked against `rustfmt` and will _fail_ if not properly formatted.
388+
Unfortunately, some config options that we require cannot currently be set in `.rustfmt` files, so arguments must be passed via the command line.
389+
Therefore, we handle `rustfmt` configuration using a Cargo alias: `cargo fmt-stacks`
389390

390391
You can check the formatting locally via:
391392

392393
```bash
393-
cargo fmt --all -- --check --config group_imports=StdExternalCrate
394+
cargo fmt-stacks --check
394395
```
395396

396397
You can automatically reformat your commit via:
397398

398399
```bash
399-
cargo fmt --all -- --config group_imports=StdExternalCrate
400+
cargo fmt-stacks
400401
```
401402

402403
## Comments

0 commit comments

Comments
 (0)