Expand description
A relay server that’s collecting and serving the light client state signatures
Modules§
Structs§
- Relay
Error - Wire-compatible error envelope: mirrors
http_client::error::ClientErr’s{status, message}JSON/VBS shape, since production clients (state_signature.rs,hotshot-state-prover) deserialize error responses into that type. - State
Relay Server State - State that checks the light client state update and the signature collection
Constants§
Functions§
- decode_
body 🔒 - get_
latest_ 🔒legacy_ state GET legacy-state: mirrors tide’sgetlatestlegacystate.- get_
latest_ 🔒state GET state(deprecated): mirrors tide’sgetlateststate, always the LCV2 bundle regardless of version, since all three registered API versions shared this handler.- get_
latest_ 🔒state_ v1 - get_
latest_ 🔒state_ v2 - get_
latest_ 🔒state_ v3 - get_
lateststate_ 🔒v1 - get_
lateststate_ 🔒v2 - get_
lateststate_ 🔒v3 - get_
legacy_ 🔒state - get_
state 🔒 - healthcheck 🔒
- post_
legacy_ 🔒state - post_
legacy_ 🔒state_ signature - Handle a
POSTtolegacy-state: tries LCV1, then LCV2 (downgraded to LCV1). Mirrors tide’spostlegacystatesignature. - post_
state 🔒 - post_
state_ 🔒signature - Handle a
POSTtostate/api/state: tries LCV3, then LCV2 (auto-downgrading to LCV1 if the signature verifies against the legacy scheme), then LCV1. Mirrors tide’spoststatesignature. - router 🔒
- Build the relay server router. Tide-disco registered
apiunder three stacked major API versions (v1, v2, v3) with identical handlers for every route exceptlateststate; requests with no version prefix were redirected to the latest (v3). We reproduce that by serving the same handlers at the unversioned and all three/v{1,2,3}paths, and only special-casinglateststateper version. - run_
relay_ server - run_
relay_ server_ with_ state - serve 🔒
Type Aliases§
- Shared
State 🔒 - Shared, lock-guarded server state, cloned into every axum handler via
State.