From 3ae577bf06e9f103ce610de0d9a24834c6815463 Mon Sep 17 00:00:00 2001 From: Mikel Cortes Date: Thu, 21 Mar 2024 18:24:53 +0100 Subject: [PATCH] update gossipsub blocks to handle deneb blocks --- docker-compose.yaml | 3 ++- pkg/networks/ethereum/gossip_handlers.go | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index c671b64..4d37103 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,11 +5,12 @@ networks: services: db: - image: postgres:14.1-alpine + image: postgres:latest restart: unless-stopped environment: - POSTGRES_USER=user - POSTGRES_PASSWORD=password + - POSTGRES_DATABASE=armiarmadb volumes: - type: bind source: ./app-data/init-armiarma.sql diff --git a/pkg/networks/ethereum/gossip_handlers.go b/pkg/networks/ethereum/gossip_handlers.go index 8618f4b..032d657 100644 --- a/pkg/networks/ethereum/gossip_handlers.go +++ b/pkg/networks/ethereum/gossip_handlers.go @@ -3,14 +3,14 @@ package ethereum import ( "bytes" "fmt" + "github.com/protolambda/zrnt/eth2/beacon/phase0" "time" // bls "github.com/phoreproject/github.com/bls/g1pubs" "github.com/migalabs/armiarma/pkg/gossipsub" - "github.com/protolambda/zrnt/eth2/beacon/capella" "github.com/protolambda/zrnt/eth2/beacon/common" - "github.com/protolambda/zrnt/eth2/beacon/phase0" + "github.com/protolambda/zrnt/eth2/beacon/deneb" "github.com/protolambda/zrnt/eth2/configs" "github.com/protolambda/ztyp/codec" @@ -140,7 +140,7 @@ func (mh *EthMessageHandler) BeaconBlockMessageHandler(msg *pubsub.Message) (gos return nil, err } msgBuf := bytes.NewBuffer(msgBytes) - bblock := new(capella.SignedBeaconBlock) + bblock := new(deneb.SignedBeaconBlock) err = bblock.Deserialize(configs.Mainnet, codec.NewDecodingReader(msgBuf, uint64(len(msgBuf.Bytes())))) if err != nil {