forked from ethereum/aleth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ethereum#4888 from ethereum/create-tx
evm: Pass the "is CREATE" information to EVM-C VM
- Loading branch information
Showing
8 changed files
with
283 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,17 @@ | |
You should have received a copy of the GNU General Public License | ||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/** @file Executive.h | ||
* @author Gav Wood <[email protected]> | ||
* @date 2014 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <functional> | ||
#include <json/json.h> | ||
#include "Transaction.h" | ||
|
||
#include <libdevcore/Log.h> | ||
#include <libethcore/Common.h> | ||
#include <libevm/VMFace.h> | ||
#include "Transaction.h" | ||
|
||
#include <json/json.h> | ||
#include <functional> | ||
|
||
namespace Json | ||
{ | ||
|
@@ -72,7 +70,6 @@ class StandardTrace | |
private: | ||
bool m_showMnemonics = false; | ||
std::vector<Instruction> m_lastInst; | ||
bytes m_lastCallData; | ||
Json::Value m_trace; | ||
DebugOptions m_options; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,18 @@ | |
You should have received a copy of the GNU General Public License | ||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/** @file ExtVM.h | ||
* @author Gav Wood <[email protected]> | ||
* @date 2014 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <map> | ||
#include <functional> | ||
#include "Executive.h" | ||
#include "State.h" | ||
|
||
#include <libethcore/Common.h> | ||
#include <libevm/ExtVMFace.h> | ||
#include <libethcore/SealEngine.h> | ||
#include "State.h" | ||
#include "Executive.h" | ||
#include <libevm/ExtVMFace.h> | ||
|
||
#include <functional> | ||
#include <map> | ||
|
||
namespace dev | ||
{ | ||
|
@@ -36,21 +34,25 @@ namespace eth | |
|
||
class SealEngineFace; | ||
|
||
/** | ||
* @brief Externality interface for the Virtual Machine providing access to world state. | ||
*/ | ||
class ExtVM: public ExtVMFace | ||
/// Externality interface for the Virtual Machine providing access to world state. | ||
class ExtVM : public ExtVMFace | ||
{ | ||
public: | ||
/// Full constructor. | ||
ExtVM(State& _s, EnvInfo const& _envInfo, SealEngineFace const& _sealEngine, Address _myAddress, Address _caller, Address _origin, u256 _value, u256 _gasPrice, bytesConstRef _data, bytesConstRef _code, h256 const& _codeHash, unsigned _depth = 0, bool _staticCall = false): | ||
ExtVMFace(_envInfo, _myAddress, _caller, _origin, _value, _gasPrice, _data, _code.toBytes(), _codeHash, _depth, _staticCall), m_s(_s), m_sealEngine(_sealEngine) | ||
{ | ||
// Contract: processing account must exist. In case of CALL, the ExtVM | ||
// is created only if an account has code (so exist). In case of CREATE | ||
// the account must be created first. | ||
assert(m_s.addressInUse(_myAddress)); | ||
} | ||
/// Full constructor. | ||
ExtVM(State& _s, EnvInfo const& _envInfo, SealEngineFace const& _sealEngine, Address _myAddress, | ||
Address _caller, Address _origin, u256 _value, u256 _gasPrice, bytesConstRef _data, | ||
bytesConstRef _code, h256 const& _codeHash, unsigned _depth, bool _isCreate, | ||
bool _staticCall) | ||
: ExtVMFace(_envInfo, _myAddress, _caller, _origin, _value, _gasPrice, _data, _code.toBytes(), | ||
_codeHash, _depth, _isCreate, _staticCall), | ||
m_s(_s), | ||
m_sealEngine(_sealEngine) | ||
{ | ||
// Contract: processing account must exist. In case of CALL, the ExtVM | ||
// is created only if an account has code (so exist). In case of CREATE | ||
// the account must be created first. | ||
assert(m_s.addressInUse(_myAddress)); | ||
} | ||
|
||
/// Read storage location. | ||
virtual u256 store(u256 _n) override final { return m_s.storage(myAddress, _n); } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.