-
Notifications
You must be signed in to change notification settings - Fork 102
batch verify seals syscall implemented incorrectly #1472
Comments
@hunjixin please add information about this error |
@ZenGround0 no any more info, just root unmatch, and have a error message |
in the code. i have check BatchVerifySeals , this func argument and return has the same length. in the code if miner contain the element , and the verifies must have too.
|
@ZenGround0 any idea? |
@hunjixin it looks like your syscall implementation is not returning a map with all miners as keys. This is required even if the miner failed all sectors. |
@ZenGround0 i have add log in in BatchVerifySeals, there but just compaire the length of arguments and returns. they have the same length. cold nearly the same as lotus. very little chance to meet this problems, there are a error in latest two month func (sys syscalls) BatchVerifySeals(vis map[address.Address][]proof5.SealVerifyInfo) (map[address.Address][]bool, error) {
out := make(map[address.Address][]bool)
sema := make(chan struct{}, BatchSealVerifyParallelism)
vmlog.Info("BatchVerifySeals miners:", len(vis))
var wg sync.WaitGroup
for addr, seals := range vis {
results := make([]bool, len(seals))
out[addr] = results
for i, s := range seals {
wg.Add(1)
go func(ma address.Address, ix int, svi proof5.SealVerifyInfo, res []bool) {
defer wg.Done()
sema <- struct{}{}
if err := sys.VerifySeal(svi); err != nil {
vmlog.Warnw("seal verify in batch failed", "miner", ma, "index", ix, "err", err)
res[ix] = false
} else {
res[ix] = true
}
<-sema
}(addr, i, s, results)
}
}
wg.Wait()
vmlog.Info("BatchVerifySeals Result miners:", len(out))
return out, nil
} |
@hunjixin to confirm it is the venus node that sees the exitcode 17 error which leads to the state root mismatch because it is not seen on mainnet? |
If this is the case you should rerun this at the problem epochs and inspect the data making it to |
yes , root not match. but when set-head back to previous tipset and reprocess the same tipset. results always become ok. not restart process. |
i add log like this keyInVerifies := []addr.Address{}
for key, _ := range verifies {
keyInVerifies = append(keyInVerifies, key)
}
rt.Log(rtt.INFO, "ID: %s, verifies keys before BatchVerifySeals %v", id, keyInVerifies)
rt.Log(rtt.INFO, "ID: %s, miners keys before BatchVerifySeals %v", id, miners)
res, err := rt.BatchVerifySeals(verifies)
builtin.RequireNoErr(rt, err, exitcode.ErrIllegalState, "failed to batch verify")
keyInRes := []addr.Address{}
for key, _ := range res {
keyInRes = append(keyInRes, key)
}
rt.Log(rtt.INFO, "ID: %s, return before BatchVerifySeals %v", id, keyInRes) and got log like this
before loop this miner keys are the same as res keys. |
@ZenGround0 in v6 version , got error like this 2021-11-04T19:29:35.417+0800 ERROR vm.actors vmcontext/runtime_adapter.go:188 unexpected error processing batch proof verifies: batch verify seals syscall implemented incorrectly, result not found for miner: %!s(PANIC=String method: unknown address protocol). Skipping all verification for epoch 1257299 unknown address protocol ? |
This error occurs very occasionally, does anyone have an idea? i have confirm BatchVerifySeals argument and return has the same length
The text was updated successfully, but these errors were encountered: