Skip to content

Commit f7eace4

Browse files
fix(galois): fix trusted validators hash by using the computed one
1 parent 9fe822b commit f7eace4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

galoisd/grpc/server.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (p *proverServer) Poll(ctx context.Context, pollReq *grpc.PollRequest) (*gr
194194
}
195195
}
196196

197-
getInputsHash := func(chainID string, h *types.Header) []byte {
197+
getInputsHash := func(chainID string, h *types.Header, trustedValidatorsHash []byte) []byte {
198198
buff := []byte{}
199199
var padded [32]byte
200200
writeI64 := func(x int64) {
@@ -215,12 +215,12 @@ func (p *proverServer) Poll(ctx context.Context, pollReq *grpc.PollRequest) (*gr
215215
writeMiMCHash(h.ValidatorsHash)
216216
writeMiMCHash(h.NextValidatorsHash)
217217
writeHash(h.AppHash)
218-
writeMiMCHash(h.ValidatorsHash)
218+
writeMiMCHash(trustedValidatorsHash)
219219
hash := sha256.Sum256(buff)
220220
return hash[1:]
221221
}
222222

223-
inputsHash := getInputsHash(req.Vote.ChainID, req.UntrustedHeader)
223+
inputsHash := getInputsHash(req.Vote.ChainID, req.UntrustedHeader, trustedValidatorsRoot)
224224

225225
log.Printf("Inputs hash: %X\n", inputsHash)
226226

0 commit comments

Comments
 (0)