Skip to content

Clean up nodes, add unsplash, /discovery, /content routes - #601

Merged
raymondjacobson merged 3 commits into
mainfrom
rj-lb
Dec 17, 2025
Merged

raymondjacobson merged 3 commits into
mainfrom
rj-lb

Conversation

@raymondjacobson

Copy link
Copy Markdown
Member

Get parity with load-balancer frontend, so we can remove it and hit api directly

  • Remove content_node_monitor and just use the validators list that comes from the core node
  • Add unsplash endpoint
  • Add /discovery, /discovery/verbose, /content, /content/verbose endpoints
  • Update root endpoint to return same data as https://api.audius.co/ currently does in a data field

@rickyrombo rickyrombo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A little indirect with the global refresh for the node list living in some extra file and global rendezvous hasher.. but I get it. for testing it might make sense to refactor away from globals in the future.

Comment thread api/server.go Outdated
"started": app.started,
"uptime": time.Since(app.started).Truncate(time.Second).String(),
"data": []string{
"https://discoveryprovider.audius.co",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: maybe https://api.audius.co? (doesn't this just redirect?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah true true

Comment thread config/nodes.go
Endpoint string
// The individual wallet address for the node
DelegateOwnerWallet string
DelegateWallet string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

praise

Comment thread config/nodes.go
DelegateWallet string
// The wallet address for the node owner/operator
OwnerWallet string
Owner string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeebuz

Comment thread config/nodes.go Outdated
// The wallet address for the node owner/operator
OwnerWallet string
Owner string
// Discovery Nodes have storage disabled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ty

@raymondjacobson

Copy link
Copy Markdown
Member Author

A little indirect with the global refresh for the node list living in some extra file and global rendezvous hasher.. but I get it. for testing it might make sense to refactor away from globals in the future.

Yeah I agree. I think this PR improves things and doesn't add any new globals really, but it isn't perfect.

@raymondjacobson
raymondjacobson merged commit 6a74d79 into main Dec 17, 2025
5 checks passed
@raymondjacobson
raymondjacobson deleted the rj-lb branch December 17, 2025 01:45
rickyrombo added a commit that referenced this pull request Oct 23, 2026
Pairs with OpenAudio/go-openaudio#601. **Merge after it, and deploy
before the new-chain flusher is turned on.**

## Problem

go-openaudio#601 has core refuse a `ForwardTransaction` whose chain ID
differs from its own. On `audius-mainnet-beta` it also refuses one that
names no chain at all. That stops the old chain's gossip from leaking
into the new chain's mempool. The flusher forwards through the same RPC
and stamps nothing, so once #601 is out the new chain refuses every
queued row and the flusher stalls on the first one.

## Change

- New `NewChainID` config field. It defaults to `audius-mainnet-beta` in
prod and `openaudio-devnet` in dev, and `newChainId` overrides it. Stage
has no default, because it has no new chain.
- `flushRow` stamps it on every `ForwardTransactionRequest`.
- With `newChainFlushEnabled` set but no chain ID, the server logs an
error and does not start the flusher, rather than starting one the new
chain will refuse.

The chain ID is configured rather than read back from `newChainUrl` on
purpose. Stamping whatever the target reports would always pass the
check. A configured value means that if `newChainUrl` points at a node
on another chain, the flusher stalls on the first refused row instead of
writing the backlog there.

## Dependency

Bumps `github.com/OpenAudio/go-openaudio` to #601's head (`8388df0b`)
for the new `chain_id` field. After #601 merges, re-pin to the merge
commit on `main`. The bump spans several releases. The full suite builds
and passes except as noted below.

## Tests

- `TestNewChainFlusherSends` asserts that every forward carries the
configured chain ID.
- `go test ./...` with the compose `db` and Elasticsearch services up:
everything passes except `TestFeedScheduledReleases`, which fails the
same way on `main` without this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
rickyrombo added a commit that referenced this pull request Oct 23, 2026
Follow-up to #1059, which pinned `github.com/OpenAudio/go-openaudio` to
OpenAudio/go-openaudio#601's branch head (`8388df0b`) to get
`ForwardTransactionRequest.chain_id` before #601 merged. #601 is on
`main` now, so this pins to `main` (`9dce6d97`) instead of a commit that
never landed there.

Only `go.mod` and `go.sum` change. Besides #601, the bump picks up
go-openaudio#595, which touches only the genesis writer, nothing the API
imports.

## Tests

`go build ./...` passes. With the compose `db` up, the new-chain flusher
tests (including the chain-ID stamping assertion) and `./config` pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants