Update sectorbuilder

This commit is contained in:
Łukasz Magiera
2019-11-03 21:44:22 +01:00
parent c550e030b1
commit 2a695611d5
5 changed files with 4 additions and 6 deletions
-1
View File
@@ -140,7 +140,6 @@ func VerifySeal(sectorSize uint64, commR, commD []byte, proverID address.Address
copy(commDa[:], commD)
copy(ticketa[:], ticket)
copy(seeda[:], seed)
seeda[31] = 0 // Temp Fr hack
proverIDa := addressToProverID(proverID)
return sectorbuilder.VerifySeal(sectorSize, commRa, commDa, proverIDa, ticketa, seeda, sectorID, proof)
+2 -2
View File
@@ -15,7 +15,7 @@ import (
const sectorSize = 1024
func TestSealAndVerify(t *testing.T) {
t.Skip("this is slow")
//t.Skip("this is slow")
build.SectorSizes = []uint64{sectorSize}
if err := build.GetParams(true); err != nil {
@@ -69,7 +69,7 @@ func TestSealAndVerify(t *testing.T) {
seed := sectorbuilder.SealSeed{
BlockHeight: 15,
TicketBytes: [32]byte{0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 45, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 0},
TicketBytes: [32]byte{0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 45, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, },
}
sco, err := sb.SealCommit(sid, seed)
-1
View File
@@ -143,7 +143,6 @@ func (s *Store) SealPreCommit(ctx context.Context, sectorID uint64) (sectorbuild
func (s *Store) SealComputeProof(ctx context.Context, sectorID uint64, height uint64, rand []byte) ([]byte, error) {
var tick [32]byte
copy(tick[:], rand)
tick[31] = 0
sco, err := s.sb.SealCommit(sectorID, sectorbuilder.SealSeed{
BlockHeight: height,