diff --git a/.cargo/config b/.cargo/config
index 7f7e28a8b84..a3f905bff38 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -2,10 +2,13 @@
stacks-node = "run --package stacks-node --"
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
-# Uncomment to improve performance slightly, at the cost of portability
-# * Note that native binaries may not run on CPUs that are different from the build machine
-# [build]
-# rustflags = ["-Ctarget-cpu=native"]
+# For x86_64 CPUs, default to `native` and override in CI for release builds
+# This makes it slightly faster for users running locally built binaries.
+# This can cause trouble when building "portable" binaries, such as for docker,
+# so disable it with the "portable" feature.
+# TODO: Same for other targets?
+[target.'cfg(all(target_arch = "x86_64", not(feature = portable))']
+rustflags = ["-Ctarget-cpu=native"]
# Needed by perf to generate flamegraphs.
#[target.x86_64-unknown-linux-gnu]
diff --git a/.github/actions/dockerfiles/Dockerfile.alpine-binary b/.github/actions/dockerfiles/Dockerfile.alpine-binary
index eae3a123bf6..2388ffa0314 100644
--- a/.github/actions/dockerfiles/Dockerfile.alpine-binary
+++ b/.github/actions/dockerfiles/Dockerfile.alpine-binary
@@ -7,19 +7,16 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
-ARG REPO
+ARG REPO=stacks-network/stacks-core
-RUN case ${TARGETPLATFORM} in \
- linux/amd64/v2) BIN_ARCH=linux-glibc-x64-v2 ;; \
- linux/amd64*) BIN_ARCH=linux-glibc-x64 ;; \
- linux/arm64*) BIN_ARCH=linux-glibc-arm64 ;; \
- linux/arm/v7) BIN_ARCH=linux-glibc-armv7 ;; \
- *) exit 1 ;; \
+RUN case ${TARGETARCH} in \
+ "amd64") BIN_ARCH=linux-musl-x64 ;; \
+ "arm64") BIN_ARCH=linux-musl-arm64 ;; \
+ "arm") BIN_ARCH=linux-musl-armv7 ;; \
+ "*") exit 1 ;; \
esac \
- && echo "TARGETPLATFORM: $TARGETPLATFORM" \
- && echo "BIN_ARCH: $BIN_ARCH" \
- && echo "wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip" \
- && wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip \
+ && echo "wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip" \
+ && wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip \
&& unzip ${BIN_ARCH}.zip -d /out
FROM --platform=${TARGETPLATFORM} alpine
diff --git a/.github/actions/dockerfiles/Dockerfile.debian-binary b/.github/actions/dockerfiles/Dockerfile.debian-binary
index f4461908538..4cec3c4391e 100644
--- a/.github/actions/dockerfiles/Dockerfile.debian-binary
+++ b/.github/actions/dockerfiles/Dockerfile.debian-binary
@@ -7,19 +7,16 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
-ARG REPO
+ARG REPO=stacks-network/stacks-core
-RUN case ${TARGETPLATFORM} in \
- linux/amd64/v2) BIN_ARCH=linux-glibc-x64-v2 ;; \
- linux/amd64*) BIN_ARCH=linux-glibc-x64 ;; \
- linux/arm64*) BIN_ARCH=linux-glibc-arm64 ;; \
- linux/arm/v7) BIN_ARCH=linux-glibc-armv7 ;; \
- *) exit 1 ;; \
+RUN case ${TARGETARCH} in \
+ "amd64") BIN_ARCH=linux-musl-x64 ;; \
+ "arm64") BIN_ARCH=linux-musl-arm64 ;; \
+ "arm") BIN_ARCH=linux-musl-armv7 ;; \
+ "*") exit 1 ;; \
esac \
- && echo "TARGETPLATFORM: $TARGETPLATFORM" \
- && echo "BIN_ARCH: $BIN_ARCH" \
- && echo "wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip" \
- && wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip \
+ && echo "wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip" \
+ && wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip \
&& unzip ${BIN_ARCH}.zip -d /out
FROM --platform=${TARGETPLATFORM} debian:bookworm
diff --git a/.github/actions/dockerfiles/Dockerfile.debian-source b/.github/actions/dockerfiles/Dockerfile.debian-source
index b8da585fe2e..13f45536133 100644
--- a/.github/actions/dockerfiles/Dockerfile.debian-source
+++ b/.github/actions/dockerfiles/Dockerfile.debian-source
@@ -1,13 +1,10 @@
-FROM rust:bookworm as build
+FROM rust:bullseye as build
ARG STACKS_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'
ARG BUILD_DIR=/build
ARG TARGET=x86_64-unknown-linux-gnu
-# Allow us to override the default `--target-cpu` for the given target triplet
-ARG TARGET_CPU
-ENV RUSTFLAGS="${TARGET_CPU:+${RUSTFLAGS} -Ctarget-cpu=${TARGET_CPU}}"
WORKDIR /src
COPY . .
@@ -19,7 +16,7 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
&& cd ${BUILD_DIR} \
&& rustup target add ${TARGET} \
&& rustup component add rustfmt \
- && cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
+ && cargo build --features monitoring_prom,slog_json,portable --release --workspace --target ${TARGET} \
&& mkdir -p /out \
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
diff --git a/.github/workflows/atlas-tests.yml b/.github/workflows/atlas-tests.yml
index 1ea78e54112..8cb6b6bcc91 100644
--- a/.github/workflows/atlas-tests.yml
+++ b/.github/workflows/atlas-tests.yml
@@ -54,17 +54,3 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}
-
- check-tests:
- name: Check Tests
- runs-on: ubuntu-latest
- if: always()
- needs:
- - atlas-tests
- steps:
- - name: Check Tests Status
- id: check_tests_status
- uses: stacks-network/actions/check-jobs-status@main
- with:
- jobs: ${{ toJson(needs) }}
- summary_print: "true"
diff --git a/.github/workflows/bitcoin-tests.yml b/.github/workflows/bitcoin-tests.yml
index a832bc22349..e1e4fff7653 100644
--- a/.github/workflows/bitcoin-tests.yml
+++ b/.github/workflows/bitcoin-tests.yml
@@ -31,7 +31,7 @@ jobs:
test-name:
- tests::bitcoin_regtest::bitcoind_integration_test
- tests::integrations::integration_test_get_info
- - tests::neon_integrations::antientropy_integration_test
+ - tests::neon_integrations::antientropy_integration_test
- tests::neon_integrations::bad_microblock_pubkey
- tests::neon_integrations::bitcoind_forking_test
- tests::neon_integrations::bitcoind_integration_test
@@ -59,7 +59,6 @@ jobs:
- tests::neon_integrations::size_overflow_unconfirmed_stream_microblocks_integration_test
- tests::neon_integrations::stx_delegate_btc_integration_test
- tests::neon_integrations::stx_transfer_btc_integration_test
- - tests::neon_integrations::stack_stx_burn_op_test
- tests::neon_integrations::test_chainwork_first_intervals
- tests::neon_integrations::test_chainwork_partial_interval
- tests::neon_integrations::test_flash_block_skip_tenure
@@ -71,25 +70,17 @@ jobs:
- tests::neon_integrations::use_latest_tip_integration_test
- tests::neon_integrations::confirm_unparsed_ongoing_ops
- tests::neon_integrations::min_txs
- - tests::neon_integrations::vote_for_aggregate_key_burn_op_test
- - tests::epoch_25::microblocks_disabled
- tests::should_succeed_handling_malformed_and_valid_txs
- tests::nakamoto_integrations::simple_neon_integration
- tests::nakamoto_integrations::mine_multiple_per_tenure_integration
- tests::nakamoto_integrations::block_proposal_api_endpoint
- tests::nakamoto_integrations::miner_writes_proposed_block_to_stackerdb
- tests::nakamoto_integrations::correct_burn_outs
- - tests::nakamoto_integrations::vote_for_aggregate_key_burn_op
- - tests::nakamoto_integrations::follower_bootup
- tests::signer::stackerdb_dkg
- tests::signer::stackerdb_sign
- tests::signer::stackerdb_block_proposal
- tests::signer::stackerdb_filter_bad_transactions
- tests::signer::stackerdb_mine_2_nakamoto_reward_cycles
- - tests::signer::stackerdb_sign_after_signer_reboot
- - tests::nakamoto_integrations::stack_stx_burn_op_integration_test
- # Do not run this one until we figure out why it fails in CI
- # - tests::neon_integrations::bitcoin_reorg_flap
steps:
## Setup test environment
- name: Setup Test Environment
@@ -97,7 +88,7 @@ jobs:
uses: stacks-network/actions/stacks-core/testenv@main
with:
btc-version: "25.0"
-
+
## Run test matrix using restored cache of archive file
## - Test will timeout after env.TEST_TIMEOUT minutes
- name: Run Tests
@@ -114,17 +105,3 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}
-
- check-tests:
- name: Check Tests
- runs-on: ubuntu-latest
- if: always()
- needs:
- - integration-tests
- steps:
- - name: Check Tests Status
- id: check_tests_status
- uses: stacks-network/actions/check-jobs-status@main
- with:
- jobs: ${{ toJson(needs) }}
- summary_print: "true"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 84e94a9bba3..434c977a560 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,6 +24,16 @@ on:
- reopened
- synchronize
- ready_for_review
+ paths-ignore:
+ - "**.md"
+ - "**.yml"
+ ## might be better to use inclusive v exclusive paths here, ex:
+ # paths:
+ # - "**.rs"
+ # - "**.clar"
+ pull_request_review:
+ types:
+ - submitted
defaults:
run:
@@ -45,6 +55,15 @@ jobs:
## - PR review comment
## - PR change is requested
rustfmt:
+ if: |
+ !(
+ github.event_name == 'pull_request_review' &&
+ github.event.action == 'submitted' &&
+ (
+ github.event.review.state == 'commented' ||
+ github.event.review.state == 'changes_requested'
+ )
+ )
name: Rust Format
runs-on: ubuntu-latest
steps:
@@ -70,9 +89,11 @@ jobs:
##
## Runs when the following is true:
## - tag is provided
+ ## - workflow is building default branch (master)
create-release:
if: |
- inputs.tag != ''
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
name: Create Release
needs:
- rustfmt
@@ -85,9 +106,22 @@ jobs:
##
## Runs when:
## - tag is not provided
+ ## and the following are not true:
+ ## - PR review submitted (not approved)
+ ## and any of:
+ ## - PR review comment
+ ## - PR change is requested
docker-image:
if: |
- inputs.tag == ''
+ inputs.tag == '' &&
+ !(
+ github.event_name == 'pull_request_review' &&
+ github.event.action == 'submitted' &&
+ (
+ github.event.review.state == 'commented' ||
+ github.event.review.state == 'changes_requested'
+ )
+ )
name: Docker Image (Source)
uses: ./.github/workflows/image-build-source.yml
needs:
@@ -101,6 +135,7 @@ jobs:
## or:
## - no tag provided
## and any of:
+ ## - PR is approved (any approval will trigger)
## - this workflow is called manually
## - PR is opened
## - commit to either (development, master) branch
@@ -108,6 +143,11 @@ jobs:
if: |
inputs.tag != '' || (
inputs.tag == '' && (
+ (
+ github.event_name == 'pull_request_review' &&
+ github.event.action == 'submitted' &&
+ github.event.review.state == 'approved'
+ ) ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
@@ -130,28 +170,16 @@ jobs:
##
## Runs when:
## - tag is provided
- ## or:
- ## - no tag provided
- ## and any of:
- ## - this workflow is called manually
- ## - PR is opened
- ## - PR added to merge queue
- ## - commit to either (development, next, master) branch
+ ## either or of the following:
+ ## - tag is not provided
+ ## - PR is approved
stacks-core-tests:
if: |
inputs.tag != '' || (
- inputs.tag == '' && (
- github.event_name == 'workflow_dispatch' ||
- github.event_name == 'pull_request' ||
- github.event_name == 'merge_group' ||
- (
- contains('
- refs/heads/master
- refs/heads/develop
- refs/heads/next
- ', github.event.pull_request.head.ref) &&
- github.event_name == 'push'
- )
+ inputs.tag == '' || (
+ github.event_name == 'pull_request_review' &&
+ github.event.action == 'submitted' &&
+ github.event.review.state == 'approved'
)
)
name: Stacks Core Tests
@@ -163,18 +191,10 @@ jobs:
bitcoin-tests:
if: |
inputs.tag != '' || (
- inputs.tag == '' && (
- github.event_name == 'workflow_dispatch' ||
- github.event_name == 'pull_request' ||
- github.event_name == 'merge_group' ||
- (
- contains('
- refs/heads/master
- refs/heads/develop
- refs/heads/next
- ', github.event.pull_request.head.ref) &&
- github.event_name == 'push'
- )
+ inputs.tag == '' || (
+ github.event_name == 'pull_request_review' &&
+ github.event.action == 'submitted' &&
+ github.event.review.state == 'approved'
)
)
name: Bitcoin Tests
diff --git a/.github/workflows/create-source-binary-x64.yml b/.github/workflows/create-source-binary-x64.yml
new file mode 100644
index 00000000000..a1b435aa5f2
--- /dev/null
+++ b/.github/workflows/create-source-binary-x64.yml
@@ -0,0 +1,78 @@
+## Github workflow to create multiarch binaries from source
+
+name: Create Binaries for x86_64
+
+on:
+ workflow_call:
+ inputs:
+ tag:
+ description: "Tag name of this release (x.y.z)"
+ required: true
+ type: string
+ arch:
+ description: "Stringified JSON object listing of platform matrix"
+ required: false
+ type: string
+ default: >-
+ ["linux-glibc-x64", "linux-musl-x64", "macos-x64", "windows-x64"]
+ cpu:
+ description: "Stringified JSON object listing of target CPU matrix"
+ required: false
+ type: string
+ default: >-
+ ["x86-64", "x86-64-v3"]
+
+## change the display name to the tag being built
+run-name: ${{ inputs.tag }}
+
+concurrency:
+ group: create-binary-${{ github.head_ref || github.ref || github.run_id}}
+ ## Only cancel in progress if this is for a PR
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ ## Runs when the following is true:
+ ## - tag is provided
+ ## - workflow is building default branch (master)
+ artifact:
+ if: |
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
+ name: Build Binaries
+ runs-on: ubuntu-latest
+ strategy:
+ ## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
+ max-parallel: 10
+ matrix:
+ platform: ${{ fromJson(inputs.arch) }}
+ cpu: ${{ fromJson(inputs.cpu) }}
+ steps:
+ ## Setup Docker for the builds
+ - name: Docker setup
+ uses: stacks-network/actions/docker@main
+
+ ## Build the binaries using defined dockerfiles
+ - name: Build Binary (${{ matrix.platform }}_${{ matrix.cpu }})
+ id: build_binaries
+ uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # 5.0.0
+ with:
+ file: build-scripts/Dockerfile.${{ matrix.platform }}
+ outputs: type=local,dest=./release/${{ matrix.platform }}
+ build-args: |
+ STACKS_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }}
+ OS_ARCH=${{ matrix.platform }}
+ TARGET_CPU=${{ matrix.cpu }}
+ GIT_BRANCH=${{ env.GITHUB_REF_SHORT }}
+ GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
+
+ ## Compress the binary artifact
+ - name: Compress artifact
+ id: compress_artifact
+ run: zip --junk-paths ${{ matrix.platform }}_${{ matrix.cpu }} ./release/${{ matrix.platform }}/*
+
+ ## Upload the binary artifact to the github action (used in `github-release.yml` to create a release)
+ - name: Upload artifact
+ id: upload_artifact
+ uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
+ with:
+ path: ${{ matrix.platform }}_${{ matrix.cpu }}.zip
diff --git a/.github/workflows/create-source-binary.yml b/.github/workflows/create-source-binary.yml
index 385b30af7db..068170efc53 100644
--- a/.github/workflows/create-source-binary.yml
+++ b/.github/workflows/create-source-binary.yml
@@ -9,6 +9,12 @@ on:
description: "Tag name of this release (x.y.z)"
required: true
type: string
+ arch:
+ description: "Stringified JSON object listing of platform matrix"
+ required: false
+ type: string
+ default: >-
+ ["linux-glibc-arm64", "linux-glibc-armv7", "linux-musl-arm64", "linux-musl-armv7"]
## change the display name to the tag being built
run-name: ${{ inputs.tag }}
@@ -21,40 +27,44 @@ concurrency:
jobs:
## Runs when the following is true:
## - tag is provided
+ ## - workflow is building default branch (master)
artifact:
if: |
- inputs.tag != ''
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
name: Build Binaries
runs-on: ubuntu-latest
strategy:
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
max-parallel: 10
matrix:
- arch:
- - linux-musl
- - linux-glibc
- - macos
- - windows
- cpu:
- - arm64
- - armv7
- - x86-64 ## defaults to x86-64-v3 variant - intel haswell (2013) and newer
- # - x86-64-v2 ## intel nehalem (2008) and newer
- # - x86-64-v3 ## intel haswell (2013) and newer
- # - x86-64-v4 ## intel skylake (2017) and newer
- exclude:
- - arch: windows # excludes windows-arm64
- cpu: arm64
- - arch: windows # excludes windows-armv7
- cpu: armv7
- - arch: macos # excludes macos-armv7
- cpu: armv7
-
+ platform: ${{ fromJson(inputs.arch) }}
steps:
- - name: Build Binary (${{ matrix.arch }}_${{ matrix.cpu }})
- id: build_binary
- uses: stacks-network/actions/stacks-core/create-source-binary@main
+ ## Setup Docker for the builds
+ - name: Docker setup
+ uses: stacks-network/actions/docker@main
+
+ ## Build the binaries using defined dockerfiles
+ - name: Build Binary (${{ matrix.platform }})
+ id: build_binaries
+ uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # 5.0.0
+ with:
+ file: build-scripts/Dockerfile.${{ matrix.platform }}
+ outputs: type=local,dest=./release/${{ matrix.platform }}
+ build-args: |
+ STACKS_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }}
+ OS_ARCH=${{ matrix.platform }}
+ GIT_BRANCH=${{ env.GITHUB_REF_SHORT }}
+ GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
+
+ ## Compress the binary artifact
+ - name: Compress artifact
+ id: compress_artifact
+ run: zip --junk-paths ${{ matrix.platform }} ./release/${{ matrix.platform }}/*
+
+ ## Upload the binary artifact to the github action (used in `github-release.yml` to create a release)
+ - name: Upload artifact
+ id: upload_artifact
+ uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
- arch: ${{ matrix.arch }}
- cpu: ${{ matrix.cpu }}
- tag: ${{ inputs.tag }}
+ path: ${{ matrix.platform }}.zip
diff --git a/.github/workflows/epoch-tests.yml b/.github/workflows/epoch-tests.yml
index be00618d505..a50e0d344d3 100644
--- a/.github/workflows/epoch-tests.yml
+++ b/.github/workflows/epoch-tests.yml
@@ -78,17 +78,3 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}
-
- check-tests:
- name: Check Tests
- runs-on: ubuntu-latest
- if: always()
- needs:
- - epoch-tests
- steps:
- - name: Check Tests Status
- id: check_tests_status
- uses: stacks-network/actions/check-jobs-status@main
- with:
- jobs: ${{ toJson(needs) }}
- summary_print: "true"
diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml
index 0b0b1833290..17d75b2d0ed 100644
--- a/.github/workflows/github-release.yml
+++ b/.github/workflows/github-release.yml
@@ -25,25 +25,44 @@ jobs:
##
## Runs when the following is true:
## - tag is provided
+ ## - workflow is building default branch (master)
build-binaries:
if: |
- inputs.tag != ''
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
name: Build Binaries
uses: ./.github/workflows/create-source-binary.yml
with:
tag: ${{ inputs.tag }}
secrets: inherit
+ ## Build x86_64 binaries from source
+ ##
+ ## Runs when the following is true:
+ ## - tag is provided
+ ## - workflow is building default branch (master)
+ build-binaries-x64:
+ if: |
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
+ name: Build Binaries (x64_64)
+ uses: ./.github/workflows/create-source-binary-x64.yml
+ with:
+ tag: ${{ inputs.tag }}
+ secrets: inherit
+
## Runs when the following is true:
## - tag is provided
## - workflow is building default branch (master)
create-release:
if: |
- inputs.tag != ''
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
name: Create Release
runs-on: ubuntu-latest
needs:
- build-binaries
+ - build-binaries-x64
steps:
## Downloads the artifacts built in `create-source-binary.yml`
- name: Download Artifacts
@@ -56,7 +75,12 @@ jobs:
## Generate a checksums file to be added to the release page
- name: Generate Checksums
id: generate_checksum
- uses: stacks-network/actions/generate-checksum@main
+ uses: jmgilman/actions-generate-checksum@24a35957fba81c6cbaefeb1e3d59ee56e3db5077 # v1.0.0
+ with:
+ method: sha512
+ output: CHECKSUMS.txt
+ patterns: |
+ release/*.zip
## Upload the release archives with the checksums file
- name: Upload Release
@@ -81,11 +105,13 @@ jobs:
## - workflow is building default branch (master)
docker-image:
if: |
- inputs.tag != ''
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
name: Docker Image (Binary)
uses: ./.github/workflows/image-build-binary.yml
needs:
- build-binaries
+ - build-binaries-x64
- create-release
with:
tag: ${{ inputs.tag }}
diff --git a/.github/workflows/image-build-binary.yml b/.github/workflows/image-build-binary.yml
index 74415e7f16a..cab5ff162b8 100644
--- a/.github/workflows/image-build-binary.yml
+++ b/.github/workflows/image-build-binary.yml
@@ -8,11 +8,16 @@ on:
tag:
required: true
type: string
- description: "Version tag for docker images"
+ description: "Version tag for alpine images"
+ docker-org:
+ required: false
+ type: string
+ description: "Docker repo org for uploading images (defaults to github org)"
+ default: "${GITHUB_REPOSITORY_OWNER}"
## Define which docker arch to build for
env:
- docker_platforms: "linux/arm64, linux/arm/v7, linux/amd64, linux/amd64/v3"
+ docker_platforms: "linux/arm64, linux/arm/v7, linux/amd64, linux/amd64/v2, linux/amd64/v3"
docker-org: blockstack
concurrency:
@@ -28,7 +33,8 @@ jobs:
## - workflow is building default branch (master)
image:
if: |
- inputs.tag != ''
+ inputs.tag != '' &&
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
name: Build Image
runs-on: ubuntu-latest
strategy:
@@ -42,39 +48,28 @@ jobs:
steps:
## Setup Docker for the builds
- name: Docker setup
- id: docker_setup
uses: stacks-network/actions/docker@main
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- ## if the repo owner is not `stacks-network`, default to a docker-org of the repo owner (i.e. github user id)
- ## this allows forks to run the docker push workflows without having to hardcode a dockerhub org (but it does require docker hub user to match github username)
- - name: Set Local env vars
- id: set_env
- if: |
- github.repository_owner != 'stacks-network'
- run: |
- echo "docker-org=${{ github.repository_owner }}" >> "$GITHUB_ENV"
-
## Set docker metatdata
## - depending on the matrix.dist, different tags will be enabled
- ## ex. debian will have this tag: `type=ref,event=tag,enable=${{ matrix.dist == 'debian' }}`
+ ## ex. alpine will have this tag: `type=ref,event=tag,enable=${{ matrix.dist == 'alpine' }}`
- name: Docker Metadata ( ${{matrix.dist}} )
id: docker_metadata
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 #v5.0.0
with:
- ## tag images with current repo name `stacks-core` as well as legacy `stacks-blockchain`
images: |
${{env.docker-org}}/${{ github.event.repository.name }}
${{env.docker-org}}/stacks-blockchain
tags: |
- type=raw,value=latest,enable=${{ inputs.tag != '' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ) && matrix.dist == 'debian' }}
- type=raw,value=${{ inputs.tag }}-${{ matrix.dist }},enable=${{ inputs.tag != '' && matrix.dist == 'debian'}}
- type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' && matrix.dist == 'debian' }}
- type=ref,event=tag,enable=${{ matrix.dist == 'debian' }}
- type=raw,value=latest-${{ matrix.dist }},enable=${{ inputs.tag != '' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ) && matrix.dist == 'alpine' }}
- type=raw,value=${{ inputs.tag }}-${{ matrix.dist }},enable=${{ inputs.tag != '' && matrix.dist == 'alpine' }}
+ type=raw,value=latest,enable=${{ inputs.tag != '' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ) && matrix.dist == 'alpine' }}
+ type=raw,value=${{ inputs.tag }}-${{ matrix.dist }},enable=${{ inputs.tag != '' && matrix.dist == 'alpine'}}
+ type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' && matrix.dist == 'alpine' }}
+ type=ref,event=tag,enable=${{ matrix.dist == 'alpine' }}
+ type=raw,value=latest-${{ matrix.dist }},enable=${{ inputs.tag != '' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ) && matrix.dist == 'debian' }}
+ type=raw,value=${{ inputs.tag }}-${{ matrix.dist }},enable=${{ inputs.tag != '' && matrix.dist == 'debian' }}
## Build docker image for release
- name: Build and Push ( ${{matrix.dist}} )
diff --git a/.github/workflows/image-build-source.yml b/.github/workflows/image-build-source.yml
index ebb9afc6790..1936999b27a 100644
--- a/.github/workflows/image-build-source.yml
+++ b/.github/workflows/image-build-source.yml
@@ -8,7 +8,7 @@ on:
## Define which docker arch to build for
env:
- docker_platforms: "linux/amd64"
+ docker_platforms: linux/amd64
docker-org: blockstack
concurrency:
@@ -31,21 +31,11 @@ jobs:
steps:
## Setup Docker for the builds
- name: Docker setup
- id: docker_setup
uses: stacks-network/actions/docker@main
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- ## if the repo owner is not `stacks-network`, default to a docker-org of the repo owner (i.e. github user id)
- ## this allows forks to run the docker push workflows without having to hardcode a dockerhub org (but it does require docker hub user to match github username)
- - name: Set Local env vars
- id: set_env
- if: |
- github.repository_owner != 'stacks-network'
- run: |
- echo "docker-org=${{ github.repository_owner }}" >> "$GITHUB_ENV"
-
## Set docker metatdata
- name: Docker Metadata ( ${{matrix.dist}} )
id: docker_metadata
@@ -68,8 +58,8 @@ jobs:
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}
build-args: |
+ REPO=${{ github.repository_owner }}/${{ github.event.repository.name }}
STACKS_NODE_VERSION=${{ env.GITHUB_SHA_SHORT }}
GIT_BRANCH=${{ env.GITHUB_REF_SHORT }}
GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
- TARGET_CPU=x86-64-v3
push: ${{ env.DOCKER_PUSH }}
diff --git a/.github/workflows/slow-tests.yml b/.github/workflows/slow-tests.yml
index bce6a15a1f0..0c2cb62ea46 100644
--- a/.github/workflows/slow-tests.yml
+++ b/.github/workflows/slow-tests.yml
@@ -56,17 +56,3 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}
-
- check-tests:
- name: Check Tests
- runs-on: ubuntu-latest
- if: always()
- needs:
- - slow-tests
- steps:
- - name: Check Tests Status
- id: check_tests_status
- uses: stacks-network/actions/check-jobs-status@main
- with:
- jobs: ${{ toJson(needs) }}
- summary_print: "true"
diff --git a/.github/workflows/stacks-core-tests.yml b/.github/workflows/stacks-core-tests.yml
index 3195f279fcb..5105c6535e1 100644
--- a/.github/workflows/stacks-core-tests.yml
+++ b/.github/workflows/stacks-core-tests.yml
@@ -87,7 +87,7 @@ jobs:
uses: stacks-network/actions/stacks-core/testenv@main
with:
btc-version: "25.0"
-
+
## Run test matrix using restored cache of archive file
## - Test will timeout after env.TEST_TIMEOUT minutes
- name: Run Tests
@@ -168,6 +168,7 @@ jobs:
# Core contract tests on Clarinet v1
# Check for false positives/negatives
+ # https://github.com/stacks-network/stacks-blockchain/pull/4031#pullrequestreview-1713341208
core-contracts-clarinet-test-clarinet-v1:
name: Core Contracts Test Clarinet V1
runs-on: ubuntu-latest
@@ -181,19 +182,3 @@ jobs:
with:
args: test --manifest-path=./contrib/core-contract-tests/Clarinet.toml contrib/core-contract-tests/tests/bns/name_register_test.ts
- check-tests:
- name: Check Tests
- runs-on: ubuntu-latest
- if: always()
- needs:
- - full-genesis
- - unit-tests
- - open-api-validation
- - core-contracts-clarinet-test
- steps:
- - name: Check Tests Status
- id: check_tests_status
- uses: stacks-network/actions/check-jobs-status@main
- with:
- jobs: ${{ toJson(needs) }}
- summary_print: "true"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33fe1be833f..9bab7a19d41 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,13 +17,6 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
- Functions that include a `signer-key` parameter also include a `signer-sig` parameter to demonstrate that the owner of `signer-key` is approving that particular Stacking operation. For more details, refer to the `verify-signer-key-sig` method in the `pox-4` contract.
- Signer key authorizations can be added via `set-signer-key-authorization` to omit the need for `signer-key` signatures
- A `max-amount` field is a field in signer key authorizations and defines the maximum amount of STX that can be locked in a single transaction.
-- Added configuration parameters to customize the burn block at which to start processing Stacks blocks, when running on testnet or regtest.
- ```
- [burnchain]
- first_burn_block_height = 2582526
- first_burn_block_timestamp = 1710780828
- first_burn_block_hash = "000000000000001a17c68d43cb577d62074b63a09805e4a07e829ee717507f66"
- ```
### Modified
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9ffcfb80f78..0101858b628 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -59,8 +59,8 @@ is responsible for:
6. Merging the new PR.
For an example of this process, see PRs
-[#3598](https://github.com/stacks-network/stacks-core/pull/3598) and
-[#3626](https://github.com/stacks-network/stacks-core/pull/3626).
+[#3598](https://github.com/stacks-network/stacks-blockchain/pull/3598) and
+[#3626](https://github.com/stacks-network/stacks-blockchain/pull/3626).
### Documentation Updates
@@ -226,7 +226,7 @@ Contributions should not contain `unsafe` blocks if at all possible.
## Documentation
* Each file must have a **copyright statement**.
-* Any new non-test modules should have **module-level documentation** explaining what the module does, and how it fits into the blockchain as a whole ([example](https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L17)).
+* Any new non-test modules should have **module-level documentation** explaining what the module does, and how it fits into the blockchain as a whole ([example](https://github.com/stacks-network/stacks-blockchain/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L17)).
* Any new files must have some **top-of-file documentation** that describes what the contained code does, and how it fits into the overall module.
Within the source files, the following **code documentation** standards are expected:
@@ -247,7 +247,7 @@ Within the source files, the following **code documentation** standards are expe
handle I/O reads and writes in an "outer" function. The "outer"
function only does the needful I/O and passes the data into the
"inner" function. The "inner" function is often private, whereas
- the "outer" function is often public. For example, [`inner_try_mine_microblock` and `try_mine_microblock`](https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L1148-L1216).
+ the "outer" function is often public. For example, [`inner_try_mine_microblock` and `try_mine_microblock`](https://github.com/stacks-network/stacks-blockchain/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L1148-L1216).
## Refactoring
@@ -281,7 +281,7 @@ Within the source files, the following **code documentation** standards are expe
does not decode with the allotted resources, then no further
processing may be done and the data is discarded. For an example, see
how the parsing functions in the http module use `BoundReader` and
- `MAX_PAYLOAD_LEN` in [http.rs](https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/src/net/http.rs#L2260-L2285).
+ `MAX_PAYLOAD_LEN` in [http.rs](https://github.com/stacks-network/stacks-blockchain/blob/4852d6439b473e24705f14b8af637aded33cb422/src/net/http.rs#L2260-L2285).
* **All network input reception is time-bound.** Every piece of code that ingests data _from the network_ must impose a maximum amount of time that ingestion can take. If the data takes too long to arrive, then it must be discarded without any further processing. There is no time bound for data ingested from disk or passed as an argument; this requirement is meant by the space-bound requirement.
@@ -303,7 +303,7 @@ Changes to the peer network should be deployed incrementally and tested by multi
Any PRs that claim to improve performance **must ship with reproducible benchmarks** that accurately measure the improvement. This data must also be reported in the PR submission.
-For an example, see [PR #3075](https://github.com/stacks-network/stacks-core/pull/3075).
+For an example, see [PR #3075](https://github.com/stacks-network/stacks-blockchain/pull/3075).
## Error Handling
@@ -597,7 +597,7 @@ Keep in mind that better variable names can reduce the need for comments, e.g.:
# Licensing and contributor license agreement
-`stacks-core` is released under the terms of the GPL version 3. Contributions
+`stacks-blockchain` is released under the terms of the GPL version 3. Contributions
that are not licensed under compatible terms will be rejected. Moreover,
contributions will not be accepted unless _all_ authors accept the project's
contributor license agreement.
diff --git a/Cargo.lock b/Cargo.lock
index 9cfd1ad9a1e..6f72aba99de 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -88,7 +88,7 @@ dependencies = [
"aes 0.8.4",
"cipher 0.4.4",
"ctr 0.9.2",
- "ghash 0.5.0",
+ "ghash 0.5.1",
"subtle",
]
@@ -120,9 +120,9 @@ checksum = "0453232ace82dee0dd0b4c87a59bd90f7b53b314f3e0f61fe2ee7c8a16482289"
[[package]]
name = "ahash"
-version = "0.8.8"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
"cfg-if 1.0.0",
"once_cell",
@@ -162,9 +162,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.11"
+version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"
+checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -210,9 +210,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.79"
+version = "1.0.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
+checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1"
[[package]]
name = "arrayvec"
@@ -265,7 +265,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3"
dependencies = [
"concurrent-queue",
- "event-listener 5.0.0",
+ "event-listener 5.2.0",
"event-listener-strategy 0.5.0",
"futures-core",
"pin-project-lite",
@@ -359,7 +359,7 @@ dependencies = [
"futures-io",
"futures-lite 2.2.0",
"parking",
- "polling 3.4.0",
+ "polling 3.5.0",
"rustix 0.38.31",
"slab",
"tracing",
@@ -498,6 +498,21 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -573,9 +588,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.14.0"
+version = "3.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
+checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b"
[[package]]
name = "byte-slice-cast"
@@ -603,12 +618,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.0.83"
+version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
-dependencies = [
- "libc",
-]
+checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723"
[[package]]
name = "cfg-if"
@@ -633,7 +645,7 @@ dependencies = [
"js-sys",
"num-traits",
"wasm-bindgen",
- "windows-targets 0.52.0",
+ "windows-targets 0.52.4",
]
[[package]]
@@ -674,9 +686,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.0"
+version = "4.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f"
+checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da"
dependencies = [
"clap_builder",
"clap_derive",
@@ -684,9 +696,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.0"
+version = "4.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99"
+checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb"
dependencies = [
"anstream",
"anstyle",
@@ -703,7 +715,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
@@ -717,10 +729,10 @@ name = "clarity"
version = "0.0.1"
dependencies = [
"assert-json-diff",
- "hashbrown 0.14.3",
+ "clarity",
"integer-sqrt",
"lazy_static",
- "mutants",
+ "proptest",
"rand 0.8.5",
"rand_chacha 0.3.1",
"regex",
@@ -986,7 +998,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
@@ -1145,9 +1157,9 @@ dependencies = [
[[package]]
name = "event-listener"
-version = "5.0.0"
+version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b72557800024fabbaa2449dd4bf24e37b93702d457a4d4f2b0dd1f0f039f20c1"
+checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91"
dependencies = [
"concurrent-queue",
"parking",
@@ -1170,7 +1182,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291"
dependencies = [
- "event-listener 5.0.0",
+ "event-listener 5.2.0",
"pin-project-lite",
]
@@ -1352,7 +1364,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
@@ -1369,9 +1381,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
[[package]]
name = "futures-timer"
-version = "3.0.2"
+version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
+checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
[[package]]
name = "futures-util"
@@ -1444,12 +1456,12 @@ dependencies = [
[[package]]
name = "ghash"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
+checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
dependencies = [
"opaque-debug",
- "polyval 0.6.1",
+ "polyval 0.6.2",
]
[[package]]
@@ -1491,9 +1503,9 @@ dependencies = [
[[package]]
name = "half"
-version = "1.8.2"
+version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
[[package]]
name = "hashbrown"
@@ -1510,7 +1522,7 @@ version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.11",
"allocator-api2",
"serde",
]
@@ -1565,9 +1577,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.3.6"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "hex"
@@ -1606,9 +1618,9 @@ dependencies = [
[[package]]
name = "http"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
+checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
dependencies = [
"bytes",
"fnv",
@@ -1677,7 +1689,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2 0.5.5",
+ "socket2 0.5.6",
"tokio",
"tower-service",
"tracing",
@@ -1753,9 +1765,9 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.2.3"
+version = "2.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
+checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
dependencies = [
"equivalent",
"hashbrown 0.14.3",
@@ -1800,7 +1812,7 @@ version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
dependencies = [
- "hermit-abi 0.3.6",
+ "hermit-abi 0.3.9",
"libc",
"windows-sys 0.48.0",
]
@@ -1820,6 +1832,17 @@ version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
+[[package]]
+name = "is-terminal"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
+dependencies = [
+ "hermit-abi 0.3.9",
+ "libc",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "itertools"
version = "0.10.5"
@@ -1837,9 +1860,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "js-sys"
-version = "0.3.68"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee"
+checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
dependencies = [
"wasm-bindgen",
]
@@ -1904,6 +1927,12 @@ dependencies = [
"rle-decode-fast",
]
+[[package]]
+name = "libm"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
+
[[package]]
name = "libredox"
version = "0.0.1"
@@ -1979,9 +2008,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
[[package]]
name = "log"
-version = "0.4.20"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
dependencies = [
"value-bag",
]
@@ -2056,9 +2085,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.10"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
+checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
@@ -2148,6 +2177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
dependencies = [
"autocfg",
+ "libm",
]
[[package]]
@@ -2156,16 +2186,7 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "hermit-abi 0.3.6",
- "libc",
-]
-
-[[package]]
-name = "num_threads"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
-dependencies = [
+ "hermit-abi 0.3.9",
"libc",
]
@@ -2192,9 +2213,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
[[package]]
name = "opaque-debug"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "overload"
@@ -2204,9 +2225,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "p256k1"
-version = "7.1.0"
+version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a40a031a559eb38c35a14096f21c366254501a06d41c4b327d2a7515d713a5b7"
+checksum = "3a64d160b891178fb9d43d1a58ddcafb6502daeb54d810e5e92a7c3c9bfacc07"
dependencies = [
"bitvec",
"bs58 0.4.0",
@@ -2221,7 +2242,7 @@ dependencies = [
"rustfmt-wrapper",
"serde",
"sha2 0.10.8",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
@@ -2264,9 +2285,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pest"
-version = "2.7.7"
+version = "2.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546"
+checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8"
dependencies = [
"memchr",
"thiserror",
@@ -2296,7 +2317,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
@@ -2390,9 +2411,9 @@ dependencies = [
[[package]]
name = "polling"
-version = "3.4.0"
+version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14"
+checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9"
dependencies = [
"cfg-if 1.0.0",
"concurrent-queue",
@@ -2425,9 +2446,9 @@ dependencies = [
[[package]]
name = "polyval"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb"
+checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
@@ -2529,6 +2550,26 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "proptest"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf"
+dependencies = [
+ "bit-set",
+ "bit-vec",
+ "bitflags 2.4.2",
+ "lazy_static",
+ "num-traits",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
+ "rand_xorshift",
+ "regex-syntax 0.8.2",
+ "rusty-fork",
+ "tempfile",
+ "unarray",
+]
+
[[package]]
name = "protobuf"
version = "2.28.0"
@@ -2544,6 +2585,12 @@ dependencies = [
"cc",
]
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+
[[package]]
name = "quote"
version = "1.0.35"
@@ -2630,11 +2677,20 @@ dependencies = [
"rand_core 0.5.1",
]
+[[package]]
+name = "rand_xorshift"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
[[package]]
name = "rayon"
-version = "1.8.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051"
+checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
dependencies = [
"either",
"rayon-core",
@@ -2678,7 +2734,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata 0.4.5",
+ "regex-automata 0.4.6",
"regex-syntax 0.8.2",
]
@@ -2693,9 +2749,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
+checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
dependencies = [
"aho-corasick",
"memchr",
@@ -2718,7 +2774,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
name = "relay-server"
version = "0.0.1"
dependencies = [
- "hashbrown 0.14.3",
+ "stacks-common",
]
[[package]]
@@ -2779,16 +2835,17 @@ dependencies = [
[[package]]
name = "ring"
-version = "0.17.7"
+version = "0.17.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"
+checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
dependencies = [
"cc",
+ "cfg-if 1.0.0",
"getrandom 0.2.12",
"libc",
"spin 0.9.8",
"untrusted 0.9.0",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2921,7 +2978,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "semver 1.0.21",
+ "semver 1.0.22",
]
[[package]]
@@ -2971,7 +3028,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba"
dependencies = [
"log",
- "ring 0.17.7",
+ "ring 0.17.8",
"rustls-webpki",
"sct",
]
@@ -2991,7 +3048,7 @@ version = "0.101.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
dependencies = [
- "ring 0.17.7",
+ "ring 0.17.8",
"untrusted 0.9.0",
]
@@ -3001,11 +3058,23 @@ version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+[[package]]
+name = "rusty-fork"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
+dependencies = [
+ "fnv",
+ "quick-error",
+ "tempfile",
+ "wait-timeout",
+]
+
[[package]]
name = "ryu"
-version = "1.0.16"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
+checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
[[package]]
name = "same-file"
@@ -3028,7 +3097,7 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
dependencies = [
- "ring 0.17.7",
+ "ring 0.17.8",
"untrusted 0.9.0",
]
@@ -3071,9 +3140,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.21"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"
+checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
[[package]]
name = "semver-parser"
@@ -3092,9 +3161,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.196"
+version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
dependencies = [
"serde_derive",
]
@@ -3111,20 +3180,20 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.196"
+version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
name = "serde_json"
-version = "1.0.113"
+version = "1.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
+checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
dependencies = [
"itoa",
"ryu",
@@ -3296,11 +3365,11 @@ dependencies = [
[[package]]
name = "slog-term"
-version = "2.9.0"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87d29185c55b7b258b4f120eab00f48557d4d9bc814f41713f449d35b0f8977c"
+checksum = "b6e022d0b998abfe5c3782c1f03551a596269450ccd677ea51c56f8b214610e8"
dependencies = [
- "atty",
+ "is-terminal",
"slog",
"term",
"thread_local",
@@ -3325,12 +3394,12 @@ dependencies = [
[[package]]
name = "socket2"
-version = "0.5.5"
+version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
dependencies = [
"libc",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -3381,6 +3450,7 @@ dependencies = [
"libc",
"nix",
"percent-encoding",
+ "proptest",
"rand 0.8.5",
"rand_core 0.6.4",
"ripemd",
@@ -3397,6 +3467,7 @@ dependencies = [
"slog",
"slog-json",
"slog-term",
+ "stacks-common",
"time 0.2.27",
"winapi 0.3.9",
"wsts",
@@ -3412,7 +3483,6 @@ dependencies = [
"base64 0.12.3",
"chrono",
"clarity",
- "hashbrown 0.14.3",
"http-types",
"lazy_static",
"libc",
@@ -3447,17 +3517,14 @@ name = "stacks-signer"
version = "0.0.1"
dependencies = [
"backoff",
- "clap 4.5.0",
+ "clap 4.5.1",
"clarity",
"hashbrown 0.14.3",
"libsigner",
"libstackerdb",
- "num-traits",
- "polynomial",
"rand 0.8.5",
"rand_core 0.6.4",
"reqwest",
- "rusqlite",
"secp256k1",
"serde",
"serde_derive",
@@ -3486,7 +3553,6 @@ dependencies = [
"criterion",
"curve25519-dalek 2.0.0",
"ed25519-dalek",
- "hashbrown 0.14.3",
"integer-sqrt",
"lazy_static",
"libc",
@@ -3497,6 +3563,7 @@ dependencies = [
"percent-encoding",
"pox-locking",
"prometheus",
+ "proptest",
"rand 0.8.5",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
@@ -3517,6 +3584,7 @@ dependencies = [
"slog-json",
"slog-term",
"stacks-common",
+ "stackslib",
"stdext",
"stx-genesis",
"tikv-jemallocator",
@@ -3629,9 +3697,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.48"
+version = "2.0.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
+checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07"
dependencies = [
"proc-macro2",
"quote",
@@ -3673,9 +3741,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
-version = "3.10.0"
+version = "3.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"
+checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [
"cfg-if 1.0.0",
"fastrand 2.0.1",
@@ -3720,14 +3788,14 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
name = "thread_local"
-version = "1.1.7"
+version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
"cfg-if 1.0.0",
"once_cell",
@@ -3776,9 +3844,7 @@ checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
dependencies = [
"deranged",
"itoa",
- "libc",
"num-conv",
- "num_threads",
"powerfmt",
"serde",
"time-core",
@@ -3870,10 +3936,10 @@ dependencies = [
"backtrace",
"bytes",
"libc",
- "mio 0.8.10",
+ "mio 0.8.11",
"num_cpus",
"pin-project-lite",
- "socket2 0.5.5",
+ "socket2 0.5.6",
"windows-sys 0.48.0",
]
@@ -3942,7 +4008,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "toml_edit 0.22.5",
+ "toml_edit 0.22.6",
]
[[package]]
@@ -3967,15 +4033,15 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.22.5"
+version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a"
+checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
- "winnow 0.6.1",
+ "winnow 0.6.5",
]
[[package]]
@@ -3987,7 +4053,7 @@ dependencies = [
"home",
"once_cell",
"regex",
- "semver 1.0.21",
+ "semver 1.0.22",
"walkdir",
]
@@ -4017,7 +4083,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
@@ -4108,6 +4174,12 @@ dependencies = [
"static_assertions",
]
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
[[package]]
name = "unicase"
version = "2.7.0"
@@ -4131,9 +4203,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-normalization"
-version = "0.1.22"
+version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
dependencies = [
"tinyvec",
]
@@ -4224,6 +4296,15 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+[[package]]
+name = "wait-timeout"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "waker-fn"
version = "1.1.1"
@@ -4232,9 +4313,9 @@ checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690"
[[package]]
name = "walkdir"
-version = "2.4.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
dependencies = [
"same-file",
"winapi-util",
@@ -4294,9 +4375,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.91"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f"
+checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
@@ -4304,24 +4385,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.91"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b"
+checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.41"
+version = "0.4.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97"
+checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0"
dependencies = [
"cfg-if 1.0.0",
"js-sys",
@@ -4331,9 +4412,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.91"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed"
+checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -4341,28 +4422,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.91"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"
+checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.91"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838"
+checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
[[package]]
name = "web-sys"
-version = "0.3.68"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446"
+checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -4423,7 +4504,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
- "windows-targets 0.52.0",
+ "windows-targets 0.52.4",
]
[[package]]
@@ -4441,7 +4522,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets 0.52.0",
+ "windows-targets 0.52.4",
]
[[package]]
@@ -4461,17 +4542,17 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
dependencies = [
- "windows_aarch64_gnullvm 0.52.0",
- "windows_aarch64_msvc 0.52.0",
- "windows_i686_gnu 0.52.0",
- "windows_i686_msvc 0.52.0",
- "windows_x86_64_gnu 0.52.0",
- "windows_x86_64_gnullvm 0.52.0",
- "windows_x86_64_msvc 0.52.0",
+ "windows_aarch64_gnullvm 0.52.4",
+ "windows_aarch64_msvc 0.52.4",
+ "windows_i686_gnu 0.52.4",
+ "windows_i686_msvc 0.52.4",
+ "windows_x86_64_gnu 0.52.4",
+ "windows_x86_64_gnullvm 0.52.4",
+ "windows_x86_64_msvc 0.52.4",
]
[[package]]
@@ -4482,9 +4563,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
+checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
[[package]]
name = "windows_aarch64_msvc"
@@ -4494,9 +4575,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
+checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
[[package]]
name = "windows_i686_gnu"
@@ -4506,9 +4587,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
+checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
[[package]]
name = "windows_i686_msvc"
@@ -4518,9 +4599,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
+checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
[[package]]
name = "windows_x86_64_gnu"
@@ -4530,9 +4611,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
+checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
[[package]]
name = "windows_x86_64_gnullvm"
@@ -4542,9 +4623,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
+checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
[[package]]
name = "windows_x86_64_msvc"
@@ -4554,9 +4635,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
+checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
[[package]]
name = "winnow"
@@ -4569,9 +4650,9 @@ dependencies = [
[[package]]
name = "winnow"
-version = "0.6.1"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401"
+checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8"
dependencies = [
"memchr",
]
@@ -4598,9 +4679,9 @@ dependencies = [
[[package]]
name = "wsts"
-version = "9.0.0"
+version = "8.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c80d57a61294350ed91e91eb20a6c34da084ec8f15d039bab79ce3efabbd1a4"
+checksum = "467aa8e40ed0277d19922fd0e7357c16552cb900e5138f61a48ac23c4b7878e0"
dependencies = [
"aes-gcm 0.10.3",
"bs58 0.5.0",
@@ -4644,7 +4725,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.48",
+ "syn 2.0.52",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index feab983833c..24b9f333f3d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,17 +10,19 @@ members = [
"contrib/tools/relay-server",
"libsigner",
"stacks-signer",
- "testnet/stacks-node"]
+ "testnet/stacks-node"
+]
# Dependencies we want to keep the same between workspace members
-[workspace.dependencies]
-ed25519-dalek = { version = "2.1.1", features = ["serde", "rand_core"] }
+[workspace.dependencies]
+ed25519-dalek = { version = "2.1.1", features = ["serde", "rand_core"] }
hashbrown = "0.14.3"
rand_core = "0.6"
rand = "0.8"
rand_chacha = "0.3.1"
tikv-jemallocator = "0.5.4"
-wsts = { version = "9.0.0", default-features = false }
+wsts = { version = "8.1", default-features = false }
+proptest = { version = "1.4.0" }
# Use a bit more than default optimization for
# dev builds to speed up test execution
@@ -37,9 +39,3 @@ opt-level = 3
debug = true
codegen-units = 1
lto = "fat"
-
-# Release build with less LTO
-# Useful for faster builds or low-RAM environments
-[profile.release-lite]
-inherits = "release"
-lto = "thin"
diff --git a/Dockerfile.debian b/Dockerfile.debian
index 8b6759527ed..4b9a56b8c5a 100644
--- a/Dockerfile.debian
+++ b/Dockerfile.debian
@@ -1,4 +1,4 @@
-FROM rust:bookworm as build
+FROM rust:bullseye as build
ARG STACKS_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
@@ -14,8 +14,9 @@ RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json -
RUN cp target/release/stacks-node /out
-FROM debian:bookworm-slim
+FROM debian:bullseye-slim
+RUN apt update && apt install -y netcat
COPY --from=build /out/ /bin/
CMD ["stacks-node", "mainnet"]
diff --git a/README.md b/README.md
index 3f91b1a9f21..e61829ff304 100644
--- a/README.md
+++ b/README.md
@@ -11,8 +11,8 @@ Reference implementation of the [Stacks blockchain](https://github.com/stacks-ne
Stacks is a layer-2 blockchain that uses Bitcoin as a base layer for security and enables decentralized apps and predictable smart contracts using the [Clarity language](https://clarity-lang.org/). Stacks implements [Proof of Transfer (PoX)](https://community.stacks.org/pox) mining that anchors to Bitcoin security. Leader election happens at the Bitcoin blockchain and Stacks (STX) miners write new blocks on the separate Stacks blockchain. With PoX there is no need to modify Bitcoin to enable smart contracts and decentralized apps.
[](https://www.gnu.org/licenses/gpl-3.0)
-[](https://github.com/stacks-network/stacks-core/releases/latest)
-[](https://github.com/stacks-network/stacks-core/actions/workflows/ci.yml?query=event%3Aworkflow_dispatch+branch%3Amaster)
+[](https://github.com/stacks-network/stacks-blockchain/releases/latest)
+[](https://github.com/stacks-network/stacks-blockchain/actions/workflows/ci.yml?query=event%3Aworkflow_dispatch+branch%3Amaster)
[](https://stacks.chat)
## Building
@@ -22,44 +22,28 @@ Stacks is a layer-2 blockchain that uses Bitcoin as a base layer for security an
_For building on Windows, follow the rustup installer instructions at https://rustup.rs/._
```bash
-curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-source $HOME/.cargo/env
-rustup component add rustfmt
+$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+$ source $HOME/.cargo/env
+$ rustup component add rustfmt
```
-- When building the [`master`](https://github.com/stacks-network/stacks-core/tree/master) branch, ensure you are using the latest stable release:
+- When building the [`master`](https://github.com/stacks-network/stacks-blockchain/tree/master) branch, ensure you are using the latest stable release:
```bash
-rustup update
+$ rustup update
```
### 2. Clone the source repository:
```bash
-git clone --depth=1 https://github.com/stacks-network/stacks-core.git
-cd stacks-core
+$ git clone --depth=1 https://github.com/stacks-network/stacks-blockchain.git
+$ cd stacks-blockchain
```
### 3. Build the project
```bash
-# Fully optimized release build
-cargo build --release
-# Faster but less optimized build. Necessary if < 16 GB RAM
-cargo build --profile release-lite
-```
-
-_Note on building_: you may set `RUSTFLAGS` to build binaries for your native cpu:
-
-```
-RUSTFLAGS="-Ctarget-cpu=native"
-```
-
-or uncomment these lines in `./cargo/config`:
-
-```
-# [build]
-# rustflags = ["-Ctarget-cpu=native"]
+$ cargo build
```
## Testing
@@ -67,15 +51,14 @@ or uncomment these lines in `./cargo/config`:
**Run the tests:**
```bash
-cargo test testnet -- --test-threads=1
+$ cargo test testnet -- --test-threads=1
```
**Run all unit tests in parallel using [nextest](https://nexte.st/):**
_Warning, this typically takes a few minutes_
-
```bash
-cargo nextest run
+$ cargo nextest run
```
## Run the testnet
@@ -83,8 +66,8 @@ cargo nextest run
You can observe the state machine in action locally by running:
```bash
-cd testnet/stacks-node
-cargo run --bin stacks-node -- start --config ./conf/testnet-follower-conf.toml
+$ cd testnet/stacks-node
+$ cargo run --bin stacks-node -- start --config ./conf/testnet-follower-conf.toml
```
_On Windows, many tests will fail if the line endings aren't `LF`. Please ensure that you are have git's `core.autocrlf` set to `input` when you clone the repository to avoid any potential issues. This is due to the Clarity language currently being sensitive to line endings._
diff --git a/build-scripts/Dockerfile.linux-glibc-arm64 b/build-scripts/Dockerfile.linux-glibc-arm64
new file mode 100644
index 00000000000..11e38f88048
--- /dev/null
+++ b/build-scripts/Dockerfile.linux-glibc-arm64
@@ -0,0 +1,26 @@
+FROM rust:bullseye as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=aarch64-unknown-linux-gnu
+WORKDIR /src
+
+COPY . .
+
+RUN apt-get update && apt-get install -y git gcc-aarch64-linux-gnu
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && CC=aarch64-linux-gnu-gcc \
+ CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
+ cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
diff --git a/build-scripts/Dockerfile.linux-glibc-armv7 b/build-scripts/Dockerfile.linux-glibc-armv7
new file mode 100644
index 00000000000..cc05298dfef
--- /dev/null
+++ b/build-scripts/Dockerfile.linux-glibc-armv7
@@ -0,0 +1,26 @@
+FROM rust:bullseye as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=armv7-unknown-linux-gnueabihf
+WORKDIR /src
+
+COPY . .
+
+RUN apt-get update && apt-get install -y git gcc-arm-linux-gnueabihf
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && CC=arm-linux-gnueabihf-gcc \
+ CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
+ CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
+ cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
diff --git a/build-scripts/Dockerfile.linux-glibc-x64 b/build-scripts/Dockerfile.linux-glibc-x64
new file mode 100644
index 00000000000..0e2bbdd9bee
--- /dev/null
+++ b/build-scripts/Dockerfile.linux-glibc-x64
@@ -0,0 +1,26 @@
+FROM rust:bullseye as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=x86_64-unknown-linux-gnu
+# Allow us to override the default `--target-cpu` for the given target triplet
+ARG TARGET_CPU
+WORKDIR /src
+
+COPY . .
+
+RUN apt-get update && apt-get install -y git
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ ${TARGET_CPU:+RUSTFLAGS="$RUSTFLAGS $TARGET_CPU"} \
+ cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
diff --git a/build-scripts/Dockerfile.linux-musl-arm64 b/build-scripts/Dockerfile.linux-musl-arm64
new file mode 100644
index 00000000000..24a07f018a2
--- /dev/null
+++ b/build-scripts/Dockerfile.linux-musl-arm64
@@ -0,0 +1,22 @@
+FROM messense/rust-musl-cross:aarch64-musl as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=aarch64-unknown-linux-musl
+WORKDIR /src
+
+COPY . .
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
+
diff --git a/build-scripts/Dockerfile.linux-musl-armv7 b/build-scripts/Dockerfile.linux-musl-armv7
new file mode 100644
index 00000000000..2ce5a999120
--- /dev/null
+++ b/build-scripts/Dockerfile.linux-musl-armv7
@@ -0,0 +1,21 @@
+FROM messense/rust-musl-cross:armv7-musleabihf as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=armv7-unknown-linux-musleabihf
+WORKDIR /src
+
+COPY . .
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
diff --git a/build-scripts/Dockerfile.linux-musl-x64 b/build-scripts/Dockerfile.linux-musl-x64
new file mode 100644
index 00000000000..d954708a0a7
--- /dev/null
+++ b/build-scripts/Dockerfile.linux-musl-x64
@@ -0,0 +1,27 @@
+FROM rust:alpine as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=x86_64-unknown-linux-musl
+# Allow us to override the default `--target-cpu` for the given target triplet
+ARG TARGET_CPU
+WORKDIR /src
+
+COPY . .
+
+RUN apk update && apk add git musl-dev
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ ${TARGET_CPU:+RUSTFLAGS="$RUSTFLAGS $TARGET_CPU"} \
+ cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
+
diff --git a/build-scripts/Dockerfile.macos-arm64 b/build-scripts/Dockerfile.macos-arm64
new file mode 100644
index 00000000000..0fd8a1e4c38
--- /dev/null
+++ b/build-scripts/Dockerfile.macos-arm64
@@ -0,0 +1,30 @@
+FROM rust:bullseye as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG OSXCROSS="https://github.com/hirosystems/docker-osxcross-rust/releases/download/MacOSX12.0.sdk/osxcross-d904031_MacOSX12.0.sdk.tar.zst"
+ARG TARGET=aarch64-apple-darwin
+WORKDIR /src
+
+COPY . .
+
+RUN apt-get update && apt-get install -y clang zstd
+
+# Retrieve and install osxcross
+RUN wget -nc -O /tmp/osxcross.tar.zst ${OSXCROSS} \
+ && mkdir -p /opt/osxcross && tar -xaf /tmp/osxcross.tar.zst -C /opt/osxcross
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && . /opt/osxcross/env-macos-aarch64 \
+ && cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
+
diff --git a/build-scripts/Dockerfile.macos-x64 b/build-scripts/Dockerfile.macos-x64
new file mode 100644
index 00000000000..f61d0574e9f
--- /dev/null
+++ b/build-scripts/Dockerfile.macos-x64
@@ -0,0 +1,32 @@
+FROM rust:bullseye as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG OSXCROSS="https://github.com/hirosystems/docker-osxcross-rust/releases/download/MacOSX12.0.sdk/osxcross-d904031_MacOSX12.0.sdk.tar.zst"
+ARG TARGET=x86_64-apple-darwin
+ARG TARGET_CPU
+WORKDIR /src
+
+COPY . .
+
+RUN apt-get update && apt-get install -y clang zstd
+
+# Retrieve and install osxcross
+RUN wget -nc -O /tmp/osxcross.tar.zst ${OSXCROSS} \
+ && mkdir -p /opt/osxcross && tar -xaf /tmp/osxcross.tar.zst -C /opt/osxcross
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && . /opt/osxcross/env-macos-x86_64 \
+ ${TARGET_CPU:+RUSTFLAGS="$RUSTFLAGS $TARGET_CPU"} \
+ cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
+
diff --git a/build-scripts/Dockerfile.windows-x64 b/build-scripts/Dockerfile.windows-x64
new file mode 100644
index 00000000000..3265c05b5c4
--- /dev/null
+++ b/build-scripts/Dockerfile.windows-x64
@@ -0,0 +1,27 @@
+FROM rust:bullseye as build
+
+ARG STACKS_NODE_VERSION="No Version Info"
+ARG GIT_BRANCH='No Branch Info'
+ARG GIT_COMMIT='No Commit Info'
+ARG BUILD_DIR=/build
+ARG TARGET=x86_64-pc-windows-gnu
+ARG TARGET_CPU
+WORKDIR /src
+
+COPY . .
+
+RUN apt-get update && apt-get install -y git gcc-mingw-w64-x86-64
+
+# Run all the build steps in ramdisk in an attempt to speed things up
+RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
+ && cd ${BUILD_DIR} \
+ && rustup target add ${TARGET} \
+ && CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
+ CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
+ ${TARGET_CPU:+RUSTFLAGS="$RUSTFLAGS $TARGET_CPU"} \
+ cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
+ && mkdir -p /out \
+ && cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
+
+FROM scratch AS export-stage
+COPY --from=build /out/stacks-inspect.exe /out/blockstack-cli.exe /out/clarity-cli.exe /out/stacks-node.exe /
diff --git a/build-scripts/build-dist.sh b/build-scripts/build-dist.sh
new file mode 100755
index 00000000000..8be8f4f8a71
--- /dev/null
+++ b/build-scripts/build-dist.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set -e
+
+script_path="$(dirname "$0")"
+src_dir="$(dirname "$script_path")"
+cd "$src_dir"
+
+build_platform () {
+ echo "Building $1"
+ rm -rf dist/$1
+ DOCKER_BUILDKIT=1 docker build --progress=plain -o dist/$1 -f ./build-scripts/Dockerfile.$1 .
+}
+
+case $DIST_TARGET_FILTER in
+ (*[![:blank:]]*)
+ case $DIST_TARGET_FILTER in
+ linux-glibc-x64) build_platform linux-glibc-x64 ;;
+ linux-glibc-arm64) build_platform linux-glibc-arm64 ;;
+ linux-glibc-armv7) build_platform linux-glibc-armv7 ;;
+ linux-musl-x64) build_platform linux-musl-x64 ;;
+ linux-musl-arm64) build_platform linux-musl-arm64 ;;
+ linux-musl-armv7) build_platform linux-musl-armv7 ;;
+ windows-x64) build_platform windows-x64 ;;
+ macos-x64) build_platform macos-x64 ;;
+ macos-arm64) build_platform macos-arm64 ;;
+ *)
+ echo "Invalid dist target filter '$DIST_TARGET_FILTER'"
+ exit 1
+ ;;
+ esac
+ ;;
+ (*)
+ echo "Building distrubtions for all targets."
+ build_platform linux-glibc-x64
+ build_platform linux-glibc-arm64
+ build_platform linux-glibc-armv7
+ build_platform linux-musl-x64
+ build_platform linux-musl-arm64
+ build_platform linux-musl-armv7
+ build_platform windows-x64
+ build_platform macos-x64
+ build_platform macos-arm64
+ ;;
+esac
diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml
index 70cbcec5857..b080726636b 100644
--- a/clarity/Cargo.toml
+++ b/clarity/Cargo.toml
@@ -30,8 +30,7 @@ slog = { version = "2.5.2", features = [ "max_level_trace" ] }
stacks_common = { package = "stacks-common", path = "../stacks-common" }
rstest = "0.17.0"
rstest_reuse = "0.5.0"
-hashbrown = { workspace = true }
-mutants = "0.0.3"
+proptest = { workspace = true, optional = true }
[dependencies.serde_json]
version = "1.0"
@@ -47,13 +46,15 @@ features = ["std"]
[dev-dependencies]
assert-json-diff = "1.0.0"
-# a nightly rustc regression (35dbef235 2021-03-02) prevents criterion from compiling
-# but it isn't necessary for tests: only benchmarks. therefore, commenting out for now.
-# criterion = "0.3"
+clarity = { path = "./", features = ["testing"] }
+# This ensures that `stacks-common` is built using the `testing` feature
+# when we build this crate in dev/test. Note that the --features flag
+# doesn't need to be provideed then.
+stacks_common = { package = "stacks-common", path = "../stacks-common", features = ["testing"] }
[features]
default = []
developer-mode = []
slog_json = ["stacks_common/slog_json"]
-testing = []
-devtools = []
+testing = ["dep:proptest", "stacks_common/testing"]
+
diff --git a/clarity/src/libclarity.rs b/clarity/src/libclarity.rs
index daae7dcfd7d..860a3ab0647 100644
--- a/clarity/src/libclarity.rs
+++ b/clarity/src/libclarity.rs
@@ -41,6 +41,10 @@ pub extern crate rstest_reuse;
#[macro_use]
extern crate stacks_common;
+#[cfg(any(test, feature = "testing"))]
+#[macro_use]
+pub mod proptesting;
+
pub use stacks_common::{
codec, consts, impl_array_hexstring_fmt, impl_array_newtype, impl_byte_array_message_codec,
impl_byte_array_serde, types, util,
diff --git a/clarity/src/proptesting/callables.rs b/clarity/src/proptesting/callables.rs
new file mode 100644
index 00000000000..aa7df423a81
--- /dev/null
+++ b/clarity/src/proptesting/callables.rs
@@ -0,0 +1,126 @@
+// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation
+// Copyright (C) 2020 Stacks Open Internet Foundation
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+use proptest::prelude::*;
+use rand::distributions::uniform::SampleRange;
+use serde::de::value;
+
+use super::*;
+use crate::vm::callables::{DefineType, DefinedFunction, FunctionIdentifier};
+use crate::vm::database::{
+ DataMapMetadata, DataVariableMetadata, FungibleTokenMetadata, NonFungibleTokenMetadata,
+};
+use crate::vm::representations::TraitDefinition;
+use crate::vm::types::FunctionSignature;
+
+/// Returns a [`Strategy`] for randomly generating a [`FunctionIdentifier`] instance
+/// representing a user-defined function.
+pub fn function_identifier_user() -> impl Strategy {
+ (clarity_name(), clarity_name()).prop_map(|(name, context)| {
+ FunctionIdentifier::new_user_function(&context.to_string(), &name.to_string())
+ })
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`FunctionIdentifier`] instance
+/// representing a native function.
+pub fn function_identifier_native() -> impl Strategy {
+ (clarity_name()).prop_map(|name| FunctionIdentifier::new_native_function(&name.to_string()))
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`FunctionIdentifier`]
+/// instance representing a function of any kind, user-defined or native.
+pub fn function_identifier() -> impl Strategy {
+ prop_oneof![function_identifier_user(), function_identifier_native()]
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`DefineType`] variant.
+pub fn define_type() -> impl Strategy {
+ prop_oneof![
+ Just(DefineType::Public),
+ Just(DefineType::Private),
+ Just(DefineType::ReadOnly)
+ ]
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`DataVariableMetadata`]
+/// instance.
+pub fn data_variable_metadata() -> impl Strategy {
+ type_signature().prop_map(|value_type| DataVariableMetadata { value_type })
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`DataMapMetadata`] instance.
+pub fn data_map_metadata() -> impl Strategy {
+ (type_signature(), type_signature()).prop_map(|(key_type, value_type)| DataMapMetadata {
+ key_type,
+ value_type,
+ })
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`NonFungibleTokenMetadata`]
+/// instance.
+pub fn nft_metadata() -> impl Strategy {
+ type_signature().prop_map(|key_type| NonFungibleTokenMetadata { key_type })
+}
+
+/// Returns a [`Strategy`] for randomly generating a [`FungibleTokenMetadata`]
+/// instance.
+pub fn ft_metadata() -> impl Strategy {
+ any::