chain routes: /v1/bc -> /v1/chain

luxd serves chain routes under /v1/chain, and the node, cli and sdk releases
already ship it. The deployed gateways still answer the old prefix, so remote
reads break until they are redeployed; the estate moves together rather than
sitting half converted.

Lines that record an observation - a probe, a status code, a past release -
keep the prefix they were written against, as do URLs on hosts that are not
ours. Avalanche endpoints move to /ext/bc, which is the path that host serves.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-09-01 08:16:57 -07:00
co-authored by Hanzo Dev
parent 3777a375fb
commit 9e4aa8c436
8 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ type client struct {
// NewClient returns a Client for interacting with EVM [chain]
func NewClient(uri, chain string) Client {
requestUri := fmt.Sprintf("%s/v1/bc/%s", uri, chain)
requestUri := fmt.Sprintf("%s/v1/chain/%s", uri, chain)
return NewClientWithURL(requestUri)
}
+3 -3
View File
@@ -31,7 +31,7 @@ func TestNewClientRequestsV1Paths(t *testing.T) {
}
got := <-seen
if want := "/v1/bc/C/admin"; got != want {
if want := "/v1/chain/C/admin"; got != want {
t.Fatalf("admin endpoint = %q, want %q", got, want)
}
if strings.Contains(got, "/ext/") {
@@ -41,7 +41,7 @@ func TestNewClientRequestsV1Paths(t *testing.T) {
if _, err := c.GetCurrentValidators(context.Background(), nil); err != nil {
t.Fatalf("GetCurrentValidators: %v", err)
}
if got, want := <-seen, "/v1/bc/C/validators"; got != want {
if got, want := <-seen, "/v1/chain/C/validators"; got != want {
t.Fatalf("validators endpoint = %q, want %q", got, want)
}
}
@@ -61,7 +61,7 @@ func TestNewClientUsesChainArgument(t *testing.T) {
if err := NewClient(srv.URL, chainID).StartCPUProfiler(context.Background()); err != nil {
t.Fatalf("StartCPUProfiler: %v", err)
}
if got, want := <-seen, "/v1/bc/"+chainID+"/admin"; got != want {
if got, want := <-seen, "/v1/chain/"+chainID+"/admin"; got != want {
t.Fatalf("endpoint = %q, want %q", got, want)
}
}