Skip to content

Commit 98843fe

Browse files
committed
[ecdsa] name recoverPubkey -> recoverPubkeyFromDigest for variant
Given that we generate a C API from the code, we need to differentiate the function names for the types. The default takes a message and this variant takes a digest (as used in Ethereum's precompile for ECRecover).
1 parent c26029a commit 98843fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

constantine/eth_ecdsa_signatures.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ proc recoverPubkey*(
7979
## even `y` coordinate of the `R` point.
8080
publicKey.raw.recoverPubkey(signature, message, evenY, keccak256)
8181

82-
proc recoverPubkey*(
82+
proc recoverPubkeyFromDigest*(
8383
publicKey: var PublicKey,
8484
msgHash: Fr[Secp256k1],
8585
signature: Signature,

constantine/ethereum_evm_precompiles.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ func eth_evm_ecrecover*(r: var openArray[byte],
13401340

13411341
# 4. perform pubkey recovery
13421342
var pubKey {.noinit.}: PublicKey
1343-
pubKey.recoverPubkey(msgHash, signature, evenY) # , keccak256)
1343+
pubKey.recoverPubkeyFromDigest(msgHash, signature, evenY)
13441344

13451345
# 4. now calculate the Ethereum address of the public key (keccak256)
13461346
privateAccess(PublicKey)

0 commit comments

Comments
 (0)