Merge pull request #3269 from filecoin-project/feat/randomize-chain-ticket
randomize ticket in genesis creation
This commit is contained in:
commit
672269e9d6
@ -2,6 +2,7 @@ package genesis
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/rand"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
@ -512,8 +513,10 @@ func MakeGenesisBlock(ctx context.Context, bs bstore.Blockstore, sys vm.SyscallB
|
|||||||
|
|
||||||
log.Infof("Empty Genesis root: %s", emptyroot)
|
log.Infof("Empty Genesis root: %s", emptyroot)
|
||||||
|
|
||||||
|
tickBuf := make([]byte, 32)
|
||||||
|
_, _ = rand.Read(tickBuf)
|
||||||
genesisticket := &types.Ticket{
|
genesisticket := &types.Ticket{
|
||||||
VRFProof: []byte("vrf proof0000000vrf proof0000000"),
|
VRFProof: tickBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
filecoinGenesisCid, err := cid.Decode("bafyreiaqpwbbyjo4a42saasj36kkrpv4tsherf2e7bvezkert2a7dhonoi")
|
filecoinGenesisCid, err := cid.Decode("bafyreiaqpwbbyjo4a42saasj36kkrpv4tsherf2e7bvezkert2a7dhonoi")
|
||||||
|
Loading…
Reference in New Issue
Block a user