Skip to content

Commit 33a4198

Browse files
committed
Merge branch 'main' into streaming-support
2 parents 7c5d635 + c76bdd7 commit 33a4198

File tree

16 files changed

+772
-668
lines changed

16 files changed

+772
-668
lines changed

.github/workflows/release-artifacts.yml

Lines changed: 70 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ permissions:
2424
jobs:
2525
build-artifacts:
2626
runs-on: ubuntu-latest
27-
strategy:
28-
matrix:
29-
cgo_variant: ['nocgo', 'cgo']
27+
28+
# TODO_INVESTIGATE: CGO matrix builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
29+
# To re-enable: Uncomment the strategy block below to build both CGO and non-CGO variants
30+
# strategy:
31+
# matrix:
32+
# cgo_variant: ['nocgo', 'cgo']
33+
3034
steps:
3135
- uses: actions/checkout@v4
3236
with:
@@ -37,10 +41,12 @@ jobs:
3741
with:
3842
go-version: "1.24.3"
3943

40-
- name: Install cross-compilers for CGO (linux/amd64 + linux/arm64)
41-
run: |
42-
sudo apt-get update
43-
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
44+
# TODO_INVESTIGATE: CGO cross-compilers disabled - https://github.com/pokt-network/poktroll/discussions/1822
45+
# To re-enable: Uncomment the step below to install cross-compilers for CGO builds
46+
# - name: Install cross-compilers for CGO (linux/amd64 + linux/arm64)
47+
# run: |
48+
# sudo apt-get update
49+
# sudo apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
4450

4551
- name: install ignite
4652
# The ignite tarballs are named like ignite_29.0.0-rc.1_Linux_x86_64.tar.gz
@@ -53,26 +59,36 @@ jobs:
5359
# - name: Generate protobufs
5460
# run: make proto_regen
5561

56-
- name: Build binaries for specific variant
62+
- name: Build binaries (CGO disabled)
5763
run: |
5864
make ignite_update_ldflags
59-
60-
# Build cosmovisor (needed by both variants)
6165
make cosmovisor_cross_compile
6266
63-
# Build specific variant
64-
if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
65-
echo "Building CGO-enabled binaries..."
66-
make ignite_release_cgo_enabled
67-
else
68-
echo "Building CGO-disabled binaries..."
69-
make ignite_release_cgo_disabled
70-
fi
67+
echo "Building CGO-disabled binaries..."
68+
make ignite_release_cgo_disabled
7169
72-
# Repackage and extract
7370
make ignite_release_repackage
7471
make ignite_release_extract_binaries
7572
73+
# TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
74+
# To re-enable: Replace the step above with the conditional build below
75+
# - name: Build binaries for specific variant
76+
# run: |
77+
# make ignite_update_ldflags
78+
# make cosmovisor_cross_compile
79+
#
80+
# # Build specific variant based on matrix
81+
# if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
82+
# echo "Building CGO-enabled binaries..."
83+
# make ignite_release_cgo_enabled
84+
# else
85+
# echo "Building CGO-disabled binaries..."
86+
# make ignite_release_cgo_disabled
87+
# fi
88+
#
89+
# make ignite_release_repackage
90+
# make ignite_release_extract_binaries
91+
7692
- name: Free disk space
7793
run: |
7894
echo "=== Disk usage before cleanup ==="
@@ -93,14 +109,9 @@ jobs:
93109
# Base images
94110
echo "images=ghcr.io/pokt-network/pocketd,ghcr.io/pokt-network/poktrolld" >> $GITHUB_OUTPUT
95111
96-
# CGO suffix and dockerfile selection
97-
if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
98-
echo "cgo_suffix=-cgo" >> $GITHUB_OUTPUT
99-
echo "dockerfile=Dockerfile.release.cgo" >> $GITHUB_OUTPUT
100-
else
101-
echo "cgo_suffix=" >> $GITHUB_OUTPUT
102-
echo "dockerfile=Dockerfile.release" >> $GITHUB_OUTPUT
103-
fi
112+
# CGO suffix and dockerfile selection (CGO disabled)
113+
echo "cgo_suffix=" >> $GITHUB_OUTPUT
114+
echo "dockerfile=Dockerfile.release" >> $GITHUB_OUTPUT
104115
105116
# Event-specific tag suffix
106117
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
@@ -117,6 +128,38 @@ jobs:
117128
fi
118129
fi
119130
131+
# TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
132+
# To re-enable: Replace the CGO suffix section above with the conditional logic below
133+
# - name: Set metadata variables
134+
# id: vars
135+
# run: |
136+
# # Base images
137+
# echo "images=ghcr.io/pokt-network/pocketd,ghcr.io/pokt-network/poktrolld" >> $GITHUB_OUTPUT
138+
#
139+
# # CGO suffix and dockerfile selection (matrix-based)
140+
# if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
141+
# echo "cgo_suffix=-cgo" >> $GITHUB_OUTPUT
142+
# echo "dockerfile=Dockerfile.release.cgo" >> $GITHUB_OUTPUT
143+
# else
144+
# echo "cgo_suffix=" >> $GITHUB_OUTPUT
145+
# echo "dockerfile=Dockerfile.release" >> $GITHUB_OUTPUT
146+
# fi
147+
#
148+
# # Event-specific tag suffix
149+
# if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
150+
# echo "tag_suffix=-prod" >> $GITHUB_OUTPUT
151+
# elif [[ "${{ github.ref }}" == "refs/heads/main" && "${{ github.event_name }}" != "workflow_dispatch" ]]; then
152+
# echo "tag_suffix=-main-prod" >> $GITHUB_OUTPUT
153+
# elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
154+
# BRANCH_NAME=${GITHUB_REF#refs/heads/}
155+
# CUSTOM_TAG="${{ github.inputs.custom_tag }}"
156+
# if [[ -n "$CUSTOM_TAG" ]]; then
157+
# echo "tag_suffix=-${BRANCH_NAME}-prod-${CUSTOM_TAG}" >> $GITHUB_OUTPUT
158+
# else
159+
# echo "tag_suffix=-${BRANCH_NAME}-prod" >> $GITHUB_OUTPUT
160+
# fi
161+
# fi
162+
120163
# Extract branch name for workflow_dispatch
121164
- name: Extract branch name
122165
if: github.event_name == 'workflow_dispatch'

