Skip to content

new env var SOLVER_EXPLORER_URL#9

Closed
bordalix wants to merge 1 commit into
masterfrom
pass_explorer_url
Closed

new env var SOLVER_EXPLORER_URL#9
bordalix wants to merge 1 commit into
masterfrom
pass_explorer_url

Conversation

@bordalix

@bordalix bordalix commented Jun 9, 2026

Copy link
Copy Markdown

allows passing explorer url as env var for arksdk Init

closes #8

@arkanaai arkanaai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: #9SOLVER_EXPLORER_URL env var

Verdict: APPROVE

Clean, minimal change. Adds an optional SOLVER_EXPLORER_URL env var that gets passed through to arksdk.WithExplorerURL() during wallet init. Reviewed all 5 changed files against the go-sdk InitOption contract.

What's good

  • Correctly optional: ExplorerURL defaults to empty string, and service.go:209-211 only appends the WithExplorerURL option when non-empty. This avoids triggering the go-sdk's "explorer url cannot be empty" validation error (go-sdk/init_opts.go:23).
  • Proper go-sdk integration: WithExplorerURL and InitOption are confirmed exported in go-sdk at the pinned version (v0.9.2-0.20260518112312-588477f9d618). The variadic Init(...opts) signature matches.
  • Tests cover both paths: config_test.go asserts ExplorerURL is empty by default and correctly overridden via env var. Good.
  • Config layer is clean: follows the existing viper pattern exactly — add var, add struct field, read via viper.GetString().
  • Not protocol-critical: this only affects which block explorer the go-sdk wallet talks to for chain queries. No VTXO, signing, forfeit, or round lifecycle code is touched.

One bug in docker-compose

test/docker-compose.yml:70SOLVER_EXPLORER_URL=http://chopsticks:3000 is set on the arkd container, not the solver. The arkd image doesn't read SOLVER_* env vars — this env var is dead weight here. It should be set on whatever runs the solver process during tests (or in a solver service block if one gets added to this compose file). Not a blocker since tests likely set this env var separately, but worth fixing so the compose file isn't misleading.

No cross-repo breakage

  • No public API, proto, or type changes — this is purely internal config plumbing.
  • go-sdk already exports WithExplorerURL; no SDK changes needed.
  • README table updated correctly.

LGTM. Ship it, fix the docker-compose nit when convenient.

@louisinger

Copy link
Copy Markdown
Collaborator

included into 3b934ac

@louisinger louisinger closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't access explorer

2 participants