staking: forward solana_rpc_endpoint and eth_rpc_endpoint env vars#14375
Open
dylanjeffers wants to merge 1 commit into
Open
staking: forward solana_rpc_endpoint and eth_rpc_endpoint env vars#14375dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
The staking pedalboard service reads `process.env.solana_rpc_endpoint` and `process.env.eth_rpc_endpoint` at boot, but the compose entry never forwarded them. Add `env_file: .env` plus an explicit `environment:` block (matching the pattern other pedalboard services use) so the service actually has its RPC URLs in prod. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Merged
7 tasks
dylanjeffers
added a commit
to AudiusProject/pedalboard
that referenced
this pull request
May 21, 2026
Brings the staking service to parity with the version in
apps/packages/discovery-provider/plugins/pedalboard/apps/staking and
fixes a handful of issues that would have prevented it from running
in prod:
- Bump @audius/eth 0.1.0 -> 1.0.0. The 1.0.0 export shape changed:
ClaimsManager is now a plain `{ abi, address }` object rather than
a class, so `new ClaimsManager(viemClient)` was a runtime crash.
Rewrite initRound to use viemClient.readContract({ abi, address,
functionName }) and parallelize the three on-chain reads.
- Replace `npx tsx ./src/index.ts` start script with `tsc` build +
`node ./dist/index.js`, matching anti-abuse-oracle. The Dockerfile
already runs `npm run build` during install, so tsx at runtime
was both slower and dragged the dev toolchain into prod.
- Pin the server port to 6000 (matches the nginx
/plugins/<service>/... upstream) and drop the `process.env.port`
fallback that no caller was setting.
- /health now returns the standard `{ status: 'ok' }` shape used by
the other pedalboard services instead of `{ status: 'up', port }`.
The apps/dev-tools/compose/docker-compose.pedalboard.prod.yml entry
was also missing the env_file/environment blocks needed to forward
solana_rpc_endpoint and eth_rpc_endpoint to the container. That's
fixed in a paired PR on the apps repo (AudiusProject/apps#14375)
so this service actually has its RPC URLs at runtime.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dylanjeffers
added a commit
to AudiusProject/pedalboard
that referenced
this pull request
May 21, 2026
Brings the staking service to parity with the version in
apps/packages/discovery-provider/plugins/pedalboard/apps/staking and
fixes a handful of issues that would have prevented it from running
in prod:
- Bump @audius/eth 0.1.0 -> 1.0.0. The 1.0.0 export shape changed:
ClaimsManager is now a plain `{ abi, address }` object rather than
a class, so `new ClaimsManager(viemClient)` was a runtime crash.
Rewrite initRound to use viemClient.readContract({ abi, address,
functionName }) and parallelize the three on-chain reads.
- Replace `npx tsx ./src/index.ts` start script with `tsc` build +
`node ./dist/index.js`, matching anti-abuse-oracle. The Dockerfile
already runs `npm run build` during install, so tsx at runtime
was both slower and dragged the dev toolchain into prod.
- Pin the server port to 6000 (matches the nginx
/plugins/<service>/... upstream) and drop the `process.env.port`
fallback that no caller was setting.
- /health now returns the standard `{ status: 'ok' }` shape used by
the other pedalboard services instead of `{ status: 'up', port }`.
The apps/dev-tools/compose/docker-compose.pedalboard.prod.yml entry
was also missing the env_file/environment blocks needed to forward
solana_rpc_endpoint and eth_rpc_endpoint to the container. That's
fixed in a paired PR on the apps repo (AudiusProject/apps#14375)
so this service actually has its RPC URLs at runtime.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
process.env.solana_rpc_endpointandprocess.env.eth_rpc_endpoint, but the prod compose entry never forwarded them — the container would boot with both undefined.env_file: .envplus anenvironment:block forwardingSOLANA_RPC_ENDPOINTandETH_RPC_ENDPOINT, matching the pattern other pedalboard services use (e.g.solana-relay).Context
Pairs with the staking-service migration to the standalone pedalboard repo: https://github.com/AudiusProject/pedalboard (separate PR). That PR contains the
ClaimsManagerruntime fix, thetsc/node distbuild setup, the/healthendpoint, and the port pin to6000— but none of that helps if the RPC URLs never reach the container.Test plan
SOLANA_RPC_ENDPOINTandETH_RPC_ENDPOINTset in.env.docker compose exec staking env | grep _rpc_endpoint— confirm both are set.curl http://staking:6000/init-round— confirm the route does not crash onprocess.env.eth_rpc_endpoint!.🤖 Generated with Claude Code