Dockerfile.dev

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@
55

66
FROM golang:1.24.3 AS base
77

8-
# Install build dependencies including CGO toolchain
8+
# TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
9+
# Install build dependencies; CGO remains disabled downstream.
910
RUN apt update && \
1011
apt-get install -y \
1112
build-essential pkg-config \
1213
ca-certificates net-tools kubernetes-client \
1314
curl jq yq make vim less dnsutils rsync
1415

16+
# CGO builds disabled; rely on pure-Go toolchain for dev containers.
17+
ENV CGO_ENABLED=0
18+
# TODO_INVESTIGATE: Original CGO settings - https://github.com/pokt-network/poktroll/discussions/1822
19+
# Install build dependencies including CGO toolchain
1520
# Enable CGO and set build flags for secp256k1
16-
ENV CGO_ENABLED=1
17-
ENV CGO_CFLAGS="-Wno-implicit-function-declaration -Wno-error=implicit-function-declaration"
21+
# ENV CGO_ENABLED=1
22+
# ENV CGO_CFLAGS="-Wno-implicit-function-declaration -Wno-error=implicit-function-declaration"
1823

1924
# Enable faster module downloading.
2025
ENV GOPROXY=https://proxy.golang.org

Dockerfile.release.cgo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# CGO-enabled release Dockerfile
1+
# TODO_INVESTIGATE: CGO-enabled release Dockerfile disabled - https://github.com/pokt-network/poktroll/discussions/1822
2+
# CGO-enabled release Dockerfile (disabled; retained for reference only)
23
FROM busybox:stable AS binary-selector
34
ARG TARGETARCH
45

@@ -37,4 +38,4 @@ COPY --from=binary-selector --chown=pocket:pocket /tmp/pocketd /bin/pocketd
3738
COPY --from=binary-selector --chown=pocket:pocket /tmp/cosmovisor /bin/cosmovisor
3839

3940
USER pocket
40-
ENTRYPOINT ["pocketd"]
41+
ENTRYPOINT ["pocketd"]

