Skip to content

Commit 301b915

Browse files
authored
Merge pull request #1 from LumeraProtocol/ica-fixes
- Fixed Docker API version mismatch by pinning to v25.0.6 (API v1.44+, compatible with interchaintest v8) - Fixed 4 reliability bugs in ICA test: silent tx failure parsing, hardcoded ICA channel ID, no retry on ICA address query, unchecked bank send result - Simplified Dockerfile after crisis module removal in Lumera v1.10.1 (removed entrypoint script, kept flag-stripping wrapper) - Removed v1.9.1 version-specific code paths (single genesis modifier, no more ChainVersion enum) - Updated buildpacket tool for sdk-go v1.0.9 (NewMultiChainKeyring → NewKeyring + KeyTypeCosmos) - Added GitHub Actions CI workflow with reusable setup-go composite action
2 parents a634254 + 1fcb992 commit 301b915

17 files changed

Lines changed: 547 additions & 827 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Setup Go from go.mod
2+
description: Detect the Go toolchain version from go.mod and install it with caching enabled
3+
outputs:
4+
version:
5+
description: Detected Go version
6+
value: ${{ steps.determine.outputs.version }}
7+
runs:
8+
using: composite
9+
steps:
10+
- id: determine
11+
name: Determine Go version
12+
shell: bash
13+
run: |
14+
set -euo pipefail
15+
16+
VERSION=""
17+
TOOLCHAIN_VERSION=$(grep -E '^toolchain go[0-9]+\.[0-9]+(\.[0-9]+)?$' go.mod | cut -d ' ' -f 2 | sed 's/^go//' || true)
18+
if [ -n "$TOOLCHAIN_VERSION" ]; then
19+
VERSION="$TOOLCHAIN_VERSION"
20+
echo "Detected toolchain directive: go$VERSION"
21+
else
22+
VERSION=$(grep -E '^go [0-9]+\.[0-9]+(\.[0-9]+)?$' go.mod | cut -d ' ' -f 2 || true)
23+
if [ -n "$VERSION" ]; then
24+
echo "Detected go directive: $VERSION"
25+
fi
26+
fi
27+
28+
if [ -z "$VERSION" ]; then
29+
echo "Unable to determine Go version from go.mod" >&2
30+
exit 1
31+
fi
32+
33+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
34+
35+
- name: Setup Go
36+
uses: actions/setup-go@v6.2.0
37+
with:
38+
go-version: ${{ steps.determine.outputs.version }}
39+
cache: true

.github/workflows/ica-test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ICA Integration Tests
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
workflow_dispatch:
9+
inputs:
10+
lumera_version:
11+
description: "Lumera version to test (e.g. v1.10.1)"
12+
required: false
13+
default: "v1.10.1"
14+
15+
env:
16+
LUMERA_VERSION: ${{ github.event.inputs.lumera_version || 'v1.10.1' }}
17+
18+
jobs:
19+
full-test:
20+
name: Full Test (build + genesis + ICA)
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 45
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6.0.1
27+
28+
- name: Set up Go
29+
uses: ./.github/actions/setup-go
30+
31+
- name: Build Docker image
32+
run: make build-docker LUMERA_VERSION=${{ env.LUMERA_VERSION }}
33+
34+
- name: Run tests
35+
run: make test-local LUMERA_VERSION=${{ env.LUMERA_VERSION }}

Dockerfile

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN apk add --no-cache \
1818

1919
# Download and install lumerad binary + libwasmvm from GitHub releases
2020
# The real binary is installed as lumerad-bin; lumerad is a wrapper that strips
21-
# --x-crisis-skip-assert-invariants (hardcoded by interchaintest but unsupported)
21+
# --x-crisis-skip-assert-invariants (hardcoded by interchaintest but removed in v1.10.1)
2222
RUN mkdir -p /tmp/release && \
2323
curl -sSfL "https://github.com/LumeraProtocol/lumera/releases/download/${LUMERA_VERSION}/lumera_${LUMERA_VERSION}_linux_amd64.tar.gz" \
2424
| tar -xz -C /tmp/release && \
@@ -28,10 +28,11 @@ RUN mkdir -p /tmp/release && \
2828
rm -rf /tmp/release && \
2929
lumerad-bin version
3030

31-
# Create wrapper script that filters unsupported flags and ensures claims.csv exists
31+
# Create wrapper that strips --x-crisis-skip-assert-invariants (interchaintest
32+
# hardcodes it, but the crisis module was removed in v1.10.1) and ensures
33+
# claims.csv exists for the --claims-path flag.
3234
RUN cat > /usr/local/bin/lumerad <<'WRAPPER'
3335
#!/bin/bash
34-
# Ensure claims.csv exists (lumerad requires it at startup)
3536
[ -f /tmp/claims.csv ] || touch /tmp/claims.csv
3637
args=()
3738
for arg in "$@"; do
@@ -44,31 +45,16 @@ exec lumerad-bin "${args[@]}"
4445
WRAPPER
4546
RUN chmod +x /usr/local/bin/lumerad
4647

