You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v:=ctx.Input[binary.Word256Bytes : 2*binary.Word256Bytes]
if!binary.IsZeros(v[:len(v)-1]) {
returnnil, fmt.Errorf("ecrecover: recovery ID is larger than one byte")
}
// Copy in v to first element of sigsig[0] =v[len(v)-1]
// Copy in r, scopy(sig[1:], ctx.Input[2*binary.Word256Bytes:4*binary.Word256Bytes])
Technical Details
Burrow Version (docker image tag or branch if built from source)
Describe the Bug
The signature to be passed to btcec.RecoverCompact must have the structure
[v, r, s], but the current implementation of ecrecover has the structure[r, s, v], which always causes an error.https://github.com/btcsuite/btcec/blob/BTCEC_0_2_2/signature.go#L386-L391
To Reproduce
Implement and call the function to call ecrecover in smartContract.
Expected Behavior
https://github.com/hyperledger/burrow/blob/v0.34.4/execution/native/precompiles.go#L75-L82
Technical Details