5

I have my Ledger connected to my signer server, which signs blocks/endorsements from my baking server.

If my Ledger is disconnected or the signer malfunctions in any way, I don't want to wait for my next baking or endorsement to know something is wrong.

How can I test that my signer server can sign blocks/endorsements without waiting for my next slot?

My idea was to have the signer sign some dummy data, but the Tezos Baking app on the Ledger only allows me to sign blocks and endorsements. Can I ask the signer to sign some dummy block or endorsement? Or are there other approaches?

PS. The test is for automatic monitoring purposes. I can't interact physically with the Ledger for this test.

PPS. I tried signing a random message like this: ./tezos-client sign bytes 0x03 for <my_ledger_address>, but it just gives me the following error:

  Unregistred error:
    { "kind": "permanent", "id": "signer.ledger",
      "ledger-error":
        "Application level error (sign): Unregistered status message" }
3

edit: only tried locally, not remote.

I suggest you try signing dummy bytes. This will fail. But the way how it fails will tell you if your ledger is connected in the right way and if your signer still responses.

 tezos-client sign bytes 0x03 for "<my_ledger_address>"

Will give you the error you got if the ledger is in baking mode, looking like this:

Error:
Ledger Application level error (sign): Security status unsatisfied

The same sign request will give you a different error if the ledger is not in baking mode

Jun  1 22:08:42 - client.signer.ledger: WARNING: The device at [0001:0004:00] is not a Tezos application
Jun  1 22:08:42 - client.signer.ledger: Transport level error: 
Error:
  Found no ledger corresponding to <my_ledger_address>.

Yet another error response if the ledger is not connected:

Found no ledger corresponding to <my_ledger_address>.

The Fact that you got one of the errors above means that your signer responses as expected.

1
  • Thank you. Not an ideal test, but I accept it's the best we got right now. – Svante Jun 6 '19 at 8:17
1

I answered a similar question previously. My previous answer was not specific to a ledger, but it should work just fine all the same.

tezos-client sign bytes 0x03 for <tz alias or tz address>

Here 0x03 is just any old random number. You could put any hex value here. If the signer is working you'll get back a message like:

Signature: sigPab0p1MdqojAaNTvASSvLo4ULEujfNFurF71EdoruABoPLLwmSxEDJf4NfQx8nJi3ncjfMEJbiWojTDXDUB8wNF5fgFIbA

2
  • Thanks for the suggestion, but as I write I have already tried this. The Ledger baking app does not allow signing messages which are not a block or an endorsement. I have added the command and error to my question above. – Svante May 2 '19 at 9:02
  • Ah, ok, rereading your question I see that now. I think that's really strange that that would be prevented. Not sure in that case. – lostdorje May 2 '19 at 9:11

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.