47-
# Copy claims.csv to temp location
48+
# Copy claims.csv (used via --claims-path /tmp/claims.csv in AdditionalStartArgs)
4849
COPY claims.csv /tmp/claims.csv
4950

5051
# Create lumera user
5152
RUN addgroup -g 1025 lumera && \
5253
adduser -D -u 1025 -G lumera lumera
5354

54-
# Create entrypoint script that ensures claims.csv is in .lumera/config
55-
RUN cat > /usr/local/bin/entrypoint.sh <<'ENTRY'
56-
#!/bin/bash
57-
set -e
58-
if [ -f /tmp/claims.csv ] && [ -s /tmp/claims.csv ]; then
59-
mkdir -p $HOME/.lumera/config
60-
if [ ! -f $HOME/.lumera/config/claims.csv ]; then
61-
cp /tmp/claims.csv $HOME/.lumera/config/claims.csv
62-
fi
63-
fi
64-
exec "$@"
65-
ENTRY
66-
RUN chmod +x /usr/local/bin/entrypoint.sh
67-
6855
USER lumera
6956
WORKDIR /home/lumera
7057

7158
EXPOSE 26656 26657 1317 9090
7259

73-
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
7460
CMD ["lumerad", "start"]

Makefile

Lines changed: 27 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,35 @@
11
.PHONY: help build-docker clean-docker docker-info verify
2-
.PHONY: test test-local test-v1.9.1 test-v1.10.1 test-v1.9.1-local test-v1.10.1-local
3-
.PHONY: test-genesis test-genesis-local test-genesis-v1.9.1 test-genesis-v1.10.1 test-genesis-v1.9.1-local test-genesis-v1.10.1-local
4-
.PHONY: test-ica test-ica-local test-ica-v1.9.1 test-ica-v1.10.1 test-ica-v1.9.1-local test-ica-v1.10.1-local
5-
.PHONY: test-all-versions test-all-versions-local full-test
2+
.PHONY: test test-local test-genesis test-genesis-local test-ica test-ica-local full-test
3+
4+
# Lumera version — override via: make test LUMERA_VERSION=v1.10.1
5+
LUMERA_VERSION ?= v1.10.1
66

77
# Default target
88
help:
99
@echo "Lumera Interchaintest Makefile"
1010
@echo ""
11+
@echo " LUMERA_VERSION=$(LUMERA_VERSION) (override with LUMERA_VERSION=vX.Y.Z)"
12+
@echo ""
1113
@echo "Docker:"
12-
@echo " build-docker Build lumerad Docker image from local source"
14+
@echo " build-docker Build lumerad Docker image"
1315
@echo " clean-docker Remove local Docker images"
1416
@echo " docker-info Show Docker image info"
1517
@echo " verify Verify local setup"
1618
@echo ""
17-
@echo "Genesis tests:"
18-
@echo " test-genesis-v1.9.1 Test genesis for v1.9.1"
19-
@echo " test-genesis-v1.10.1 Test genesis for v1.10.1"
20-
@echo " test-genesis-v1.9.1-local ... with local image"
21-
@echo " test-genesis-v1.10.1-local ... with local image"
22-
@echo ""
23-
@echo "ICA tests:"
24-
@echo " test-ica-v1.9.1 Run ICA tests for v1.9.1"
25-
@echo " test-ica-v1.10.1 Run ICA tests for v1.10.1"
26-
@echo " test-ica-v1.9.1-local ... with local image"
27-
@echo " test-ica-v1.10.1-local ... with local image"
28-
@echo ""
29-
@echo "All tests for a version:"
30-
@echo " test-v1.9.1 Run all tests for v1.9.1"
31-
@echo " test-v1.10.1 Run all tests for v1.10.1"
32-
@echo " test-v1.9.1-local ... with local image"
33-
@echo " test-v1.10.1-local ... with local image"
34-
@echo ""
35-
@echo "Shortcuts (default v1.10.1):"
36-
@echo " test-genesis Test genesis (v1.10.1)"
19+
@echo "Tests:"
20+
@echo " test-genesis Test genesis configuration"
3721
@echo " test-genesis-local Test genesis with local image"
38-
@echo " test-ica Run ICA tests (v1.10.1)"
22+
@echo " test-ica Run ICA tests"
3923
@echo " test-ica-local Run ICA tests with local image"
40-
@echo " test Run all tests (v1.10.1)"
24+
@echo " test Run all tests"
4125
@echo " test-local Run all tests with local image"
42-
@echo ""
43-
@echo "Multi-version:"
44-
@echo " test-all-versions Test both v1.9.1 and v1.10.1"
45-
@echo " test-all-versions-local Test both versions with local image"
46-
@echo " full-test Build + test all versions locally"
26+
@echo " full-test Build + run all tests locally"
4727

