Browse Source

Merge branch 'develop' into discoveryEndpoints

cl-refactor
subtly 10 years ago
parent
commit
8bfe9822b8
  1. 134
      CMakeLists.txt
  2. 11
      extdep/getstuff.bat
  3. 2
      libp2p/Host.cpp
  4. 2
      mix/CodeHighlighter.cpp
  5. 2
      mix/ContractCallDataEncoder.cpp
  6. 3
      mix/FileIo.cpp
  7. 2
      mix/MixClient.cpp
  8. 32
      test/TestHelper.cpp
  9. 1
      test/TestHelper.h
  10. 18
      test/blockchain.cpp
  11. 6
      test/peer.cpp
  12. 2
      test/stQuadraticComplexityTestFiller.json
  13. 78
      test/stTransactionTestFiller.json
  14. 1
      test/transaction.cpp
  15. 3
      test/tt10mbDataFieldFiller.json
  16. 2
      test/ttTransactionTestFiller.json
  17. 4
      test/vm.cpp

134
CMakeLists.txt

@ -8,30 +8,26 @@ project(ethereum)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
######################################################################################################
# user defined, defaults
# Normally, set(...CACHE...) creates cache variables, but does not modify them.
function(createDefaultCacheConfig)
set(VMTRACE OFF CACHE BOOL "VM tracing and run-time checks (useful for cross-implementation VM debugging)")
set(PARANOID OFF CACHE BOOL "Additional run-time checks")
set(JSONRPC ON CACHE BOOL "Build with jsonprc. default on")
set(FATDB OFF CACHE BOOL "Build with ability to list entries in the Trie. Doubles DB size, slows everything down, but good for looking at state diffs and trie contents.")
set(USENPM OFF CACHE BOOL "Use npm to recompile ethereum.js if it was changed")
set(PROFILING OFF CACHE BOOL "Build in support for profiling")
option(VMTRACE "VM tracing and run-time checks (useful for cross-implementation VM debugging)" OFF)
option(PARANOID "Additional run-time checks" OFF)
option(JSONRPC "Build with jsonprc. default on" ON)
option(FATDB "Build with ability to list entries in the Trie. Doubles DB size, slows everything down, but good for looking at state diffs and trie contents." OFF)
option(USENPM "Use npm to recompile ethereum.js if it was changed" OFF)
option(PROFILING "Build in support for profiling" OFF)
set(BUNDLE "none" CACHE STRING "Predefined bundle of software to build (none, full, user, tests, minimal).")
set(SOLIDITY ON CACHE BOOL "Build the Solidity language components")
set(SERPENT ON CACHE BOOL "Build the Serpent language components")
set(TOOLS ON CACHE BOOL "Build the tools components")
set(NCURSES ON CACHE BOOL "Build the NCurses components")
set(GUI ON CACHE BOOL "Build GUI components (AlethZero, Mix)")
set(TESTS ON CACHE BOOL "Build the tests.")
set(EVMJIT OFF CACHE BOOL "Build just-in-time compiler for EVM code (requires LLVM)")
set(ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL")
endfunction()
option(SOLIDITY "Build the Solidity language components" ON)
option(SERPENT "Build the Serpent language components" ON)
option(TOOLS "Build the tools components" ON)
option(NCURSES "Build the NCurses components" ON)
option(GUI "Build GUI components (AlethZero, Mix)" ON)
option(TESTS "Build the tests." ON)
option(EVMJIT "Build just-in-time compiler for EVM code (requires LLVM)" OFF)
option(ETHASHCL "Build in support for GPU mining via OpenCL" OFF)
# propagates CMake configuration options to the compiler
function(configureProject)
@ -143,96 +139,56 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
endif ()
endif ()
createDefaultCacheConfig()
# Force chromium.
set (ETH_HAVE_WEBENGINE 1)
# Normalise build options
# TODO: Abstract into something sensible and move into a function.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(DECENT_PLATFORM OFF)
else ()
set(DECENT_PLATFORM ON)
endif ()
# Backwards compatibility
if (HEADLESS)
message("*** WARNING: -DHEADLESS=1 option is DEPRECATED! Use -DBUNDLE=minimal or -DGUI=0")
set(BUNDLE "minimal")
endif ()
if (PARANOID)
set(PARANOID ON)
else ()
set(PARANOID OFF)
endif ()
if (VMTRACE)
set(VMTRACE ON)
else ()
set(VMTRACE OFF)
endif ()
if (EVMJIT)
set(EVMJIT ON)
else ()
set(EVMJIT OFF)
endif()
if (FATDB)
set(FATDB ON)
else ()
set(FATDB OFF)
endif()
if (JSONRPC)
set(JSONRPC ON)
# TODO: Abstract into something sensible and move into a function.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(DECENT_PLATFORM OFF)
else ()
set(JSONRPC OFF)
set(DECENT_PLATFORM ON)
endif ()
if (USENPM)
set(USENPM ON)
macro(eth_format_option O)
if (${${O}})
set(${O} ON)
else()
set(USENPM OFF)
set(${O} OFF)
endif()
if (PROFILING)
set(PROFILING ON)
endmacro()
macro(eth_format_option_on_decent_platform O)
if (${${O}})
set(${O} ${DECENT_PLATFORM})
else()
set(PROFILING OFF)
set(${O} OFF)
endif()
endmacro()
# Normalise build options
eth_format_option(PARANOID)
eth_format_option(VMTRACE)
eth_format_option(EVMJIT)
eth_format_option(FATDB)
eth_format_option(JSONRPC)
eth_format_option(USENPM)
eth_format_option(PROFILING)
eth_format_option(SOLIDITY)
eth_format_option(GUI)
eth_format_option(TESTS)
eth_format_option(TOOLS)
eth_format_option(ETHASHCL)
eth_format_option_on_decent_platform(SERPENT)
eth_format_option_on_decent_platform(NCURSES)
if (SOLIDITY)
set(SOLIDITY ON)
else ()
set(SOLIDITY OFF)
endif()
if (SERPENT)
set(SERPENT ${DECENT_PLATFORM})
else ()
set(SERPENT OFF)
endif()
if (GUI)
set(GUI ON)
set(JSONRPC ON)
else ()
set(GUI OFF)
endif ()
if (TESTS)
set(TESTS ON)
else ()
set(TESTS OFF)
endif ()
if (TOOLS)
set(TOOLS ON)
else ()
set(TOOLS OFF)
endif ()
if (ETHASHCL)
set(ETHASHCL ON)
else ()
set(ETHASHCL OFF)
endif()
if (NCURSES)
set(NCURSES ${DECENT_PLATFORM})
else ()
set(NCURSES OFF)
endif()
if (BUNDLE STREQUAL "minimal")

11
extdep/getstuff.bat

@ -23,10 +23,15 @@ set eth_version=%2
cd download
if not exist %eth_name%-%eth_version%.tar.gz curl -k -o %eth_name%-%eth_version%.tar.gz %eth_server%/%eth_name%-%eth_version%.tar.gz
if not exist %eth_name%-%eth_version% tar -zxvf %eth_name%-%eth_version%.tar.gz
if not exist %eth_name%-%eth_version%.tar.gz (
bitsadmin /cancel %eth_name%-%eth_version%.tar.gz
bitsadmin /create %eth_name%-%eth_version%.tar.gz
bitsadmin /transfer %eth_name%-%eth_version%.tar.gz /download /priority normal %eth_server%/%eth_name%-%eth_version%.tar.gz %cd%\%eth_name%-%eth_version%.tar.gz
bitsadmin /cancel %eth_name%-%eth_version%.tar.gz
)
if not exist %eth_name%-%eth_version% cmake -E tar -zxvf %eth_name%-%eth_version%.tar.gz
cmake -E copy_directory %eth_name%-%eth_version% ..\install\windows
cd ..\download
cd ..
goto :EOF

2
libp2p/Host.cpp

@ -687,7 +687,7 @@ bytes Host::saveNetwork() const
if (chrono::system_clock::now() - p.m_lastConnected < chrono::seconds(3600 * 48) && endpoint.port() > 0 && p.id != id() && (p.required || p.endpoint.isAllowed()))
{
network.appendList(10);
network << endpoint.port() << p.id << p.required
network << endpoint.address().to_v4().to_bytes() << endpoint.port() << p.id << p.required
<< chrono::duration_cast<chrono::seconds>(p.m_lastConnected.time_since_epoch()).count()
<< chrono::duration_cast<chrono::seconds>(p.m_lastAttempted.time_since_epoch()).count()
<< p.m_failedAttempts << (unsigned)p.m_lastDisconnect << p.m_score << p.m_rating;

2
mix/CodeHighlighter.cpp

@ -109,7 +109,7 @@ void CodeHighlighter::processError(dev::Exception const& _exception)
void CodeHighlighter::processComments(std::string const& _source)
{
unsigned i = 0;
unsigned size = _source.size();
size_t size = _source.size();
if (size == 0)
return;
while (i < size - 1)

2
mix/ContractCallDataEncoder.cpp

@ -127,7 +127,7 @@ unsigned ContractCallDataEncoder::encodeSingleItem(QString const& _data, Solidit
}
}
unsigned dataSize = _type.dynamicSize ? result.size() : alignSize;
size_t dataSize = _type.dynamicSize ? result.size() : alignSize;
if (result.size() % alignSize != 0)
result.resize((result.size() & ~(alignSize - 1)) + alignSize);
_dest.insert(_dest.end(), result.begin(), result.end());

3
mix/FileIo.cpp

@ -102,6 +102,7 @@ void FileIo::writeFile(QString const& _url, QString const& _data)
}
else
error(tr("Error writing file %1").arg(_url));
file.close();
m_watcher->addPath(path);
}
@ -184,7 +185,7 @@ QStringList FileIo::makePackage(QString const& _deploymentFolder)
QUrl url(_deploymentFolder + "package.dapp");
QFile compressed(url.path());
QByteArray qFileBytes((char*)dapp.data(), dapp.size());
QByteArray qFileBytes((char*)dapp.data(), static_cast<int>(dapp.size()));
if (compressed.open(QIODevice::WriteOnly))
{
compressed.write(qFileBytes);

2
mix/MixClient.cpp

@ -40,7 +40,7 @@ namespace mix
{
Secret const c_defaultUserAccountSecret = Secret("cb73d9408c4720e230387d956eb0f829d8a4dd2c1055f96257167e14e7169074");
u256 const c_mixGenesisDifficulty = c_minimumDifficulty; //TODO: make it lower for Mix somehow
u256 const c_mixGenesisDifficulty = 131072; //TODO: make it lower for Mix somehow
bytes MixBlockChain::createGenesisBlock(h256 _stateRoot)
{

32
test/TestHelper.cpp

@ -119,6 +119,32 @@ ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller):
}
}
json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
{
static const set<string> hashes {"bloom" , "coinbase", "hash", "mixHash", "parentHash", "receiptTrie",
"stateRoot", "transactionsTrie", "uncleHash", "currentCoinbase",
"previousHash", "to", "address", "caller", "origin", "secretKey"};
for (auto& i: _o)
{
std::string key = i.first;
if (hashes.count(key))
continue;
std::string str;
json_spirit::mValue value = i.second;
if (value.type() == json_spirit::int_type)
str = toString(value.get_int());
else if (value.type() == json_spirit::str_type)
str = value.get_str();
else continue;
_o[key] = (str.substr(0, 2) == "0x") ? str : "0x" + toHex(toCompactBigEndian(toInt(str)));
}
return _o;
}
void ImportTest::importEnv(json_spirit::mObject& _o)
{
assert(_o.count("previousHash") > 0);
@ -325,6 +351,8 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost)
// export pre state
m_TestObject["pre"] = fillJsonWithState(m_statePre);
m_TestObject["env"] = makeAllFieldsHex(m_TestObject["env"].get_obj());
m_TestObject["transaction"] = makeAllFieldsHex(m_TestObject["transaction"].get_obj());
}
json_spirit::mObject fillJsonWithState(State _state)
@ -335,8 +363,8 @@ json_spirit::mObject fillJsonWithState(State _state)
for (auto const& a: _state.addresses())
{
json_spirit::mObject o;
o["balance"] = toString(_state.balance(a.first));
o["nonce"] = toString(_state.transactionsFrom(a.first));
o["balance"] = "0x" + toHex(toCompactBigEndian(_state.balance(a.first)));
o["nonce"] = "0x" + toHex(toCompactBigEndian(_state.transactionsFrom(a.first)));
{
json_spirit::mObject store;
for (auto const& s: _state.storage(a.first))

1
test/TestHelper.h

@ -121,6 +121,7 @@ public:
static void importState(json_spirit::mObject& _o, eth::State& _state);
static void importState(json_spirit::mObject& _o, eth::State& _state, stateOptionsMap& _stateOptionsMap);
void importTransaction(json_spirit::mObject& _o);
static json_spirit::mObject& makeAllFieldsHex(json_spirit::mObject& _o);
void exportTest(bytes const& _output, eth::State const& _statePost);
static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const _expectedStateOptions = stateOptionsMap(), WhenError _throw = WhenError::Throw);

18
test/blockchain.cpp

@ -90,7 +90,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
for (auto const& bl: o["blocks"].get_array())
{
mObject blObj = bl.get_obj();
stateTemp = state;
// get txs
TransactionQueue txs;
ZeroGasPricer gp;
@ -222,6 +222,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
txObject["v"] = to_string(txi.second.signature().v + 27);
txObject["to"] = txi.second.isCreation() ? "" : toString(txi.second.receiveAddress());
txObject["value"] = toString(txi.second.value());
txObject = ImportTest::makeAllFieldsHex(txObject);
txArray.push_back(txObject);
}
@ -301,6 +302,11 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
o["blocks"] = blArray;
o["postState"] = fillJsonWithState(state);
//make all values hex
State prestate(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress);
importer.importState(o["pre"].get_obj(), prestate);
o["pre"] = fillJsonWithState(prestate);
}//_fillin
else
@ -619,11 +625,11 @@ void writeBlockHeaderToJson(mObject& _o, BlockInfo const& _bi)
_o["transactionsTrie"] = toString(_bi.transactionsRoot);
_o["receiptTrie"] = toString(_bi.receiptsRoot);
_o["bloom"] = toString(_bi.logBloom);
_o["difficulty"] = toString(_bi.difficulty);
_o["number"] = toString(_bi.number);
_o["gasLimit"] = toString(_bi.gasLimit);
_o["gasUsed"] = toString(_bi.gasUsed);
_o["timestamp"] = toString(_bi.timestamp);
_o["difficulty"] = "0x" + toHex(toCompactBigEndian(_bi.difficulty));
_o["number"] = "0x" + toHex(toCompactBigEndian(_bi.number));
_o["gasLimit"] = "0x" + toHex(toCompactBigEndian(_bi.gasLimit));
_o["gasUsed"] = "0x" + toHex(toCompactBigEndian(_bi.gasUsed));
_o["timestamp"] = "0x" + toHex(toCompactBigEndian(_bi.timestamp));
_o["extraData"] ="0x" + toHex(_bi.extraData);
_o["mixHash"] = toString(_bi.mixHash);
_o["nonce"] = toString(_bi.nonce);

