From 11f56080791b5490d9612f05db683803115538b8 Mon Sep 17 00:00:00 2001 From: tac0turtle Date: Mon, 24 Nov 2025 15:44:36 +0100 Subject: [PATCH 1/2] remove extra github action yml file --- project/.github/workflows/test.yml | 40 ------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 project/.github/workflows/test.yml diff --git a/project/.github/workflows/test.yml b/project/.github/workflows/test.yml deleted file mode 100644 index 4481ec6a8b..0000000000 --- a/project/.github/workflows/test.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: CI - -on: - push: - pull_request: - workflow_dispatch: - -env: - FOUNDRY_PROFILE: ci - -jobs: - check: - name: Foundry project - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Show Forge version - run: | - forge --version - - - name: Run Forge fmt - run: | - forge fmt --check - id: fmt - - - name: Run Forge build - run: | - forge build --sizes - id: build - - - name: Run Forge tests - run: | - forge test -vvv - id: test From c3bf903f4f04da938ceda637c319cbf62fa20b4f Mon Sep 17 00:00:00 2001 From: tac0turtle Date: Mon, 24 Nov 2025 16:27:28 +0100 Subject: [PATCH 2/2] fix: ensure consistent network ID usage in P2P subscriber --- pkg/sync/sync_service.go | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pkg/sync/sync_service.go b/pkg/sync/sync_service.go index 6a17a42a85..9b018460ed 100644 --- a/pkg/sync/sync_service.go +++ b/pkg/sync/sync_service.go @@ -252,13 +252,18 @@ func (syncService *SyncService[H]) initStore(ctx context.Context, initial H) (bo // but does not start the Subscriber. Returns peer IDs for later use. func (syncService *SyncService[H]) setupP2PInfrastructure(ctx context.Context) ([]peer.ID, error) { ps := syncService.p2p.PubSub() - var err error + + _, _, chainID, err := syncService.p2p.Info() + if err != nil { + return nil, fmt.Errorf("error while fetching the network: %w", err) + } + networkID := syncService.getNetworkID(chainID) // Create subscriber but DON'T start it yet syncService.sub, err = goheaderp2p.NewSubscriber[H]( ps, pubsub.DefaultMsgIdFn, - goheaderp2p.WithSubscriberNetworkID(syncService.getChainID()), + goheaderp2p.WithSubscriberNetworkID(networkID), goheaderp2p.WithSubscriberMetrics(), ) if err != nil { @@ -269,12 +274,6 @@ func (syncService *SyncService[H]) setupP2PInfrastructure(ctx context.Context) ( return nil, fmt.Errorf("error while starting store: %w", err) } - _, _, network, err := syncService.p2p.Info() - if err != nil { - return nil, fmt.Errorf("error while fetching the network: %w", err) - } - networkID := syncService.getNetworkID(network) - if syncService.p2pServer, err = newP2PServer(syncService.p2p.Host(), syncService.store, networkID); err != nil { return nil, fmt.Errorf("error while creating p2p server: %w", err) } @@ -446,10 +445,6 @@ func (syncService *SyncService[H]) getNetworkID(network string) string { return network + "-" + string(syncService.syncType) } -func (syncService *SyncService[H]) getChainID() string { - return syncService.genesis.ChainID + "-" + string(syncService.syncType) -} - func (syncService *SyncService[H]) getPeerIDs() []peer.ID { peerIDs := syncService.p2p.PeerIDs() if !syncService.conf.Node.Aggregator {