Skip to content

Commit 29a27e2

Browse files
committed
Add a workaround for setup-arcium not working on 0.6.2
Remove arcup use 0.6.2 call - binary already installed Fix Node engine warning - use Node 23.6.0 for @noble/hashes 2.0.1 Use Node 22.12.0 LTS instead of unstable 23.x
1 parent 91f430f commit 29a27e2

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,31 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515

16-
- name: Install libudev
17-
run: sudo apt-get update && sudo apt-get install -y libudev-dev
18-
16+
# Use setup-arcium@v0.5.4 to install Rust, Solana, Anchor, and arcup
17+
# Then override with Arcium 0.6.2 binary since arcup 0.6.2 has bootstrap bug
1918
- uses: arcium-hq/setup-arcium@v0.5.4
2019
with:
21-
runner-arch-os: x86_64_linux
22-
solana-cli-version: 2.3.11
23-
arcium-version: 0.6.2
24-
anchor-version: 0.32.1
20+
runner-arch-os: "x86_64_linux"
21+
arcium-version: "0.5.4"
22+
solana-cli-version: "2.3.11"
23+
anchor-version: "0.32.1"
24+
node-version: "22.12.0"
25+
26+
# Override with Arcium 0.6.2 binary
27+
# arcup 0.6.2 has bootstrap bug (panics with "index not found" at arcup/src/config.rs:29:51)
28+
# so we download the 0.6.2 binary directly instead of using arcup
29+
- name: Override with Arcium CLI 0.6.2
30+
run: |
31+
curl "https://bin.arcium.com/download/arcium_x86_64_linux_0.6.2" -o ~/.cargo/bin/arcium
32+
chmod +x ~/.cargo/bin/arcium
33+
arcium --version
2534
26-
- run: solana --version
35+
# Verify Docker is running and can pull images
36+
# Arcium requires Docker to run MPC nodes during tests
37+
- name: Verify Docker
38+
run: |
39+
docker info
40+
docker ps
2741
2842
- run: npm i
2943

Anchor.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ wallet = "~/.config/solana/id.json"
2121
test = "npx tsx tests/election.ts"
2222

2323
[test]
24-
startup_wait = 90000
24+
# GitHub Actions environment can be very slow - 300s (5 minutes) allows Solana localnet
25+
# and Arcium MPC nodes enough time to initialize. Local development typically uses ~90s.
26+
startup_wait = 300000
2527
shutdown_wait = 2000
2628
upgradeable = false

run-tests.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ set -euo pipefail
2020
# 'Program 11111111111111111111111111111111 invoke [3]'
2121
# 'Allocate: account Address { address: FLpEeHKkzCKwVvC7LMV3GBSLAsmhWSvEx2z4PYKWZk6U, base: None } already in use'
2222

23-
# Set correct Arcium version
24-
arcup use 0.6.2
23+
# Arcium version is set by directly installing the 0.6.2 binary (in GitHub Actions)
24+
# or by the user having arcium 0.6.2 in their PATH (local development)
2525

2626
# TODO: Upgrade to Agave 3.x when resolved
2727
# Currently using Agave 2.3.11 due to Agave 3.x panic with bind-address 0.0.0.0

tests/election.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { getSetComputeUnitLimitInstruction } from "@solana-program/compute-budget";
22
import { randomBytes } from "crypto";
3+
import { promises as fs } from "fs";
34
import { connect, type Connection } from "solana-kite";
45
import {
56
type KeyPairSigner,
@@ -24,7 +25,6 @@ import {
2425
} from "./arcium-solana-kit/helpers.js";
2526
import * as os from "os";
2627
import { describe, test, before } from "node:test";
27-
import assert from "node:assert";
2828
import {
2929
getRandomBigInt,
3030
makeClientSideKeys,
@@ -386,7 +386,7 @@ describe("Election", () => {
386386
compDefAccount: compDefPDA,
387387
});
388388

389-
const instructions = [];
389+
const instructions: Array<Instruction> = [];
390390

391391
if (needsComputeBudget) {
392392
// create_poll circuit requires higher compute budget due to initialization complexity

0 commit comments

Comments
 (0)