4828
# ── Docker ──────────────────────────────────────────────
4929

5030
build-docker:
5131
@echo "Building lumerad Docker image..."
52-
./build-docker.sh
32+
LUMERA_VERSION=$(LUMERA_VERSION) ./build-docker.sh
5333

5434
clean-docker:
5535
-docker rmi lumerad-local:local 2>/dev/null || true
@@ -67,64 +47,26 @@ verify:
6747

6848
# ── Genesis tests ───────────────────────────────────────
6949

70-
test-genesis-v1.9.1:
71-
LUMERA_VERSION=v1.9.1 go test -v -timeout 10m -run TestLumeraGenesisSetup
72-
73-
test-genesis-v1.10.1:
74-
LUMERA_VERSION=v1.10.1 go test -v -timeout 10m -run TestLumeraGenesisSetup
75-
76-
test-genesis-v1.9.1-local: build-docker
77-
LUMERA_VERSION=v1.9.1 USE_LOCAL_IMAGE=true go test -v -timeout 10m -run TestLumeraGenesisSetup
78-
79-
test-genesis-v1.10.1-local: build-docker
80-
LUMERA_VERSION=v1.10.1 USE_LOCAL_IMAGE=true go test -v -timeout 10m -run TestLumeraGenesisSetup
50+
test-genesis:
51+
LUMERA_VERSION=$(LUMERA_VERSION) go test -v -timeout 10m -run TestLumeraGenesisSetup
8152

82-
# Shortcuts (default v1.10.1)
83-
test-genesis: test-genesis-v1.10.1
84-
test-genesis-local: test-genesis-v1.10.1-local
53+
test-genesis-local: build-docker
54+
LUMERA_VERSION=$(LUMERA_VERSION) USE_LOCAL_IMAGE=true go test -v -timeout 10m -run TestLumeraGenesisSetup
8555

8656
# ── ICA tests ───────────────────────────────────────────
8757

88-
test-ica-v1.9.1:
89-
LUMERA_VERSION=v1.9.1 go test -v -timeout 20m -run TestOsmosisLumeraICA
90-
91-
test-ica-v1.10.1:
92-
LUMERA_VERSION=v1.10.1 go test -v -timeout 20m -run TestOsmosisLumeraICA
93-
94-
test-ica-v1.9.1-local: build-docker
95-
LUMERA_VERSION=v1.9.1 USE_LOCAL_IMAGE=true go test -v -timeout 20m -run TestOsmosisLumeraICA
96-
97-
test-ica-v1.10.1-local: build-docker
98-
LUMERA_VERSION=v1.10.1 USE_LOCAL_IMAGE=true go test -v -timeout 20m -run TestOsmosisLumeraICA
99-
100-
# Shortcuts (default v1.10.1)
101-
test-ica: test-ica-v1.10.1
102-
test-ica-local: test-ica-v1.10.1-local
103-
104-
# ── All tests for a version ─────────────────────────────
105-
106-
test-v1.9.1:
107-
LUMERA_VERSION=v1.9.1 go test -v -timeout 30m ./...
108-
109-
test-v1.10.1:
110-
LUMERA_VERSION=v1.10.1 go test -v -timeout 30m ./...
111-
112-
test-v1.9.1-local: build-docker
113-
LUMERA_VERSION=v1.9.1 USE_LOCAL_IMAGE=true go test -v -timeout 30m ./...
114-
115-
test-v1.10.1-local: build-docker
116-
LUMERA_VERSION=v1.10.1 USE_LOCAL_IMAGE=true go test -v -timeout 30m ./...
58+
test-ica:
59+
LUMERA_VERSION=$(LUMERA_VERSION) go test -v -timeout 20m -run TestOsmosisLumeraICA
11760

118-
# Shortcuts (default v1.10.1)
119-
test: test-v1.10.1
120-
test-local: test-v1.10.1-local
61+
test-ica-local: build-docker
62+
LUMERA_VERSION=$(LUMERA_VERSION) USE_LOCAL_IMAGE=true go test -v -timeout 20m -run TestOsmosisLumeraICA
12163

122-
# ── Multi-version ───────────────────────────────────────
64+
# ── All tests ───────────────────────────────────────────
12365

124-
test-all-versions:
125-
go test -v -timeout 30m -run TestBothVersions
66+
test:
67+
LUMERA_VERSION=$(LUMERA_VERSION) go test -v -timeout 30m ./...
12668

127-
test-all-versions-local: build-docker
128-
USE_LOCAL_IMAGE=true go test -v -timeout 30m -run TestBothVersions
69+
test-local: build-docker
70+
LUMERA_VERSION=$(LUMERA_VERSION) USE_LOCAL_IMAGE=true go test -v -timeout 30m ./...
12971

130-
full-test: build-docker test-all-versions-local
72+
full-test: test-local

0 commit comments

Comments
 (0)