Skip to content

Commit 6dac628

Browse files
committed
refactor: rename product identity from gbase to base
Replace domain tags, env vars, image names, paths, and docs so the stack is consistently base. Publish images to GHCR via CI on dev; use local docker build only for temporary tests. Refresh digest goldens for base-* domain tags.
1 parent d48719e commit 6dac628

128 files changed

Lines changed: 842 additions & 842 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# gbase compose — non-secret operator knobs (safe to commit as example).
1+
# base compose — non-secret operator knobs (safe to commit as example).
22
# Copy to `.env` for local overrides. Real secrets NEVER go here:
33
# materialize them with deploy/scripts/materialize-env.sh (age → deploy/env/*.env mode 0600).
44

5-
# Compose project name (must match GBASE_UPDATER_COMPOSE_PROJECT)
6-
COMPOSE_PROJECT_NAME=gbase
5+
# Compose project name (must match BASE_UPDATER_COMPOSE_PROJECT)
6+
COMPOSE_PROJECT_NAME=base
77

88
# Docker build path: prebuilt (host cargo release) | source (full multi-stage rustc 1.96)
9-
GBASE_DOCKER_BUILD_FROM=prebuilt
9+
BASE_DOCKER_BUILD_FROM=prebuilt
1010

1111
# Optional: validator → gateway URL when profile master is enabled
12-
GBASE_GATEWAY_ENDPOINT=http://gateway:8080
12+
BASE_GATEWAY_ENDPOINT=http://gateway:8080
1313

1414
# Directory holding age-decrypted env files (default relative to compose file)
15-
# GBASE_SECRETS_DIR=./deploy/env
15+
# BASE_SECRETS_DIR=./deploy/env
1616

1717
# --- Image pins (informational; canonical pins live in docker-compose.yml) ---
1818
# postgres@sha256:33f923b05f64ca54ac4401c01126a6b92afe839a0aa0a52bc5aeb5cc958e5f20

