From 7d6db54d413ef08728733fae4be886bf32ff3ef5 Mon Sep 17 00:00:00 2001 From: Gavin Yu Date: Tue, 17 Sep 2024 21:41:24 +0800 Subject: [PATCH] fix(taiko-client): revert path changes about SocialScan endpoint (#18119) --- .../integration_test/hive_test.go | 46 ++++++++++++++++++- .../taiko-client/pkg/rpc/blob_datasource.go | 2 +- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/packages/taiko-client/integration_test/hive_test.go b/packages/taiko-client/integration_test/hive_test.go index 6aea46425d8..fad8a430946 100644 --- a/packages/taiko-client/integration_test/hive_test.go +++ b/packages/taiko-client/integration_test/hive_test.go @@ -18,7 +18,7 @@ func TestHiveHandler(t *testing.T) { clientGroups := [][]string{ { - "taiko/anvil", + "anvil", "taiko/taiko-geth", "taiko/driver", "taiko/proposer", @@ -46,6 +46,50 @@ func TestHiveHandler(t *testing.T) { t.Run("taiko-reorg/taiko-reorg/clusters(1)", func(t *testing.T) { testDenebReorg(t, "taiko-reorg/taiko-reorg", [][]string{clientGroups[0]}) }) + + t.Run("taiko-blob/blob-l1-beacon", func(t *testing.T) { + testBlobScan(t, "taiko-blob/blob-server", []string{ + "geth", + "prysm/prysm-bn", + "prysm/prysm-vc", + "taiko/taiko-geth", + "taiko/driver", + "taiko/proposer", + "taiko/prover", + "storage/redis", + "storage/postgres", + "blobscan/blobscan-api", + "blobscan/blobscan-indexer", + }) + }) + + t.Run("taiko-blob/blob-server", func(t *testing.T) { + testBlobScan(t, "taiko-blob/blob-l1-beacon", []string{ + "geth", + "prysm/prysm-bn", + "prysm/prysm-vc", + "taiko/taiko-geth", + "taiko/driver", + "taiko/proposer", + "taiko/prover", + }) + }) +} + +func testBlobScan(t *testing.T, pattern string, clients []string) { + handler, err := hivesim.NewHiveFramework(&hivesim.HiveConfig{ + BuildOutput: false, + ContainerOutput: true, + BaseDir: "/Users/huan/projects/taiko/hive", + SimPattern: "taiko", + SimTestPattern: pattern, + ClientGroups: [][]string{clients}, + }) + assert.NoError(t, err) + + failedCount, err := handler.Run(context.Background()) + assert.NoError(t, err) + assert.Equal(t, 0, failedCount) } func testDenebGenesis(t *testing.T, simPattern string, clientGroups [][]string) { diff --git a/packages/taiko-client/pkg/rpc/blob_datasource.go b/packages/taiko-client/pkg/rpc/blob_datasource.go index b1d208e76ae..c02d1606bb1 100644 --- a/packages/taiko-client/pkg/rpc/blob_datasource.go +++ b/packages/taiko-client/pkg/rpc/blob_datasource.go @@ -118,7 +118,7 @@ func (ds *BlobDataSource) getBlobFromServer(ctx context.Context, blobHash common err error ) if ds.socialScanEndpoint != nil { - route = "/blobs/" + blobHash.String() + route = "/blob/" + blobHash.String() requestURL, err = url.JoinPath(ds.socialScanEndpoint.String(), route) } else { route = "/blobs/" + blobHash.String()