randomize ticket in genesis creation

This commit is contained in:
whyrusleeping 2020-08-24 11:33:49 -07:00
parent ee79855536
commit 1447a66515

View File

@ -2,6 +2,7 @@ package genesis
import (
"context"
"crypto/rand"
"encoding/json"
"fmt"
@ -510,8 +511,10 @@ func MakeGenesisBlock(ctx context.Context, bs bstore.Blockstore, sys vm.SyscallB
log.Infof("Empty Genesis root: %s", emptyroot)
tickBuf := make([]byte, 32)
_, _ = rand.Read(tickBuf)
genesisticket := &types.Ticket{
VRFProof: []byte("vrf proof0000000vrf proof0000000"),
VRFProof: tickBuf,
}
filecoinGenesisCid, err := cid.Decode("bafyreiaqpwbbyjo4a42saasj36kkrpv4tsherf2e7bvezkert2a7dhonoi")