diff --git a/go.mod b/go.mod index b104fde8b1..ffd9afedb3 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 github.com/ethereum-optimism/optimism v1.7.4 github.com/ethereum/go-ethereum v1.13.15 - github.com/ethereum/hive v0.0.0-20240819211657-cf4f55c5d80c + github.com/ethereum/hive v0.0.0-20240822135954-91829ccfb2c5 github.com/go-git/go-git/v5 v5.12.0 github.com/go-resty/resty/v2 v2.7.0 github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 @@ -338,4 +338,4 @@ replace github.com/ethereum-optimism/optimism v1.7.4 => github.com/taikoxyz/opti replace github.com/uber/jaeger-client-go => github.com/uber/jaeger-client-go v2.25.0+incompatible -replace github.com/ethereum/hive v0.0.0-20240819211657-cf4f55c5d80c => github.com/taikoxyz/hive v0.0.0-20240820085424-18828a3c52ee +replace github.com/ethereum/hive v0.0.0-20240822135954-91829ccfb2c5 => github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082 diff --git a/go.sum b/go.sum index 634d57e046..3d85672de4 100644 --- a/go.sum +++ b/go.sum @@ -1175,8 +1175,8 @@ github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/taikoxyz/hive v0.0.0-20240820085424-18828a3c52ee h1:/TbK2Ui8YJveJDQexkvchBOL4uX8HILThARQNZ9aEtU= -github.com/taikoxyz/hive v0.0.0-20240820085424-18828a3c52ee/go.mod h1:SRnVApayESg4JOlUIojO1nKNG8BLxdpZSkewWrj6rYU= +github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082 h1:ymZR+Y88LOnA8i3KeuJXK7hff2n7bpMIhONPJwpcA5w= +github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082/go.mod h1:RHnIu3EFehrWX3JhFAMQSXD5uz7l0xaNroTzXrap7EQ= github.com/taikoxyz/optimism v0.0.0-20240627102435-4845247ff00c h1:Hfhh/icxShwpLdX7RqYzZN1EU40MGWhvSXc2V+ZzTxw= github.com/taikoxyz/optimism v0.0.0-20240627102435-4845247ff00c/go.mod h1:jKn73pLX8eDIG0Y3XeuUSetepecM8OvRflyPHbi05B4= github.com/taikoxyz/taiko-geth v1.5.1-0.20240808041410-882a6cd3294c h1:XQDnwQfisAlFAGKqabDcLdg9B+pRwS3nxS+03yP1g9o= diff --git a/packages/eventindexer/.golangci.yml b/packages/eventindexer/.golangci.yml index 4d07f36217..2f3a3d4742 100644 --- a/packages/eventindexer/.golangci.yml +++ b/packages/eventindexer/.golangci.yml @@ -19,7 +19,6 @@ linters: - gocritic - gofmt # - revive - - gosec - gosimple - lll - unused diff --git a/packages/taiko-client/integration_test/hive_test.go b/packages/taiko-client/integration_test/hive_test.go index 9d66fa49f4..ce168762b7 100644 --- a/packages/taiko-client/integration_test/hive_test.go +++ b/packages/taiko-client/integration_test/hive_test.go @@ -2,6 +2,7 @@ package integration_test import ( "context" + "fmt" "os" "testing" @@ -14,24 +15,47 @@ func TestHiveHandler(t *testing.T) { if baseDir == "" { t.SkipNow() } - t.Run("taiko-deneb-testnet/test-deneb-genesis", testDenebGenesis) - t.Run("taiko-deneb-reorg/test-deneb-reorg", testDenebReorg) + + clientGroups := [][]string{ + { + "taiko/anvil", + "taiko/taiko-geth", + "taiko/driver", + "taiko/proposer", + "taiko/prover", + }, + { + "taiko/taiko-geth", + "taiko/driver", + }, + { + "taiko/taiko-geth", + "taiko/driver", + }, + } + + // Single cluster test. + t.Run("taiko-deneb-testnet/test-deneb-genesis/clusters(1)", func(t *testing.T) { + testDenebGenesis(t, [][]string{clientGroups[0]}) + }) + t.Run("taiko-deneb-reorg/test-deneb-reorg/clusters(1)", func(t *testing.T) { + testDenebReorg(t, [][]string{clientGroups[0]}) + }) + + // Multi clusters test. + t.Run(fmt.Sprintf("taiko-deneb-testnet/test-deneb-genesis/clusters(%d)", len(clientGroups)), func(t *testing.T) { + testDenebGenesis(t, clientGroups) + }) } -func testDenebGenesis(t *testing.T) { +func testDenebGenesis(t *testing.T, clientGroups [][]string) { handler, err := hivesim.NewHiveFramework(&hivesim.HiveConfig{ BuildOutput: false, ContainerOutput: true, BaseDir: os.Getenv("HIVE_DIR"), SimPattern: "taiko", SimTestPattern: "taiko-deneb-testnet/test-deneb-genesis", - Clients: []string{ - "taiko/anvil", - "taiko/taiko-geth", - "taiko/driver", - "taiko/proposer", - "taiko/prover", - }, + ClientGroups: clientGroups, }) assert.NoError(t, err) @@ -40,20 +64,14 @@ func testDenebGenesis(t *testing.T) { assert.Equal(t, 0, failedCount) } -func testDenebReorg(t *testing.T) { +func testDenebReorg(t *testing.T, clientGroups [][]string) { handler, err := hivesim.NewHiveFramework(&hivesim.HiveConfig{ BuildOutput: false, ContainerOutput: true, BaseDir: os.Getenv("HIVE_DIR"), SimPattern: "taiko", SimTestPattern: "taiko-deneb-reorg/test-deneb-reorg", - Clients: []string{ - "taiko/anvil", - "taiko/taiko-geth", - "taiko/driver", - "taiko/proposer", - "taiko/prover", - }, + ClientGroups: clientGroups, }) assert.NoError(t, err)