From 6c9dcaf7ac729ca06dad8cd839556df96f0022af Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 25 Apr 2017 18:26:33 +0100 Subject: [PATCH 1/2] Mention the order of the ABI in metadata --- docs/miscellaneous.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 2865d8843..7be46eace 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -314,6 +314,8 @@ Comments are of course also not permitted and used here only for explanatory pur } } +.. note:: + Note the ABI definition above has no fixed order. It can change with compiler versions. Encoding of the Metadata Hash in the Bytecode ============================================= From 8a5feb8c490e38961da68ea059309e06cef3e1c0 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 25 Apr 2017 18:29:00 +0100 Subject: [PATCH 2/2] Explain that bytecode depends on metadata --- docs/miscellaneous.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 7be46eace..914dfacd4 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -317,6 +317,12 @@ Comments are of course also not permitted and used here only for explanatory pur .. note:: Note the ABI definition above has no fixed order. It can change with compiler versions. +.. note:: + Since the bytecode of the resulting contract contains the metadata hash, any change to + the metadata will result in a change of the bytecode. Furthermore, since the metadata + includes a hash of all the sources used, a single whitespace change in any of the source + codes will result in a different metadata, and subsequently a different bytecode. + Encoding of the Metadata Hash in the Bytecode =============================================