Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
doc: complete constraints desc.
Browse files Browse the repository at this point in the history
  • Loading branch information
KimiWu123 committed Oct 19, 2023
1 parent e53546d commit b59667c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion specs/precompile/01ecRecover.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ A constant gas cost: 3000

## Constraints

1. v is 27 or 28.
1. If gas_left < gas_required, then is_success == false and return data is zero.
1. v, r and s are valid
- v is 27 or 28 and the first 31 bytes of v is zero
- both of r and s are less than `secp256k1N (0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141)`
- both of r and s are greater than `1`
- r is greater than `secp256k1N/2`
2. `sig_table` lookups
3. recovered address is zero if the signature can't be recovered.

Expand Down

0 comments on commit b59667c

Please sign in to comment.