From e4ec723450b17b80868a8561d92f52ce30b987b3 Mon Sep 17 00:00:00 2001 From: avalonche Date: Wed, 15 May 2024 02:52:04 +1000 Subject: [PATCH] Optimistic v1 fixes --- database/database.go | 2 +- services/api/service.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/database/database.go b/database/database.go index 704d8a08..fe7d4d4e 100644 --- a/database/database.go +++ b/database/database.go @@ -546,7 +546,7 @@ func (s *DatabaseService) DeleteExecutionPayloads(idFirst, idLast uint64) error } func (s *DatabaseService) InsertBuilderDemotion(submitBlockRequest *common.VersionedSubmitBlockRequest, simError error) error { - _submitBlockRequest, err := json.Marshal(submitBlockRequest.Capella) + _submitBlockRequest, err := json.Marshal(submitBlockRequest) if err != nil { return err } diff --git a/services/api/service.go b/services/api/service.go index 238813ea..ef93661b 100644 --- a/services/api/service.go +++ b/services/api/service.go @@ -608,7 +608,12 @@ func (api *RelayAPI) demoteBuilder(pubkey string, req *common.VersionedSubmitBlo api.log.Error(fmt.Errorf("error setting builder: %v status: %w", pubkey, err)) } // Write to demotions table. - api.log.WithFields(logrus.Fields{"builder_pubkey": pubkey}).Info("demoting builder") + api.log.WithFields(logrus.Fields{ + "builderPubkey": pubkey, + "slot": req.Slot, + "blockHash": req.BlockHash, + "demotionErr": simError.Error(), + }).Info("demoting builder") bidTrace, err := req.BidTrace() if err != nil { api.log.WithError(err).Warn("failed to get bid trace from submit block request")