Skip to content

Commit

Permalink
Optimistic v1 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed May 14, 2024
1 parent c1eb4ca commit e4ec723
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 6 additions & 1 deletion services/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e4ec723

Please sign in to comment.