From 8add2790a3990d6dc05e99d1352df85593e86be5 Mon Sep 17 00:00:00 2001 From: Tyler <48813565+technicallyty@users.noreply.github.com> Date: Fri, 25 Oct 2024 07:52:29 -1000 Subject: [PATCH 1/3] chore: update codeowners to @skip-connect (#807) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0f3403033..7a60a536e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,4 +4,4 @@ # Primary repo maintainers -* @aljo242 @Eric-Warehime @technicallyty @wesl-ee @zrbecker +* @skip-mev/skip-connect From 7355199cc4b18ff6d7f2f07ec877b64875b57527 Mon Sep 17 00:00:00 2001 From: Tyler <48813565+technicallyty@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:00:52 -1000 Subject: [PATCH 2/3] chore: change use and short text for `connect` binary (#806) --- cmd/connect/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/connect/main.go b/cmd/connect/main.go index 50e4c68eb..61edcf57b 100644 --- a/cmd/connect/main.go +++ b/cmd/connect/main.go @@ -37,8 +37,8 @@ import ( var ( rootCmd = &cobra.Command{ - Use: "oracle", - Short: "Run the connect oracle server.", + Use: "connect", + Short: "Run the connect oracle.", Args: cobra.NoArgs, RunE: func(_ *cobra.Command, _ []string) error { return runOracle() From c5b2cfc7b4767207f57bb7a20708629a61d0a970 Mon Sep 17 00:00:00 2001 From: Tyler <48813565+technicallyty@users.noreply.github.com> Date: Thu, 31 Oct 2024 05:04:26 -1000 Subject: [PATCH 3/3] fix: remove unnecessary block from websocket subtask creator (#809) --- providers/base/fetch.go | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/providers/base/fetch.go b/providers/base/fetch.go index 246fbb792..89589a915 100644 --- a/providers/base/fetch.go +++ b/providers/base/fetch.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap" + "github.com/skip-mev/connect/v2/pkg/slices" providermetrics "github.com/skip-mev/connect/v2/providers/base/metrics" providertypes "github.com/skip-mev/connect/v2/providers/types" ) @@ -85,23 +86,8 @@ func (p *Provider[K, V]) startMultiplexWebsocket(ctx context.Context) error { if maxSubsPerConn > 0 { // case where we will split ID's across sub handlers numSubHandlers := int(math.Ceil(float64(len(ids)) / float64(maxSubsPerConn))) - p.logger.Debug("setting number of web socket handlers for provider", zap.Int("sub_handlers", numSubHandlers)) wg.SetLimit(numSubHandlers) - - // split ids - for i := 0; i < numSubHandlers; i++ { - start := i * maxSubsPerConn - - // Copy the IDs over. - subIDs := make([]K, 0) - if end := start + maxSubsPerConn; end >= len(ids) { - subIDs = append(subIDs, ids[start:]...) - } else { - subIDs = append(subIDs, ids[start:end]...) - } - - subTasks = append(subTasks, subIDs) - } + subTasks = slices.Chunk(ids, maxSubsPerConn) } else { // case where there is 1 sub handler subTasks = append(subTasks, ids) @@ -110,14 +96,6 @@ func (p *Provider[K, V]) startMultiplexWebsocket(ctx context.Context) error { for _, subIDs := range subTasks { wg.Go(p.startWebSocket(ctx, subIDs)) - - select { - case <-time.After(p.wsCfg.HandshakeTimeout): - p.logger.Debug("handshake timeout reached") - case <-ctx.Done(): - p.logger.Debug("context done") - return wg.Wait() - } } // Wait for all the sub handlers to finish.