Browse Source

Merge remote-tracking branch 'upstream/develop' into suicideRefundTests

Conflicts:
	test/stTransactionTestFiller.json
	test/vmArithmeticTestFiller.json
cl-refactor
CJentzsch 10 years ago
parent
commit
78002e81c5
  1. 9
      CMakeLists.txt
  2. 2
      libethereum/Client.cpp
  3. 2
      libethereum/Executive.cpp
  4. 2
      libsolidity/Compiler.cpp
  5. 2
      libsolidity/CompilerContext.cpp
  6. 174
      test/stTransactionTestFiller.json
  7. 568
      test/vmArithmeticTestFiller.json

9
CMakeLists.txt

@ -121,13 +121,8 @@ cmake_policy(SET CMP0015 NEW)
createDefaultCacheConfig()
configureProject()
# TODO: Move to some other place / remove once we make Qt5.4 mandatory.
find_package (Qt5WebEngine QUIET)
if ("${Qt5WebEngine_VERSION_STRING}" VERSION_GREATER "5.3.0")
set (ETH_HAVE_WEBENGINE 1)
else()
set (ETH_HAVE_WEBENGINE 0)
endif()
# Force chromium.
set (ETH_HAVE_WEBENGINE 1)
message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
message("-- VMTRACE: ${VMTRACE}; PARANOIA: ${PARANOIA}; HEADLESS: ${HEADLESS}; JSONRPC: ${JSONRPC}; EVMJIT: ${EVMJIT}; FATDB: ${FATDB}; CHROMIUM: ${ETH_HAVE_WEBENGINE}")

2
libethereum/Client.cpp

@ -67,7 +67,7 @@ void BasicGasPricer::update(BlockChain const& _bc)
m_gasPerBlock = _bc.info(p).gasLimit;
map<u256, unsigned> dist;
unsigned total;
unsigned total = 0;
while (c < 1000 && p)
{
BlockInfo bi = _bc.info(p);

2
libethereum/Executive.cpp

@ -176,7 +176,7 @@ OnOpFunc Executive::simpleTrace()
o << endl << " STACK" << endl;
for (auto i: vm.stack())
o << (h256)i << endl;
o << " MEMORY" << endl << (vm.memory().size() > 1000) ? " mem size greater than 1000 bytes " : memDump(vm.memory());
o << " MEMORY" << endl << ((vm.memory().size() > 1000) ? " mem size greater than 1000 bytes " : memDump(vm.memory()));
o << " STORAGE" << endl;
for (auto const& i: ext.state().storage(ext.myAddress))
o << showbase << hex << i.first << ": " << i.second << endl;

2
libsolidity/Compiler.cpp

@ -375,7 +375,7 @@ bool Compiler::visit(FunctionDefinition const& _function)
for (VariableDeclaration const* localVariable: _function.getLocalVariables())
m_context.removeVariable(*localVariable);
m_context.adjustStackOffset(-c_returnValuesSize);
m_context.adjustStackOffset(-(int)c_returnValuesSize);
if (!_function.isConstructor())
m_context << eth::Instruction::JUMP;
return false;

2
libsolidity/CompilerContext.cpp

@ -63,7 +63,7 @@ void CompilerContext::addVariable(VariableDeclaration const& _declaration,
void CompilerContext::removeVariable(VariableDeclaration const& _declaration)
{
solAssert(m_localVariables.count(&_declaration), "");
solAssert(!!m_localVariables.count(&_declaration), "");
m_localVariables.erase(&_declaration);
}

174
test/stTransactionTestFiller.json

@ -30,6 +30,37 @@
}
},
"EmptyTransaction2" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"pre" :
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "100000",
"code" : "",
"nonce" : "0",
"storage" : {
}
}
},
"transaction" :
{
"data" : "",
"gasLimit" : "22000",
"gasPrice" : "",
"nonce" : "",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "",
"value" : ""
}
},
"TransactionSendingToEmpty" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@ -236,6 +267,100 @@
}
},
"InternalCallHittingGasLimit2" : {
"env" : {
"currentCoinbase" : "2adf5374fce5edbc8e2a8697c15331677e6ebf0b",
"currentDifficulty" : "45678256",
"currentGasLimit" : "47766",
"currentNumber" : "0",
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"pre" :
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "1000000",
"code" : "",
"nonce" : "0",
"storage" : {
}
},
"b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0",
"code" : "{ (CALL 25000 0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b 1 0 0 0 0) }",
"nonce" : "0",
"storage" : {
}
},
"c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0",
"code" : "{[[1]]55}",
"nonce" : "0",
"storage" : {
}
}
},
"transaction" :
{
"data" : "",
"gasLimit" : "47766",
"gasPrice" : "1",
"nonce" : "",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"value" : "10"
}
},
"InternalCallHittingGasLimitSuccess" : {
"env" : {
"currentCoinbase" : "2adf5374fce5edbc8e2a8697c15331677e6ebf0b",
"currentDifficulty" : "45678256",
"currentGasLimit" : "220000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"pre" :
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "1000000",
"code" : "",
"nonce" : "0",
"storage" : {
}
},
"b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0",
"code" : "{ (CALL 25000 0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b 1 0 0 0 0) }",
"nonce" : "0",
"storage" : {
}
},
"c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0",
"code" : "{[[1]]55}",
"nonce" : "0",
"storage" : {
}
}
},
"transaction" :
{
"data" : "",
"gasLimit" : "150000",
"gasPrice" : "1",
"nonce" : "",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"value" : "10"
}
},
"TransactionFromCoinbaseHittingBlockGasLimit" : {
"env" : {
"currentCoinbase" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
@ -811,7 +936,7 @@
}
},
"TransactionCosts555" : {
"TransactionDataCosts652" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "45678256",
@ -916,7 +1041,7 @@
"pre" :
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "33000",
"balance" : "133000",
"code" : "",
"nonce" : "0",
"storage" : {
@ -927,7 +1052,7 @@
{
"data" : "0x3240349548983454",
"gasLimit" : "32600",
"gasPrice" : "1",
"gasPrice" : "0",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
@ -1089,7 +1214,7 @@
"transaction" :
{
"data" : "0x602280600c6000396000f30060e060020a600035048063f8a8fd6d14601457005b601a6020565b60006000f35b56",
"gasLimit" : "25000",
"gasLimit" : "23679",
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
@ -1098,7 +1223,7 @@
}
},
"CreateTransactionWorking" : {
"CreateTransactionSuccess" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "45678256",
@ -1166,5 +1291,44 @@
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"value" : "100"
}
},
"CreateMessageSuccess" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "45678256",
"currentGasLimit" : "1000000000000",
"currentNumber" : "0",
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"pre" :
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "400000",
"code" : "",
"nonce" : "0",
"storage" : {
}
},
"b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0",
"code" : "{(MSTORE 0 0x600c600055) (CREATE 0 27 5)}",
"nonce" : "0",
"storage" : {
}
}
},
"transaction" :
{
"data" : "",
"gasLimit" : "131882",
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"value" : "100"
}
}
}

568
test/vmArithmeticTestFiller.json

File diff suppressed because it is too large
Loading…
Cancel
Save