The VerifySig syscall should verify sigs
This commit is contained in:
parent
25c10e4b36
commit
8a9862bdb4
@ -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
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user