6
test/peer.cpp

@ -108,6 +108,12 @@ BOOST_AUTO_TEST_CASE(save_nodes)
BOOST_REQUIRE(r[0].toInt<unsigned>() == dev::p2p::c_protocolVersion);
BOOST_REQUIRE_EQUAL(r[1].toBytes().size(), 32); // secret
BOOST_REQUIRE_EQUAL(r[2].itemCount(), 5);
for (auto i: r[2])
{
BOOST_REQUIRE(i.itemCount() == 3 || i.itemCount() == 10);
BOOST_REQUIRE(i[0].itemCount() == 4 || i[0].itemCount() == 16);
}
}
BOOST_AUTO_TEST_SUITE_END()

2
test/stQuadraticComplexityTestFiller.json

@ -43,7 +43,7 @@
},
"transaction" :
{
"//" : "run(int256)",
"data" : "run(int256)",
"data" : "0x61a47706000000000000000000000000000000000000000000000000000000000000c350",
"gasLimit" : "904+68*x+e",
"gasLimit" : "350000000",

78
test/stTransactionTestFiller.json

@ -5,7 +5,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -42,7 +42,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -85,7 +85,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -128,7 +128,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -167,7 +167,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -207,7 +207,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -280,7 +280,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1100",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -316,7 +316,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "22000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -370,7 +370,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "47766",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -424,7 +424,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "220000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -479,7 +479,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "21100",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -515,7 +515,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "21100",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -552,7 +552,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -609,7 +609,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "100000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -678,7 +678,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -761,7 +761,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -834,7 +834,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -925,7 +925,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1003,7 +1003,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1056,7 +1056,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1110,7 +1110,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1170,7 +1170,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1226,7 +1226,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "100000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1284,7 +1284,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1333,7 +1333,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
@ -1381,7 +1381,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1417,7 +1417,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "100000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1453,7 +1453,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1490,7 +1490,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1533,7 +1533,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "100000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1570,7 +1570,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "10000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1613,7 +1613,7 @@
"currentGasLimit" : "(2**256)-1",
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1655,7 +1655,7 @@
"currentGasLimit" : "(2**256)-1",
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1695,7 +1695,7 @@
"currentGasLimit" : "(2**256)-1",
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1733,7 +1733,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "100000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1769,7 +1769,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1806,7 +1806,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1846,7 +1846,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
@ -1894,7 +1894,7 @@
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {

1
test/transaction.cpp

@ -52,6 +52,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") );
o["sender"] = toString(txFromFields.sender());
o["transaction"] = ImportTest::makeAllFieldsHex(tObj);
}
catch(Exception const& _e)
{

3
test/tt10mbDataFieldFiller.json

File diff suppressed because one or more lines are too long

2
test/ttTransactionTestFiller.json

@ -176,7 +176,7 @@
},
"SenderTest" : {
"//" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e",
"senderExpect" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e",
"expect" : "valid",
"transaction" :
{

4
test/vm.cpp

@ -85,7 +85,7 @@ void FakeExtVM::reset(u256 _myBalance, u256 _myNonce, map<u256, u256> const& _st
void FakeExtVM::push(mObject& o, string const& _n, u256 _v)
{
o[_n] = toString(_v);
o[_n] = "0x" + toHex(toCompactBigEndian(_v));
}
void FakeExtVM::push(mArray& a, u256 _v)
@ -448,7 +448,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
BOOST_AUTO_TEST_SUITE(VMTests)
BOOST_AUTO_TEST_CASE(vm_tests)
BOOST_AUTO_TEST_CASE(vmtests)
{
dev::test::executeTests("vmtests", "/VMTests", dev::test::doVMTests);
}

Loading…
Cancel
Save