Closed emlautarom1 closed 3 days ago
Great! Can you include a snippet of the logs right now?
It will look something like this:
2024-07-01T13:31:40.252-0300 INFO rest_server/log_test.go:23 Received signed operator set update message {"message": {"Message":{"Id":100,"Timestamp":200,"Operators":[{"Pubkey":{"X":3,"Y":4},"Weight":5}]},"BlsSignature":{"g1_point":{"X":1,"Y":2}},"OperatorId":[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]}}
To get a better representation we could use something like BlsSignature.Serialize()
which looks like the following:
2024-07-01T13:33:32.477-0300 INFO rest_server/log_test.go:23 Received signed operator set update message {"message": {"Message":{"Id":100,"Timestamp":200,"Operators":[{"Pubkey":{"X":3,"Y":4},"Weight":5}]},"BlsSignature":{"g1_point":{"X":1,"Y":2}},"OperatorId":[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]}, "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAg=="}
That's all right really. Usually these signatures are represented as E(x, y)
indeed, without hex.
It's fine as it is IMO
Merging and closing #247
Current Behavior
Currently, when logging messages that contain a
bls.Signature
we're logging a pointer address rather than its contents.New Behavior
Whenever we log these messages we log their value rather that their representation
Breaking Changes
This change should not introduce any breaking changes.
Observations
The original code used
fmt.Sprintf("%#v", ...)
in the log calls which did not dereference the pointers. This behavior is present since #12 but there is no clear indication on why it was done that way.