Merge pull request #3269 from filecoin-project/feat/randomize-chain-ticket

randomize ticket in genesis creation
This commit is contained in:
Whyrusleeping 2020-08-24 11:59:04 -07:00 committed by GitHub
commit 672269e9d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ package genesis
import (
"context"
"crypto/rand"
"encoding/json"
"fmt"
@ -512,8 +513,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")