.github/workflows/ghcr-public.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
set -euo pipefail
2929
# Nested image names: ghcr.io/<owner>/base/<suffix> → package name "base/<suffix>"
3030
pkgs=(
31-
"base/gbase-agent"
32-
"base/gbase-attest-helper"
31+
"base/base-agent"
32+
"base/base-attest-helper"
3333
"base/gateway"
3434
"base/validator"
3535
"base/updater"

.github/workflows/images.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ jobs:
4545
- target: agent-challenge
4646
image_suffix: agent-challenge
4747
dockerfile: deploy/Dockerfile
48-
- target: gbase-agent
49-
image_suffix: gbase-agent
48+
- target: base-agent
49+
image_suffix: base-agent
5050
dockerfile: deploy/Dockerfile
5151
- target: ""
52-
image_suffix: gbase-attest-helper
52+
image_suffix: base-attest-helper
5353
dockerfile: deploy/attest-helper/Dockerfile
5454
steps:
5555
- name: Checkout
@@ -78,7 +78,7 @@ jobs:
7878
id: build
7979
uses: docker/build-push-action@v6
8080
with:
81-
context: ${{ matrix.image_suffix == 'gbase-attest-helper' && 'deploy/attest-helper' || '.' }}
81+
context: ${{ matrix.image_suffix == 'base-attest-helper' && 'deploy/attest-helper' || '.' }}
8282
file: ${{ matrix.dockerfile }}
8383
target: ${{ matrix.target }}
8484
push: ${{ github.event_name != 'pull_request' }}
@@ -150,8 +150,8 @@ jobs:
150150
"gateway",
151151
"updater",
152152
"agent-challenge",
153-
"gbase-agent",
154-
"gbase-attest-helper",
153+
"base-agent",
154+
"base-attest-helper",
155155
}
156156
assert set(images) == expected, (set(images), expected)
157157
out = {

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ validators. The gateway is the sole TLS / public edge process.
3737

3838
Day-1: [docs/external-miner/](docs/external-miner/)
3939

40-
1. Deploy a measured CVM (`miner deploy`) with digest-pinned `gbase-agent` +
41-
`gbase-attest-helper` + socket-proxy.
40+
1. Deploy a measured CVM (`miner deploy`) with digest-pinned `base-agent` +
41+
`base-attest-helper` + socket-proxy.
4242
2. Fund your own Phala account; hotkey + launch token + receipt sk are **files**
43-
under `/run/gbase/` (never env secret values).
43+
under `/run/base/` (never env secret values).
4444
3. Certify each epoch (`miner certify`) via loopback attest-helper
4545
`GET /v1/quote` → validator attest API.
4646

@@ -74,8 +74,8 @@ Never `:latest` in measured compose.
7474
| gateway | `gateway` |
7575
| updater | `updater` |
7676
| agent-challenge | `agent-challenge` |
77-
| gbase-agent | `gbase-agent` (miner runner) |
78-
| gbase-attest-helper | `gbase-attest-helper` (quote helper) |
77+
| base-agent | `base-agent` (miner runner) |
78+
| base-attest-helper | `base-attest-helper` (quote helper) |
7979

8080
## Toolchain
8181

bins/agent-challenge/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! `agent-challenge` — operator-side agent-v1 challenge service.
22
//!
33
//! Listens on `:8090` for `/healthz` + `/readyz`. Challenge secret is loaded from
4-
//! `GBASE_CHALLENGE_SK_FILE` (mode 0600 file). Never logs or commits the secret.
4+
//! `BASE_CHALLENGE_SK_FILE` (mode 0600 file). Never logs or commits the secret.
55
66
#![forbid(unsafe_code)]
77

@@ -26,10 +26,10 @@ struct Cli {
2626
#[command(subcommand)]
2727
cmd: Option<Cmd>,
2828
/// Bind address for health endpoints (default 0.0.0.0:8090).
29-
#[arg(long, env = "GBASE_CHALLENGE_BIND", default_value = "0.0.0.0:8090")]
29+
#[arg(long, env = "BASE_CHALLENGE_BIND", default_value = "0.0.0.0:8090")]
3030
bind: SocketAddr,
3131
/// Path to challenge mini-secret (32 raw bytes or hex). Required for ready.
32-
#[arg(long, env = "GBASE_CHALLENGE_SK_FILE")]
32+
#[arg(long, env = "BASE_CHALLENGE_SK_FILE")]
3333
challenge_sk_file: Option<PathBuf>,
3434
}
3535

@@ -68,7 +68,7 @@ fn run(cli: Cli) -> Result<(), String> {
6868
}
6969

7070
fn cmd_identity(sk_file: Option<&PathBuf>) -> Result<(), String> {
71-
let path = sk_file.ok_or("GBASE_CHALLENGE_SK_FILE / --challenge-sk-file required")?;
71+
let path = sk_file.ok_or("BASE_CHALLENGE_SK_FILE / --challenge-sk-file required")?;
7272
let sk = load_challenge_secret(path).map_err(|e| e.to_string())?;
7373
let pk = public_key_from_secret(&sk).map_err(|e| e.to_string())?;
7474
let ch = AgentV1Challenge::new();

bins/agent-runner/src/main.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! `agent-runner` — miner CVM HTTP task API (`agent:8080`).
22
//!
3-
//! Loads the CVM-local work-receipt key from `GBASE_RECEIPT_SK_FILE` (mode 0600
3+
//! Loads the CVM-local work-receipt key from `BASE_RECEIPT_SK_FILE` (mode 0600
44
//! mount). Dispatch auth (todo 18) is on by default when a trusted challenge
55
//! pubkey is configured. Concurrency is clamped to 1..=5 and enforced with a
66
//! semaphore (todo 19). Pack execution uses allowlisted Docker when
7-
//! `GBASE_DOCKER_BASE` + `GBASE_ENVIRONMENT_IMAGE` + `GBASE_PACK_ROOT` are set;
7+
//! `BASE_DOCKER_BASE` + `BASE_ENVIRONMENT_IMAGE` + `BASE_PACK_ROOT` are set;
88
//! otherwise the deterministic stub backend is used. Default egress posture is
99
//! OPEN (todo 21).
1010
@@ -33,44 +33,44 @@ use tokio::net::TcpListener;
3333
)]
3434
struct Cli {
3535
/// Bind address (compose publishes agent:8080).
36-
#[arg(long, env = "GBASE_RUNNER_BIND", default_value = "0.0.0.0:8080")]
36+
#[arg(long, env = "BASE_RUNNER_BIND", default_value = "0.0.0.0:8080")]
3737
bind: SocketAddr,
3838
/// Miner-declared max concurrency (clamped to 1..=5 at runtime).
39-
#[arg(long, env = "GBASE_MAX_CONCURRENCY", default_value_t = 1)]
39+
#[arg(long, env = "BASE_MAX_CONCURRENCY", default_value_t = 1)]
4040
max_concurrency: u32,
4141
/// Path to the CVM-local receipt mini-secret (mode 0600 file).
42-
#[arg(long, env = "GBASE_RECEIPT_SK_FILE", default_value = DEFAULT_RECEIPT_SK_PATH)]
42+
#[arg(long, env = "BASE_RECEIPT_SK_FILE", default_value = DEFAULT_RECEIPT_SK_PATH)]
4343
receipt_sk_file: PathBuf,
4444
/// When set, generate the receipt key if the file is missing (local/dev only).
45-
#[arg(long, env = "GBASE_RECEIPT_SK_GENERATE", default_value_t = false)]
45+
#[arg(long, env = "BASE_RECEIPT_SK_GENERATE", default_value_t = false)]
4646
receipt_sk_generate: bool,
4747
/// Disable dispatch auth (local/dev only). Default: auth on when pubkey set.
48-
#[arg(long, env = "GBASE_DISPATCH_AUTH_DISABLE", default_value_t = false)]
48+
#[arg(long, env = "BASE_DISPATCH_AUTH_DISABLE", default_value_t = false)]
4949
dispatch_auth_disable: bool,
5050
/// Trusted challenge public key (64 hex) for dispatch auth.
51-
#[arg(long, env = "GBASE_TRUSTED_CHALLENGE_PUBKEY")]
51+
#[arg(long, env = "BASE_TRUSTED_CHALLENGE_PUBKEY")]
5252
trusted_challenge_pubkey: Option<String>,
5353
/// Docker Engine HTTP base (socket-proxy). When set with image + pack root → Docker backend.
54-
#[arg(long, env = "GBASE_DOCKER_BASE")]
54+
#[arg(long, env = "BASE_DOCKER_BASE")]
5555
docker_base: Option<String>,
5656
/// Digest-pinned environment image for pack runs (`name@sha256:…`).
57-
#[arg(long, env = "GBASE_ENVIRONMENT_IMAGE")]
57+
#[arg(long, env = "BASE_ENVIRONMENT_IMAGE")]
5858
environment_image: Option<String>,
5959
/// Host directory of Harbor packs (`{root}/{pack_id}/`).
60-
#[arg(long, env = "GBASE_PACK_ROOT")]
60+
#[arg(long, env = "BASE_PACK_ROOT")]
6161
pack_root: Option<PathBuf>,
6262
/// Staging root for agent binds.
6363
#[arg(
6464
long,
65-
env = "GBASE_AGENT_WORK_ROOT",
66-
default_value = "/tmp/gbase-agent-work"
65+
env = "BASE_AGENT_WORK_ROOT",
66+
default_value = "/tmp/base-agent-work"
6767
)]
6868
work_root: PathBuf,
6969
/// Miner-supplied model API key file (mounted into agent; never logged).
70-
#[arg(long, env = "GBASE_MODEL_KEY_FILE")]
70+
#[arg(long, env = "BASE_MODEL_KEY_FILE")]
7171
model_key_file: Option<PathBuf>,
7272
/// Egress posture: `open` (default) or `allowlisted_proxy`.
73-
#[arg(long, env = "GBASE_AGENT_EGRESS", default_value = "open")]
73+
#[arg(long, env = "BASE_AGENT_EGRESS", default_value = "open")]
7474
egress: String,
7575
}
7676

