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
%
svalue cannot live in the upper half interval of the curve order. Having fixed that,helpethnever thinks the signature is invalid anymore. However, it still recovers public keys incorrectly sometimes, very likely because I'm calculatingvincorrectly. This question here, therefore, becomes how to calculatevproperly. I hope I can calculatevfromrandswithout knowing the ephemeral private key --- because I don't think OpenSSL exposes such key me and I'm using OpenSSL for signatures. – user66567 Jan 29 '21 at 11:38