I am attempting to verify BLS signatures using the Chainsafe BLS library. I am attempting to independently verify signatures associated with deposits to the ETH Deposit Contract. In order to test that I am using the library correctly, I used the verify function on the following deposit.

When I attempted to verify the deposit, the function returned false.

I made a couple of assumptions which may have led to this error.

  1. I inputed all arguments as strings.
  2. For the message parameter, I inserted the users withdrawal credentials

This is what my function looked like:


How did I do?


You can find the canonical definition of the deposit signature in ethereum/eth2.0-specs: process_deposit. Specifically, it is this code:

# Verify the deposit signature (proof of possession) which is not checked by the deposit contract
deposit_message = DepositMessage(
domain = compute_domain(DOMAIN_DEPOSIT)  # Fork-agnostic domain since deposits are valid across forks
signing_root = compute_signing_root(deposit_message, domain)
if not bls.Verify(pubkey, signing_root, deposit.data.signature):

The message isn't just the withdrawal_credentials, it's the signing_root (a.k.a. merkle root) of a DepositMessage obect. Due to the complexity involved I won't go into detail to describe the entire process but the specs (linked above) should be comprehensive enough to describe the process exactly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.