Skip to content

Commit

Permalink
exporter: add pubkey to FullData on API response (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov authored Oct 17, 2024
1 parent 8297d92 commit 3de919b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions exporter/api/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,28 @@ func ParticipantsAPIData(msgs ...qbftstorage.ParticipantsRangeEntry) (interface{

apiMsgs := make([]*ParticipantsAPI, 0)
for _, msg := range msgs {
dutyExecutorID := msg.Identifier.GetDutyExecutorID()
blsPubKey := phase0.BLSPubKey{}
copy(blsPubKey[:], dutyExecutorID)

apiMsg := &ParticipantsAPI{
Signers: msg.Signers,
Slot: msg.Slot,
Identifier: msg.Identifier[:],
ValidatorPK: hex.EncodeToString(msg.Identifier.GetDutyExecutorID()),
ValidatorPK: hex.EncodeToString(dutyExecutorID),
Role: msg.Identifier.GetRoleType().String(),
Message: specqbft.Message{
MsgType: specqbft.CommitMsgType,
Height: specqbft.Height(msg.Slot),
Identifier: msg.Identifier[:],
Round: specqbft.FirstRound,
},
FullData: &spectypes.ValidatorConsensusData{Duty: spectypes.ValidatorDuty{Slot: msg.Slot}},
FullData: &spectypes.ValidatorConsensusData{
Duty: spectypes.ValidatorDuty{
PubKey: blsPubKey,
Slot: msg.Slot,
},
},
}

apiMsgs = append(apiMsgs, apiMsg)
Expand Down

0 comments on commit 3de919b

Please sign in to comment.