Tiltfile

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ load("./tiltfiles/config.Tiltfile", "read_configs")
1111
load("./tiltfiles/pocketdex.Tiltfile", "check_and_load_pocketdex")
1212
load("./tiltfiles/ibc.tilt", "check_and_load_ibc")
1313
load("./tiltfiles/static-nginx.Tiltfile", "provision_static_nginx")
14-
load("./tiltfiles/env.Tiltfile", "build_env", "build_cmd", "TARGET_GOOS", "TARGET_GOARCH", "IGNITE_CMD", "IGNITE_CGO_CFLAGS")
14+
load("./tiltfiles/env.Tiltfile", "build_env", "build_cmd", "TARGET_GOOS", "TARGET_GOARCH", "IGNITE_CMD", "CGO_DISABLED_ENV")
1515

1616

1717
# Avoid the header
@@ -157,8 +157,10 @@ if localnet_config["hot-reloading"]:
157157
# Given the complexity of containerized environments, CGO, static/dynamic linking, darwin/linux, etc.
158158
# it is not currently possible to enable CGO cross-compilation.
159159

160-
# Cross-compilation for container use - uses appropriate build tags and CGO settings.
161-
# Automatically selects Decred (no CGO) for cross-compilation or Ethereum (CGO) for native builds.
160+
# TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
161+
# Cross-compilation for container use - uses pure-Go configuration for consistency across hosts.
162+
# Original: Cross-compilation for container use - uses appropriate build tags and CGO settings.
163+
# Original: Automatically selects Decred (no CGO) for cross-compilation or Ethereum (CGO) for native builds.
162164
local_resource(
163165
"hot-reload: pocketd (bin)",
164166
"%s --output=./bin" % build_cmd(TARGET_GOOS, TARGET_GOARCH),
@@ -169,13 +171,17 @@ if localnet_config["hot-reloading"]:
169171
)
170172

171173
# Hot reload the local pocketd binary used by the CLI (host architecture).
172-
# Always uses CGO + ethereum_secp256k1 for optimal performance on host.
174+
# TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
175+
# CGO path disabled; rely on pure-Go build for stability across environments.
176+
# Original: Always uses CGO + ethereum_secp256k1 for optimal performance on host.
173177
local_resource(
174178
"hot-reload: pocketd (host)",
175-
'%s %s -o $(go env GOPATH)/bin' % (IGNITE_CGO_CFLAGS, IGNITE_CMD),
179+
'%s -o $(go env GOPATH)/bin' % IGNITE_CMD,
180+
# Original: '%s %s -o $(go env GOPATH)/bin' % (IGNITE_CGO_CFLAGS, IGNITE_CMD),
176181
deps=hot_reload_dirs,
177182
labels=["hot-reloading"],
178183
resource_deps=[PROTO_RESOURCE],
184+
env=CGO_DISABLED_ENV,
179185
)
180186

181187
# Build an image with a pocketd binary
@@ -220,6 +226,11 @@ helm_resource(
220226
)
221227

222228
# Provision RelayMiners
229+
# Build dependency list for relayminers
230+
relayminer_deps = ["validator", "anvil", "nginx-chainid"]
231+
if localnet_config["rest"]["enabled"]:
232+
relayminer_deps.append("rest")
233+
223234
actor_number = 0
224235
for x in range(localnet_config["relayminers"]["count"]):
225236
actor_number = actor_number + 1
@@ -285,7 +296,7 @@ for x in range(localnet_config["relayminers"]["count"]):
285296
k8s_resource(
286297
"relayminer" + str(actor_number),
287298
labels=["suppliers"],
288-
resource_deps=["validator", "anvil"],
299+
resource_deps=relayminer_deps,
289300
links=[
290301
link(
291302
"http://localhost:3003/d/relayminer/relayminer?orgId=1&var-relayminer=relayminer" + str(actor_number),
@@ -342,12 +353,12 @@ for x in range(localnet_config["path_gateways"]["count"]):
342353
if localnet_config["path_local_repo"]["enabled"]:
343354
path_image_deps = ["path-local"]
344355
path_image_keys = [("image.repository", "image.tag")]
345-
path_deps=["path-local"]
356+
path_deps=["path-local", "relayminer" + str(actor_number)]
346357
resource_flags.append("--set=global.imagePullPolicy=Never")
347358
else:
348359
path_image_deps = []
349360
path_image_keys = []
350-
path_deps=[]
361+
path_deps=["relayminer" + str(actor_number)]
351362

352363
configmap_create(
353364
"path-config-" + str(actor_number),

0 commit comments

Comments
 (0)