1

I'm signing transactions using an HSM and when using Web3js to send the signed transaction, the from property on the receipt shows an address that's:

  1. Different every time a sent signed transactions is processed (even when using the same private key for signing)
  2. Never the address derived from the signer's public key

Example Transaction Receipts:

The signer's address is: 0xe8e9961af9ecdf3e6ee84dc52cbfc526fb3c5107

Example receipt 1:

{
    "blockHash": "0xa1f1161b90917a7cc92ee437a5243550dcc4514817ff7ec13da8fcb3b1fcfadc",
    "blockNumber": 135,
    "contractAddress": null,
    "cumulativeGasUsed": 52983,
    "from": "0xc82b53e7f0ba0c044b33e73dd4b1d6c08eb8e313",
    "gasUsed": 52983,
    "logs": [{...}, {...}],
    "logsBloom": "0x00000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000020020000000000000000040000000000000001000000000008000000000000000000040000004000800000000020000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000400000000000000000000000000000000000000000000060000e00000000000000000000000000000000000000001000000000000000000000",
    "status": true,
    "to": "0x18761d4a26db5c6ce4332964ee183e95e82b5ffe",
    "transactionHash": "0x393c89cd8a20130986f2057ee249e9ab48451d608ea9764bd545a692141b610a",
    "transactionIndex": 0
}

Example receipt 2:

{
    "blockHash": "0x8b152141ad109105e8ca74f23bc8817f52d81fbe1c94aa73464b11002be6ae65",
    "blockNumber": 136,
    "contractAddress": null,
    "cumulativeGasUsed": 37983,
    "from": "0x5ba188bdb5c2e2b77def59faf6963f83a445b8cf",
    "gasUsed": 37983,
    "logs": [{...}, {...}],
    "logsBloom": "0x00000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000020020000000000000000040100000000000001000000000008000000000000000000040000004000000000000020000000020000000000000040000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000400000000000000000000000000000000000000000000060000a00000000000000000000000000010000000000000000000000000000000000",
    "status": true,
    "to": "0x18761d4a26db5c6ce4332964ee183e95e82b5ffe",
    "transactionHash": "0xfdad1458c3795f33d7d62c496e5438cfba028b76ab2a064735c70db89b2ef5ce",
    "transactionIndex": 0
}

Example receipt 3:

{
    "blockHash": "0xf1a25c3a1da2da9b32c5534f47af2832de249101ba82af9cceae3fc429120a3e",
    "blockNumber": 137,
    "contractAddress": null,
    "cumulativeGasUsed": 37983,
    "from": "0x2fff486184b53a5cc263fa955df4b82021f07341",
    "gasUsed": 37983,
    "logs": [{...}, {...}],
    "logsBloom": "0x00000000000000000000000000000400000000000000000000000800000000000000000000000000000000000000000000000020020000000000000000040000000000000001000000000008000000000000000000040000004000000000000020000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000002000000400000000000000000000010000000000000000000000060000a00000000000000000000000000000000000000000000000000000000000000",
    "status": true,
    "to": "0x18761d4a26db5c6ce4332964ee183e95e82b5ffe",
    "transactionHash": "0x2665e33eb4021461395793b80b18429a53d6dc08fafc064a51221ea26bffb940",
    "transactionIndex": 0
}
  • Did you check the HSM documentation? What type of HSM are you using? How are transaction signed? From your examples they were signed by different private keys, perhaps it is using child keys derived from a master. – Ismael Jun 5 at 20:17
  • Hi @Ismael, thank you for the response. I'm using SoftHSMv2 with the Graphene Library Transactions are signed using the Graphene library with the ECDSA Mechanism Looking at the above receipts, it does appear that different private keys are used to sign the transactions, however, every time a transaction is signed, the public key is console logged and the public key never changes. Additionally, I am able to call ecrecover on the signatures and get back the correct public key and ETH address – spacesailor24 Jun 6 at 8:10

Your Answer

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

Browse other questions tagged or ask your own question.