Skip to content

[Stacks 2.1] Support new "block 0" boot events #1476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
388b82a
chore: split up pox-2-rosetta tests
zone117x Nov 30, 2022
a56ac8c
chore: split up pox-2-rosetta test suites into smaller units
zone117x Nov 30, 2022
07b3be6
feat: new regtest standalone image with 2.1 node
zone117x Dec 1, 2022
f1086e9
chore: store postgres data in same volume
zone117x Dec 2, 2022
0237433
chore: add configurable heights for each epoch
zone117x Dec 5, 2022
871a818
feat: arg to toggle if docker image is bootstraps the chainstate
zone117x Dec 6, 2022
09f3f39
chore: block height adjustments
zone117x Dec 6, 2022
deb564e
chore: block heights that work with epoch 2.0 and 2.05 receipts
zone117x Dec 6, 2022
efb16be
chore: fix bash script error
zone117x Dec 6, 2022
28befb7
feat: store and forward boot events
zone117x Dec 6, 2022
69a7ba5
chore: allow pg server connections
zone117x Dec 6, 2022
27ed27f
chore: do not error when skipping bootstrap
zone117x Dec 6, 2022
8ae0df2
chore: update to latest stacks2.1 images
zone117x Dec 6, 2022
35bcaaa
Merge branch 'stacks-2.1' into feat/stacks-2.1-standalone
zone117x Dec 6, 2022
36d9cdd
chore: add epoch config for mocknet node
zone117x Dec 6, 2022
0096b7c
ci: attempt fix for host.docker.internal for tests using stacks mockn…
zone117x Dec 6, 2022
ab18798
ci: fix tokens and rosetta mocknet mode tests
zone117x Dec 6, 2022
36d3898
feat: finish ingesting "block 0" data once the first real block is re…
zone117x Dec 6, 2022
c025038
test: implement test suite to ensure "block-zero" is ingested correctly
zone117x Dec 7, 2022
5d76760
test: re-enable double-stacking test suite
zone117x Dec 7, 2022
bd5a771
ci: add workflow dispatch for standalone docker image build [skip ci]
zone117x Dec 8, 2022
f9e71d1
chore: bump to latest stacks-blockchain `next` branch
zone117x Dec 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ jobs:
strategy:
matrix:
suite: [
block-zero-handling,
faucet-stx,
pox-2-auto-unlock,
pox-2-btc-address-formats,
Expand Down
141 changes: 141 additions & 0 deletions .github/workflows/regtest-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Publish standalone regtest image

on:
workflow_dispatch:
inputs:
stacks_blockchain_commit:
description: 'stacks-blockchain git commit'
required: true
type: string

env:
STACKS_API_COMMIT: ${{ github.sha }}
STACKS_BLOCKCHAIN_COMMIT: ${{ inputs.stacks_blockchain_commit }}

jobs:
build-stacks-node:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache stacks-node
id: cache
uses: actions/cache@v3
with:
path: bin
key: cache-stacks-node-${{ env.STACKS_BLOCKCHAIN_COMMIT }}
- name: Install Rust - linux/amd64
if: steps.cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
- name: Install Rust - linux/arm64
if: steps.cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-unknown-linux-gnu
- name: Install compilation tooling
if: steps.cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross gcc-aarch64-linux-gnu
- name: Fetch Stacks node repo
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "$PWD"
mkdir stacks-blockchain-repo && cd stacks-blockchain-repo
git init
git remote add origin https://github.com/stacks-network/stacks-blockchain.git
git -c protocol.version=2 fetch --depth=1 origin $STACKS_BLOCKCHAIN_COMMIT
git reset --hard FETCH_HEAD
- name: Rust cache
if: steps.cache.outputs.cache-hit != 'true'
uses: Swatinem/rust-cache@v2
with:
workspaces: "stacks-blockchain-repo"
shared-key: rust-cache-stacks-node-${{ env.STACKS_BLOCKCHAIN_COMMIT }}
- name: Cargo fetch
if: steps.cache.outputs.cache-hit != 'true'
working-directory: stacks-blockchain-repo
run: |
cargo fetch --manifest-path testnet/stacks-node/Cargo.toml --target x86_64-unknown-linux-gnu --target aarch64-unknown-linux-gnu
- name: Build Stacks node
if: steps.cache.outputs.cache-hit != 'true'
working-directory: stacks-blockchain-repo
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar
run: |
cargo build --package stacks-node --bin stacks-node --release --target x86_64-unknown-linux-gnu --target aarch64-unknown-linux-gnu
mkdir -p ../bin/x86_64-unknown-linux-gnu ../bin/aarch64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/stacks-node ../bin/x86_64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/stacks-node ../bin/aarch64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
with:
name: stacks-node-bin
if-no-files-found: error
path: |
bin/*/stacks-node

build-push-docker:
needs: build-stacks-node
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: stacks-node-bin
path: docker/stacks-blockchain-binaries
- name: Process of downloaded artifacts
working-directory: docker/stacks-blockchain-binaries
run: |
ls -R
chmod +x x86_64-unknown-linux-gnu/stacks-node
chmod +x aarch64-unknown-linux-gnu/stacks-node
- name: Create tag labels
run: |
api_short=$(head -c 7 <<< "$STACKS_API_COMMIT")
blockchain_short=$(head -c 7 <<< "$STACKS_BLOCKCHAIN_COMMIT")
echo "GIT_SHORTS=${api_short}-${blockchain_short}" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: hirosystems/${{ github.event.repository.name }}-standalone-regtest
tags: |
type=raw,value=latest,enable=false
type=raw,value={{date 'YYYYMMDDHH'}}-${{ env.GIT_SHORTS }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
file: docker/standalone-regtest.Dockerfile
context: ./docker
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=hirosystems/${{ github.event.repository.name }}-standalone-regtest
cache-to: type=inline
build-args: |
STACKS_API_VERSION=${{ github.head_ref || github.ref_name }}
API_GIT_COMMIT=${{ env.STACKS_API_COMMIT }}
BLOCKCHAIN_GIT_COMMIT=${{ env.STACKS_BLOCKCHAIN_COMMIT }}
2 changes: 2 additions & 0 deletions docker/docker-compose.dev.stacks-blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ services:
volumes:
- ../stacks-blockchain/:/app/config
- ../stacks-blockchain/.chaindata:/tmp/stacks-blockchain-data
extra_hosts:
- "host.docker.internal:host-gateway" # fixes `host.docker.internal` on linux hosts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
stacks-blockchain:
image: "zone117x/stacks-api-e2e:stacks2.1-transition-930b652"
image: "zone117x/stacks-api-e2e:stacks2.1-transition-21295d3"
ports:
- "18443:18443" # bitcoin regtest JSON-RPC interface
- "18444:18444" # bitcoin regtest p2p
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.dev.stacks-krypton.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
stacks-blockchain:
image: "zone117x/stacks-api-e2e:stacks2.1-930b652"
image: "zone117x/stacks-api-e2e:stacks2.1-21295d3"
ports:
- "18443:18443" # bitcoin regtest JSON-RPC interface
- "18444:18444" # bitcoin regtest p2p
Expand Down
Loading