aboutsummaryrefslogtreecommitdiffstats
path: root/docs/transaction_tests
diff options
context:
space:
mode:
authorholgerd77 <Holger.Drewes@gmail.com>2017-08-29 01:57:01 +0800
committerholgerd77 <Holger.Drewes@gmail.com>2017-08-30 01:23:44 +0800
commit8477fc273c31f839119847731f029f10a8648bd2 (patch)
tree9412fed202aa6ff3120eff4aac591954ddb87054 /docs/transaction_tests
parent60c19d22eb79aed3084ede5d4a0725235376c6b3 (diff)
downloaddexon-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.gz
dexon-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.zst
dexon-tests-8477fc273c31f839119847731f029f10a8648bd2.zip
Added doc rst files from the Homestead docs
Diffstat (limited to 'docs/transaction_tests')
-rw-r--r--docs/transaction_tests/index.rst51
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/transaction_tests/index.rst b/docs/transaction_tests/index.rst
new file mode 100644
index 000000000..ffe65247d
--- /dev/null
+++ b/docs/transaction_tests/index.rst
@@ -0,0 +1,51 @@
+.. _transaction_tests:
+
+################################################################################
+Transaction Tests
+################################################################################
+
+Describes a complete transaction and its `RLP <https://github.com/ethereum/wiki/wiki/RLP>`_ representation using the .json file.
+The client should read the rlp and check whether the transaction is valid, has the correct sender and corresponds to the transaction parameters.
+If it is an invalid transaction, the transaction and the sender object will be missing.
+
+Basic structure
+--------------------------------------------------------------------------------
+::
+
+ {
+ "transactionTest1": {
+ "rlp" : "bytearray",
+ "sender" : "address",
+ "blocknumber" : "1000000"
+ "transaction" : {
+ "nonce" : "int",
+ "gasPrice" : "int",
+ "gasLimit" : "int",
+ "to" : "address",
+ "value" : "int",
+ "v" : "byte",
+ "r" : "256 bit unsigned int",
+ "s" : "256 bit unsigned int",
+ "data" : "byte array"
+ }
+ },
+
+ "invalidTransactionTest": {
+ "rlp" : "bytearray",
+ },
+ ...
+ }
+
+Sections
+--------------------------------------------------------------------------------
+
+* ``rlp`` - RLP encoded data of this transaction
+* ``transaction`` - transaction described by fields
+* ``nonce`` - A scalar value equal to the number of transactions sent by the sender.
+* ``gasPrice`` - A scalar value equal to the number of wei to be paid per unit of gas.
+* ``gasLimit`` - A scalar value equal to the maximum amount of gas that should be used in executing this transaction.
+* ``to`` - The 160-bit address of the message call's recipient or empty for a contract creation transaction.
+* ``value`` - A scalar value equal to the number of wei to be transferred to the message call's recipient or, in the case of contract creation, as an endowment to the newly created account.
+* ``v, r, s`` - Values corresponding to the signature of the transaction and used to determine the sender of the transaction.
+* ``sender`` - the address of the sender, derived from the v,r,s values.
+* ``blocknumber`` - indicates network rules for the transaction. Since blocknumber = **1000000** Homestead rules are applied to transaction. (see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.mediawiki)