Skip to content

fix(config): point oracleAccount at the deployed vault's on-chain oracle - #20

Merged
Oyinkans0la12 merged 1 commit into
mainfrom
fix/registry-oracle-account
Sep 15, 2026
Merged

Oyinkans0la12 merged 1 commit into
mainfrom
fix/registry-oracle-account

Conversation

@Oyinkans0la12

Copy link
Copy Markdown
Collaborator

Problem

The registry merged in #18 asserts oracleAccount: GCVR3V7I… — an identity generated on 2026-09-15 for this purpose, which has no authority over the deployed vault. splitstream-core's initialize(admin, oracle, token) fixes the oracle in instance storage, exposes no setter (a second initialize returns AlreadyInitialized, and there is no set_oracle among the 19 public functions), so a mismatch means post_cycle_root fails Unauthorized permanently.

Because src/relay.ts asserts the keypair resolves to the registry's oracleAccount before any RPC call, the current pairing cannot relay at all — the secret would resolve to something other than GCVR3V7I…, and if it did resolve, the contract would still reject it.

Fix

Point oracleAccount at the address actually stored on CCC2LP2L…, read directly from the contract's instance storage (DataKey::Oracle):

stellar contract read --id CCC2LP2L… --network testnet
  → storage: { Admin, Oracle, Token }
    Oracle = GBU2Q6BOD5WHRVTVLIYL4UQEFSSGS4DJOLAG23JRX52TILGQZM5HTHOJ

The on-chain value is authoritative and immutable, so the config must match it — never the reverse. A comment records why, so a future edit doesn't reintroduce this.

Verification

  • loadRegistry('.github/splitstream.yml') — the same entrypoint the action uses — passes, and the new G… strkey clears version + CRC16 checksum validation.
  • npm run check green (76 passed, 3 skipped).

Still required from the maintainer

ORACLE_SECRET_KEY must hold the secret for GBU2Q6BO… (the key that signed post_cycle_root(cycle_id=1) on 2026-09-08). gh secret list is still 403 for this token, so that is unverified.

⚠️ If that key is unrecoverable, no config change can help: the deployed contract can never accept another root, and the remedy is a redeploy + re-init touching all three repos (registry vaultContract included). This PR is a prerequisite in that path too — it removes a config that is wrong in every scenario.

The registry asserted a freshly generated identity that has no authority
over CCC2LP2L…: the vault fixes its oracle at initialize() and exposes no
setter, so the stored address is the only one post_cycle_root will accept.
Reading instance storage gives GBU2Q6BO…; the relay's pre-flight check
would otherwise refuse to sign, since ORACLE_SECRET_KEY cannot resolve to
a key the contract does not know.
@Oyinkans0la12
Oyinkans0la12 merged commit 84f50c1 into main Sep 15, 2026
1 check passed
@Oyinkans0la12
Oyinkans0la12 deleted the fix/registry-oracle-account branch September 15, 2026 13:59
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.

1 participant