Skip to content
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

It has happened #439

Merged
merged 66 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4dcf997
it has happened
n8maninger Jul 31, 2024
cf64e9f
contracts,sqlite: migrate v1 databases, expose formation index on v2 …
n8maninger Aug 2, 2024
9b769df
docs: remove testnet specific docs
n8maninger Aug 2, 2024
6345507
docs: update cli flags
n8maninger Aug 2, 2024
ea0e77e
contracts: add debug logging for sector roots
n8maninger Aug 2, 2024
13f7c88
cmd: replace magic strings with consts
n8maninger Aug 2, 2024
22e2acd
docker: update wallet env variable
n8maninger Aug 2, 2024
b9a63e2
sqlite: make migration error messages clearer, fix foreign key check …
n8maninger Aug 2, 2024
8668ce9
contracts,sqlite: batch chain index element updates
n8maninger Aug 2, 2024
7e7f726
contracts: batch v2 contract element updates
n8maninger Aug 2, 2024
9d4c853
contracts: fix chain element delete
n8maninger Aug 2, 2024
a591b4b
deps: update coreutils
n8maninger Aug 2, 2024
018f6cb
sqlite: don't panic during rescan changes
n8maninger Aug 2, 2024
16e008a
fix expired v1 contract logging
n8maninger Aug 2, 2024
090bbf0
sqlite: ignore already rejected contracts
n8maninger Aug 2, 2024
0c43ebc
api: move /state/host to /state
n8maninger Aug 2, 2024
9bd49ad
cmd: delete siad databases
n8maninger Aug 2, 2024
07569fc
contracts: better logging for v2 proofs
n8maninger Aug 2, 2024
f68d97c
cmd: add network to node startup message
n8maninger Aug 2, 2024
210310f
cmd: fix cli flag docs
n8maninger Aug 2, 2024
f793596
index: subscribe to manager outside of goroutine
n8maninger Aug 2, 2024
53a0665
deps: tidy
n8maninger Aug 2, 2024
9578db8
sqlite, contracts: fix rejection, add test
n8maninger Aug 5, 2024
03c9458
contracts, sqlite: fix v2 renewals, only broadcast revisions for unre…
n8maninger Aug 5, 2024
cf80a00
contracts: improve v1 proof errors
n8maninger Aug 5, 2024
274b7f6
deps: update coreutils
n8maninger Aug 6, 2024
91c9319
deps: update coreutils again
n8maninger Aug 6, 2024
2f6c6b3
sqlite: remove debug log
n8maninger Aug 6, 2024
9088637
update core & coreutils
n8maninger Aug 7, 2024
ccb2acb
deps,api: update coreutils for new event types
n8maninger Aug 9, 2024
64c520e
deps: update coreutils
n8maninger Aug 9, 2024
180ff53
deps: update core and coreutils
n8maninger Aug 9, 2024
580945b
settings: support v2 announcements
n8maninger Aug 9, 2024
533aa2d
contracts: remove proof element batching, fix deep reorg updates
n8maninger Aug 13, 2024
4675648
testutil: run the syncer
n8maninger Aug 13, 2024
7a02190
contracts, rhp, testutil: change mine blocks helper to broadcast to s…
n8maninger Aug 14, 2024
4c34b2b
settings: add v2 auto announce test
n8maninger Aug 14, 2024
822818b
deps: update core and coreutils
n8maninger Aug 14, 2024
46072d9
testutil: change mine and sync to wait for sync between blocks
n8maninger Aug 14, 2024
ac2e120
contracts: batch chain and contract element updates
n8maninger Aug 14, 2024
4531ae4
index, sqlite: reset consensus on sync error
n8maninger Aug 14, 2024
3626d76
ci: use common publish workflow
n8maninger Aug 15, 2024
60843fe
ci: add its-happening to publish workflow
n8maninger Aug 15, 2024
8d9adba
ui: v0.46.0
ChrisSchinnerl Aug 15, 2024
891b90e
settings: use config option for netaddress validation
n8maninger Aug 17, 2024
1fe281b
settings, testutil: add missing netaddress validation checks
n8maninger Aug 17, 2024
16bf955
settings: fix validation logic
n8maninger Aug 17, 2024
aaf9563
sqlite, metrics: split mature and immature wallet metrics
n8maninger Aug 19, 2024
9e41e09
docs: update readme
n8maninger Aug 19, 2024
b3e1d2d
build: update version
n8maninger Aug 19, 2024
9fbf61f
settings: don't log announcement warning when validate is disabled
n8maninger Aug 20, 2024
b865cce
settings: override default settings
n8maninger Aug 20, 2024
a9fa812
settings: fix announce test
n8maninger Aug 20, 2024
2528157
contracts: reduce blocks for test
n8maninger Aug 20, 2024
b0c1391
contracts: mine to void address to avoid auto-announce
n8maninger Aug 20, 2024
be66f8b
cmd,testutil: close syncer after starting go routine to reduce race c…
n8maninger Aug 20, 2024
ac1b016
sqlite: reset chain state for immature balance metric
n8maninger Aug 20, 2024
5208f55
rhp2: disable rpc after require height
n8maninger Aug 20, 2024
5004834
testutil: set initial host settings
n8maninger Aug 20, 2024
ed403de
rhp/v2: disable form and renew RPC after allow height, disable rhp2 a…
n8maninger Aug 20, 2024
4511b22
rhp/v3: disable renew RPC after allow height, disable rhp3 after requ…
n8maninger Aug 20, 2024
9f2899f
rhp/v2: ignore windows error during test
n8maninger Aug 20, 2024
86e1d8d
api: fix TPoolResp marshalling
n8maninger Aug 28, 2024
e4ef964
contracts,sqlite: remove registry revenue
n8maninger Sep 1, 2024
a84fec4
deps: update all
n8maninger Sep 1, 2024
1462133
api,contracts,settings: update wallet usage
n8maninger Sep 1, 2024
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
256 changes: 11 additions & 245 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,256 +6,22 @@ on:
push:
branches:
- master
- its-happening
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-**'

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Test
uses: ./.github/actions/test
docker:
runs-on: ubuntu-latest
needs: [ test ]
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
name: generate tags
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=sha,prefix=
type=semver,pattern={{version}}
- uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-linux:
runs-on: ubuntu-latest
needs: [ test ]
strategy:
matrix:
go-arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup
run: |
sudo apt update
go generate ./...
if [ ${{ matrix.go-arch }} == "arm64" ]; then
sudo apt install -y gcc-aarch64-linux-gnu
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
fi
- name: Build ${{ matrix.go-arch }}
env:
CGO_ENABLED: 1
GOOS: linux
GOARCH: ${{ matrix.go-arch }}
run: |
mkdir -p release
ZIP_OUTPUT=release/hostd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/hostd
cp README.md LICENSE bin/
zip -qj $ZIP_OUTPUT bin/*
- uses: actions/upload-artifact@v4
with:
name: hostd_linux_${{ matrix.go-arch }}
path: release/*
build-mac:
runs-on: macos-latest
needs: [ test ]
strategy:
matrix:
go-arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup
env:
APPLE_CERT_ID: ${{ secrets.APPLE_CERT_ID }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_KEY_B64: ${{ secrets.APPLE_KEY_B64 }}
APPLE_CERT_B64: ${{ secrets.APPLE_CERT_B64 }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
# extract apple cert
APPLE_CERT_PATH=$RUNNER_TEMP/apple_cert.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo -n "$APPLE_CERT_B64" | base64 --decode --output $APPLE_CERT_PATH

# extract apple key
mkdir -p ~/private_keys
APPLE_API_KEY_PATH=~/private_keys/AuthKey_$APPLE_API_KEY.p8
echo -n "$APPLE_KEY_B64" | base64 --decode --output $APPLE_API_KEY_PATH

# create temp keychain
security create-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security default-keychain -s $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH

# import keychain
security import $APPLE_CERT_PATH -P $APPLE_CERT_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security find-identity -v $KEYCHAIN_PATH -p codesigning
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH

# generate
go generate ./...

# resync system clock https://github.com/actions/runner/issues/2996#issuecomment-1833103110
sudo sntp -sS time.windows.com
- name: Build ${{ matrix.go-arch }}
env:
APPLE_CERT_ID: ${{ secrets.APPLE_CERT_ID }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_KEY_B64: ${{ secrets.APPLE_KEY_B64 }}
APPLE_CERT_B64: ${{ secrets.APPLE_CERT_B64 }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
CGO_ENABLED: 1
GOOS: darwin
GOARCH: ${{ matrix.go-arch }}
run: |
ZIP_OUTPUT=release/hostd_${GOOS}_${GOARCH}.zip
mkdir -p release
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/hostd
cp README.md LICENSE bin/
/usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/hostd
ditto -ck bin $ZIP_OUTPUT
xcrun notarytool submit -k ~/private_keys/AuthKey_$APPLE_API_KEY.p8 -d $APPLE_API_KEY -i $APPLE_API_ISSUER --wait --timeout 10m $ZIP_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: hostd_darwin_${{ matrix.go-arch }}
path: release/*
build-windows:
runs-on: windows-latest
needs: [ test ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup
shell: bash
run: |
dotnet tool install --global AzureSignTool
go generate ./...
- name: Build amd64
env:
CGO_ENABLED: 1
GOOS: windows
GOARCH: amd64
shell: bash
run: |
mkdir -p release
ZIP_OUTPUT=release/hostd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/hostd
azuresigntool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v bin/hostd.exe
cp README.md LICENSE bin/
7z a $ZIP_OUTPUT ./bin/*
- uses: actions/upload-artifact@v4
with:
name: hostd_windows_amd64
path: release/*
combine-release-assets:
runs-on: ubuntu-latest
needs: [ build-linux, build-mac, build-windows ]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: hostd

dispatch-homebrew: # only runs on full releases
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
needs: [ build-mac ]
runs-on: ubuntu-latest
steps:
- name: Extract Tag Name
id: get_tag
run: echo "::set-output name=tag_name::${GITHUB_REF#refs/tags/}"

- name: Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT_REPOSITORY_DISPATCH }}
repository: siafoundation/homebrew-sia
event-type: release-tagged
client-payload: >
{
"description": "hostd: The Next-Gen Sia Host",
"tag": "${{ steps.get_tag.outputs.tag_name }}",
"project": "hostd",
"workflow_id": "${{ github.run_id }}"
}
dispatch-linux: # always runs
needs: [ build-linux ]
runs-on: ubuntu-latest
steps:
- name: Build Dispatch Payload
id: get_payload
uses: actions/github-script@v7
with:
script: |
const isRelease = context.ref.startsWith('refs/tags/v'),
isBeta = isRelease && context.ref.includes('-beta'),
tag = isRelease ? context.ref.replace('refs/tags/', '') : 'master';

let component = 'nightly';
if (isBeta) {
component = 'beta';
} else if (isRelease) {
component = 'main';
}

return {
description: "hostd: The Next-Gen Sia Host",
tag: tag,
project: "hostd",
workflow_id: context.runId,
component: component
};

- name: Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT_REPOSITORY_DISPATCH }}
repository: siafoundation/linux
event-type: release-tagged
client-payload: ${{ steps.get_payload.outputs.result }}
publish:
uses: SiaFoundation/workflows/.github/workflows/go-publish.yml@master
secrets: inherit
with:
linux-build-args: -tags=timetzdata -trimpath -a -ldflags '-s -w -linkmode external -extldflags "-static"'
windows-build-args: -tags=timetzdata -trimpath -a -ldflags '-s -w -linkmode external -extldflags "-static"'
macos-build-args: -tags=timetzdata -trimpath -a -ldflags '-s -w'
cgo-enabled: 1
project: hostd
Loading
Loading