ssv
ssv copied to clipboard
Use partial signature messages instead of decided in exporter
The PR changes the exporter message handling logic to use partial signature messages instead of decided messages to gather information about consensus participants.
Since decided messages are not used anymore, the old API returning decided messages behaves a bit differently, constructing a "decided" message from information in the partial signature messages, but some fields are not available anymore, however, it's still compatible with the explorer, because it uses just a few fields. So, the old API is just a workaround for compatibility with the explorer.
There's also a new API that is simple/straightforward but requires changes to the explorer.
Examples of API:
Old
{"type":"decided","filter":{"from":1439466,"to":1439500,"role":"ATTESTER","publicKey":"aadcd9e473fa356a10dc14c876d1570d0f9affb39d479b317d39a93393d64b3608bb82220eb7011f659c5adc0275ac96"},"data":[{"Signature":null,"Signers":[29,30,31],"Message":{"MsgType":2,"Height":1439466,"Round":0,"Identifier":"AAAxEqrc2eRz+jVqENwUyHbRVw0Pmv+znUebMX05qTOT1ks2CLuCIg63AR9lnFrcAnWslgAAAAA=","Root":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"DataRound":0,"RoundChangeJustification":null,"PrepareJustification":null},"FullData":{"Duty":{"Type":0,"PubKey":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","Slot":"1439466","ValidatorIndex":"0","CommitteeIndex":0,"CommitteeLength":0,"CommitteesAtSlot":0,"ValidatorCommitteeIndex":0,"ValidatorSyncCommitteeIndices":null},"Version":"unknown","PreConsensusJustifications":null,"DataSSZ":null}}]}
New
{"type":"participants","filter":{"from":1439466,"to":1439500,"role":"ATTESTER","publicKey":"aadcd9e473fa356a10dc14c876d1570d0f9affb39d479b317d39a93393d64b3608bb82220eb7011f659c5adc0275ac96"},"data":[{"Signers":[29,30,31],"Slot":"1439466","Identifier":"AAAxEqrc2eRz+jVqENwUyHbRVw0Pmv+znUebMX05qTOT1ks2CLuCIg63AR9lnFrcAnWslgAAAAA=","ValidatorPK":"aadcd9e473fa356a10dc14c876d1570d0f9affb39d479b317d39a93393d64b3608bb82220eb7011f659c5adc0275ac96","Role":"ATTESTER"}]}
Codecov Report
Attention: Patch coverage is 19.33333%
with 121 lines
in your changes are missing coverage. Please review.
Project coverage is 50.1%. Comparing base (
4867647
) to head (cf2bf33
). Report is 1 commits behind head on stage.
Additional details and impacted files
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The explorer team shared the fields they are using, so this PR needs to check whether all these fields are set in the old 'compatibiliy' API:
public key
slot
role
version
network
round
height
signers
message_type
This was merged as part of #1409