aboutsummaryrefslogtreecommitdiffstats
path: root/docs/rlp_tests/index.rst
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/rlp_tests/index.rst
parent60c19d22eb79aed3084ede5d4a0725235376c6b3 (diff)
downloadtangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.tar
tangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.gz
tangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.bz2
tangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.lz
tangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.xz
tangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.tar.zst
tangerine-tests-8477fc273c31f839119847731f029f10a8648bd2.zip
Added doc rst files from the Homestead docs
Diffstat (limited to 'docs/rlp_tests/index.rst')
-rw-r--r--docs/rlp_tests/index.rst50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/rlp_tests/index.rst b/docs/rlp_tests/index.rst
new file mode 100644
index 000000000..00ba3dc7b
--- /dev/null
+++ b/docs/rlp_tests/index.rst
@@ -0,0 +1,50 @@
+.. _rlp_tests:
+
+################################################################################
+RLP Tests
+################################################################################
+
+Describes an **RLP** (https://github.com/ethereum/wiki/wiki/RLP) encoding using the .json file.
+The client should read the rlp byte stream, **decode** and check whether the contents match its json representation. Then it should try do it reverse - **encode** json rlp representation into rlp byte stream and check whether it matches the given rlp byte stream.
+
+If it is an invalid RLP byte stream in the test, then 'in' field would contain string 'INVALID'
+
+Some RLP byte streams are expected to be generated by fuzz test suite. For those examples 'in' field would contain string 'VALID' as it means that rlp should be easily decoded.
+
+RLP tests are located in in ``/RLPTests``
+
+**Note** that RLP tests are testing a single RLP object encoding. Not a stream of RLP objects in one array.
+
+Basic structure
+--------------------------------------------------------------------------------
+
+::
+
+ {
+ "rlpTest": {
+ "in": "dog",
+ "out": "83646f67"
+ },
+
+ "multilist": {
+ "in": [ "zw", [ 4 ], 1 ],
+ "out": "c6827a77c10401"
+ },
+
+ "validRLP": {
+ "in": "VALID",
+ "out": "c7c0c1c0c3c0c1c0"
+ },
+
+ "invalidRLP": {
+ "in": "INVALID",
+ "out": "bf0f000000000000021111"
+ },
+ ...
+ }
+
+Sections
+--------------------------------------------------------------------------------
+
+* ``in`` - json object (array, int, string) representation of the rlp byte stream (\*except values 'VALID' and 'INVALID')
+* ``out`` - string of rlp bytes stream