ethereum/retesteth

string eth_sendRawTransaction(string _trRLPWithSig)

Closed this issue · 12 comments

string eth_sendRawTransaction(string _transactionRLP)

Accepts a transaction RLP list of the following items:

u256 nonce;
u256 gasPrice;
u256 gasLimit;
hash32 toAddress (could be empty)
u256 value
bytes data;
byte v  (in form 27 + (0|1)  and so on)
h256 r 
h256 s

and apply on top of the current chain configuration. (add it to a block which is yet not finalized)
returns the hash of the imported transaction if transaction is valid. or 0 if it's not.

rename to test_signAndSendTransaction by proposal of @gumb0?

test_signAndAppendTransaction?

secretKey -> privateKey?

test files has this field named "secretKey". that might be confusing but doable

The "secret key" is confusing by itself. Nobody knows what it is except ~5 people.

Why not sign the tx in the test runner and then send it to the client with eth_sendRawTransaction? Fewer RPC methods makes it easier to support more clients.

that would require test runner to implement crypto libs, making it heavier

@winsvega why? There is signTransaction RPC method.

ok. then I should study how it works. so maybe there is no need in this method.
I see, I've remembered.
@pirapira is there a method to add account by private key via RPC ? signTransaction wont work if there is no account

@pirapira @cdetrio @holiman
ok. what if instead of adding this new method. there would be a
test_registerAccount(Privatekey)

then it would be possible to use existing signTransaction and sendRawTransaction

replacing this requirement with standart eth_sendRawTransaction