@@ -122,12 +122,12 @@ fn build_execution(cli: &Cli) -> Result<ExecutionBackend, String> {
122122
) {
123123
(Some(base), Some(image), Some(root)) => {
124124
if image.is_empty() {
125-
return Err("GBASE_ENVIRONMENT_IMAGE must be non-empty".into());
125+
return Err("BASE_ENVIRONMENT_IMAGE must be non-empty".into());
126126
}
127127
if let Some(key) = &cli.model_key_file {
128128
if !key.is_file() {
129129
return Err(format!(
130-
"GBASE_MODEL_KEY_FILE not a file: {}",
130+
"BASE_MODEL_KEY_FILE not a file: {}",
131131
key.display()
132132
));
133133
}
@@ -146,7 +146,7 @@ fn build_execution(cli: &Cli) -> Result<ExecutionBackend, String> {
146146
hold: Duration::ZERO,
147147
}),
148148
_ => Err(
149-
"Docker pack execution requires GBASE_DOCKER_BASE + GBASE_ENVIRONMENT_IMAGE + GBASE_PACK_ROOT (or omit all three for stub)"
149+
"Docker pack execution requires BASE_DOCKER_BASE + BASE_ENVIRONMENT_IMAGE + BASE_PACK_ROOT (or omit all three for stub)"
150150
.into(),
151151
),
152152
}
@@ -177,7 +177,7 @@ async fn serve(cli: Cli) -> Result<(), String> {
177177
let auth_enabled = !cli.dispatch_auth_disable;
178178
if auth_enabled && trusted.is_none() {
179179
return Err(
180-
"dispatch auth enabled but GBASE_TRUSTED_CHALLENGE_PUBKEY unset (or pass --dispatch-auth-disable)"
180+
"dispatch auth enabled but BASE_TRUSTED_CHALLENGE_PUBKEY unset (or pass --dispatch-auth-disable)"
181181
.into(),
182182
);
183183
}

bins/gateway/src/main.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
//! the configured hotkey does not match (exit code 2).
55
//!
66
//! Chain backend (task 47 cleartext/IP e2e):
7-
//! - default / `GBASE_CHAIN_BACKEND=fake_owner`: [`FakeChain`] whose owner hotkey
8-
//! equals the configured `GBASE_GATEWAY_HOTKEY` so master check can pass without
7+
//! - default / `BASE_CHAIN_BACKEND=fake_owner`: [`FakeChain`] whose owner hotkey
8+
//! equals the configured `BASE_GATEWAY_HOTKEY` so master check can pass without
99
//! a full live SDK client (TLS/ACME still deferred to task 42).
10-
//! - `GBASE_CHAIN_BACKEND=not_implemented`: previous fail-closed stub.
10+
//! - `BASE_CHAIN_BACKEND=not_implemented`: previous fail-closed stub.
1111
1212
use std::process::ExitCode;
1313

@@ -25,15 +25,15 @@ async fn main() -> ExitCode {
2525
e.log_fatal();
2626
eprintln!("gateway config error: {e}");
2727
eprintln!(
28-
"required: GBASE_ROLE=gateway GBASE_NETUID GBASE_DOMAIN \
29-
GBASE_DATABASE_URL (or _FILE) GBASE_GATEWAY_HOTKEY \
30-
[GBASE_GATEWAY_LISTEN]"
28+
"required: BASE_ROLE=gateway BASE_NETUID BASE_DOMAIN \
29+
BASE_DATABASE_URL (or _FILE) BASE_GATEWAY_HOTKEY \
30+
[BASE_GATEWAY_LISTEN]"
3131
);
3232
return e.exit_code();
3333
}
3434
};
3535

36-
let backend = std::env::var("GBASE_CHAIN_BACKEND").unwrap_or_else(|_| "fake_owner".to_owned());
36+
let backend = std::env::var("BASE_CHAIN_BACKEND").unwrap_or_else(|_| "fake_owner".to_owned());
3737
let backend = backend.to_ascii_lowercase();
3838

3939
match backend.as_str() {
@@ -48,7 +48,7 @@ async fn main() -> ExitCode {
4848
// fake_owner (default): owner hotkey == configured gateway hotkey.
4949
let hotkeys =
5050
gateway::parse_fake_metagraph_hotkeys(&config.hotkey).unwrap_or_else(|e| {
51-
tracing::warn!(error = %e, "bad GBASE_FAKE_METAGRAPH_HOTKEYS; owner-only");
51+
tracing::warn!(error = %e, "bad BASE_FAKE_METAGRAPH_HOTKEYS; owner-only");
5252
vec![config.hotkey.to_vec()]
5353
});
5454
let fc = FakeChainConfig {
@@ -63,7 +63,7 @@ async fn main() -> ExitCode {
6363
backend = "fake_owner",
6464
netuid = config.netuid,
6565
metagraph_n = hotkeys.len(),
66-
"gateway chain: FakeChain owner matches GBASE_GATEWAY_HOTKEY (cleartext e2e)"
66+
"gateway chain: FakeChain owner matches BASE_GATEWAY_HOTKEY (cleartext e2e)"
6767
);
6868
run_with(config, &chain).await
6969
}

bins/miner/src/main.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,33 @@ enum Cmd {
3636
#[arg(long, default_value = "miner")]
3737
name: String,
3838
/// Digest-pinned agent image (`repo@sha256:<64 hex>`).
39-
#[arg(long, default_value = DEFAULT_AGENT_IMAGE, env = "GBASE_AGENT_IMAGE")]
39+
#[arg(long, default_value = DEFAULT_AGENT_IMAGE, env = "BASE_AGENT_IMAGE")]
4040
agent_image: String,
4141
/// Digest-pinned attest-helper image.
4242
#[arg(
4343
long,
4444
default_value = DEFAULT_ATTEST_HELPER_IMAGE,
45-
env = "GBASE_ATTEST_HELPER_IMAGE"
45+
env = "BASE_ATTEST_HELPER_IMAGE"
4646
)]
4747
attest_helper_image: String,
4848
/// Digest-pinned socket-proxy image (measured allowlist).
4949
#[arg(
5050
long,
5151
default_value = DEFAULT_SOCKET_PROXY_IMAGE,
52-
env = "GBASE_SOCKET_PROXY_IMAGE"
52+
env = "BASE_SOCKET_PROXY_IMAGE"
5353
)]
5454
socket_proxy_image: String,
5555
/// Lowercase hex SHA-256 of the launch token (measured; not the raw token).
56-
#[arg(long, env = "GBASE_LAUNCH_TOKEN_HASH")]
56+
#[arg(long, env = "BASE_LAUNCH_TOKEN_HASH")]
5757
launch_token_hash: Option<String>,
5858
/// Subnet netuid embedded as non-secret env.
59-
#[arg(long, default_value_t = 1, env = "GBASE_NETUID")]
59+
#[arg(long, default_value_t = 1, env = "BASE_NETUID")]
6060
netuid: u16,
6161
/// Host path for the CVM-local receipt mini-secret (mode 0600). Generated if missing.
62-
#[arg(long, env = "GBASE_RECEIPT_SK_HOST_PATH", default_value = "receipt_sk")]
62+
#[arg(long, env = "BASE_RECEIPT_SK_HOST_PATH", default_value = "receipt_sk")]
6363
receipt_sk_host_path: PathBuf,
6464
/// Optional pre-known receipt public key (64 hex). When omitted, derived from the secret file.
65-
#[arg(long, env = "GBASE_RECEIPT_PUBLIC_KEY")]
65+
#[arg(long, env = "BASE_RECEIPT_PUBLIC_KEY")]
6666
receipt_public_key: Option<String>,
6767
/// Write rendered app-compose.json here.
6868
#[arg(long)]
@@ -74,22 +74,22 @@ enum Cmd {
7474
#[arg(long)]
7575
deploy: bool,
7676
/// Path to `phala` binary.
77-
#[arg(long, default_value = "phala", env = "GBASE_PHALA_BIN")]
77+
#[arg(long, default_value = "phala", env = "BASE_PHALA_BIN")]
7878
phala_bin: PathBuf,
7979
},
8080
/// Request nonce, obtain D10-bound quote, submit to validator (task 38).
8181
Certify {
8282
/// Validator base URL (`http://host:port`).
83-
#[arg(long, env = "GBASE_VALIDATOR_URL")]
83+
#[arg(long, env = "BASE_VALIDATOR_URL")]
8484
validator_url: String,
8585
/// Subnet netuid.
86-
#[arg(long, default_value_t = 1, env = "GBASE_NETUID")]
86+
#[arg(long, default_value_t = 1, env = "BASE_NETUID")]
8787
netuid: u16,
8888
/// Epoch to bind into `report_data`.
89-
#[arg(long, env = "GBASE_EPOCH")]
89+
#[arg(long, env = "BASE_EPOCH")]
9090
epoch: u64,
9191
/// Miner hotkey (64 hex).
92-
#[arg(long, env = "GBASE_MINER_HOTKEY_HEX")]
92+
#[arg(long, env = "BASE_MINER_HOTKEY_HEX")]
9393
miner_hotkey_hex: String,
9494
/// Use embedded/real fixtures instead of a live CVM.
9595
#[arg(long, default_value_t = false)]
@@ -98,10 +98,10 @@ enum Cmd {
9898
#[arg(long)]
9999
fixture_dir: Option<PathBuf>,
100100
/// Live agent / attest-helper base URL (ignored when `--fixture-mode`).
101-
#[arg(long, env = "GBASE_AGENT_URL")]
101+
#[arg(long, env = "BASE_AGENT_URL")]
102102
agent_url: Option<String>,
103103
/// Optional validator hotkey override (defaults to nonce response).
104-
#[arg(long, env = "GBASE_VALIDATOR_HOTKEY_HEX")]
104+
#[arg(long, env = "BASE_VALIDATOR_HOTKEY_HEX")]
105105
validator_hotkey_hex: Option<String>,
106106
},
107107
}
@@ -158,7 +158,7 @@ fn run(cli: Cli) -> Result<(), String> {
158158
println!("receipt-sk-host-path={}", receipt_sk_host_path.display());
159159
println!("phala_invoked={}", result.phala_invoked);
160160
println!("mode={mode:?}");
161-
println!("note=miner_funds_own_phala_account secrets_are_file_mounts_under_/run/gbase");
161+
println!("note=miner_funds_own_phala_account secrets_are_file_mounts_under_/run/base");
162162
Ok(())
163163
}
164164
Cmd::Certify {

bins/trustroot/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! `trustroot` — offline ceremony CLI (keygen / sign / verify).
22
//!
33
//! Secrets are written outside the git tree (operator chooses path). Prefer
4-
//! `/root/.gbase-secrets/` with mode 0700. Age encryption is applied via the
4+
//! `/root/.base-secrets/` with mode 0700. Age encryption is applied via the
55
//! system `age` binary when `--age-recipient` is set.
66
77
use std::fs;

0 commit comments

Comments
 (0)