Closed devpavan04 closed 1 year ago
Can we not compress it outside of the graphql work and on the Ui?
Can we not compress it outside of the graphql work and on the Ui?
We're compressing/uncompressing as needed in the UI without any problem. But this update is required since we're using compressed
key as the ID when creating public keys in subquery. We need to use either compressed or uncompressed key in all events. Not both as marked in the screenshot above.
Overview
In the individual key details page of
stats-dapp
, we display aTimeline
component that illustrates the status of3 key events
at various timestamps:Generated
Signed
Rotated
However,
stats-dapp
currently, can only show thegenerated
androtated
status. This limitation is due to the absence of thecompressed public key
in the following DKG events:nextPublicKeySignatureSubmitted
publicKeySignatureChanged
Most notably, the limitation is with the event -
nextPublicKeySignatureSubmitted
.Whenever a
public key is submitted
or anext public key is generated
, we create a newPublic Key
GraphQL item, assigning itsID
to thecompressed key
. Yet, when a public key signature is submitted, we only have theUncompressed Public Key
at our disposal, and not theCompressed Key
. This discrepancy hinders the update of that specific public key's status fromgenerated
torotated
.The solution requires us to utilize the
compressed public key
across all events, rather than theuncompressed key
.Note:
Tried to make use of the following function to convert
uncompressed
tocompressed
key:Due to the limitation of
subquery
'ssandbox
environment, there was error importingtiny-secp256k1
andecpair
library.