From 9b851e9359c18ecd740f934bdd0ec1a3bfc5a114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 13 Mar 2015 11:19:26 +0100 Subject: [PATCH 1/7] Stats for testeth Simple listener support added to testeth. Stats class implements the Listener interface and collects tests execution times. Try options: --stats or --stats=full. Closes ethereum/cpp-ethereum#1285 --- test/CMakeLists.txt | 8 ++--- test/Stats.cpp | 83 +++++++++++++++++++++++++++++++++++++++++++++ test/Stats.h | 50 +++++++++++++++++++++++++++ test/TestHelper.cpp | 28 +++++++++++++++ test/TestHelper.h | 30 +++++++++++++++- test/state.cpp | 21 +++--------- test/vm.cpp | 39 +++++---------------- 7 files changed, 207 insertions(+), 52 deletions(-) create mode 100644 test/Stats.cpp create mode 100644 test/Stats.h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d7761b8d3..ef292c2bb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -19,10 +19,10 @@ include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) file(GLOB HEADERS "*.h") add_executable(testeth ${SRC_LIST} ${HEADERS}) -add_executable(createRandomVMTest createRandomVMTest.cpp vm.cpp TestHelper.cpp) -add_executable(createRandomStateTest createRandomStateTest.cpp TestHelper.cpp) -add_executable(checkRandomVMTest checkRandomVMTest.cpp vm.cpp TestHelper.cpp) -add_executable(checkRandomStateTest checkRandomStateTest.cpp TestHelper.cpp) +add_executable(createRandomVMTest createRandomVMTest.cpp vm.cpp TestHelper.cpp Stats.cpp) +add_executable(createRandomStateTest createRandomStateTest.cpp TestHelper.cpp Stats.cpp) +add_executable(checkRandomVMTest checkRandomVMTest.cpp vm.cpp TestHelper.cpp Stats.cpp) +add_executable(checkRandomStateTest checkRandomStateTest.cpp TestHelper.cpp Stats.cpp) target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) target_link_libraries(testeth ${CURL_LIBRARIES}) diff --git a/test/Stats.cpp b/test/Stats.cpp new file mode 100644 index 000000000..fa615cb50 --- /dev/null +++ b/test/Stats.cpp @@ -0,0 +1,83 @@ +/* + This file is part of cpp-ethereum. + + cpp-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + cpp-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with cpp-ethereum. If not, see . +*/ + +#include "Stats.h" + +#include +#include + +namespace dev +{ +namespace test +{ + +Stats& Stats::get() +{ + static Stats instance; + return instance; +} + +void Stats::testStarted(std::string const& _name) +{ + m_currentTest = _name; + m_tp = clock::now(); +} + +void Stats::testFinished() +{ + m_stats[clock::now() - m_tp] = std::move(m_currentTest); +} + +std::ostream& operator<<(std::ostream& out, Stats::clock::duration const& d) +{ + return out << std::setw(10) << std::right << std::chrono::duration_cast(d).count() << " us"; +} + +Stats::~Stats() +{ + if (m_stats.empty()) + return; + + auto& out = std::cout; + auto itr = m_stats.begin(); + auto min = *itr; + auto max = *m_stats.rbegin(); + std::advance(itr, m_stats.size() / 2); + auto med = *itr; + auto tot = std::accumulate(m_stats.begin(), m_stats.end(), clock::duration{}, [](clock::duration const& a, stats_t::value_type const& v) + { + return a + v.first; + }); + + out << "\nSTATS:\n\n" << std::setfill(' '); + + if (Options::get().statsFull) + { + for (auto&& s: m_stats) + out << " " << std::setw(40) << std::left << s.second.substr(0, 40) << s.first << " \n"; + out << "\n"; + } + + out << " tot: " << tot << "\n" + << " avg: " << (tot / m_stats.size()) << "\n\n" + << " min: " << min.first << " (" << min.second << ")\n" + << " med: " << med.first << " (" << med.second << ")\n" + << " max: " << max.first << " (" << max.second << ")\n"; +} + +} +} diff --git a/test/Stats.h b/test/Stats.h new file mode 100644 index 000000000..7692a2b30 --- /dev/null +++ b/test/Stats.h @@ -0,0 +1,50 @@ +/* + This file is part of cpp-ethereum. + + cpp-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + cpp-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with cpp-ethereum. If not, see . +*/ + +#pragma once + +#include +#include + +#include "TestHelper.h" + +namespace dev +{ +namespace test +{ + +class Stats: public Listener +{ +public: + using clock = std::chrono::high_resolution_clock; + using stats_t = std::map; + + static Stats& get(); + + ~Stats(); + + void testStarted(std::string const& _name) override; + void testFinished() override; + +private: + clock::time_point m_tp; + std::string m_currentTest; + stats_t m_stats; +}; + +} +} diff --git a/test/TestHelper.cpp b/test/TestHelper.cpp index ddc929e4e..72fecf593 100644 --- a/test/TestHelper.cpp +++ b/test/TestHelper.cpp @@ -551,6 +551,10 @@ Options::Options() vmtrace = true; else if (arg == "--filltests") fillTests = true; + else if (arg == "--stats") + stats = true; + else if (arg == "--stats=full") + stats = statsFull = true; else if (arg == "--performance") performance = true; else if (arg == "--quadratic") @@ -578,6 +582,7 @@ Options const& Options::get() return instance; } + LastHashes lastHashes(u256 _currentBlockNumber) { LastHashes ret; @@ -586,4 +591,27 @@ LastHashes lastHashes(u256 _currentBlockNumber) return ret; } + +namespace +{ + Listener* g_listener; +} + +void Listener::registerListener(Listener& _listener) +{ + g_listener = &_listener; +} + +void Listener::notifyTestStarted(std::string const& _name) +{ + if (g_listener) + g_listener->testStarted(_name); +} + +void Listener::notifyTestFinished() +{ + if (g_listener) + g_listener->testFinished(); +} + } } // namespaces diff --git a/test/TestHelper.h b/test/TestHelper.h index 9efed0fa6..ade20f5e4 100644 --- a/test/TestHelper.h +++ b/test/TestHelper.h @@ -162,8 +162,9 @@ class Options public: bool jit = false; ///< Use JIT bool vmtrace = false; ///< Create EVM execution tracer // TODO: Link with log verbosity? - bool showTimes = false; ///< Print test groups execution times bool fillTests = false; ///< Create JSON test files from execution results + bool stats = false; ///< Execution time stats + bool statsFull = false; ///< Output full stats - execution times for every test /// Test selection /// @{ @@ -183,5 +184,32 @@ private: Options(Options const&) = delete; }; +/// Allows observing test execution process. +/// This class also provides methods for registering and notifying the listener +class Listener +{ +public: + virtual ~Listener() = default; + + virtual void testStarted(std::string const& _name) = 0; + virtual void testFinished() = 0; + + static void registerListener(Listener& _listener); + static void notifyTestStarted(std::string const& _name); + static void notifyTestFinished(); + + /// Test started/finished notification RAII helper + class ExecTimeGuard + { + public: + ExecTimeGuard(std::string const& _testName) { notifyTestStarted(_testName); } + ~ExecTimeGuard() { notifyTestFinished(); } + ExecTimeGuard(ExecTimeGuard const&) = delete; + ExecTimeGuard& operator=(ExecTimeGuard) = delete; + }; +}; + + + } } diff --git a/test/state.cpp b/test/state.cpp index d6790029a..8c191aa70 100644 --- a/test/state.cpp +++ b/test/state.cpp @@ -31,6 +31,7 @@ #include #include #include "TestHelper.h" +#include "Stats.h" using namespace std; using namespace json_spirit; @@ -41,7 +42,8 @@ namespace dev { namespace test { void doStateTests(json_spirit::mValue& v, bool _fillin) { - Options::get(); // process command line options + if (Options::get().stats) + Listener::registerListener(Stats::get()); for (auto& i: v.get_obj()) { @@ -60,6 +62,7 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) try { + Listener::ExecTimeGuard guard{i.first}; theState.execute(lastHashes(importer.m_environment.currentBlock.number), tx, &output); } catch (Exception const& _e) @@ -178,29 +181,13 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest) BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest) { if (test::Options::get().quadratic) - { - auto start = chrono::steady_clock::now(); - dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests); - - auto end = chrono::steady_clock::now(); - auto duration(chrono::duration_cast(end - start)); - cnote << "test duration: " << duration.count() << " milliseconds.\n"; - } } BOOST_AUTO_TEST_CASE(stMemoryStressTest) { if (test::Options::get().memory) - { - auto start = chrono::steady_clock::now(); - dev::test::executeTests("stMemoryStressTest", "/StateTests", dev::test::doStateTests); - - auto end = chrono::steady_clock::now(); - auto duration(chrono::duration_cast(end - start)); - cnote << "test duration: " << duration.count() << " milliseconds.\n"; - } } BOOST_AUTO_TEST_CASE(stSolidityTest) diff --git a/test/vm.cpp b/test/vm.cpp index 4433a60ee..24ae4e069 100644 --- a/test/vm.cpp +++ b/test/vm.cpp @@ -20,13 +20,12 @@ * vm test functions. */ -#include - #include #include #include #include "vm.h" +#include "Stats.h" using namespace std; using namespace json_spirit; @@ -312,7 +311,8 @@ namespace dev { namespace test { void doVMTests(json_spirit::mValue& v, bool _fillin) { - Options::get(); // process command line options // TODO: We need to control the main() function + if (Options::get().stats) + Listener::registerListener(Stats::get()); for (auto& i: v.get_obj()) { @@ -340,12 +340,16 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) bytes output; u256 gas; bool vmExceptionOccured = false; - auto startTime = std::chrono::high_resolution_clock::now(); try { auto vm = eth::VMFactory::create(fev.gas); auto vmtrace = Options::get().vmtrace ? fev.simpleTrace() : OnOpFunc{}; - output = vm->go(fev, vmtrace).toBytes(); + auto outputRef = bytesConstRef{}; + { + Listener::ExecTimeGuard guard{i.first}; + outputRef = vm->go(fev, vmtrace); + } + output = outputRef.toBytes(); gas = vm->gas(); } catch (VMException const&) @@ -364,15 +368,6 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) BOOST_ERROR("Failed VM Test with Exception: " << _e.what()); } - auto endTime = std::chrono::high_resolution_clock::now(); - if (Options::get().showTimes) - { - auto testDuration = endTime - startTime; - cnote << "Execution time: " - << std::chrono::duration_cast(testDuration).count() - << " ms"; - } - // delete null entries in storage for the sake of comparison for (auto &a: fev.addresses) @@ -513,29 +508,13 @@ BOOST_AUTO_TEST_CASE(vmSystemOperationsTest) BOOST_AUTO_TEST_CASE(vmPerformanceTest) { if (test::Options::get().performance) - { - auto start = chrono::steady_clock::now(); - dev::test::executeTests("vmPerformanceTest", "/VMTests", dev::test::doVMTests); - - auto end = chrono::steady_clock::now(); - auto duration(chrono::duration_cast(end - start)); - cnote << "test duration: " << duration.count() << " milliseconds.\n"; - } } BOOST_AUTO_TEST_CASE(vmInputLimitsTest1) { if (test::Options::get().inputLimits) - { - auto start = chrono::steady_clock::now(); - dev::test::executeTests("vmInputLimits1", "/VMTests", dev::test::doVMTests); - - auto end = chrono::steady_clock::now(); - auto duration(chrono::duration_cast(end - start)); - cnote << "test duration: " << duration.count() << " milliseconds.\n"; - } } BOOST_AUTO_TEST_CASE(vmInputLimitsTest2) From 19fb5d986534262adbfcd98a342395a9dffb4f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 13 Mar 2015 13:10:38 +0100 Subject: [PATCH 2/7] Prettify VM and State test outputs --- test/TestHelper.cpp | 2 +- test/state.cpp | 6 +++--- test/vm.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/TestHelper.cpp b/test/TestHelper.cpp index 72fecf593..128318b8c 100644 --- a/test/TestHelper.cpp +++ b/test/TestHelper.cpp @@ -473,7 +473,7 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun try { - cnote << "Testing ..." << _name; + std::cout << "TEST " << _name << ":\n"; json_spirit::mValue v; string s = asString(dev::contents(testPath + "/" + _name + ".json")); BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + testPath + "/" + _name + ".json is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?"); diff --git a/test/state.cpp b/test/state.cpp index 8c191aa70..162ae5f34 100644 --- a/test/state.cpp +++ b/test/state.cpp @@ -47,7 +47,7 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) for (auto& i: v.get_obj()) { - cerr << i.first << endl; + std::cout << " " << i.first << "\n"; mObject& o = i.second.get_obj(); BOOST_REQUIRE(o.count("env") > 0); @@ -67,12 +67,12 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) } catch (Exception const& _e) { - cnote << "state execution did throw an exception: " << diagnostic_information(_e); + cnote << "Exception:\n" << diagnostic_information(_e); theState.commit(); } catch (std::exception const& _e) { - cnote << "state execution did throw an exception: " << _e.what(); + cnote << "state execution exception: " << _e.what(); } if (_fillin) diff --git a/test/vm.cpp b/test/vm.cpp index 24ae4e069..2bdafb270 100644 --- a/test/vm.cpp +++ b/test/vm.cpp @@ -316,7 +316,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) for (auto& i: v.get_obj()) { - cnote << i.first; + std::cout << " " << i.first << "\n"; mObject& o = i.second.get_obj(); BOOST_REQUIRE(o.count("env") > 0); @@ -354,7 +354,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) } catch (VMException const&) { - cnote << "Safe VM Exception"; + std::cout << " Safe VM Exception\n"; vmExceptionOccured = true; } catch (Exception const& _e) @@ -544,7 +544,7 @@ BOOST_AUTO_TEST_CASE(vmRandom) { try { - cnote << "Testing ..." << path.filename(); + std::cout << "TEST " << path.filename() << "\n"; json_spirit::mValue v; string s = asString(dev::contents(path.string())); BOOST_REQUIRE_MESSAGE(s.length() > 0, "Content of " + path.string() + " is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?"); From 94718485cd4bc0f64ce6cea23eb95b95088d8a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 13 Mar 2015 13:37:30 +0100 Subject: [PATCH 3/7] Small improvements here and there Add virtual destructor to polymorphic GasPricer. Init v field of SignatureStruct. --- libdevcrypto/Common.h | 4 ++-- libethereum/State.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libdevcrypto/Common.h b/libdevcrypto/Common.h index 38e5649fb..3159f4e7e 100644 --- a/libdevcrypto/Common.h +++ b/libdevcrypto/Common.h @@ -45,7 +45,7 @@ using Signature = h520; struct SignatureStruct { - SignatureStruct() {} + SignatureStruct() = default; SignatureStruct(Signature const& _s) { *(h520*)this = _s; } SignatureStruct(h256 const& _r, h256 const& _s, byte _v): r(_r), s(_s), v(_v) {} operator Signature() const { return *(h520 const*)this; } @@ -55,7 +55,7 @@ struct SignatureStruct h256 r; h256 s; - byte v; + byte v = 0; }; /// An Ethereum address: 20 bytes. diff --git a/libethereum/State.h b/libethereum/State.h index 1f8516fce..bfa60e452 100644 --- a/libethereum/State.h +++ b/libethereum/State.h @@ -68,7 +68,8 @@ enum class TransactionPriority class GasPricer { public: - GasPricer() {} + GasPricer() = default; + virtual ~GasPricer() = default; virtual u256 ask(State const&) const = 0; virtual u256 bid(TransactionPriority _p = TransactionPriority::Medium) const = 0; From 1fcb747fefdcb63e4756b2fd02932550b9f5815e Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Sat, 14 Mar 2015 10:17:42 +0100 Subject: [PATCH 4/7] fix CallCode to address 0 --- libethereum/ExtVM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethereum/ExtVM.cpp b/libethereum/ExtVM.cpp index a8eba5a50..68d146ce1 100644 --- a/libethereum/ExtVM.cpp +++ b/libethereum/ExtVM.cpp @@ -29,7 +29,7 @@ using namespace dev::eth; bool ExtVM::call(Address _receiveAddress, u256 _txValue, bytesConstRef _txData, u256& io_gas, bytesRef _out, OnOpFunc const& _onOp, Address _myAddressOverride, Address _codeAddressOverride) { Executive e(m_s, lastHashes, depth + 1); - if (!e.call(_receiveAddress, _codeAddressOverride ? _codeAddressOverride : _receiveAddress, _myAddressOverride ? _myAddressOverride : myAddress, _txValue, gasPrice, _txData, io_gas, origin)) + if (!e.call(_receiveAddress, _codeAddressOverride, _myAddressOverride ? _myAddressOverride : myAddress, _txValue, gasPrice, _txData, io_gas, origin)) { e.go(_onOp); e.accrueSubState(sub); From 475a14e5b1d3b7d41b9b695838f576994f240ae9 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Sat, 14 Mar 2015 10:26:06 +0100 Subject: [PATCH 5/7] test for callcode to 0 --- test/stSystemOperationsTestFiller.json | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/stSystemOperationsTestFiller.json b/test/stSystemOperationsTestFiller.json index 23ff8c4c3..a20fdbcaf 100644 --- a/test/stSystemOperationsTestFiller.json +++ b/test/stSystemOperationsTestFiller.json @@ -835,6 +835,40 @@ } }, + "callcodeTo0": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "30000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ [[ 0 ]] (CALLCODE 50000 0 1 0 0 0 0) }", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + + }, + "transaction" : { + "nonce" : "0", + "gasPrice" : "1", + "gasLimit" : "3000000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "data" : "" + } + }, "CallToNameRegistratorOutOfGas": { "env" : { From 00694cb2613b1ed7837105eb79c90641aa72772a Mon Sep 17 00:00:00 2001 From: winsvega Date: Thu, 12 Mar 2015 19:34:34 +0300 Subject: [PATCH 6/7] State Tests poc9 --- test/stPreCompiledContractsFiller.json | 14 +- test/stSolidityTestFiller.json | 639 +++++++++++++++++-------- test/stSpecialTestFiller.json | 4 +- 3 files changed, 461 insertions(+), 196 deletions(-) diff --git a/test/stPreCompiledContractsFiller.json b/test/stPreCompiledContractsFiller.json index 9e5fa862a..ff0cda3f5 100644 --- a/test/stPreCompiledContractsFiller.json +++ b/test/stPreCompiledContractsFiller.json @@ -12,7 +12,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", "nonce" : "0", - "code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", + "code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 300000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -46,7 +46,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", "nonce" : "0", - "code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 64 32) [[ 0 ]] (MOD (MLOAD 64) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", + "code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 300000 1 0 0 128 64 32) [[ 0 ]] (MOD (MLOAD 64) (EXP 2 160)) [[ 1 ]] (EQ (ORIGIN) (SLOAD 0)) }", "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -81,7 +81,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", "nonce" : "0", - "code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MLOAD 128) }", + "code": "{ (MSTORE 0 0x18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c) (MSTORE 32 28) (MSTORE 64 0x73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f) (MSTORE 96 0xeeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549) [[ 2 ]] (CALL 3000 1 0 0 128 128 32) [[ 0 ]] (MLOAD 128) }", "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -217,7 +217,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", "nonce" : "0", - "code": "{ [[ 2 ]] (CALL 100000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) }", + "code": "{ [[ 2 ]] (CALL 300000 1 0 0 128 128 32) [[ 0 ]] (MOD (MLOAD 128) (EXP 2 160)) }", "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -230,7 +230,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "365224", + "gasLimit" : "3652240", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -421,7 +421,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "200000000", "nonce" : "0", - "code" : "{ [[ 2 ]] (CALL 20000000 2 0x13 0 0 0 32) [[ 0 ]] (MLOAD 0)}", + "code" : "{ [[ 2 ]] (CALL 200000 2 0x13 0 0 0 32) [[ 0 ]] (MLOAD 0)}", "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -591,7 +591,7 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", "nonce" : "0", - "code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 500 2 0 0 1000000 0 32) [[ 0 ]] (MLOAD 0)}", + "code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) [[ 2 ]] (CALL 600 2 0 0 1000000 0 32) [[ 0 ]] (MLOAD 0)}", "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { diff --git a/test/stSolidityTestFiller.json b/test/stSolidityTestFiller.json index f2a2a0aa0..253a90c14 100644 --- a/test/stSolidityTestFiller.json +++ b/test/stSolidityTestFiller.json @@ -1,83 +1,24 @@ { - "SolidityTest" : { + "TestCryptographicFunctions" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "45678256", - "currentGasLimit" : "1000000000000000000000000", + "currentGasLimit" : "1000000000000000000000", "currentNumber" : "120", "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, "pre" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "1000000000000000000", - "code" : "", - "nonce" : "0", - "storage" : { - } - }, - - "d94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "1000000", - "//" : " ", - "//" : "contract TestContract ", + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//" : "contract main ", "//" : "{ ", - "//" : " function testMethod() returns (int res) ", + "//" : " function run() returns (bool) ", "//" : " { ", - "//" : " return 225; ", - "//" : " } ", - "//" : " ", - "//" : " function destroy(address sendFoundsTo) ", - "//" : " { ", - "//" : " suicide(sendFoundsTo); ", - "//" : " } ", - "//" : "} ", - "//" : " ", - "//" : "contract TestSolidityContracts ", - "//" : "{ ", - "//" : "struct StructTest ", - "//" : " { ", - "//" : " address addr; ", - "//" : " int amount; ", - "//" : " string32 str; ", - "//" : " mapping (uint => address) funders; ", - "//" : " } ", - "//" : " ", - "//" : " int globalValue; ", - "//" : " StructTest globalData; ", - "//" : " function runSolidityTests() returns (hash res) ", - "//" : " { ", - "//" : " //res is a mask of failing tests given the first byte is first test ", - "//" : " res = 0x0000000000000000000000000000000000000000000000000000000000000000; ", - "//" : " ", - "//" : " createContractFromMethod(); ", - "//" : " ", - "//" : " if (!testKeywords()) ", - "//" : " res = hash(int(res) + int(0xf000000000000000000000000000000000000000000000000000000000000000)); ", - "//" : " ", - "//" : " if (!testContractInteraction()) ", - "//" : " res = hash(int(res) + int(0x0f00000000000000000000000000000000000000000000000000000000000000)); ", - "//" : " ", - "//" : " if (!testContractSuicide()) ", - "//" : " res = hash(int(res) + int(0x00f0000000000000000000000000000000000000000000000000000000000000)); ", - "//" : " ", - "//" : " if (!testBlockAndTransactionProperties()) ", - "//" : " res = hash(int(res) + int(0x000f000000000000000000000000000000000000000000000000000000000000)); ", - "//" : " ", - "//" : " globalValue = 255; ", - "//" : " globalData.addr = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ", - "//" : " globalData.amount = 255; ", - "//" : " globalData.str = 'global data 32 length string'; ", - "//" : " globalData.funders[0] = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ", - "//" : " if (!testStructuresAndVariabless()) ", - "//" : " res = hash(int(res) + int(0x0000f00000000000000000000000000000000000000000000000000000000000)); ", - "//" : " ", - "//" : " if (!testCryptographicFunctions()) ", - "//" : " res = hash(int(res) + int(0x00000f0000000000000000000000000000000000000000000000000000000000)); ", - "//" : " ", - "//" : " } ", - "//" : " ", + "//" : " return testCryptographicFunctions(); ", + "//" : " } ", + "//" : " ", "//" : " function testCryptographicFunctions() returns (bool res) ", "//" : " { ", "//" : " res = true; ", @@ -92,139 +33,463 @@ "//" : " ", "//" : " //ecrecover ", "//" : " } ", - "//" : " ", - "//" : " function testStructuresAndVariabless() returns (bool res) ", - "//" : " { ", - "//" : " res = true; ", - "//" : " if (globalValue != 255) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (globalValue != globalData.amount) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (globalData.addr != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (globalData.str != 'global data 32 length string') ", - "//" : " return false; ", - "//" : " ", - "//" : " if (globalData.funders[0] != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", - "//" : " return false; ", - "//" : " } ", - "//" : " ", - "//" : " function testBlockAndTransactionProperties() returns (bool res) ", - "//" : " { ", - "//" : " res = true; ", - "//" : " if (block.coinbase != 0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (block.difficulty != 45678256) ", - "//" : " return false; ", - "//" : " ", - "//" : " //for some reason does not work 27.01.2015 ", - "//" : " if (block.gaslimit != 1000000000000000000000) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (block.number != 120) ", - "//" : " return false; ", - "//" : " ", - "//" : " //try to call this ", - "//" : " block.blockhash(120); ", - "//" : " block.timestamp; ", - "//" : " msg.gas; ", - "//" : " ", - "//" : " if (msg.sender != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (msg.value != 100) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (tx.gasprice != 1) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (tx.origin != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", - "//" : " return false; ", - "//" : " ", - "//" : " } ", - "//" : " ", - "//" : " function testContractSuicide() returns (bool res) ", - "//" : " { ", - "//" : " TestContract a = new TestContract(); ", - "//" : " a.destroy(block.coinbase); ", - "//" : " if (a.testMethod() == 225) //we should be able to call a contract ", - "//" : " return true; ", - "//" : " return false; ", - "//" : " } ", - "//" : " ", - "//" : " function testContractInteraction() returns (bool res) ", - "//" : " { ", - "//" : " TestContract a = new TestContract(); ", - "//" : " if (a.testMethod() == 225) ", - "//" : " return true; ", - "//" : " return false; ", - "//" : " } ", - "//" : " ", - "//" : " function testKeywords() returns (bool res) ", - "//" : " { ", - "//" : " //some simple checks for the if statemnt ", - "//" : " //if, else, while, for, break, continue, return ", - "//" : " int i = 0; ", - "//" : " res = false; ", - "//" : " ", - "//" : " if (i == 0) ", - "//" : " { ", - "//" : " if( i <= -25) ", - "//" : " { ", - "//" : " return false; ", - "//" : " } ", - "//" : " else ", - "//" : " { ", - "//" : " while(i < 10) ", - "//" : " i++; ", - "//" : " ", - "//" : " if (i == 10) ", - "//" : " { ", - "//" : " for(var j=10; j>0; j--) ", - "//" : " { ", - "//" : " i--; ", - "//" : " } ", - "//" : " } ", - "//" : " } ", - "//" : " } ", - "//" : " ", - "//" : " if (i == 0) ", - "//" : " return true; ", - "//" : " ", - "//" : " return false; ", - "//" : " } ", - "//" : " ", - "//" : " function createContractFromMethod() returns (TestContract a) ", - "//" : " { ", - "//" : " a = new TestContract(); ", - "//" : " } ", "//" : "} ", - "code" : "0x60003560e060020a900480630c4c9a80146100635780632a9afb8314610075578063380e4396146100875780637ee17e1214610099578063a60eedda146100a7578063e0a9fd28146100b9578063e97384dc146100cb578063ed973fe9146100dd57005b61006b610473565b8060005260206000f35b61007d61064e565b8060005260206000f35b61008f61073f565b8060005260206000f35b6100a16107fe565b60006000f35b6100af6100ef565b8060005260206000f35b6100c1610196565b8060005260206000f35b6100d3610352565b8060005260206000f35b6100e56102eb565b8060005260206000f35b60006000600191506060610815600039606060006000f0905080600160a060020a031662f55d9d600060008260e060020a02600052600441600160a060020a03168152602001600060008660325a03f161014557005b505080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161017657005b505060005160e1141561018857610191565b60009150610192565b5b5090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156101f3576101fc565b600090506102e8565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f161023a57005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111141561026a57610273565b600090506102e8565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f16102b157005b50600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae14156102de576102e7565b600090506102e8565b5b90565b600060006060610815600039606060006000f0905080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161032f57005b505060005160e11461034057610349565b6001915061034e565b600091505b5090565b60006001905041600160a060020a0316732adc25665018aa1fe0e6bc666dac8fc2697ff9ba14156103825761038b565b60009050610470565b446302b8feb0141561039c576103a5565b60009050610470565b45683635c9adc5dea0000014156103bb576103c4565b60009050610470565b43607814156103d2576103db565b60009050610470565b33600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156104055761040e565b60009050610470565b346064141561041c57610425565b60009050610470565b3a600114156104335761043c565b60009050610470565b32600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156104665761046f565b60009050610470565b5b90565b6000600090506104816107fe565b5061048a61073f565b15610494576104ba565b7ff000000000000000000000000000000000000000000000000000000000000000810190505b6104c26102eb565b156104cc576104f2565b7f0f00000000000000000000000000000000000000000000000000000000000000810190505b6104fa6100ef565b1561050457610529565b7ef0000000000000000000000000000000000000000000000000000000000000810190505b610531610352565b1561053b57610560565b7e0f000000000000000000000000000000000000000000000000000000000000810190505b60ff60008190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b60018190555060ff6002819055507f676c6f62616c2064617461203332206c656e67746820737472696e670000000060038190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6004600060008152602001908152602001600020819055506105e761064e565b156105f157610615565b7df00000000000000000000000000000000000000000000000000000000000810190505b61061d610196565b156106275761064b565b7d0f0000000000000000000000000000000000000000000000000000000000810190505b90565b60006001905060005460ff14156106645761066d565b6000905061073c565b600254600054141561067e57610687565b6000905061073c565b600154600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156106b3576106bc565b6000905061073c565b6003547f676c6f62616c2064617461203332206c656e67746820737472696e670000000014156106eb576106f4565b6000905061073c565b600460006000815260200190815260200160002054600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156107325761073b565b6000905061073c565b5b90565b60006000600060009150600092508160001461075a576107de565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe78213156107d4575b600a821215610799578180600101925050610783565b81600a146107a6576107cf565b600a90505b60008160ff1611156107ce578180600190039250508080600190039150506107ab565b5b6107dd565b600092506107f9565b5b816000146107eb576107f4565b600192506107f9565b600092505b505090565b60006060610815600039606060006000f09050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056", + "code" : "0x60003560e060020a90048063c040622614610021578063e0a9fd281461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d40000000000000000000000000000000000000000000000000000000000081526003016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100d7576100e0565b60009050610218565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f161014457005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d11114156101745761017d565b60009050610218565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f16101e157005b50600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae141561020e57610217565b60009050610218565b5b9056", "nonce" : "0", "storage" : { - } + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "50000000", + "nonce" : "0", + "code" : "", + "storage": {} } }, + "transaction" : + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "35000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100" + } + }, + "TestStructuresAndVariabless" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000000000000000000", + "currentNumber" : "120", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//" : "contract main ", + "//" : "{ ", + "//" : " struct StructTest ", + "//" : " { ", + "//" : " address addr; ", + "//" : " int amount; ", + "//" : " string32 str; ", + "//" : " mapping (uint => address) funders; ", + "//" : " } ", + "//" : " ", + "//" : " int globalValue; ", + "//" : " StructTest globalData; ", + "//" : " function run() returns (bool) ", + "//" : " { ", + "//" : " globalValue = 255; ", + "//" : " globalData.addr = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ", + "//" : " globalData.amount = 255; ", + "//" : " globalData.str = 'global data 32 length string'; ", + "//" : " globalData.funders[0] = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ", + "//" : " return testStructuresAndVariabless(); ", + "//" : " } ", + "//" : " ", + "//" : " function testStructuresAndVariabless() returns (bool res) ", + "//" : " { ", + "//" : " res = true; ", + "//" : " if (globalValue != 255) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (globalValue != globalData.amount) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (globalData.addr != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (globalData.str != 'global data 32 length string') ", + "//" : " return false; ", + "//" : " ", + "//" : " if (globalData.funders[0] != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", + "//" : " return false; ", + "//" : " } ", + "//" : "} ", + "code" : "0x60003560e060020a900480632a9afb8314610021578063c04062261461003357005b610029610045565b8060005260206000f35b61003b610136565b8060005260206000f35b60006001905060005460ff141561005b57610064565b60009050610133565b60025460005414156100755761007e565b60009050610133565b600154600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156100aa576100b3565b60009050610133565b6003547f676c6f62616c2064617461203332206c656e67746820737472696e670000000014156100e2576100eb565b60009050610133565b600460006000815260200190815260200160002054600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561012957610132565b60009050610133565b5b90565b600060ff60008190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b60018190555060ff6002819055507f676c6f62616c2064617461203332206c656e67746820737472696e670000000060038190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6004600060008152602001908152602001600020819055506101bf610045565b90509056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, "transaction" : - { - "//" : "createContractFromMethod()", - "data" : "0x7ee17e12", - "//" : "runSolidityTests()", - "data" : "0x0c4c9a80", - "gasLimit" : "15000000", + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "350000", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "d94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100" } }, + "TestBlockAndTransactionProperties" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000000000000000000", + "currentNumber" : "120", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//" : "contract main ", + "//" : "{ ", + "//" : " function run() returns (bool) ", + "//" : " { ", + "//" : " return testBlockAndTransactionProperties(); ", + "//" : " } ", + "//" : " ", + "//" : " function testBlockAndTransactionProperties() returns (bool res) ", + "//" : " { ", + "//" : " res = true; ", + "//" : " if (block.coinbase != 0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (block.difficulty != 45678256) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (block.gaslimit != 1000000000000000000000) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (block.number != 120) ", + "//" : " return false; ", + "//" : " ", + "//" : " //try to call this ", + "//" : " block.blockhash(120); ", + "//" : " block.timestamp; ", + "//" : " msg.gas; ", + "//" : " ", + "//" : " if (msg.sender != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (msg.value != 100) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (tx.gasprice != 1) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (tx.origin != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ", + "//" : " return false; ", + "//" : " ", + "//" : " } ", + "//" : "} ", + "code" : "0x60003560e060020a90048063c040622614610021578063e97384dc1461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905041600160a060020a0316732adc25665018aa1fe0e6bc666dac8fc2697ff9ba14156100845761008d565b60009050610172565b446302b8feb0141561009e576100a7565b60009050610172565b45683635c9adc5dea0000014156100bd576100c6565b60009050610172565b43607814156100d4576100dd565b60009050610172565b33600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561010757610110565b60009050610172565b346064141561011e57610127565b60009050610172565b3a600114156101355761013e565b60009050610172565b32600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561016857610171565b60009050610172565b5b9056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "350000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100" + } + }, + + "TestContractSuicide" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//": "contract TestContract ", + "//": "{ ", + "//": " function testMethod() returns (int res) ", + "//": " { ", + "//": " return 225; ", + "//": " } ", + "//": " ", + "//": " function destroy(address sendFoundsTo) ", + "//": " { ", + "//": " suicide(sendFoundsTo); ", + "//": " } ", + "//": "} ", + "//": "contract main ", + "//": "{ ", + "//": " function run() returns (bool) ", + "//": " { ", + "//": " return testContractSuicide(); ", + "//": " } ", + "//": " ", + "//": " function testContractSuicide() returns (bool res) ", + "//": " { ", + "//": " TestContract a = new TestContract(); ", + "//": " a.destroy(block.coinbase); ", + "//": " if (a.testMethod() == 225) //we should be able to call a contract ", + "//": " return true; ", + "//": " return false; ", + "//": " } ", + "//": "} ", + "code" : "0x60003560e060020a90048063a60eedda14610021578063c04062261461003357005b610029610045565b8060005260206000f35b61003b6100eb565b8060005260206000f35b6000600060606100fb600039606060006000f0905080600160a060020a031662f55d9d600060008260e060020a02600052600441600160a060020a03168152602001600060008660325a03f161009757005b505080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f16100c857005b505060005160e1146100d9576100e2565b600191506100e7565b600091505b5090565b60006100f5610045565b9050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "350000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "1" + } + }, + + "TestContractInteraction" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//": "contract TestContract ", + "//": "{ ", + "//": " function testMethod() returns (int res) ", + "//": " { ", + "//": " return 225; ", + "//": " } ", + "//": " ", + "//": " function destroy(address sendFoundsTo) ", + "//": " { ", + "//": " suicide(sendFoundsTo); ", + "//": " } ", + "//": "} ", + "//": "contract main ", + "//": "{ ", + "//": " function run() returns (bool) ", + "//": " { ", + "//": " return testContractInteraction(); ", + "//": " } ", + "//": " ", + "//" : " function testContractInteraction() returns (bool res) ", + "//" : " { ", + "//" : " TestContract a = new TestContract(); ", + "//" : " if (a.testMethod() == 225) ", + "//" : " return true; ", + "//" : " return false; ", + "//" : " } ", + "//": "} ", + "code" : "0x60003560e060020a90048063c040622614610021578063ed973fe91461003357005b6100296100ac565b8060005260206000f35b61003b610045565b8060005260206000f35b6000600060606100bc600039606060006000f0905080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161008957005b505060005160e11461009a576100a3565b600191506100a8565b600091505b5090565b60006100b6610045565b9050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b6027600435603d565b60006000f35b6033604b565b8060005260206000f35b80600160a060020a0316ff50565b600060e190509056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "350000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "1" + } + }, + + "TestKeywords" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//": "contract main ", + "//": "{ ", + "//": " function run() returns (bool) ", + "//": " { ", + "//": " return testKeywords(); ", + "//": " } ", + "//": " ", + "//": " function testKeywords() returns (bool res) ", + "//": " { ", + "//": " //some simple checks for the if statemnt ", + "//": " //if, else, while, for, break, continue, return ", + "//": " int i = 0; ", + "//": " res = false; ", + "//": " ", + "//": " if (i == 0) ", + "//": " { ", + "//": " if( i <= -25) ", + "//": " { ", + "//": " return false; ", + "//": " } ", + "//": " else ", + "//": " { ", + "//": " while(i < 10) ", + "//": " i++; ", + "//": " ", + "//": " if (i == 10) ", + "//": " { ", + "//": " for(var j=10; j>0; j--) ", + "//": " { ", + "//": " i--; ", + "//": " } ", + "//": " } ", + "//": " } ", + "//": " } ", + "//": " ", + "//": " if (i == 0) ", + "//": " return true; ", + "//": " ", + "//": " return false; ", + "//": " } ", + "//": "} ", + "code" : "0x60003560e060020a90048063380e439614601f578063c040622614602f57005b6025603f565b8060005260206000f35b603560f0565b8060005260206000f35b60006000600060009150600092508160001460585760d3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe782131560ca575b600a82121560945781806001019250506080565b81600a14609f5760c6565b600a90505b60008160ff16111560c55781806001900392505080806001900391505060a4565b5b60d2565b6000925060eb565b5b8160001460de5760e6565b6001925060eb565b600092505b505090565b600060f8603f565b90509056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "350000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "1" + } + }, + + "CreateContractFromMethod" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//": "contract TestContract ", + "//": "{ ", + "//": " function testMethod() returns (int res) ", + "//": " { ", + "//": " return 225; ", + "//": " } ", + "//": " ", + "//": " function destroy(address sendFoundsTo) ", + "//": " { ", + "//": " suicide(sendFoundsTo); ", + "//": " } ", + "//": "} ", + "//": " ", + "//": "contract main ", + "//": "{ ", + "//": " function run() returns (uint) ", + "//": " { ", + "//": " createContractFromMethod(); ", + "//": " } ", + "//": " ", + "//": " function createContractFromMethod() returns (TestContract a) ", + "//": " { ", + "//": " a = new TestContract(); ", + "//": " } ", + "//": "} ", + "code" : "0x60003560e060020a900480637ee17e1214601f578063c040622614602b57005b60256047565b60006000f35b6031603b565b8060005260206000f35b600060436047565b5090565b60006060605d600039606060006000f09050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : + { + "//" : "run()", + "data" : "0xc0406226", + "gasLimit" : "350000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "1" + } + }, + "CallLowLevelCreatesSolidity" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", diff --git a/test/stSpecialTestFiller.json b/test/stSpecialTestFiller.json index 223d9f75f..b6552923f 100644 --- a/test/stSpecialTestFiller.json +++ b/test/stSpecialTestFiller.json @@ -22,7 +22,7 @@ "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "100000", + "balance" : "1000000", "nonce" : "0", "code" : "", "storage": {} @@ -31,7 +31,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "22850", + "gasLimit" : "228500", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "10", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", From ba4f413b8792590732115f77d6a0f11ca7174e1a Mon Sep 17 00:00:00 2001 From: winsvega Date: Fri, 13 Mar 2015 17:46:38 +0300 Subject: [PATCH 7/7] State Tests stSystemOperations poc9 --- test/stSystemOperationsTestFiller.json | 80 +++++++++++++------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/test/stSystemOperationsTestFiller.json b/test/stSystemOperationsTestFiller.json index 23ff8c4c3..bb4484961 100644 --- a/test/stSystemOperationsTestFiller.json +++ b/test/stSystemOperationsTestFiller.json @@ -3,7 +3,7 @@ "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", "currentNumber" : "0", - "currentGasLimit" : "1000000", + "currentGasLimit" : "100000000", "currentDifficulty" : "256", "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" @@ -25,7 +25,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -60,7 +60,7 @@ }, "transaction" : { "data" : "", - "gasLimit" : "30000", + "gasLimit" : "300000", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -95,7 +95,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -129,7 +129,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -163,7 +163,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -197,7 +197,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -232,7 +232,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -257,7 +257,7 @@ "storage": {} }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "100000", + "balance" : "1000000", "nonce" : "0", "code" : "", "storage": {} @@ -266,7 +266,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -300,7 +300,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -334,7 +334,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -368,7 +368,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -452,7 +452,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -494,7 +494,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -536,7 +536,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -578,7 +578,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -619,7 +619,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -660,7 +660,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -701,7 +701,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -743,7 +743,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -785,7 +785,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -870,7 +870,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -911,7 +911,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -952,7 +952,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -993,7 +993,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -1035,7 +1035,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -1076,7 +1076,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "30000", + "gasLimit" : "300000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -1894,12 +1894,12 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ [[ (PC) ]] (CALL 1000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", + "code" : "{ [[ (PC) ]] (CALL 100000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : " { [[ (PC) ]] (ADD 1 (CALL 500 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", + "code" : " { [[ (PC) ]] (ADD 1 (CALL 50000 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", "nonce" : "0", "storage" : { } @@ -1935,12 +1935,12 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ [[ (PC) ]] (CALL (- (GAS) 1000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", + "code" : "{ [[ (PC) ]] (CALL (- (GAS) 100000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : " { [[ (PC) ]] (ADD 1 (CALL (- (GAS) 1000) 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", + "code" : " { [[ (PC) ]] (ADD 1 (CALL (- (GAS) 100000) 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", "nonce" : "0", "storage" : { } @@ -1976,12 +1976,12 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1 0 0 0 0) }", + "code" : "{ [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 100000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1 0 0 0 0) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "0", - "code" : " { [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 0 0 0 0 0) } ", + "code" : " { [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 100000) 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 0 0 0 0 0) } ", "nonce" : "0", "storage" : { } @@ -2017,12 +2017,12 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1025000", "nonce" : "0", - "code" : "{ [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1 0 0 0 0) }", + "code" : "{ [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 100000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1 0 0 0 0) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "0", - "code" : " { [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 0 0 0 0 0) } ", + "code" : " { [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 100000) 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 0 0 0 0 0) } ", "nonce" : "0", "storage" : { } @@ -2058,12 +2058,12 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ [[ (PC) ]] (CALL 1000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) (SUICIDE 0x945304eb96065b2a98b57a48a06ae28d285a71b5) }", + "code" : "{ [[ (PC) ]] (CALL 100000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) (SUICIDE 0x945304eb96065b2a98b57a48a06ae28d285a71b5) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "{ [[ (PC) ]] (ADD 1 (CALL 500 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", + "code" : "{ [[ (PC) ]] (ADD 1 (CALL 50000 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) } ", "nonce" : "0", "storage" : { } @@ -2099,12 +2099,12 @@ "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ [[ (PC) ]] (CALL 1000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", + "code" : "{ [[ (PC) ]] (CALL 100000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 24 0 0 0 0) }", "storage": {} }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "23", - "code" : "{ [[ (PC) ]] (ADD 1 (CALL 500 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) (SUICIDE 0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6) } ", + "code" : "{ [[ (PC) ]] (ADD 1 (CALL 50000 0x095e7baea6a6c7c4c2dfeb977efac326af552d87 23 0 0 0 0)) (SUICIDE 0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6) } ", "nonce" : "0", "storage" : { }