From 181016a38447362570b0ce7a2896a808f1208f59 Mon Sep 17 00:00:00 2001 From: Terence Tsao Date: Fri, 19 Apr 2019 12:41:33 -0700 Subject: [PATCH 1/5] use with fields --- beacon-chain/blockchain/fork_choice.go | 6 +- .../core/blocks/validity_conditions.go | 6 +- beacon-chain/core/state/transition.go | 2 +- beacon-chain/node/node.go | 2 +- beacon-chain/operations/service.go | 2 +- beacon-chain/operations/service_test.go | 8 +-- beacon-chain/powchain/log_processing.go | 2 +- beacon-chain/rpc/beacon_server.go | 3 +- beacon-chain/rpc/service.go | 2 +- beacon-chain/rpc/service_test.go | 4 +- beacon-chain/sync/initial-sync/service.go | 3 +- beacon-chain/sync/initial-sync/sync_blocks.go | 23 +++++--- beacon-chain/sync/receive_block.go | 8 ++- beacon-chain/sync/receive_block_test.go | 2 +- beacon-chain/sync/regular_sync.go | 59 ++++++++++++------- beacon-chain/sync/regular_sync_test.go | 19 +++--- 16 files changed, 84 insertions(+), 67 deletions(-) diff --git a/beacon-chain/blockchain/fork_choice.go b/beacon-chain/blockchain/fork_choice.go index dbbd954c051e..1701e430ceed 100644 --- a/beacon-chain/blockchain/fork_choice.go +++ b/beacon-chain/blockchain/fork_choice.go @@ -52,8 +52,7 @@ func (c *ChainService) updateFFGCheckPts(ctx context.Context, state *pb.BeaconSt // until we can get a block. lastAvailBlkSlot := lastJustifiedSlot for newJustifiedBlock == nil { - log.Debugf("Saving new justified block, no block with slot %d in db, trying slot %d", - lastAvailBlkSlot, lastAvailBlkSlot-1) + log.WithField("slot", lastAvailBlkSlot-params.BeaconConfig().GenesisSlot).Debug("Missing block in DB, looking one slot back") lastAvailBlkSlot-- newJustifiedBlock, err = c.beaconDB.BlockBySlot(ctx, lastAvailBlkSlot) if err != nil { @@ -91,8 +90,7 @@ func (c *ChainService) updateFFGCheckPts(ctx context.Context, state *pb.BeaconSt // until we can get a block. lastAvailBlkSlot := lastFinalizedSlot for newFinalizedBlock == nil { - log.Debugf("Saving new finalized block, no block with slot %d in db, trying slot %d", - lastAvailBlkSlot, lastAvailBlkSlot-1) + log.WithField("slot", lastAvailBlkSlot-params.BeaconConfig().GenesisSlot).Debug("Missing block in DB, looking one slot back") lastAvailBlkSlot-- newFinalizedBlock, err = c.beaconDB.BlockBySlot(ctx, lastAvailBlkSlot) if err != nil { diff --git a/beacon-chain/core/blocks/validity_conditions.go b/beacon-chain/core/blocks/validity_conditions.go index 7cf9c37c168c..4d38db10794a 100644 --- a/beacon-chain/core/blocks/validity_conditions.go +++ b/beacon-chain/core/blocks/validity_conditions.go @@ -71,8 +71,10 @@ func IsSlotValid(slot uint64, genesisTime time.Time) bool { now := clock.Now() isValid := now.After(validTimeThreshold) if !isValid { - log.Infof("Waiting for slot to be valid. local clock: %v, genesis+slot: %v", - now, validTimeThreshold) + log.WithFields(logrus.Fields{ + "localTime": now, + "genesisPlusSlotTime": validTimeThreshold, + }).Info("Waiting for slot to be valid") } return isValid } diff --git a/beacon-chain/core/state/transition.go b/beacon-chain/core/state/transition.go index 61ce3bd6f2a0..2d59a29f70ed 100644 --- a/beacon-chain/core/state/transition.go +++ b/beacon-chain/core/state/transition.go @@ -333,7 +333,7 @@ func ProcessEpoch(ctx context.Context, state *pb.BeaconState, config *Transition } case epochsSinceFinality > 4: - log.Infof("Applying more penalties. Epochs since finality %d greater than 4", epochsSinceFinality) + log.WithField("epochSinceFinality", epochsSinceFinality).Info("Applying quadratic leak penalties") // Apply penalties for long inactive FFG source participants. state = bal.InactivityFFGSource( state, diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index b7b4f1688a17..34839b7a1750 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -179,7 +179,7 @@ func (b *BeaconNode) startDB(ctx *cli.Context) error { return err } - log.Infof("Checking db at %s", dbPath) + log.WithField("path", dbPath).Info("Checking db") b.db = db return nil } diff --git a/beacon-chain/operations/service.go b/beacon-chain/operations/service.go index 69323ee318f4..a7aeced6adea 100644 --- a/beacon-chain/operations/service.go +++ b/beacon-chain/operations/service.go @@ -170,7 +170,7 @@ func (s *Service) HandleValidatorExits(ctx context.Context, message proto.Messag if err := s.beaconDB.SaveExit(ctx, exit); err != nil { return err } - log.Infof("Exit request %#x saved in DB", hash) + log.WithField("hash", fmt.Sprintf("%#x", hash)).Info("Exit request saved in DB") return nil } diff --git a/beacon-chain/operations/service_test.go b/beacon-chain/operations/service_test.go index 09f64271c27e..e856015727eb 100644 --- a/beacon-chain/operations/service_test.go +++ b/beacon-chain/operations/service_test.go @@ -10,7 +10,6 @@ import ( "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/beacon-chain/internal" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" - "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/sirupsen/logrus" @@ -91,16 +90,11 @@ func TestIncomingExits_Ok(t *testing.T) { service := NewOpsPoolService(context.Background(), &Config{BeaconDB: beaconDB}) exit := &pb.VoluntaryExit{Epoch: 100} - hash, err := hashutil.HashProto(exit) - if err != nil { - t.Fatalf("Could not hash exit proto: %v", err) - } - if err := service.HandleValidatorExits(context.Background(), exit); err != nil { t.Error(err) } - want := fmt.Sprintf("Exit request %#x saved in DB", hash) + want := fmt.Sprintf("Exit request saved in DB") testutil.AssertLogsContain(t, hook, want) } diff --git a/beacon-chain/powchain/log_processing.go b/beacon-chain/powchain/log_processing.go index c0417d6c00cf..246fca1441b4 100644 --- a/beacon-chain/powchain/log_processing.go +++ b/beacon-chain/powchain/log_processing.go @@ -52,7 +52,7 @@ func (w *Web3Service) ProcessLog(depositLog gethTypes.Log) { w.ProcessChainStartLog(depositLog) return } - log.Debugf("Log is not of a valid event signature %#x", depositLog.Topics[0]) + log.WithField("signature", fmt.Sprintf("%#x", depositLog.Topics[0])).Debug("Not a valid signature") } // ProcessDepositLog processes the log which had been received from diff --git a/beacon-chain/rpc/beacon_server.go b/beacon-chain/rpc/beacon_server.go index 45e2c4fed52c..2edcce525d18 100644 --- a/beacon-chain/rpc/beacon_server.go +++ b/beacon-chain/rpc/beacon_server.go @@ -139,7 +139,8 @@ func (bs *BeaconServer) Eth1Data(ctx context.Context, _ *ptypes.Empty) (*pb.Eth1 // Verify the block from the vote's block hash exists in the eth1.0 chain and fetch its height. blockExists, blockHeight, err := bs.powChainService.BlockExists(ctx, eth1Hash) if err != nil { - log.Debugf("Could not verify block with hash exists in Eth1 chain: %#x: %v", eth1Hash, err) + log.WithError(err).WithField("blockRoot", fmt.Sprintf("%#x", eth1Hash)). + Debug("Could not verify block with hash in ETH1 chain") continue } if !blockExists { diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index 7d7b2a133479..a67176a0336d 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -111,7 +111,7 @@ func (s *Service) Start() { log.Errorf("Could not listen to port in Start() :%s: %v", s.port, err) } s.listener = lis - log.Infof("RPC server listening on port :%s", s.port) + log.WithField("port", s.port).Info("Listening on port") opts := []grpc.ServerOption{ grpc.StatsHandler(&ocgrpc.ServerHandler{}), diff --git a/beacon-chain/rpc/service_test.go b/beacon-chain/rpc/service_test.go index 23edc929d7ee..7cd09f2ff0d1 100644 --- a/beacon-chain/rpc/service_test.go +++ b/beacon-chain/rpc/service_test.go @@ -132,7 +132,7 @@ func TestLifecycle_OK(t *testing.T) { rpcService.Start() testutil.AssertLogsContain(t, hook, "Starting service") - testutil.AssertLogsContain(t, hook, fmt.Sprintf("RPC server listening on port :%s", rpcService.port)) + testutil.AssertLogsContain(t, hook, "Listening on port") rpcService.Stop() testutil.AssertLogsContain(t, hook, "Stopping service") @@ -185,7 +185,7 @@ func TestRPC_InsecureEndpoint(t *testing.T) { rpcService.Start() testutil.AssertLogsContain(t, hook, "Starting service") - testutil.AssertLogsContain(t, hook, fmt.Sprintf("RPC server listening on port :%s", rpcService.port)) + testutil.AssertLogsContain(t, hook, fmt.Sprint("Listening on port")) testutil.AssertLogsContain(t, hook, "You are using an insecure gRPC connection") rpcService.Stop() diff --git a/beacon-chain/sync/initial-sync/service.go b/beacon-chain/sync/initial-sync/service.go index 2b0316cce1b4..f8b4929da534 100644 --- a/beacon-chain/sync/initial-sync/service.go +++ b/beacon-chain/sync/initial-sync/service.go @@ -239,8 +239,7 @@ func (s *InitialSync) exitInitialSync(ctx context.Context, block *pb.BeaconBlock s.highestObservedRoot, ) } - log.Infof("Canonical state slot: %d", canonicalState.Slot-params.BeaconConfig().GenesisSlot) - log.Info("Exiting initial sync and starting normal sync") + log.WithField("canonicalStateSlot", canonicalState.Slot-params.BeaconConfig().GenesisSlot).Info("Exiting init sync and starting regular sync") s.syncService.ResumeSync() s.cancel() s.nodeIsSynced = true diff --git a/beacon-chain/sync/initial-sync/sync_blocks.go b/beacon-chain/sync/initial-sync/sync_blocks.go index 976e59d50a51..e6dea63e04e1 100644 --- a/beacon-chain/sync/initial-sync/sync_blocks.go +++ b/beacon-chain/sync/initial-sync/sync_blocks.go @@ -6,6 +6,8 @@ import ( "fmt" "strings" + "github.com/sirupsen/logrus" + "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/hashutil" @@ -108,20 +110,20 @@ func (s *InitialSync) requestBatchedBlocks(startSlot uint64, endSlot uint64) { defer span.End() sentBatchedBlockReq.Inc() if startSlot > endSlot { - log.Debugf( - "Invalid batched request from slot %d to %d", - startSlot-params.BeaconConfig().GenesisSlot, endSlot-params.BeaconConfig().GenesisSlot, - ) + log.WithFields(logrus.Fields{ + "slotSlot": startSlot - params.BeaconConfig().GenesisSlot, + "endSlot": endSlot - params.BeaconConfig().GenesisSlot}, + ).Debug("Invalid batched block request") return } blockLimit := params.BeaconConfig().BatchBlockLimit if startSlot+blockLimit < endSlot { endSlot = startSlot + blockLimit } - log.Debugf( - "Requesting batched blocks from slot %d to %d", - startSlot-params.BeaconConfig().GenesisSlot, endSlot-params.BeaconConfig().GenesisSlot, - ) + log.WithFields(logrus.Fields{ + "slotSlot": startSlot - params.BeaconConfig().GenesisSlot, + "endSlot": endSlot - params.BeaconConfig().GenesisSlot}, + ).Debug("Requesting batched blocks") s.p2p.Broadcast(ctx, &pb.BatchedBeaconBlockRequest{ StartSlot: startSlot, EndSlot: endSlot, @@ -143,7 +145,10 @@ func (s *InitialSync) validateAndSaveNextBlock(ctx context.Context, block *pb.Be if err := s.checkBlockValidity(ctx, block); err != nil { return err } - log.Infof("Saving block with root %#x and slot %d for initial sync", root, block.Slot-params.BeaconConfig().GenesisSlot) + log.WithFields(logrus.Fields{ + "root": fmt.Sprintf("%#x", root), + "slot": block.Slot - params.BeaconConfig().GenesisSlot, + }).Info("Saving block") s.currentSlot = block.Slot s.mutex.Lock() diff --git a/beacon-chain/sync/receive_block.go b/beacon-chain/sync/receive_block.go index de5713b3fc59..de9562805685 100644 --- a/beacon-chain/sync/receive_block.go +++ b/beacon-chain/sync/receive_block.go @@ -27,7 +27,8 @@ func (rs *RegularSync) receiveBlockAnnounce(msg p2p.Message) error { span.AddAttributes(trace.BoolAttribute("isEvilBlock", isEvilBlock)) if isEvilBlock { - log.Debugf("Received a blacklisted block hash: %#x", h) + log.WithField("blockRoot", fmt.Sprintf("%#x", h)). + Debug("Received blacklisted block") return nil } @@ -43,7 +44,7 @@ func (rs *RegularSync) receiveBlockAnnounce(msg p2p.Message) error { span.AddAttributes(trace.BoolAttribute("hasBlock", hasBlock)) if hasBlock { - log.Debugf("Received a root for a block that has already been processed: %#x", h) + log.WithField("blockRoot", fmt.Sprintf("%#x", h)).Debug("Already processed") return nil } @@ -119,7 +120,8 @@ func (rs *RegularSync) validateAndProcessBlock( return nil, nil, false, err } - log.Debugf("Processing response to block request: %#x", blockRoot) + log.WithField("blockRoot", fmt.Sprintf("%#x", blockRoot)). + Debug("Processing response to block request") hasBlock := rs.db.HasBlock(blockRoot) if hasBlock { log.Debug("Received a block that already exists. Exiting...") diff --git a/beacon-chain/sync/receive_block_test.go b/beacon-chain/sync/receive_block_test.go index e015c2b37fb9..ad66856b1c1c 100644 --- a/beacon-chain/sync/receive_block_test.go +++ b/beacon-chain/sync/receive_block_test.go @@ -85,7 +85,7 @@ func TestReceiveBlockAnnounce_SkipsBlacklistedBlock(t *testing.T) { if err := rs.receiveBlockAnnounce(msg); err != nil { t.Errorf("Unexpected error: %v", err) } - testutil.AssertLogsContain(t, hook, "Received a blacklisted block hash") + testutil.AssertLogsContain(t, hook, "Received blacklisted block") hook.Reset() } diff --git a/beacon-chain/sync/regular_sync.go b/beacon-chain/sync/regular_sync.go index d6e1dfb086b1..0a38f76e63b7 100644 --- a/beacon-chain/sync/regular_sync.go +++ b/beacon-chain/sync/regular_sync.go @@ -241,8 +241,6 @@ func (rs *RegularSync) run() { go rs.broadcastCanonicalBlock(rs.ctx, blockAnnounce) } } - - log.Info("Exiting regular sync run()") } // safelyHandleMessage will recover and log any panic that occurs from the @@ -301,14 +299,15 @@ func (rs *RegularSync) handleBlockRequestBySlot(msg p2p.Message) error { block, err := rs.db.BlockBySlot(ctx, request.SlotNumber) if err != nil || block == nil { if block == nil { - log.Debugf("Block with slot %d does not exist", request.SlotNumber) + log.WithField("slot", request.SlotNumber-params.BeaconConfig().GenesisSlot).Debug( + "block does not exist") return errors.New("block does not exist") } log.Errorf("Error retrieving block from db: %v", err) return err } - log.WithField("slotNumber", + log.WithField("slot", fmt.Sprintf("%d", request.SlotNumber-params.BeaconConfig().GenesisSlot)).Debug("Sending requested block to peer") defer sentBlocks.Inc() @@ -341,7 +340,10 @@ func (rs *RegularSync) handleStateRequest(msg p2p.Message) error { return err } if root != bytesutil.ToBytes32(req.FinalizedStateRootHash32S) { - log.Debugf("Requested state root is different from locally stored state root %#x", req.FinalizedStateRootHash32S) + log.WithFields(logrus.Fields{ + "requested": fmt.Sprintf("%#x", req.FinalizedStateRootHash32S), + "local": fmt.Sprintf("%#x", root)}, + ).Debug("Requested state root is diff than local state root") return err } log.WithField( @@ -427,7 +429,7 @@ func (rs *RegularSync) receiveAttestation(msg p2p.Message) error { return err } log.WithFields(logrus.Fields{ - "blockRoot": fmt.Sprintf("%#x", attestation.Data.BeaconBlockRootHash32), + "headRoot": fmt.Sprintf("%#x", attestation.Data.BeaconBlockRootHash32), "justifiedEpoch": attestation.Data.JustifiedEpoch - params.BeaconConfig().GenesisEpoch, }).Debug("Received an attestation") @@ -435,7 +437,8 @@ func (rs *RegularSync) receiveAttestation(msg p2p.Message) error { hasAttestation := rs.db.HasAttestation(attestationRoot) span.AddAttributes(trace.BoolAttribute("hasAttestation", hasAttestation)) if hasAttestation { - log.Debugf("Received, skipping attestation #%x", attestationRoot) + log.WithField("attestationRoot", fmt.Sprintf("%#x", attestationRoot)). + Debug("Received, skipping attestation") return nil } @@ -451,8 +454,10 @@ func (rs *RegularSync) receiveAttestation(msg p2p.Message) error { trace.Int64Attribute("finalized state slot", int64(beaconState.Slot-params.BeaconConfig().SlotsPerEpoch)), ) if attestation.Data.Slot < beaconState.Slot-params.BeaconConfig().SlotsPerEpoch { - log.Debugf("Skipping received attestation with slot smaller than one epoch ago, %d < %d", - attestation.Data.Slot, beaconState.Slot-params.BeaconConfig().SlotsPerEpoch) + log.WithFields(logrus.Fields{ + "receivedSlot": attestation.Data.Slot, + "epochSlot": beaconState.Slot - params.BeaconConfig().SlotsPerEpoch}, + ).Debug("Skipping received attestation with slot smaller than one epoch ago") return nil } @@ -482,7 +487,8 @@ func (rs *RegularSync) receiveExitRequest(msg p2p.Message) error { hasExit := rs.db.HasExit(h) span.AddAttributes(trace.BoolAttribute("hasExit", hasExit)) if hasExit { - log.Debugf("Received, skipping exit request #%x", h) + log.WithField("exitRoot", fmt.Sprintf("%#x", h)). + Debug("Received, skipping exit request") return nil } log.WithField("exitReqHash", fmt.Sprintf("%#x", h)). @@ -505,7 +511,6 @@ func (rs *RegularSync) handleBlockRequestByHash(msg p2p.Message) error { return err } if block == nil { - log.Debug("Block does not exist") return errors.New("block does not exist") } @@ -544,9 +549,12 @@ func (rs *RegularSync) handleBatchedBlockRequest(msg p2p.Message) error { currentSlot := block.Slot if currentSlot < startSlot || finalizedSlot > endSlot { - log.Debugf( - "invalid batch request: current slot < start slot || finalized slot > end slot."+ - "currentSlot %d startSlot %d endSlot %d finalizedSlot %d", currentSlot, startSlot, endSlot, finalizedSlot) + log.WithFields(logrus.Fields{ + "currentSlot": currentSlot, + "startSlot": startSlot, + "endSlot": endSlot, + "finalizedSlot": finalizedSlot}, + ).Debug("invalid batch request: current slot < start slot || finalized slot > end slot") return err } @@ -554,7 +562,10 @@ func (rs *RegularSync) handleBatchedBlockRequest(msg p2p.Message) error { // Handle overflows if startSlot > endSlot { // Do not process requests with invalid slot ranges - log.Debugf("Batched block range is invalid, start slot %d , end slot %d", startSlot, endSlot) + log.WithFields(logrus.Fields{ + "slotSlot": startSlot - params.BeaconConfig().GenesisSlot, + "endSlot": endSlot - params.BeaconConfig().GenesisSlot}, + ).Debug("Invalid batched block range") return err } @@ -572,7 +583,9 @@ func (rs *RegularSync) handleBatchedBlockRequest(msg p2p.Message) error { response = append(response, retBlock) } - log.Debugf("Sending response for batch blocks to peer %v", msg.Peer) + log.WithField("peer", msg.Peer). + Debug("Sending response for batch blocks") + defer sentBatchedBlocks.Inc() if err := rs.p2p.Send(ctx, &pb.BatchedBeaconBlockResponse{ BatchedBlocks: response, @@ -597,11 +610,15 @@ func (rs *RegularSync) handleAttestationRequestByHash(msg p2p.Message) error { } span.AddAttributes(trace.BoolAttribute("hasAttestation", att == nil)) if att == nil { - log.Debugf("Attestation %#x is not in db", root) + log.WithField("attestationRoot", fmt.Sprintf("%#x", root)). + Debug("Attestation not in db") return nil } - log.Debugf("Sending attestation %#x to peer %v", root, msg.Peer) + log.WithFields(logrus.Fields{ + "attestationRoot": fmt.Sprintf("%#x", root), + "peer": msg.Peer}, + ).Debug("Sending attestation to peer") if err := rs.p2p.Send(ctx, &pb.AttestationResponse{ Attestation: att, }, msg.Peer); err != nil { @@ -632,7 +649,8 @@ func (rs *RegularSync) handleAttestationAnnouncement(msg p2p.Message) error { return nil } - log.Debugf("Sending request for attestation to peer %v", msg.Peer) + log.WithField("peer", msg.Peer). + Debug("Sending request for attestation") if err := rs.p2p.Send(ctx, &pb.AttestationRequest{ Hash: data.Hash, }, msg.Peer); err != nil { @@ -645,7 +663,8 @@ func (rs *RegularSync) handleAttestationAnnouncement(msg p2p.Message) error { func (rs *RegularSync) broadcastCanonicalBlock(ctx context.Context, announce *pb.BeaconBlockAnnounce) { ctx, span := trace.StartSpan(ctx, "beacon-chain.sync.broadcastCanonicalBlock") defer span.End() - log.Debugf("Announcing canonical block %#x", announce.Hash) + log.WithField("blockRoot", fmt.Sprintf("%#x", announce.Hash)). + Debug("Announcing canonical block") rs.p2p.Broadcast(ctx, announce) sentBlockAnnounce.Inc() } diff --git a/beacon-chain/sync/regular_sync_test.go b/beacon-chain/sync/regular_sync_test.go index ed8e57fa8cdd..3468461aa7b6 100644 --- a/beacon-chain/sync/regular_sync_test.go +++ b/beacon-chain/sync/regular_sync_test.go @@ -2,14 +2,13 @@ package sync import ( "context" - "fmt" "io/ioutil" "strconv" "testing" "time" "github.com/gogo/protobuf/proto" - peer "github.com/libp2p/go-libp2p-peer" + "github.com/libp2p/go-libp2p-peer" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/internal" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" @@ -468,10 +467,8 @@ func TestReceiveAttestation_OlderThanPrevEpoch(t *testing.T) { if err := ss.receiveAttestation(msg1); err != nil { t.Error(err) } - want := fmt.Sprintf( - "Skipping received attestation with slot smaller than one epoch ago, %d < %d", - request1.Attestation.Data.Slot, params.BeaconConfig().GenesisSlot+params.BeaconConfig().SlotsPerEpoch) - testutil.AssertLogsContain(t, hook, want) + + testutil.AssertLogsContain(t, hook, "Skipping received attestation with slot smaller than one epoch ago") } func TestReceiveExitReq_OK(t *testing.T) { @@ -529,8 +526,8 @@ func TestHandleAttReq_HashNotFound(t *testing.T) { if err := ss.handleAttestationRequestByHash(msg); err != nil { t.Error(err) } - want := fmt.Sprintf("Attestation %#x is not in db", bytesutil.ToBytes32(req.Hash)) - testutil.AssertLogsContain(t, hook, want) + + testutil.AssertLogsContain(t, hook, "Attestation not in db") } func TestHandleAnnounceAttestation_requestsAttestationData(t *testing.T) { @@ -649,8 +646,8 @@ func TestHandleAttReq_Ok(t *testing.T) { if err := ss.handleAttestationRequestByHash(msg); err != nil { t.Error(err) } - want := fmt.Sprintf("Sending attestation %#x to peer", attRoot) - testutil.AssertLogsContain(t, hook, want) + + testutil.AssertLogsContain(t, hook, "Sending attestation to peer") } func TestHandleStateReq_NOState(t *testing.T) { @@ -681,7 +678,7 @@ func TestHandleStateReq_NOState(t *testing.T) { t.Error(err) } - testutil.AssertLogsContain(t, hook, "Requested state root is different from locally stored state root") + testutil.AssertLogsContain(t, hook, "Requested state root is diff than local state root") } From 259175090ea6b83c4b22f73aa0be34a10df545f7 Mon Sep 17 00:00:00 2001 From: Terence Tsao Date: Fri, 19 Apr 2019 12:48:33 -0700 Subject: [PATCH 2/5] gaz --- beacon-chain/operations/BUILD.bazel | 1 - 1 file changed, 1 deletion(-) diff --git a/beacon-chain/operations/BUILD.bazel b/beacon-chain/operations/BUILD.bazel index 9226c5fdc93b..ee9e4c2d41c2 100644 --- a/beacon-chain/operations/BUILD.bazel +++ b/beacon-chain/operations/BUILD.bazel @@ -26,7 +26,6 @@ go_test( deps = [ "//beacon-chain/internal:go_default_library", "//proto/beacon/p2p/v1:go_default_library", - "//shared/hashutil:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", From 4d35e8f29cf2cf92965419e0f495ca8db49d6ace Mon Sep 17 00:00:00 2001 From: Terence Tsao Date: Fri, 19 Apr 2019 12:41:33 -0700 Subject: [PATCH 3/5] use with fields --- beacon-chain/sync/regular_sync_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/sync/regular_sync_test.go b/beacon-chain/sync/regular_sync_test.go index 47a8fa3c2cac..3468461aa7b6 100644 --- a/beacon-chain/sync/regular_sync_test.go +++ b/beacon-chain/sync/regular_sync_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/gogo/protobuf/proto" - peer "github.com/libp2p/go-libp2p-peer" + "github.com/libp2p/go-libp2p-peer" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/internal" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" From 61a0c5724b043a953cee93ec91caa493353de299 Mon Sep 17 00:00:00 2001 From: Terence Tsao Date: Sat, 20 Apr 2019 11:45:53 -0700 Subject: [PATCH 4/5] update crosslink proto fields --- proto/beacon/p2p/v1/messages.pb.go | 3 +- proto/beacon/p2p/v1/types.pb.go | 324 ++++++++++++++++----------- proto/beacon/p2p/v1/types.proto | 6 +- proto/beacon/rpc/v1/services.pb.go | 5 +- proto/sharding/p2p/v1/messages.pb.go | 3 +- 5 files changed, 197 insertions(+), 144 deletions(-) diff --git a/proto/beacon/p2p/v1/messages.pb.go b/proto/beacon/p2p/v1/messages.pb.go index 84e72de86d1a..056a27848291 100755 --- a/proto/beacon/p2p/v1/messages.pb.go +++ b/proto/beacon/p2p/v1/messages.pb.go @@ -5,10 +5,9 @@ package ethereum_beacon_p2p_v1 import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" io "io" math "math" - - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/beacon/p2p/v1/types.pb.go b/proto/beacon/p2p/v1/types.pb.go index 9064a2a1cc52..f407f384b48b 100755 --- a/proto/beacon/p2p/v1/types.pb.go +++ b/proto/beacon/p2p/v1/types.pb.go @@ -5,11 +5,10 @@ package ethereum_beacon_p2p_v1 import ( fmt "fmt" - io "io" - math "math" - proto "github.com/gogo/protobuf/proto" _ "github.com/prysmaticlabs/prysm/proto/common" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -852,11 +851,12 @@ func (m *ShardReassignmentRecord) GetSlot() uint64 { } type Crosslink struct { - Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - CrosslinkDataRootHash32 []byte `protobuf:"bytes,2,opt,name=crosslink_data_root_hash32,json=crosslinkDataRootHash32,proto3" json:"crosslink_data_root_hash32,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` + PreviousCrosslinkRootHash32 []byte `protobuf:"bytes,2,opt,name=previous_crosslink_root_hash32,json=previousCrosslinkRootHash32,proto3" json:"previous_crosslink_root_hash32,omitempty"` + CrosslinkDataRootHash32 []byte `protobuf:"bytes,3,opt,name=crosslink_data_root_hash32,json=crosslinkDataRootHash32,proto3" json:"crosslink_data_root_hash32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Crosslink) Reset() { *m = Crosslink{} } @@ -899,6 +899,13 @@ func (m *Crosslink) GetEpoch() uint64 { return 0 } +func (m *Crosslink) GetPreviousCrosslinkRootHash32() []byte { + if m != nil { + return m.PreviousCrosslinkRootHash32 + } + return nil +} + func (m *Crosslink) GetCrosslinkDataRootHash32() []byte { if m != nil { return m.CrosslinkDataRootHash32 @@ -1738,133 +1745,134 @@ func init() { func init() { proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_e719e7d82cfa7b0d) } var fileDescriptor_e719e7d82cfa7b0d = []byte{ - // 2009 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x59, 0x6f, 0x1c, 0x59, - 0x15, 0xa6, 0xdc,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c2, 0x45, 0xe9, 0x50, 0x31, 0xa1, 0xb6, 0x44, 0x28, 0xff, - 0x68, 0x40, 0xfe, 0x03, 0xe2, 0xd1, 0x1e, 0x24, 0x1a, 0x88, 0xc3, 0xbc, 0x5e, 0x80, 0xf9, 0x30, - 0x22, 0xd2, 0xad, 0x82, 0x8d, 0x12, 0x56, 0x2b, 0xe6, 0x58, 0xdf, 0xcf, 0x41, 0x79, 0xc2, 0x50, - 0x84, 0x74, 0x3e, 0x19, 0x69, 0x3a, 0x89, 0x2b, 0x57, 0xd3, 0x5d, 0x65, 0x84, 0xfa, 0x40, 0xf7, - 0xc0, 0x54, 0x3e, 0x4f, 0xf7, 0x3a, 0x6d, 0xe1, 0x66, 0x3b, 0x53, 0xce, 0x49, 0x57, 0x40, 0xf7, - 0xe1, 0xb2, 0x4c, 0x1a, 0xa7, 0x4d, 0x87, 0x81, 0x8b, 0xa3, 0xb3, 0x31, 0x51, 0x65, 0x6e, 0x55, - 0x22, 0x9a, 0x1a, 0x30, 0x2e, 0x9c, 0x34, 0x7a, 0x55, 0xc0, 0x59, 0xe1, 0x25, 0x25, 0x9c, 0x20, - 0x64, 0xec, 0x53, 0xe1, 0x87, 0x49, 0x17, 0x49, 0x10, 0xe6, 0xb2, 0xbc, 0xc8, 0xe7, 0x18, 0x15, - 0xe5, 0x89, 0x51, 0x21, 0x4a, 0x66, 0x72, 0xac, 0xae, 0xcc, 0x9c, 0xaa, 0xaf, 0xc1, 0x95, 0x14, - 0x38, 0x1d, 0xac, 0x55, 0x69, 0xb4, 0x99, 0x40, 0x26, 0xe2, 0x65, 0x7d, 0x15, 0xae, 0x4e, 0xdc, - 0xd2, 0x7e, 0xe0, 0x3e, 0x48, 0x2e, 0xff, 0xfd, 0xa5, 0xe4, 0x36, 0xe4, 0x33, 0xf9, 0x25, 0x6f, - 0x78, 0xd5, 0x86, 0x34, 0xb5, 0xac, 0x6f, 0xe6, 0x60, 0x2d, 0x59, 0x80, 0xd1, 0x16, 0x2c,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e7, 0xae, 0x96, 0x5a, - 0xa2, 0xa5, 0x05, 0xec, 0xf5, 0x70, 0x82, 0x22, 0x15, 0xab, 0x83, 0xc6, 0x14, 0xe7, 0xce, 0x57, - 0xbc, 0xaf, 0x25, 0x52, 0xc5, 0x78, 0x82, 0xc2, 0xd0, 0x7d, 0x58, 0xd5, 0x9b, 0x17, 0x33, 0x17, - 0xa5, 0xba, 0xed, 0x79, 0xea, 0x0e, 0x14, 0xce, 0x4e, 0x04, 0xd0, 0x5b, 0x50, 0x1e, 0x51, 0x7f, - 0x18, 0x70, 0x31, 0x97, 0x44, 0x47, 0x61, 0xe6, 0x92, 0xd4, 0xf1, 0xd2, 0xdc, 0x6a, 0x8f, 0xe1, - 0x87, 0x4f, 0x3d, 0x6e, 0x97, 0x46, 0xd9, 0x4f, 0x66, 0x7d, 0xdb, 0x80, 0xc2, 0x41, 0xbc, 0x07, - 0x86, 0x43, 0x3e, 0xb7, 0x83, 0xd6, 0x60, 0x23, 0x8c, 0x28, 0xed, 0x3a, 0xb4, 0xeb, 0x84, 0x94, - 0x31, 0xc2, 0x92, 0x25, 0xac, 0x20, 0xc3, 0x47, 0xbb, 0x6f, 0x77, 0x8f, 0x13, 0xc6, 0xc5, 0x1d, - 0x37, 0x77, 0x61, 0xc7, 0xb5, 0x9e, 0x00, 0x52, 0x37, 0x85, 0x7d, 0xb1, 0x15, 0x10, 0xf7, 0x05, - 0x57, 0x80, 0xbb, 0xb0, 0x3e, 0x6f, 0xf6, 0x97, 0xdb, 0x13, 0x53, 0xec, 0x4f, 0x06, 0x5c, 0x92, - 0x77, 0x84, 0xdb, 0x3e, 0xc9, 0x6e, 0x54, 0x1f, 0x85, 0xf5, 0xb1, 0x6e, 0xe5, 0x89, 0x07, 0x8f, - 0x21, 0xdf, 0x3b, 0x95, 0x6c, 0xbf, 0x12, 0xf4, 0x99, 0xeb, 0xd0, 0xc2, 0xec, 0x75, 0x28, 0x1e, - 0x8b, 0xb9, 0xff, 0x65, 0x2c,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x33, 0xdf, 0x90, 0xaf, 0x7c, 0xa4, - 0x78, 0xc7, 0x82, 0x15, 0xbf, 0xf0, 0xef, 0xc2, 0xba, 0x96, 0xe0, 0x11, 0x21, 0x3a, 0xa9, 0x54, - 0x9e, 0x96, 0x15, 0xe3, 0x24, 0x22, 0x44, 0xa5, 0xd5, 0x0d, 0x88, 0x13, 0xdb, 0x49, 0x2a, 0xb3, - 0x60, 0xe7, 0xdd, 0xb4, 0x6c, 0x2c, 0x1f, 0x8a, 0x63, 0xfd, 0x74, 0xce, 0xae, 0x31, 0x63, 0xc3, - 0x59, 0x98, 0xb9, 0xe1, 0x8c, 0x4d, 0xdd, 0xdc, 0xc4, 0xd4, 0xb5, 0xbe, 0x04, 0xab, 0xc9, 0x9f, - 0x02, 0x35, 0xd8, 0x88, 0x8d, 0xcb, 0x76, 0x33, 0xd5, 0xa4, 0xd7, 0x35, 0x2b, 0xb3, 0x33, 0xdc, - 0x80, 0x82, 0xea, 0x7d, 0x63, 0x7b, 0x48, 0x5e, 0xd2, 0x74, 0xcb, 0xf3, 0xa1, 0x90, 0xfd, 0xdf, - 0x60, 0x7c, 0x83, 0x30, 0x5e, 0x78, 0x83, 0xb8, 0x06, 0x30, 0xa2, 0x9c, 0x38, 0x9d, 0x4c, 0x2f, - 0x58, 0x13, 0x94, 0x07, 0x82, 0xd0, 0x2c, 0xfc, 0xf2, 0xd9, 0x75, 0xe3, 0x57, 0xcf, 0xae, 0x1b, - 0x7f, 0x79, 0x76, 0xdd, 0x68, 0x2f, 0xcb, 0xff, 0xbf, 0x5f, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xc4, 0x8d, 0x74, 0xea, 0x57, 0x17, 0x00, 0x00, + // 2029 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x5b, 0x6f, 0x23, 0x49, + 0x15, 0xa6, 0xe3, 0x4c, 0x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0x71, 0x97, 0x88, 0xf1, + 0xc5, 0xd0, 0x6d, 0x58, 0xf2, 0x49, 0x4c, 0x59, 0xa0, 0x33, 0x64, 0xbf, 0xb7, 0x21, 0x4b, 0xba, + 0xa4, 0xa5, 0x32, 0x2b, 0xc8, 0x81, 0x52, 0x87, 0x44, 0x84, 0x05, 0xcc, 0xe3, 0x41, 0x8f, 0xd8, + 0x5f, 0xbf, 0x23, 0x41, 0x45, 0x2d, 0x3c, 0x09, 0x7a, 0x04, 0xd5, 0x60, 0xb6, 0x4d, 0x93, 0x53, + 0xfb, 0xdd, 0x3b, 0x72, 0x67, 0xd7, 0xa6, 0x45, 0xf3, 0x3a, 0x4d, 0x4e, 0x5d, 0x09, 0x45, 0xab, + 0x30, 0xcb, 0x42, 0xca, 0xed, 0x6f, 0x28, 0x77, 0xf2, 0xc3, 0x89, 0x61, 0x56, 0x40, 0xd0, 0x5d, + 0xa8, 0x64, 0x8c, 0x31, 0x20, 0x09, 0x0b, 0x68, 0x64, 0x5b, 0x12, 0x57, 0x4e, 0xe5, 0x8f, 0x94, + 0x18, 0xdd, 0x81, 0x72, 0xca, 0x6d, 0x29, 0x52, 0xb5, 0xad, 0x65, 0x2d, 0x4e, 0x81, 0x97, 0xe1, + 0x92, 0xba, 0xb8, 0x05, 0xa9, 0x56, 0x1f, 0xce, 0xfb, 0x16, 0xa0, 0xf1, 0x7a, 0x42, 0x0f, 0x60, + 0x56, 0x1e, 0x95, 0x25, 0xf7, 0x73, 0x67, 0xda, 0x7e, 0x0c, 0x13, 0x79, 0x60, 0xd2, 0x08, 0xd5, + 0xe0, 0x32, 0xee, 0x74, 0x12, 0xd2, 0x19, 0xa1, 0x98, 0x19, 0xc9, 0x03, 0xab, 0x86, 0x2e, 0xe3, + 0x97, 0xbb, 0x50, 0x69, 0xf5, 0x19, 0xa7, 0xfe, 0x59, 0x0e, 0x2f, 0x48, 0x78, 0x59, 0xcb, 0x33, + 0xe8, 0x4b, 0xb0, 0x1c, 0x44, 0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0x00, } func (m *BeaconState) Marshal() (dAtA []byte, err error) { @@ -2560,9 +2568,15 @@ func (m *Crosslink) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.Epoch)) } - if len(m.CrosslinkDataRootHash32) > 0 { + if len(m.PreviousCrosslinkRootHash32) > 0 { dAtA[i] = 0x12 i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.PreviousCrosslinkRootHash32))) + i += copy(dAtA[i:], m.PreviousCrosslinkRootHash32) + } + if len(m.CrosslinkDataRootHash32) > 0 { + dAtA[i] = 0x1a + i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.CrosslinkDataRootHash32))) i += copy(dAtA[i:], m.CrosslinkDataRootHash32) } @@ -3497,6 +3511,10 @@ func (m *Crosslink) Size() (n int) { if m.Epoch != 0 { n += 1 + sovTypes(uint64(m.Epoch)) } + l = len(m.PreviousCrosslinkRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } l = len(m.CrosslinkDataRootHash32) if l > 0 { n += 1 + l + sovTypes(uint64(l)) @@ -6063,6 +6081,40 @@ func (m *Crosslink) Unmarshal(dAtA []byte) error { } } case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousCrosslinkRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PreviousCrosslinkRootHash32 = append(m.PreviousCrosslinkRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.PreviousCrosslinkRootHash32 == nil { + m.PreviousCrosslinkRootHash32 = []byte{} + } + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CrosslinkDataRootHash32", wireType) } diff --git a/proto/beacon/p2p/v1/types.proto b/proto/beacon/p2p/v1/types.proto index 22c19c09958c..e23bb3babe91 100644 --- a/proto/beacon/p2p/v1/types.proto +++ b/proto/beacon/p2p/v1/types.proto @@ -110,8 +110,12 @@ message ShardReassignmentRecord { } message Crosslink { + // Epoch number uint64 epoch = 1; - bytes crosslink_data_root_hash32 = 2; + // Root of the previous crosslink + bytes previous_crosslink_root_hash32 = 2; + // Root of the shard data since the previous crosslink + bytes crosslink_data_root_hash32 = 3; } message BeaconBlock { diff --git a/proto/beacon/rpc/v1/services.pb.go b/proto/beacon/rpc/v1/services.pb.go index 4a034d5e2470..c3101f63cccc 100755 --- a/proto/beacon/rpc/v1/services.pb.go +++ b/proto/beacon/rpc/v1/services.pb.go @@ -7,13 +7,12 @@ import ( context "context" encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" grpc "google.golang.org/grpc" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/sharding/p2p/v1/messages.pb.go b/proto/sharding/p2p/v1/messages.pb.go index 61228b93def4..ba268c5f4bac 100644 --- a/proto/sharding/p2p/v1/messages.pb.go +++ b/proto/sharding/p2p/v1/messages.pb.go @@ -5,10 +5,9 @@ package ethereum_sharding_p2p_v1 import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" io "io" math "math" - - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. From 03198fb6fbd50f2aa4f587f97e8efb2a6b6d1dfe Mon Sep 17 00:00:00 2001 From: Terence Tsao Date: Sat, 20 Apr 2019 11:48:47 -0700 Subject: [PATCH 5/5] lint --- beacon-chain/sync/regular_sync_test.go | 2 +- proto/beacon/p2p/v1/messages.pb.go | 3 ++- proto/beacon/rpc/v1/services.pb.go | 5 +++-- proto/sharding/p2p/v1/messages.pb.go | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/beacon-chain/sync/regular_sync_test.go b/beacon-chain/sync/regular_sync_test.go index 3468461aa7b6..47a8fa3c2cac 100644 --- a/beacon-chain/sync/regular_sync_test.go +++ b/beacon-chain/sync/regular_sync_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/gogo/protobuf/proto" - "github.com/libp2p/go-libp2p-peer" + peer "github.com/libp2p/go-libp2p-peer" "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/internal" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" diff --git a/proto/beacon/p2p/v1/messages.pb.go b/proto/beacon/p2p/v1/messages.pb.go index 056a27848291..84e72de86d1a 100755 --- a/proto/beacon/p2p/v1/messages.pb.go +++ b/proto/beacon/p2p/v1/messages.pb.go @@ -5,9 +5,10 @@ package ethereum_beacon_p2p_v1 import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/beacon/rpc/v1/services.pb.go b/proto/beacon/rpc/v1/services.pb.go index c3101f63cccc..4a034d5e2470 100755 --- a/proto/beacon/rpc/v1/services.pb.go +++ b/proto/beacon/rpc/v1/services.pb.go @@ -7,12 +7,13 @@ import ( context "context" encoding_binary "encoding/binary" fmt "fmt" + io "io" + math "math" + proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" grpc "google.golang.org/grpc" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/sharding/p2p/v1/messages.pb.go b/proto/sharding/p2p/v1/messages.pb.go index ba268c5f4bac..61228b93def4 100644 --- a/proto/sharding/p2p/v1/messages.pb.go +++ b/proto/sharding/p2p/v1/messages.pb.go @@ -5,9 +5,10 @@ package ethereum_sharding_p2p_v1 import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used.