46

In Ethereum JSON-RPC I found the return is:

Returns

Object - A transaction object, or null when no transaction was found:
hash: DATA, 32 Bytes - hash of the transaction.
nonce: QUANTITY - the number of transactions made by the sender prior to this one.
blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
from: DATA, 20 Bytes - address of the sender.
to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
value: QUANTITY - value transferred in Wei.
gasPrice: QUANTITY - gas price provided by the sender in Wei.
gas: QUANTITY - gas provided by the sender.
input: DATA - the data send along with the transaction.

But I type the command, the result is not same with the document above :

{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x949f40920a86f281daccbe8e30dd60a366b22ff270647815f6bfc0402ff38e42","blockNumber":"0xce3","from":"0x047347096a6dc73f8626afb520c383a02efda314","gas":"0x15f90","gasPrice":"0x4a817c800","hash":"0x70a7552c8ab8d2621c80c8a1c149012d10a823c4619cc82235cbdfad0553310b","input":"0x021df6f4000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20776f726c642100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20776f726c642100000000000000000000000000000000000000","nonce":"0x178","to":"0xe2412bb63a0a25d7b8973fc6764fd246ebe62c7a","transactionIndex":"0x0","value":"0x0","v":"0x1b","r":"0xd693b532a80fed6392b428604171fb32fdbf953728a3a7ecc7d4062b1652c042","s":"0x24e9c602ac800b983b035700a14b23f78a253ab762deab5dc27e3555a750b354"}}

What does r, s, v and others mean ?

And value: QUANTITY - value transferred in Wei, what does it mean?

eth
  • 85,679
  • 53
  • 285
  • 406
jiebang
  • 993
  • 1
  • 12
  • 18

1 Answers1

49

v, r, s are the values for the transaction's signature. They can be used as in Get public key of any ethereum account

A little more information, r and s are outputs of an ECDSA signature, and v is the recovery id. https://bitcoin.stackexchange.com/questions/38351/ecdsa-v-r-s-what-is-v also applies to Ethereum. For replay attack prevention, Ethereum makes further adjustments to v as explained in EIP 155.


value is how many Wei was sent to the to address. 1 ETH is 10^18 wei.

QUANTITY basically means that the value is encoded in hex.

eth
  • 85,679
  • 53
  • 285
  • 406
  • Why there are 27,28,189,190 values? trying to understand it. esp 189 and 190 – rstormsf May 16 '18 at 16:11
  • @rstormsf Asking at https://crypto.stackexchange.com could be better. – eth May 20 '18 at 09:53
  • 3
    I figured it out, it is result of applied chain_id number vs non-applied – rstormsf May 23 '18 at 22:51
  • Is it possible to have any abuse by having r, v, s? In terms of security. – Nabi K.A.Z. May 12 '22 at 17:25
  • 1
    @NabiK.A.Z. Not sure what you mean, r, v, s, are specific to a transaction (and nonce), so using r, v, s on another transaction will almost always have an invalid effect. Replay attacks are a related area that you might be asking more about. – eth May 25 '22 at 04:06
  • @eth Of course, I did not mean merely repeating the transaction, in general, any security issues. For example, forging a signature, signing a new transaction, security code, wallet identity information, or any other security issue. – Nabi K.A.Z. May 26 '22 at 13:27
  • 1
    @NabiK.A.Z. Maybe these answers will help? https://bitcoin.stackexchange.com/questions/111260/why-is-it-not-possible-to-get-the-private-key-out-of-the-public-key or https://bitcoin.stackexchange.com/questions/54857/does-signing-message-weakens-the-address-security – eth Jun 02 '22 at 05:18