Skip to content

Commit

Permalink
Merge pull request #1 from jbencin/multisig-order-independence
Browse files Browse the repository at this point in the history
Multisig order independence
  • Loading branch information
fess-v authored Mar 26, 2024
2 parents bd6df03 + 8cdd2dd commit 857be7f
Show file tree
Hide file tree
Showing 433 changed files with 64,773 additions and 22,295 deletions.
9 changes: 9 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
stacks-node = "run --package stacks-node --"
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"

# 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]
#linker = "/usr/bin/clang"
#rustflags = ["-Clink-arg=-fuse-ld=lld", "-Clink-arg=-Wl,--no-rosegment"]

4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
Pull requests are ideal for making small changes to this project. However, they are NOT an appropriate venue to introducing non-trivial or breaking changes to the codebase.
For introducing non-trivial or breaking changes to the codebase, please follow the SIP (Stacks Improvement Proposal) process documented here:
https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-000-stacks-improvement-proposal-process.md.
https://github.com/stacksgov/sips/blob/main/sips/sip-000/sip-000-stacks-improvement-proposal-process.md.
-->

### Description

### Applicable issues

- fixes #

### Additional info (benefits, drawbacks, caveats)

### Checklist

- [ ] Test coverage for new or modified code paths
- [ ] Changelog is updated
- [ ] Required documentation changes (e.g., `docs/rpc/openapi.yaml` and `rpc-endpoints.md` for v2 endpoints, `event-dispatcher.md` for new events)
Expand Down
18 changes: 11 additions & 7 deletions .github/actions/dockerfiles/Dockerfile.alpine-binary
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
ARG REPO=stacks-network/stacks-blockchain
ARG REPO

RUN case ${TARGETARCH} in \
"amd64") BIN_ARCH=linux-musl-x64 ;; \
"arm64") BIN_ARCH=linux-musl-arm64 ;; \
"*") exit 1 ;; \
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 ;; \
esac \
&& 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 "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 \
&& unzip ${BIN_ARCH}.zip -d /out

FROM --platform=${TARGETPLATFORM} alpine
Expand Down
18 changes: 11 additions & 7 deletions .github/actions/dockerfiles/Dockerfile.debian-binary
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
ARG REPO=stacks-network/stacks-blockchain
ARG REPO

RUN case ${TARGETARCH} in \
"amd64") BIN_ARCH=linux-musl-x64 ;; \
"arm64") BIN_ARCH=linux-musl-arm64 ;; \
"*") exit 1 ;; \
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 ;; \
esac \
&& 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 "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 \
&& unzip ${BIN_ARCH}.zip -d /out

FROM --platform=${TARGETPLATFORM} debian:bookworm
Expand Down
11 changes: 7 additions & 4 deletions .github/actions/dockerfiles/Dockerfile.debian-source
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
FROM rust:bullseye as build
FROM rust:bookworm 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 . .

RUN apt-get update && apt-get install -y git libclang-dev

# Run all the build steps in ramdisk in an attempt to speed things up
RUN target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
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

FROM --platform=${TARGETPLATFORM} debian:bookworm
COPY --from=build /out/stacks-node /bin/
COPY --from=build /out/stacks-node /out/stacks-signer /bin/
CMD ["stacks-node", "mainnet"]
56 changes: 56 additions & 0 deletions .github/workflows/atlas-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Github workflow to run atlas tests

name: Tests::Atlas

on:
workflow_call:

## env vars are transferred to composite action steps
env:
BITCOIND_TEST: 1
RUST_BACKTRACE: full
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 15
TEST_TIMEOUT: 30

concurrency:
group: atlas-tests-${{ 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:
# Atlas integration tests with code coverage
atlas-tests:
name: Atlas Test
runs-on: ubuntu-latest
strategy:
## Continue with the test matrix even if we've had a failure
fail-fast: false
## Run a maximum of 2 concurrent tests from the test matrix
max-parallel: 2
matrix:
test-name:
- tests::neon_integrations::atlas_integration_test
- tests::neon_integrations::atlas_stress_integration_test
steps:
## Setup test environment
- name: Setup Test Environment
id: setup_tests
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
id: run_tests
timeout-minutes: ${{ fromJSON(env.TEST_TIMEOUT) }}
uses: stacks-network/actions/stacks-core/run-tests@main
with:
test-name: ${{ matrix.test-name }}

## Create and upload code coverage file
- name: Code Coverage
id: codecov
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}
35 changes: 0 additions & 35 deletions .github/workflows/audit.yml

This file was deleted.

Loading

0 comments on commit 857be7f

Please sign in to comment.