Lucas Henning
1 min readApr 21, 2021

--

Thanks for the response. Yes, rsv need to be set in order for web3 to be able to determine the right from address. We know rand s. However, prior to signing, we don’t know the value of v. It can be 27 or 28. We’re using this little trick to get temporary values for rsv so that we can use those values in the Tx that we want to sign.

I tried a few different ways to determine the public keys but this way works 100% every time. This is the way I tried to explain this in the article.

If you do not set any value for r, s and v before signing, Ethereum will not be able to determine the from address of the transaction. In turn, it will end up calculating the wrong public key and it won’t be able to send your transaction due to insufficient funds. This is a chicken-egg problem since you do not know the rsv values prior to signing.

Hope it makes more sense now. Let me know if you have any other questions.

--

--

Lucas Henning
Lucas Henning

Written by Lucas Henning

CTO @ suku.world — building a more accessible web3

Responses (1)