Skip to content

fix: enable empty blocks in single-node mode to prevent broadcast_tx_… #221

fix: enable empty blocks in single-node mode to prevent broadcast_tx_…

fix: enable empty blocks in single-node mode to prevent broadcast_tx_… #221

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags-ignore: ['v*']
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: '1.24'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.1.6
install-mode: binary
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: '1.24'
cache: true
- name: Run tests
run: go test ./... -v -count=1 -race
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: '1.24'
cache: true
- name: Build binary
run: go build -o bin/amid ./cmd/amid
docker:
name: Docker Build
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build Docker images
env:
POSTGRES_PASSWORD: ci_build_only
run: |
docker compose -f deploy/docker-compose.yml build
byzantine:
name: Byzantine Fault Tests
runs-on: ubuntu-latest
needs: [build]
env:
POSTGRES_PASSWORD: ci_test_password
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: '1.24'
cache: true
- name: Initialize testnet
run: bash deploy/init-testnet.sh
- name: Start 4-validator network
run: |
docker compose -f deploy/docker-compose.yml up -d --build
echo "Waiting for network to stabilize..."
# Poll REST API health endpoints until all 4 ABCI nodes are ready
for i in $(seq 1 60); do
ALL_UP=true
for port in 8080 8081 8082 8083; do
if ! curl -sf "http://localhost:${port}/health" > /dev/null 2>&1; then
ALL_UP=false
break
fi
done
if [ "$ALL_UP" = true ]; then
echo "All 4 ABCI nodes healthy"
break
fi
echo "Waiting for nodes... (attempt $i/60)"
sleep 5
done
if [ "$ALL_UP" != true ]; then
echo "Nodes failed to start in time"
docker compose -f deploy/docker-compose.yml logs --tail=50
exit 1
fi
- name: Run Byzantine fault tests
run: go test ./test/byzantine/... -v -count=1 -timeout 120s -tags=byzantine
- name: Stop network
if: always()
run: docker compose -f deploy/docker-compose.yml down -v --remove-orphans
sdk-test:
name: Python SDK Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- name: Install SDK and test
run: |
cd sdk/python
pip install -e ".[dev]"
pytest -v