Skip to content

feat(node)!: send the erb token as a bearer header in get-and-observe-missing-vaas - #5092

Merged
jmgilman merged 6 commits into
wormhole-foundation:mainfrom
jmgilman:jmgilman/reobserve-erb-client
Nov 4, 2026
Merged

jmgilman merged 6 commits into
wormhole-foundation:mainfrom
jmgilman:jmgilman/reobserve-erb-client

Conversation

@jmgilman

@jmgilman jmgilman commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This moves guardiand admin get-and-observe-missing-vaas over to the Wormhole Foundation's new reobserve endpoint in erb. It replaces the reobserve-vaas Cloud Function in the wormhole-dashboard GCP project, which is being shut down.

The new endpoint works differently in two ways:

  1. It authenticates with a bearer token, like the rest of erb's API. The token goes in the Authorization header instead of in the request body.
  2. It returns only the messages the calling Guardian is expected to observe. On a delegated chain, only that chain's delegates are asked for its messages. erb works out which Guardian is asking from the token: each token belongs to a Guardian's organization in erb, and that organization's key in the current Guardian set is the caller. A token can't be used to ask on behalf of a different Guardian.

The response format is unchanged.

Change

  • The API_KEY argument is sent as Authorization: Bearer <API_KEY>.
  • The request has no body.
  • If the endpoint returns an error status, the command now reports the status and the response body. Before, it tried to parse the error body as the list and failed with a confusing JSON error.
  • The command's arguments stay the same: get-and-observe-missing-vaas [URL] [API_KEY].

This is a breaking change

Once a Guardian runs this version, the command no longer works against the old reobserve-vaas function, because that function reads the key from the request body. Anyone using the command needs to switch to the erb URL and an erb token when they upgrade. Guardian operators create the token themselves in erb, as a service account under their Guardian's organization. The Foundation will coordinate the switch.

Testing

  • New unit tests using an httptest server:
    • the request carries the bearer header and no body;
    • an error status from the endpoint is returned as an error that includes the status.
  • go test ./pkg/adminrpc ./pkg/node passes.
  • The repo's custom golangci-lint reports no issues on node/.

…e-missing-vaas

GetAndObserveMissingVAAs now calls the missing-VAA endpoint the way erb's
POST /api/v1/stuck/reobserve expects:

- the admin RPC's api_key is sent as "Authorization: Bearer <api_key>"
  instead of in the body;
- the body is {"guardian": "0x<address>"}, the node's own guardian address,
  so the endpoint returns only the messages this guardian should observe.
  The address is derived from the guardian signer and passed into
  NewPrivService;
- a non-2xx response is returned as an error carrying the status and body,
  instead of failing to unmarshal the error body.

The response format and the CLI arguments [URL] [API_KEY] are unchanged.

BREAKING CHANGE: the request no longer carries {"apiKey": ...} in the body,
so endpoints that authenticate that way, such as the wormhole-dashboard
reobserve-vaas Cloud Function, reject it.
@jmgilman

Copy link
Copy Markdown
Contributor Author

Note this PR socializes this early. I am keeping it in draft until the erb side is done.

@jmgilman
jmgilman marked this pull request as ready for review October 29, 2026 15:20
…serve-missing-vaas

erb now works out the polling Guardian from the token's organization, so the request no longer names the Guardian and has no body.
@jmgilman jmgilman changed the title feat(node)!: send bearer token and guardian address in get-and-observe-missing-vaas feat(node)!: send the erb token as a bearer header in get-and-observe-missing-vaas Nov 3, 2026

@evan-gray evan-gray 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.

there are likely other fixes and improvements that could be made around this code, but these changes seem alright.

@jmgilman
jmgilman merged commit 8615418 into wormhole-foundation:main Nov 4, 2026
45 checks passed
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.

4 participants