Skip to content
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
1879119
Run one block and exit
akup Feb 25, 2026
f71fb96
Add docker-build workflow (from test-782-783)
akup Feb 25, 2026
726250f
replace binary
akup Feb 25, 2026
3a8dbcd
Fixing go.mod
akup Feb 25, 2026
c68b287
Build with custom cosmos sdk
akup Feb 25, 2026
fabde5b
chore(upgrade): scaffold v0.2.13 handler and governance artifacts
gmorgachev May 3, 2026
562d4c9
feat(api): default node manager gRPC port to 9400
gmorgachev May 3, 2026
784e240
fix(inference): reset consecutive invalid counter on reactivation
gmorgachev May 3, 2026
8750cd9
feat(inference): move devshard max_nonce into DevshardEscrowParams
gmorgachev May 3, 2026
5b54ef3
Fix: non-eligible models confirmation poc
gmorgachev May 4, 2026
f90f9e7
refactoring
gmorgachev May 4, 2026
c4e8edd
corner case
gmorgachev May 4, 2026
fc3c8d3
fix(upgrade): backfill MsgRespondDealerComplaints authz grants in v0.…
gmorgachev May 4, 2026
28614f7
chore(upgrade): register v0.2.13 upgrade handler
gmorgachev May 4, 2026
e59a07e
fix(poc): skip confirmation penalties without evidence
gmorgachev May 4, 2026
954a797
Devshard storage: Postgres backend + epoch pruning (#1145)
gmorgachev May 6, 2026
109eba7
Desctiption
gmorgachev May 6, 2026
80c0902
refactor(inference): reuse confirmation weight coefficients
gmorgachev May 6, 2026
4b2cd6a
fix(upgrade): skip confirmation PoC for the rest of v0.2.13 upgrade e…
gmorgachev May 6, 2026
347d947
fix(test): assert last-tick partition survives prune, not latestEpoch
gmorgachev May 6, 2026
f85f991
fix(api): avoid blocking startup on devshard migration
gmorgachev May 6, 2026
bd4b0b4
Minor fixes
gmorgachev May 6, 2026
b27618d
Add ldflgs back
gmorgachev May 6, 2026
b3accc9
Snapshot for devshards (#1149)
gmorgachev May 6, 2026
975647c
recover duration
gmorgachev May 6, 2026
f25426e
verions on conflicts
gmorgachev May 6, 2026
048535a
check before create escrow
gmorgachev May 7, 2026
b2a6714
stats
gmorgachev May 7, 2026
e2e319f
Set version in CICD
gmorgachev May 7, 2026
cc86a87
Simplify
gmorgachev May 7, 2026
a5dcfea
Fix: wasm permission
gmorgachev May 7, 2026
dafd523
bridge setup in handler (#1151)
gmorgachev May 7, 2026
fa145c1
Fix: devshard inference invalidation (#1147)
gmorgachev May 8, 2026
0bb5478
Fetch validation threshold (#1158)
gmorgachev May 10, 2026
1244cdc
remove seed reveal and add temporary payload pruning
akup May 12, 2026
a374415
Minor fixes, fix failing unit test
patimen May 12, 2026
835155f
Seed reveal removal and full cleanup inferences from state and RAM
akup May 13, 2026
eea974d
Merge branch 'gm/microrelease' into akuprin/no-seed-reveal
akup May 13, 2026
5ec68d0
Weight Scaling (#1163)
gmorgachev May 13, 2026
ff1226f
Desctiption
gmorgachev May 13, 2026
cc9e263
fix: add query gas limit (#1161)
GLiberman May 13, 2026
3a91a18
Reduce guardians weight and adjust qourum
gmorgachev May 14, 2026
f2559ba
Cleaning
akup May 14, 2026
aa413e1
Change quorum only
gmorgachev May 14, 2026
c1bfd56
bounty distribution for 0.2.13 (#1168)
mtvnastya May 14, 2026
77f2a06
Increase timeout
gmorgachev May 14, 2026
26e9a55
Add binary upgrade
gmorgachev May 14, 2026
70d4c8a
fix(deploy): remove invalid wasm query gas setting
gmorgachev May 14, 2026
b0fd08e
Max model length minimax
gmorgachev May 14, 2026
da96a6b
Update upgrades.go
mtvnastya May 15, 2026
2c49824
Context length
gmorgachev May 15, 2026
b0c2eab
Fix lost test
gmorgachev May 15, 2026
771a2fb
Geo fix in proxy (#1183)
gmorgachev May 18, 2026
557867b
Restore doc
akup May 19, 2026
01dfd41
Cleaner and more secure code
akup May 19, 2026
6155671
minor fixes
akup May 19, 2026
57ac9f8
Preserved Guardians (#1179)
gmorgachev May 20, 2026
036e22c
Add devshard request availability gate (#1210)
gmorgachev May 20, 2026
8ac50af
During renaming redundant code appeared, fix
akup May 20, 2026
1e24d1c
feat(upgrade): allow more addresses to create devshards
gmorgachev May 20, 2026
94a96b9
New devshard binary
gmorgachev May 20, 2026
0d32892
Governance parameters wasn't used.
akup May 20, 2026
4956b35
Remove useV2StateRootComposition that was used during development
akup May 20, 2026
5350476
Fixed failed test that used len(sm.Inferences) but they are cleared
akup May 20, 2026
6da7e9c
Tests fixes, that used sm.Inferences, that now are drained
akup May 20, 2026
c716df2
increment minimax bootstrap
gmorgachev May 20, 2026
3f0c34f
Fix
gmorgachev May 20, 2026
1529fbc
Merge pull request #1208 from a-kuprin/akuprin/no-seed-reveal
a-kuprin May 20, 2026
f015fae
Merge branch 'gm/microrelease' into devshard-0.2.13-v2
akup May 23, 2026
611186b
Merge pull request #1236 from a-kuprin/ak/0.2.13-merge-to-devshard
a-kuprin May 23, 2026
1836e90
`devshard` fix(devshardctl): drain upstream SSE for devshard_meta aft…
a-kuprin May 30, 2026
59cc8a0
`devshard` Finish gossip on missed diff (#1238)
a-kuprin May 30, 2026
2e45b94
Lock use optimization
akup May 21, 2026
b4336bf
feat(devshard): runtime config via dapi long-poll; lean Testermint e2e
akup May 23, 2026
1d50326
Prune devshard database only when epoch change.
akup May 23, 2026
51310be
Fix tests timings
akup May 23, 2026
82027f0
fix(dapi): atomic runtime config snapshots and safe epoch prune
akup May 26, 2026
e9cdb4d
chore(proto): drop hand-edited DevshardEscrowParams generated comments
akup May 26, 2026
1f78358
fix(dapi): run runtime publish callbacks outside runtimePublishMu
akup May 26, 2026
f6f8320
Merge pull request #1234 from a-kuprin/ak/devshard-0.2.13-optimizations
a-kuprin May 30, 2026
ad5f68c
feat(devshard): enforce max_nonce on hosts before settlement fails
akup May 26, 2026
9f8956b
Making versions naming strict
akup May 26, 2026
9d7a0b0
feat(devshard): route session config through dapi runtime snapshot
akup May 27, 2026
42cb423
Prepared plan
akup May 26, 2026
d86e214
feat(devshard): add forward-only session storage schema migrations
akup May 27, 2026
ea0f393
fix(devshard): select storage backend at boot to prevent reboot fork
akup May 27, 2026
2bb9726
fix(ci,devshard,chain): CI ripgrep, single nodemanager proto, migrati…
akup May 28, 2026
6eee4c2
feat(devshardd): chain-poll runtime config fallback when dapi lacks G…
akup May 28, 2026
750c897
Minor fixes, cleaner code
akup May 28, 2026
f100c21
Minor fixes
akup May 28, 2026
f3a12a7
fix(devshard): fail boot on .pg-bound without PGHOST; WAL on SQLite m…
akup May 29, 2026
7dcf4ae
fix(devshardctl): pass cancelFlag in proxy test after v2 rebase merge
akup May 30, 2026
1160fa0
Merge pull request #1258 from a-kuprin/ak/devshard-0.2.13-optimizations2
a-kuprin May 31, 2026
0dcfb90
Implement dapi & devshard observability (#1046)
qdanik May 29, 2026
9bb4556
Merge pull request #1288 from a-kuprin/feat/observability
a-kuprin Jun 1, 2026
da4cb4e
ci: register GitHub Actions workflows on fork
akup Jun 1, 2026
6f7144f
Merge branch 'main' of https://github.com/a-kuprin/gonka into main
akup Jun 1, 2026
694c534
fix(testermint,devshardctl): join stack up -d, fail-fast 501/503, gov…
akup Jun 2, 2026
cd6f7b4
feat(devshard): stamp protocol v2 at build and improve versiond overr…
akup Jun 3, 2026
8b747f0
feat(testermint): Apple Silicon Docker platform and cluster harness h…
akup Jun 3, 2026
efde007
feat(devshard): persist validation observability and align parallel T…
akup Jun 3, 2026
87d92c3
Merge branch 'main' of https://github.com/gonka-ai/gonka
akup Jun 3, 2026
7f7869c
Merge branch 'main' into devshard-0.2.13-v2
akup Jun 3, 2026
00e8de8
Fix after merge
akup Jun 3, 2026
a270b0b
Merge pull request #1298 from a-kuprin/devshard-0.2.13-v2-to-main
a-kuprin Jun 3, 2026
9662de6
Devshard 0.2.13 v2 - inference observability after pruning and e2e fi…
a-kuprin Jun 4, 2026
6aa25d6
Merging gateweay
akup Jun 6, 2026
e8a6fff
desciption
gmorgachev Jun 6, 2026
58c7d6e
Moved new migrations to scaffolded v0_2_14 upgrade,
akup Jun 6, 2026
da8370d
Fxing inferenced backward-compatibility
akup Jun 6, 2026
caf6917
Fixing test after InferenceClearGraceSeconds update
akup Jun 6, 2026
9922caf
Fix ignite regen
akup Jun 6, 2026
331c751
Merge pull request #1313 from a-kuprin/devshard-0.2.13-v2-gateway
a-kuprin Jun 6, 2026
77c2640
Rebase devshard-0.2.13-v2-gateway onto upstream/main
akup Jun 6, 2026
7773d3b
Merge pull request #1315 from a-kuprin/devshard-0.2.13-v2-gateway
a-kuprin Jun 6, 2026
e3693c3
Backward compatibility settlement json, fix in tests
akup Jun 6, 2026
f8f7f5f
Merge pull request #1317 from a-kuprin/devshard-0.2.13-v2-gateway
a-kuprin Jun 6, 2026
491e500
Fix in-test devshardd version
akup Jun 7, 2026
781c523
Fix flacky test.
akup Jun 7, 2026
29edf76
Update proxy/nginx.unified.conf.template
a-kuprin Jun 8, 2026
a35139e
Update proxy/nginx.unified.conf.template
a-kuprin Jun 8, 2026
1e3f91e
Secure observability UI proxying with Jaeger basic auth and opt-in de…
akup Jun 8, 2026
1e73426
Merge pull request #1320 from a-kuprin/devshard-0.2.13-v2-obs-protection
a-kuprin Jun 8, 2026
9df75e6
CONFIG_instrumentation__prometheus set by env var
akup Jun 8, 2026
78991b6
inference timeout
gmorgachev Jun 9, 2026
0180623
Move devshard inference sealing into deterministic state-machine (#1328)
a-kuprin Jun 10, 2026
8b9e0fe
Fixing flaky test
akup Jun 10, 2026
a3cb052
Cleanup, as gateway already has more compex solution, and there was d…
akup Jun 10, 2026
1d180f9
Quote in entrypoint.sh that broked start
akup Jun 10, 2026
7af5384
Using min confirmedAt instead of max (debugging) (#1330)
a-kuprin Jun 11, 2026
09d7f0c
Remove ,string from the two uint32 grace tags
akup Jun 12, 2026
aa17f7a
AutoSealEveryNNonces is also passed as governance parameter.
akup Jun 12, 2026
84a2783
Fixing flaky tests
akup Jun 12, 2026
cd1172d
NodeDisableInferenceTests adjust inference window
akup Jun 12, 2026
77220ba
Add devshardctl, devshardd binaries to gitignore
akup Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
143 changes: 143 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Build and push Docker images for decentralized-api and inference-chain.
# Mirrors the pattern from dev/hacked/.github/workflows/docker-build.yml (subset of targets).
name: Build Docker (decentralized-api & inference-chain)

on:
workflow_dispatch:
inputs:
build_target:
description: 'What to build'
required: true
type: choice
options:
- decentralized-api
- inference-chain
- both
version_tag:
description: 'Version tag (leave empty for latest)'
required: false
type: string
default: 'latest'
push_to_registry:
description: 'Push to registry'
required: true
type: boolean
default: true

env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ${{ github.repository_owner }}

jobs:
build-decentralized-api:
if: ${{ github.event.inputs.build_target == 'decentralized-api' || github.event.inputs.build_target == 'both' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
if: ${{ github.event.inputs.push_to_registry == 'true' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/decentralized-api
tags: |
type=raw,value=${{ github.event.inputs.version_tag || 'latest' }}
type=sha,prefix=
type=ref,event=branch

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./decentralized-api/Dockerfile
push: ${{ github.event.inputs.push_to_registry == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GOOS=linux
GOARCH=amd64

build-inference-chain:
if: ${{ github.event.inputs.build_target == 'inference-chain' || github.event.inputs.build_target == 'both' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Container Registry
if: ${{ github.event.inputs.push_to_registry == 'true' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/gonka-node-test
tags: |
type=raw,value=${{ github.event.inputs.version_tag || 'latest' }}
type=sha,prefix=
type=ref,event=branch

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./inference-chain/Dockerfile
push: ${{ github.event.inputs.push_to_registry == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GOOS=linux
GOARCH=amd64

summary:
needs: [build-decentralized-api, build-inference-chain]
if: always()
runs-on: ubuntu-latest
steps:
- name: Build Summary
run: |
echo "## Docker Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Build Target:** ${{ github.event.inputs.build_target }}" >> $GITHUB_STEP_SUMMARY
echo "**Version Tag:** ${{ github.event.inputs.version_tag || 'latest' }}" >> $GITHUB_STEP_SUMMARY
echo "**Pushed to Registry:** ${{ github.event.inputs.push_to_registry }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Built Images:" >> $GITHUB_STEP_SUMMARY
if [ "${{ github.event.inputs.build_target }}" == "decentralized-api" ] || [ "${{ github.event.inputs.build_target }}" == "both" ]; then
echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/decentralized-api:${{ github.event.inputs.version_tag || 'latest' }}\`" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ github.event.inputs.build_target }}" == "inference-chain" ] || [ "${{ github.event.inputs.build_target }}" == "both" ]; then
echo "- \`${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/inferenced:${{ github.event.inputs.version_tag || 'latest' }}\`" >> $GITHUB_STEP_SUMMARY
fi
21 changes: 18 additions & 3 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,16 @@ jobs:
- name: Make Docker Images
env:
GENESIS_OVERRIDES_FILE: "inference-chain/test_genesis_overrides.json"
DEVSHARD_VERSION: "v0.2.11"
USE_REGISTRY_CACHE: "1"
run: |
make build-docker
make devshardd-build
echo "=== devshard version (make DEVSHARD_VERSION / build/devshard-version) ==="
make -s print-devshard-version
cat build/devshard-version
echo "=== devshard protocol version (DEVSHARD_PROTOCOL_VERSION / build/devshard-protocol-version) ==="
make -s print-devshard-protocol-version
cat build/devshard-protocol-version
echo "=== Images immediately after build ==="
docker images | head -20

Expand Down Expand Up @@ -195,7 +200,10 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: devshardd-host-binary
path: build/devshardd
path: |
build/devshardd
build/devshard-version
build/devshard-protocol-version
retention-days: 1

- name: Make Upgrade Build
Expand Down Expand Up @@ -261,6 +269,9 @@ jobs:
- name: Prepare devshardd Host Binary
run: |
chmod +x build/devshardd
echo "=== devshard version stamp (for Testermint) ==="
cat build/devshard-version 2>/dev/null || echo "(missing build/devshard-version)"
cat build/devshard-protocol-version 2>/dev/null || echo "(missing build/devshard-protocol-version)"

- name: Install Make
run: |
Expand Down Expand Up @@ -294,17 +305,21 @@ jobs:
if: ${{ inputs.use_matrix && inputs.test_command == 'run-tests' }}
run: |
echo "Running test group: ${{ matrix.test_group }}"
echo "devshard version stamp: $(cat build/devshard-version 2>/dev/null || echo missing)"
sudo make run-tests TESTS="${{ matrix.test_group }}"

- name: Run Tests (Matrix - Sanity)
if: ${{ inputs.use_matrix && inputs.test_command == 'run-sanity' }}
run: |
echo "Running sanity test group: ${{ matrix.test_group }}"
echo "devshard version stamp: $(cat build/devshard-version 2>/dev/null || echo missing)"
sudo make run-sanity TESTS="${{ matrix.test_group }}"

- name: Run Tests (Non-Matrix)
if: ${{ !inputs.use_matrix }}
run: sudo make ${{ inputs.test_command }}
run: |
echo "devshard version stamp: $(cat build/devshard-version 2>/dev/null || echo missing)"
sudo make ${{ inputs.test_command }}
- name: Archive Test Results XML
if: always()
uses: actions/upload-artifact@v4
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ on:
- main

jobs:
check-storage-ddl:
# Pinned runner because the ripgrep apt version below only exists in the
# 22.04 (jammy) package archive. Bumping the runner requires bumping the
# pinned ripgrep version in lockstep.
runs-on: ubuntu-22.04
name: Storage schema DDL guard
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install ripgrep
# Pin the package version so the DDL guard runs against a known
# ripgrep build (reproducible CI). Update both pins together.
run: sudo apt-get update && sudo apt-get install -y ripgrep=13.0.0-2

- name: Check storage DDL placement
run: bash scripts/check-storage-ddl.sh

build-and-test:
runs-on: ubuntu-latest
name: Build and Test chain
Expand Down Expand Up @@ -194,7 +212,7 @@ jobs:
reporter: java-junit

build-and-test-devshard:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Build and Test Devshard
permissions:
contents: read
Expand Down Expand Up @@ -223,6 +241,10 @@ jobs:
- name: Install dependencies
run: go mod download

- name: Install ripgrep
# Pin the package version for reproducible CI; keep in sync with runner image.
run: sudo apt-get update && sudo apt-get install -y ripgrep=13.0.0-2

- name: Build
run: go build ./...

Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
vue/node_modules
vue/dist
/build/
release/
.idea/
.vscode/
Expand All @@ -18,6 +19,7 @@ decentralized-api/responses/
inference-chain/build/
inference-chain/dist/
/decentralized-api/decentralized-api
/decentralized-api/devshardd
chain-venv/
.inference/
prod-genesis/
Expand All @@ -44,8 +46,11 @@ run-parallel-tests/
**/target/
/tmp
.worklog
.metals
actionlint

# Generated proto artifacts (buf output in wrong location)
inference-chain/proto/github.com/
inference-chain/proto/api/
inference-chain/proto/**/module/*.pb.go
inference-chain/.docker-context
49 changes: 35 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
.PHONY: release decentralized-api-release inference-chain-release tmkms-release proxy-release proxy-ssl-release bridge-release versiond-release check-docker build-testermint run-blockchain-tests test-blockchain local-build api-local-build node-local-build api-test node-test mock-server-build-docker proxy-build-docker proxy-ssl-build-docker bridge-build-docker run-bls-tests devshardctl-build devshardd-build versiond-build-docker testapp-server-build-docker
.PHONY: release decentralized-api-release inference-chain-release tmkms-release proxy-release proxy-ssl-release bridge-release versiond-release check-docker build-testermint run-blockchain-tests test-blockchain local-build api-local-build node-local-build api-test node-test mock-server-build-docker proxy-build-docker proxy-ssl-build-docker bridge-build-docker run-bls-tests devshardctl-build devshardd-build print-devshard-version print-devshard-protocol-version versiond-build-docker testapp-server-build-docker

include scripts/blst-portable.mk

VERSION ?= $(shell git describe --always)
# devshardd link stamp; Testermint VERSIOND_FORCE follows this via build/devshard-version or `make print-devshard-version`.
DEVSHARD_VERSION ?= dev
# State-root / settlement protocol tag (not versiond runtime name). See devshard/docs/protocol-version.md.
DEVSHARD_PROTOCOL_VERSION ?= v2

print-devshard-version:
@echo $(DEVSHARD_VERSION)

print-devshard-protocol-version:
@echo $(DEVSHARD_PROTOCOL_VERSION)
TAG_NAME := "release/v$(VERSION)"
USE_REGISTRY_CACHE ?= 0
ifeq ($(USE_REGISTRY_CACHE),1)
Expand All @@ -21,16 +32,21 @@ all: build-docker
build-docker: api-build-docker node-build-docker mock-server-build-docker proxy-build-docker proxy-ssl-build-docker bridge-build-docker versiond-build-docker testapp-server-build-docker

api-build-docker:
@make -C decentralized-api build-docker SET_LATEST=1
@make -C decentralized-api build-docker SET_LATEST=1 \
BLST_PORTABLE=$(BLST_PORTABLE) \
DOCKER_PLATFORM=$(DOCKER_PLATFORM) DOCKER_GOOS=$(DOCKER_GOOS) DOCKER_GOARCH=$(DOCKER_GOARCH)

node-build-docker:
@make -C inference-chain build-docker SET_LATEST=1 $(if $(GENESIS_OVERRIDES_FILE),GENESIS_OVERRIDES_FILE=$(GENESIS_OVERRIDES_FILE),)
@make -C inference-chain build-docker SET_LATEST=1 \
BLST_PORTABLE=$(BLST_PORTABLE) \
DOCKER_PLATFORM=$(DOCKER_PLATFORM) DOCKER_GOOS=$(DOCKER_GOOS) DOCKER_GOARCH=$(DOCKER_GOARCH) \
$(if $(GENESIS_OVERRIDES_FILE),GENESIS_OVERRIDES_FILE=$(GENESIS_OVERRIDES_FILE),)

mock-server-build-docker:
@echo "Building mock-server JAR file..."
@cd testermint/mock_server && ./gradlew clean && ./gradlew shadowJar
@echo "Building mock-server docker image..."
@$(_MOCK_BUILD_CMD) -t inference-mock-server -f testermint/Dockerfile testermint
@$(_MOCK_BUILD_CMD) --platform $(DOCKER_PLATFORM) -t inference-mock-server -f testermint/Dockerfile testermint

proxy-build-docker:
@make -C proxy build-docker SET_LATEST=1
Expand All @@ -42,12 +58,12 @@ bridge-build-docker:
@make -C bridge build-docker SET_LATEST=1

versiond-build-docker:
@echo "Building versiond docker image..."
@docker build -t versiond:latest -f versioned/Dockerfile versioned
@echo "Building versiond docker image ($(DOCKER_PLATFORM), matches devshardd-build)..."
@docker build --platform $(DOCKER_PLATFORM) -t versiond:latest -f versioned/Dockerfile versioned

testapp-server-build-docker:
@echo "Building testapp-server docker image..."
@docker build -t testapp-server:latest -f local-test-net/Dockerfile.testapp-server .
@echo "Building testapp-server docker image ($(DOCKER_PLATFORM))..."
@docker build --platform $(DOCKER_PLATFORM) -t testapp-server:latest -f local-test-net/Dockerfile.testapp-server .

release: decentralized-api-release inference-chain-release tmkms-release proxy-release proxy-ssl-release bridge-release versiond-release
@git tag $(TAG_NAME)
Expand Down Expand Up @@ -113,24 +129,29 @@ api-local-build:
@echo "Building decentralized-api locally..."
@cd decentralized-api && go build -mod=mod -o ./build/dapi

DEVSHARD_PROTOCOL_LDFLAGS = -X devshard/types.buildStateRootProtocolVersion=$(DEVSHARD_PROTOCOL_VERSION)

devshardctl-build:
@echo "Building devshardctl..."
@cd devshard && go build -ldflags "-X main.Version=$(DEVSHARD_VERSION)" -o ../build/devshardctl ./cmd/devshardctl/
@echo "Building devshardctl (DEVSHARD_PROTOCOL_VERSION=$(DEVSHARD_PROTOCOL_VERSION))..."
@cd devshard && go build -ldflags "-X main.Version=$(DEVSHARD_VERSION) $(DEVSHARD_PROTOCOL_LDFLAGS)" -o ../build/devshardctl ./cmd/devshardctl/

devshardd-build:
@echo "Building devshardd..."
@echo "Building devshardd (DEVSHARD_VERSION=$(DEVSHARD_VERSION) DEVSHARD_PROTOCOL_VERSION=$(DEVSHARD_PROTOCOL_VERSION))..."
@mkdir -p build
@$(_DEVSHARDD_BUILD_CMD) --platform linux/amd64 --target builder \
--build-arg GOOS=linux \
--build-arg GOARCH=amd64 \
@$(_DEVSHARDD_BUILD_CMD) --platform $(DOCKER_PLATFORM) --target builder \
--build-arg GOOS=$(DOCKER_GOOS) \
--build-arg GOARCH=$(DOCKER_GOARCH) \
--build-arg BLST_PORTABLE=1 \
--build-arg DEVSHARD_VERSION=$(DEVSHARD_VERSION) \
--build-arg DEVSHARD_PROTOCOL_VERSION=$(DEVSHARD_PROTOCOL_VERSION) \
-f decentralized-api/Dockerfile . \
-t devshardd-builder:latest -q >/dev/null
@CID=$$(docker create devshardd-builder:latest) && \
docker cp $$CID:/app/decentralized-api/build/devshardd build/devshardd && \
docker rm $$CID >/dev/null
@chmod +x build/devshardd
@echo "$(DEVSHARD_VERSION)" > build/devshard-version
@echo "$(DEVSHARD_PROTOCOL_VERSION)" > build/devshard-protocol-version
@echo "Built build/devshardd ($$(file build/devshardd | grep -o 'statically linked\|dynamically linked'))"

node-local-build:
Expand Down
4 changes: 3 additions & 1 deletion bridge/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: all build-docker docker-push release

include ../scripts/blst-portable.mk

VERSION ?= $(shell git describe --always)
SET_LATEST ?= 0
SET_LATEST := $(shell if [ "$(SET_LATEST)" = "1" ]; then echo 1; else echo 0; fi)
Expand All @@ -25,7 +27,7 @@ endef
all: build-docker

build-docker:
$(eval PLATFORM=linux/amd64)
$(eval PLATFORM=$(DOCKER_PLATFORM))
$(eval DOCKER_FILE=Dockerfile)
$(eval DOCKER_TAG=ghcr.io/product-science/bridge:$(VERSION))
$(DOCKER_BUILD)
Expand Down
Loading