aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-04 19:02:33 +0800
committerGitHub <noreply@github.com>2018-10-04 19:02:33 +0800
commit1305bf34f0f82983868028cf2e39f218ba742385 (patch)
treeed4972c644e98b3bbade80883513c6bbc9857f81 /docs
parent98fa46bfe0c90e94218e0c0a2a621e0dfb5c36ed (diff)
parent26d36e1faac40fb0570965a33b67f7651ce8eeaa (diff)
downloaddexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.tar
dexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.tar.gz
dexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.tar.bz2
dexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.tar.lz
dexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.tar.xz
dexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.tar.zst
dexon-solidity-1305bf34f0f82983868028cf2e39f218ba742385.zip
Merge pull request #5073 from IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/patch-4
separate out a new "Design Criteria" section from "Formal Specification"
Diffstat (limited to 'docs')
-rw-r--r--docs/abi-spec.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index 7c9d9f9e..f31d9d45 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -102,18 +102,19 @@ them.
|:ref:`struct<structs>` |``tuple`` |
+-------------------------------+-----------------------------------------------------------------------------+
-Formal Specification of the Encoding
-====================================
+Design Criteria for the Encoding
+================================
-We will now formally specify the encoding, such that it will have the following
-properties, which are especially useful if some arguments are nested arrays:
-
-Properties:
+The encoding is designed to have the following properties, which are especially useful if some arguments are nested arrays:
1. The number of reads necessary to access a value is at most the depth of the value inside the argument array structure, i.e. four reads are needed to retrieve ``a_i[k][l][r]``. In a previous version of the ABI, the number of reads scaled linearly with the total number of dynamic parameters in the worst case.
2. The data of a variable or array element is not interleaved with other data and it is relocatable, i.e. it only uses relative "addresses".
+
+Formal Specification of the Encoding
+====================================
+
We distinguish static and dynamic types. Static types are encoded in-place and dynamic types are encoded at a separately allocated location after the current block.
**Definition:** The following types are called "dynamic":