1

Here are two RLP-encodings of two signings of the same transaction --- for Goerli. Notice how the "Signed by" address is different. This must be implying something is wrong with my signing procedure? The private key with which I'm signing is 6e08[...]28d8. The address relative to this private key is 3e21c651dfc21ee198bc2f735502eb82a2e8c4f0, so I was expecting to see "Signed by: 0x3e21c651dfc21ee198bc2f735502eb82a2e8c4f0".

%helpeth parseTx 0xf86d018612309ce5400082a4109479e4e5c6309eab8df0299973ef29ce2b001704a5880de0b6b3a7640000802ea02db2dc28cf1c6d049d773bd78c5fad9cca19e4e4e191e9ec80f5765c1a5739b8a0747602789e0b20eeca045e49260fc7382d937125178ea2e4a712326b7c0b8eb8
Signed by: 0xd07b876c0b06b6fea8de3df326518abc5a862c45
Nonce: 0x01
To: 0x79e4e5c6309eab8df0299973ef29ce2b001704a5
Value: 1000000000000000000 (1 ETH)
Data: 0x
Gas limit: 42000
Gas price: 20000000000000 (20000 Gwei)
Potential total transaction cost: 0.84 ETH
Minimum required account balance: 1.84 ETH

%helpeth parseTx 0xf86d018612309ce5400082a4109479e4e5c6309eab8df0299973ef29ce2b001704a5880de0b6b3a7640000802ea033f0f6603ce617e2bc67048c63ac7ee407b82517fb490e694030d43893c26b12a0725bb38fc835acc70290164eba994bfc144ef9151a7de5ea57880576f7895a65
Signed by: 0xe31621a692881e27467be5b22e3b15720fe1aa55
Nonce: 0x01
To: 0x79e4e5c6309eab8df0299973ef29ce2b001704a5
Value: 1000000000000000000 (1 ETH)
Data: 0x
Gas limit: 42000
Gas price: 20000000000000 (20000 Gwei)
Potential total transaction cost: 0.84 ETH
Minimum required account balance: 1.84 ETH
%
11
  • Hi there. I know this only relates to Georli, but please don't reveal private keys to the public. It's a bad habit to fall into... And even if a human doesn't see it, there are bots about. Jan 28 at 11:02
  • 1
    I surely wouldn't fall into the habit, but it doesn't cost me much to remove it from here right now. (Of course, it remains in the history forever now.) Thanks!
    – user66567
    Jan 28 at 11:29
  • That's fine, but I didn't remove it myself because anyone can just look at the edit logs :-) I would move the testnet ETH to a new address. (I don't know how reliable the Georli faucet is - if it's quick to get your hands on testnet ETH then it might not matter anyway.) Jan 28 at 11:30
  • 1
    It's quick, yes. But, no worries, I'll follow the local culture. Thanks for the tip.
    – user66567
    Jan 28 at 11:33
  • Signatures should be deterministic, so if the transaction is the same, the signature should be the same as well. There's likely something wrong with your signing method, as all the other transaction parameters in your RLP encoded data seem correct.
    – Morten
    Jan 28 at 11:58
1

The problem is in v. I don't have access to the ephemeral private key used in the signing process, so I can't easily get the y-coordinate of this private key, which I need for computing v. However, since I know the public key of the signer (which is myself), I can verify which v produces the correct public key, this way inferring which v I must encode the transaction with.

So, essentially, in such situation I need to brute-force v. I don't have another solution. For a better solution I'd need to modify the primitive libraries I'm using to calculate v for me during the signing process because the signing process is the one which has the information for calculating v precisely.

Assuming you have the correct y-coordinate, this answer shows you how to compute v.

1
  • Thanks to @CoreyOgburn for writing his answer.
    – user66567
    Jan 29 at 15:29

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.