The VerifySig syscall should verify sigs

This commit is contained in:
Aayush Rajasekaran 2020-05-05 15:26:34 -04:00
parent 25c10e4b36
commit 8a9862bdb4
2 changed files with 7 additions and 8 deletions

View File

@ -279,8 +279,6 @@ func (rt *Runtime) DeleteActor(addr address.Address) {
} }
} }
const GasVerifySignature = 50
func (rs *Runtime) Syscalls() vmr.Syscalls { func (rs *Runtime) Syscalls() vmr.Syscalls {
// TODO: Make sure this is wrapped in something that charges gas for each of the calls // TODO: Make sure this is wrapped in something that charges gas for each of the calls
return rs.sys return rs.sys

View File

@ -243,11 +243,12 @@ func (ss *syscallShim) VerifySeal(info abi.SealVerifyInfo) error {
} }
func (ss *syscallShim) VerifySignature(sig crypto.Signature, addr address.Address, input []byte) error { func (ss *syscallShim) VerifySignature(sig crypto.Signature, addr address.Address, input []byte) error {
return nil // TODO: in genesis setup, we are currently faking signatures
/* // TODO: in genesis setup, we are currently faking signatures
if err := ss.rt.vmctx.VerifySignature(&sig, addr, input); err != nil { kaddr, err := ResolveToKeyAddr(ss.cstate, ss.cst, addr)
return false if err != nil {
return err
} }
return true
*/ return sigs.Verify(&sig, kaddr, input)
} }