From a1fb5e8299e50f42c437e212540d537191c1b08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 7 Aug 2017 18:19:05 +0200 Subject: [PATCH] EVM-C: Limit functionality of output in message Do not allow passing debug and error messages in message.output. We should keep the output buffer for passing consensus-critical data only. We still need to design tracing / debugging subsystem for EVM-C. The place of error messages is there. --- include/evm.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/evm.h b/include/evm.h index 6706ff0..89cbb2b 100644 --- a/include/evm.h +++ b/include/evm.h @@ -131,21 +131,14 @@ struct evm_result { /// The amount of gas left after the execution. /// - /// The value is valid only if evm_result::code is ::EVM_SUCCESS - /// or ::EVM_REVERT. In other cases all provided gas is assumed to have been - /// used. + /// If evm_result::code is not ::EVM_SUCCESS nor ::EVM_REVERT + /// the value MUST be 0. int64_t gas_left; /// The reference to output data. /// /// The output contains data coming from RETURN opcode (iff evm_result::code - /// field is ::EVM_SUCCESS) or from REVERT opcode (iff evm_result::code - /// field is ::EVM_REVERT). - /// - /// In case the evm_result::code field signals - /// a failure the output MAY contain optional explanation of the failure - /// for debugging or tracing purposes. In case the explanation is provided - /// and contains human-readable text then UTF-8 encoding SHOULD be used. + /// field is ::EVM_SUCCESS) or from REVERT opcode. /// /// The memory containing the output data is owned by EVM and has to be /// freed with evm_result::release().