Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fixed preconf digest and sig
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Apr 15, 2024
1 parent 6e0b1e6 commit 9e16af3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/signer/preconfencryptor/encryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ func (e *encryptor) ConstructEncryptedPreConfirmation(bid *preconfpb.Bid) (*prec

preConfirmation := &preconfpb.PreConfirmation{
Bid: bid,
Digest: bid.Digest,
Signature: bid.Signature,
SharedSecret: sharedSecredProviderSk,
ProviderAddress: providerKK.GetAddress().Bytes(),
}
Expand All @@ -143,6 +141,9 @@ func (e *encryptor) ConstructEncryptedPreConfirmation(bid *preconfpb.Bid) (*prec
sig[64] += 27 // Transform V from 0/1 to 27/28
}

preConfirmation.Digest = preConfirmationHash
preConfirmation.Signature = sig

return preConfirmation, &preconfpb.EncryptedPreConfirmation{
Commitment: preConfirmationHash,
Signature: sig,
Expand Down

0 comments on commit 9e16af3

Please sign in to comment.