CCQ/Node: Query request ID may not be unique (#3536)

This commit is contained in:
bruce-riley 2023-11-16 09:32:16 -06:00 committed by GitHub
parent 0cf298cabe
commit 9e27b73e43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -179,9 +179,11 @@ func handleQueryRequestsImpl(
// - valid "block" strings
allQueryRequestsReceived.Inc()
requestID := hex.EncodeToString(signedRequest.Signature)
digest := QueryRequestDigest(env, signedRequest.QueryRequest)
// It's possible that the signature alone is not unique, and the digest alone is not unique, but the combination should be.
requestID := hex.EncodeToString(signedRequest.Signature) + ":" + digest.String()
qLogger.Info("received a query request", zap.String("requestID", requestID))
signerBytes, err := ethCrypto.Ecrecover(digest.Bytes(), signedRequest.Signature)