mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge branch 'develop' into p2p
Conflicts: libp2p/Host.cpp libp2p/Host.h
This commit is contained in:
commit
c49a2e6fd9
129
Assembly.cpp
Normal file
129
Assembly.cpp
Normal file
@ -0,0 +1,129 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* @author Lefteris Karapetsas <lefteris@ethdev.com>
|
||||
* @date 2015
|
||||
* Unit tests for Assembly Items from evmcore/Assembly.h
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <libdevcore/Log.h>
|
||||
#include <libevmcore/SourceLocation.h>
|
||||
#include <libsolidity/Scanner.h>
|
||||
#include <libsolidity/Parser.h>
|
||||
#include <libsolidity/NameAndTypeResolver.h>
|
||||
#include <libsolidity/Compiler.h>
|
||||
#include <libsolidity/AST.h>
|
||||
#include <libevmcore/Assembly.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev::eth;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace solidity
|
||||
{
|
||||
namespace test
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
eth::AssemblyItems compileContract(const string& _sourceCode)
|
||||
{
|
||||
Parser parser;
|
||||
ASTPointer<SourceUnit> sourceUnit;
|
||||
BOOST_REQUIRE_NO_THROW(sourceUnit = parser.parse(make_shared<Scanner>(CharStream(_sourceCode))));
|
||||
NameAndTypeResolver resolver({});
|
||||
resolver.registerDeclarations(*sourceUnit);
|
||||
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
|
||||
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
|
||||
{
|
||||
BOOST_REQUIRE_NO_THROW(resolver.resolveNamesAndTypes(*contract));
|
||||
}
|
||||
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
|
||||
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
|
||||
{
|
||||
BOOST_REQUIRE_NO_THROW(resolver.checkTypeRequirements(*contract));
|
||||
}
|
||||
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
|
||||
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
|
||||
{
|
||||
Compiler compiler;
|
||||
compiler.compileContract(*contract, map<ContractDefinition const*, bytes const*>{});
|
||||
|
||||
return compiler.getRuntimeAssemblyItems();
|
||||
}
|
||||
BOOST_FAIL("No contract found in source.");
|
||||
return AssemblyItems();
|
||||
}
|
||||
|
||||
void checkAssemblyLocations(AssemblyItems const& _items, std::vector<SourceLocation> _locations)
|
||||
{
|
||||
size_t i = 0;
|
||||
BOOST_CHECK_EQUAL(_items.size(), _locations.size());
|
||||
for (auto const& it: _items)
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(it.getLocation() == _locations[i],
|
||||
std::string("Location mismatch for assembly item ") + std::to_string(i));
|
||||
++i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(Assembly)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(location_test)
|
||||
{
|
||||
char const* sourceCode = "contract test {\n"
|
||||
" function f() returns (uint256 a)\n"
|
||||
" {\n"
|
||||
" return 16;\n"
|
||||
" }\n"
|
||||
"}\n";
|
||||
std::shared_ptr<std::string const> n = make_shared<std::string>("source");
|
||||
AssemblyItems items = compileContract(sourceCode);
|
||||
std::vector<SourceLocation> locations {
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(), SourceLocation(),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(), SourceLocation(), SourceLocation(),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n), SourceLocation(0, 77, n),
|
||||
SourceLocation(0, 77, n),
|
||||
SourceLocation(18, 75, n), SourceLocation(40, 49, n),
|
||||
SourceLocation(61, 70, n), SourceLocation(61, 70, n), SourceLocation(61, 70, n),
|
||||
SourceLocation(), SourceLocation(),
|
||||
SourceLocation(61, 70, n), SourceLocation(61, 70, n), SourceLocation(61, 70, n)
|
||||
};
|
||||
checkAssemblyLocations(items, locations);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespaces
|
||||
|
@ -1619,9 +1619,11 @@ BOOST_AUTO_TEST_CASE(gas_and_value_basic)
|
||||
function sendAmount(uint amount) returns (uint256 bal) {
|
||||
return h.getBalance.value(amount)();
|
||||
}
|
||||
function outOfGas() returns (bool flagBefore, bool flagAfter, uint myBal) {
|
||||
flagBefore = h.getFlag();
|
||||
h.setFlag.gas(2)(); // should fail due to OOG, return value can be garbage
|
||||
function outOfGas() returns (bool ret) {
|
||||
h.setFlag.gas(2)(); // should fail due to OOG
|
||||
return true;
|
||||
}
|
||||
function checkState() returns (bool flagAfter, uint myBal) {
|
||||
flagAfter = h.getFlag();
|
||||
myBal = this.balance;
|
||||
}
|
||||
@ -1630,7 +1632,8 @@ BOOST_AUTO_TEST_CASE(gas_and_value_basic)
|
||||
compileAndRun(sourceCode, 20);
|
||||
BOOST_REQUIRE(callContractFunction("sendAmount(uint256)", 5) == encodeArgs(5));
|
||||
// call to helper should not succeed but amount should be transferred anyway
|
||||
BOOST_REQUIRE(callContractFunction("outOfGas()", 5) == encodeArgs(false, false, 20 - 5));
|
||||
BOOST_REQUIRE(callContractFunction("outOfGas()", 5) == bytes());
|
||||
BOOST_REQUIRE(callContractFunction("checkState()", 5) == encodeArgs(false, 20 - 5));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(value_complex)
|
||||
@ -2504,11 +2507,11 @@ BOOST_AUTO_TEST_CASE(struct_containing_bytes_copy_and_delete)
|
||||
compileAndRun(sourceCode);
|
||||
string data = "123456789012345678901234567890123";
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("set(uint256,bytes,uint256)", u256(data.length()), 12, data, 13) == encodeArgs(true));
|
||||
BOOST_CHECK(callContractFunction("set(uint256,bytes,uint256)", 12, u256(data.length()), 13, data) == encodeArgs(true));
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("copy()") == encodeArgs(true));
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("set(uint256,bytes,uint256)", u256(data.length()), 12, data, 13) == encodeArgs(true));
|
||||
BOOST_CHECK(callContractFunction("set(uint256,bytes,uint256)", 12, u256(data.length()), 13, data) == encodeArgs(true));
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("del()") == encodeArgs(true));
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
@ -2661,8 +2664,8 @@ BOOST_AUTO_TEST_CASE(bytes_in_arguments)
|
||||
bytes calldata1 = encodeArgs(u256(innercalldata1.length()), 12, innercalldata1, 13);
|
||||
string innercalldata2 = asString(FixedHash<4>(dev::sha3("g(uint256)")).asBytes() + encodeArgs(3));
|
||||
bytes calldata = encodeArgs(
|
||||
u256(innercalldata1.length()), u256(innercalldata2.length()),
|
||||
12, innercalldata1, innercalldata2, 13);
|
||||
12, u256(innercalldata1.length()), u256(innercalldata2.length()), 13,
|
||||
innercalldata1, innercalldata2);
|
||||
BOOST_CHECK(callContractFunction("test(uint256,bytes,bytes,uint256)", calldata)
|
||||
== encodeArgs(12, (8 + 9) * 3, 13, u256(innercalldata1.length())));
|
||||
}
|
||||
@ -2768,6 +2771,248 @@ BOOST_AUTO_TEST_CASE(dynamic_out_of_bounds_array_access)
|
||||
BOOST_CHECK(callContractFunction("length()") == encodeArgs(4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(fixed_array_cleanup)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
uint spacer1;
|
||||
uint spacer2;
|
||||
uint[20] data;
|
||||
function fill() {
|
||||
for (uint i = 0; i < data.length; ++i) data[i] = i+1;
|
||||
}
|
||||
function clear() { delete data; }
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("fill()") == bytes());
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("clear()") == bytes());
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(short_fixed_array_cleanup)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
uint spacer1;
|
||||
uint spacer2;
|
||||
uint[3] data;
|
||||
function fill() {
|
||||
for (uint i = 0; i < data.length; ++i) data[i] = i+1;
|
||||
}
|
||||
function clear() { delete data; }
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("fill()") == bytes());
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("clear()") == bytes());
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(dynamic_array_cleanup)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
uint[20] spacer;
|
||||
uint[] dynamic;
|
||||
function fill() {
|
||||
dynamic.length = 21;
|
||||
for (uint i = 0; i < dynamic.length; ++i) dynamic[i] = i+1;
|
||||
}
|
||||
function halfClear() { dynamic.length = 5; }
|
||||
function fullClear() { delete dynamic; }
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("fill()") == bytes());
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("halfClear()") == bytes());
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("fullClear()") == bytes());
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(dynamic_multi_array_cleanup)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
struct s { uint[][] d; }
|
||||
s[] data;
|
||||
function fill() returns (uint) {
|
||||
data.length = 3;
|
||||
data[2].d.length = 4;
|
||||
data[2].d[3].length = 5;
|
||||
data[2].d[3][4] = 8;
|
||||
return data[2].d[3][4];
|
||||
}
|
||||
function clear() { delete data; }
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("fill()") == encodeArgs(8));
|
||||
BOOST_CHECK(!m_state.storage(m_contractAddress).empty());
|
||||
BOOST_CHECK(callContractFunction("clear()") == bytes());
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_storage_storage_dyn_dyn)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
uint[] data1;
|
||||
uint[] data2;
|
||||
function setData1(uint length, uint index, uint value) {
|
||||
data1.length = length; if (index < length) data1[index] = value;
|
||||
}
|
||||
function copyStorageStorage() { data2 = data1; }
|
||||
function getData2(uint index) returns (uint len, uint val) {
|
||||
len = data2.length; if (index < len) val = data2[index];
|
||||
}
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("setData1(uint256,uint256,uint256)", 10, 5, 4) == bytes());
|
||||
BOOST_CHECK(callContractFunction("copyStorageStorage()") == bytes());
|
||||
BOOST_CHECK(callContractFunction("getData2(uint256)", 5) == encodeArgs(10, 4));
|
||||
BOOST_CHECK(callContractFunction("setData1(uint256,uint256,uint256)", 0, 0, 0) == bytes());
|
||||
BOOST_CHECK(callContractFunction("copyStorageStorage()") == bytes());
|
||||
BOOST_CHECK(callContractFunction("getData2(uint256)", 0) == encodeArgs(0, 0));
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_storage_storage_static_static)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
uint[40] data1;
|
||||
uint[20] data2;
|
||||
function test() returns (uint x, uint y){
|
||||
data1[30] = 4;
|
||||
data1[2] = 7;
|
||||
data1[3] = 9;
|
||||
data2[3] = 8;
|
||||
data1 = data2;
|
||||
x = data1[3];
|
||||
y = data1[30]; // should be cleared
|
||||
}
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("test()") == encodeArgs(8, 0));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_storage_storage_static_dynamic)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
uint[9] data1;
|
||||
uint[] data2;
|
||||
function test() returns (uint x, uint y){
|
||||
data1[8] = 4;
|
||||
data2 = data1;
|
||||
x = data2.length;
|
||||
y = data2[8];
|
||||
}
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("test()") == encodeArgs(9, 4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_storage_storage_struct)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract c {
|
||||
struct Data { uint x; uint y; }
|
||||
Data[] data1;
|
||||
Data[] data2;
|
||||
function test() returns (uint x, uint y) {
|
||||
data1.length = 9;
|
||||
data1[8].x = 4;
|
||||
data1[8].y = 5;
|
||||
data2 = data1;
|
||||
x = data2[8].x;
|
||||
y = data2[8].y;
|
||||
data1.length = 0;
|
||||
data2 = data1;
|
||||
}
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("test()") == encodeArgs(4, 5));
|
||||
BOOST_CHECK(m_state.storage(m_contractAddress).empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(pass_dynamic_arguments_to_the_base)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract Base {
|
||||
function Base(uint i)
|
||||
{
|
||||
m_i = i;
|
||||
}
|
||||
uint public m_i;
|
||||
}
|
||||
contract Derived is Base(2) {
|
||||
function Derived(uint i) Base(i)
|
||||
{}
|
||||
}
|
||||
contract Final is Derived(4) {
|
||||
})";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("m_i()") == encodeArgs(4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(pass_dynamic_arguments_to_the_base_base)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract Base {
|
||||
function Base(uint j)
|
||||
{
|
||||
m_i = j;
|
||||
}
|
||||
uint public m_i;
|
||||
}
|
||||
contract Base1 is Base(3) {
|
||||
function Base1(uint k) Base(k*k) {}
|
||||
}
|
||||
contract Derived is Base(3), Base1(2) {
|
||||
function Derived(uint i) Base(i) Base1(i)
|
||||
{}
|
||||
}
|
||||
contract Final is Derived(4) {
|
||||
})";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("m_i()") == encodeArgs(4));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(pass_dynamic_arguments_to_the_base_base_with_gap)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract Base {
|
||||
function Base(uint i)
|
||||
{
|
||||
m_i = i;
|
||||
}
|
||||
uint public m_i;
|
||||
}
|
||||
contract Base1 is Base(3) {}
|
||||
contract Derived is Base(2), Base1 {
|
||||
function Derived(uint i) Base(i) {}
|
||||
}
|
||||
contract Final is Derived(4) {
|
||||
})";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("m_i()") == encodeArgs(4));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
@ -127,6 +127,7 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _
|
||||
BOOST_REQUIRE(extractor.getExpression() != nullptr);
|
||||
|
||||
CompilerContext context;
|
||||
context.resetVisitedNodes(contract);
|
||||
context.setInheritanceHierarchy(inheritanceHierarchy);
|
||||
unsigned parametersSize = _localVariables.size(); // assume they are all one slot on the stack
|
||||
context.adjustStackOffset(parametersSize);
|
||||
@ -134,7 +135,7 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _
|
||||
context.addVariable(dynamic_cast<VariableDeclaration const&>(resolveDeclaration(variable, resolver)),
|
||||
parametersSize--);
|
||||
|
||||
ExpressionCompiler::compileExpression(context, *extractor.getExpression());
|
||||
ExpressionCompiler(context).compile(*extractor.getExpression());
|
||||
|
||||
for (vector<string> const& function: _functions)
|
||||
context << context.getFunctionEntryLabel(dynamic_cast<FunctionDefinition const&>(resolveDeclaration(function, resolver)));
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
|
||||
string getSourcePart(ASTNode const& _node) const
|
||||
{
|
||||
Location location = _node.getLocation();
|
||||
SourceLocation location = _node.getLocation();
|
||||
BOOST_REQUIRE(!location.isEmpty());
|
||||
return m_interface.substr(location.start, location.end - location.start);
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ BOOST_AUTO_TEST_CASE(inheritance_diamond_basic)
|
||||
function g() { f(); rootFunction(); }
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(cyclic_inheritance)
|
||||
@ -720,6 +720,58 @@ BOOST_AUTO_TEST_CASE(private_state_variable)
|
||||
BOOST_CHECK_MESSAGE(function == nullptr, "Accessor function of an internal variable should not exist");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(base_class_state_variable_accessor)
|
||||
{
|
||||
// test for issue #1126 https://github.com/ethereum/cpp-ethereum/issues/1126
|
||||
char const* text = "contract Parent {\n"
|
||||
" uint256 public m_aMember;\n"
|
||||
"}\n"
|
||||
"contract Child is Parent{\n"
|
||||
" function foo() returns (uint256) { return Parent.m_aMember; }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(base_class_state_variable_internal_member)
|
||||
{
|
||||
char const* text = "contract Parent {\n"
|
||||
" uint256 internal m_aMember;\n"
|
||||
"}\n"
|
||||
"contract Child is Parent{\n"
|
||||
" function foo() returns (uint256) { return Parent.m_aMember; }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(state_variable_member_of_wrong_class1)
|
||||
{
|
||||
char const* text = "contract Parent1 {\n"
|
||||
" uint256 internal m_aMember1;\n"
|
||||
"}\n"
|
||||
"contract Parent2 is Parent1{\n"
|
||||
" uint256 internal m_aMember2;\n"
|
||||
"}\n"
|
||||
"contract Child is Parent2{\n"
|
||||
" function foo() returns (uint256) { return Parent2.m_aMember1; }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(state_variable_member_of_wrong_class2)
|
||||
{
|
||||
char const* text = "contract Parent1 {\n"
|
||||
" uint256 internal m_aMember1;\n"
|
||||
"}\n"
|
||||
"contract Parent2 is Parent1{\n"
|
||||
" uint256 internal m_aMember2;\n"
|
||||
"}\n"
|
||||
"contract Child is Parent2{\n"
|
||||
" function foo() returns (uint256) { return Child.m_aMember2; }\n"
|
||||
" uint256 public m_aMember3;\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(fallback_function)
|
||||
{
|
||||
char const* text = R"(
|
||||
@ -1185,6 +1237,61 @@ BOOST_AUTO_TEST_CASE(array_with_nonconstant_length)
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_with_different_types1)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c {
|
||||
bytes a;
|
||||
uint[] b;
|
||||
function f() { b = a; }
|
||||
})";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_with_different_types2)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c {
|
||||
uint32[] a;
|
||||
uint8[] b;
|
||||
function f() { b = a; }
|
||||
})";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_with_different_types_conversion_possible)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c {
|
||||
uint32[] a;
|
||||
uint8[] b;
|
||||
function f() { a = b; }
|
||||
})";
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_with_different_types_static_dynamic)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c {
|
||||
uint32[] a;
|
||||
uint8[80] b;
|
||||
function f() { a = b; }
|
||||
})";
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(array_copy_with_different_types_dynamic_static)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c {
|
||||
uint[] a;
|
||||
uint[80] b;
|
||||
function f() { b = a; }
|
||||
})";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
@ -367,6 +367,40 @@ BOOST_AUTO_TEST_CASE(variable_definition_with_initialization)
|
||||
BOOST_CHECK_NO_THROW(parseText(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(variable_definition_in_function_parameter)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
function fun(var a) {}
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_THROW(parseText(text), ParserError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(variable_definition_in_mapping)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
function fun() {
|
||||
mapping(var=>hash) d;
|
||||
}
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_THROW(parseText(text), ParserError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(variable_definition_in_function_return)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
function fun() returns(var d) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_THROW(parseText(text), ParserError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(operator_expression)
|
||||
{
|
||||
char const* text = "contract test {\n"
|
||||
|
@ -23,7 +23,9 @@
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include <libethereum/Client.h>
|
||||
#include <liblll/Compiler.h>
|
||||
#include <libevm/VMFactory.h>
|
||||
@ -139,13 +141,14 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state)
|
||||
}
|
||||
|
||||
void ImportTest::importTransaction(json_spirit::mObject& _o)
|
||||
{
|
||||
if (_o.count("secretKey") > 0)
|
||||
{
|
||||
BOOST_REQUIRE(_o.count("nonce") > 0);
|
||||
BOOST_REQUIRE(_o.count("gasPrice") > 0);
|
||||
BOOST_REQUIRE(_o.count("gasLimit") > 0);
|
||||
BOOST_REQUIRE(_o.count("to") > 0);
|
||||
BOOST_REQUIRE(_o.count("value") > 0);
|
||||
BOOST_REQUIRE(_o.count("secretKey") > 0);
|
||||
BOOST_REQUIRE(_o.count("data") > 0);
|
||||
|
||||
if (bigint(_o["nonce"].get_str()) >= c_max256plus1)
|
||||
@ -161,8 +164,15 @@ void ImportTest::importTransaction(json_spirit::mObject& _o)
|
||||
Transaction(toInt(_o["value"]), toInt(_o["gasPrice"]), toInt(_o["gasLimit"]), importData(_o), toInt(_o["nonce"]), Secret(_o["secretKey"].get_str())) :
|
||||
Transaction(toInt(_o["value"]), toInt(_o["gasPrice"]), toInt(_o["gasLimit"]), Address(_o["to"].get_str()), importData(_o), toInt(_o["nonce"]), Secret(_o["secretKey"].get_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
RLPStream transactionRLPStream = createRLPStreamFromTransactionFields(_o);
|
||||
RLP transactionRLP(transactionRLPStream.out());
|
||||
m_transaction = Transaction(transactionRLP.data(), CheckSignature::Sender);
|
||||
}
|
||||
}
|
||||
|
||||
void ImportTest::exportTest(bytes _output, State& _statePost)
|
||||
void ImportTest::exportTest(bytes const& _output, State const& _statePost)
|
||||
{
|
||||
// export output
|
||||
m_TestObject["out"] = "0x" + toHex(_output);
|
||||
|
@ -22,7 +22,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
#include <libethereum/State.h>
|
||||
#include <libevm/ExtVMFace.h>
|
||||
@ -52,7 +54,7 @@ public:
|
||||
void importEnv(json_spirit::mObject& _o);
|
||||
void importState(json_spirit::mObject& _o, eth::State& _state);
|
||||
void importTransaction(json_spirit::mObject& _o);
|
||||
void exportTest(bytes _output, eth::State& _statePost);
|
||||
void exportTest(bytes const& _output, eth::State const& _statePost);
|
||||
|
||||
eth::State m_statePre;
|
||||
eth::State m_statePost;
|
||||
|
154
block.cpp
154
block.cpp
@ -81,6 +81,76 @@ bytes createBlockRLPFromFields(mObject& _tObj)
|
||||
return rlpStream.out();
|
||||
}
|
||||
|
||||
void overwriteBlockHeader(mObject& _o, BlockInfo _current_BlockHeader)
|
||||
{
|
||||
if (_o.count("blockHeader"))
|
||||
{
|
||||
if (_o["blockHeader"].get_obj().size() != 14)
|
||||
{
|
||||
|
||||
BlockInfo tmp = _current_BlockHeader;
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("parentHash"))
|
||||
tmp.parentHash = h256(_o["blockHeader"].get_obj()["parentHash"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("uncleHash"))
|
||||
tmp.sha3Uncles = h256(_o["blockHeader"].get_obj()["uncleHash"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("coinbase"))
|
||||
tmp.coinbaseAddress = Address(_o["blockHeader"].get_obj()["coinbase"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("stateRoot"))
|
||||
tmp.stateRoot = h256(_o["blockHeader"].get_obj()["stateRoot"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("transactionsTrie"))
|
||||
tmp.transactionsRoot = h256(_o["blockHeader"].get_obj()["transactionsTrie"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("receiptTrie"))
|
||||
tmp.receiptsRoot = h256(_o["blockHeader"].get_obj()["receiptTrie"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("bloom"))
|
||||
tmp.logBloom = LogBloom(_o["blockHeader"].get_obj()["bloom"].get_str());
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("difficulty"))
|
||||
tmp.difficulty = toInt(_o["blockHeader"].get_obj()["difficulty"]);
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("number"))
|
||||
tmp.number = toInt(_o["blockHeader"].get_obj()["number"]);
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("gasLimit"))
|
||||
tmp.gasLimit = toInt(_o["blockHeader"].get_obj()["gasLimit"]);
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("gasUsed"))
|
||||
tmp.gasUsed = toInt(_o["blockHeader"].get_obj()["gasUsed"]);
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("timestamp"))
|
||||
tmp.timestamp = toInt(_o["blockHeader"].get_obj()["timestamp"]);
|
||||
|
||||
if (_o["blockHeader"].get_obj().count("extraData"))
|
||||
tmp.extraData = importByteArray(_o["blockHeader"].get_obj()["extraData"].get_str());
|
||||
|
||||
// find new valid nonce
|
||||
|
||||
if (tmp != _current_BlockHeader)
|
||||
{
|
||||
_current_BlockHeader = tmp;
|
||||
cout << "new header!\n";
|
||||
ProofOfWork pow;
|
||||
MineInfo ret;
|
||||
while (!ProofOfWork::verify(_current_BlockHeader.headerHash(WithoutNonce), _current_BlockHeader.nonce, _current_BlockHeader.difficulty))
|
||||
tie(ret, _current_BlockHeader.nonce) = pow.mine(_current_BlockHeader.headerHash(WithoutNonce), _current_BlockHeader.difficulty, 10000, true, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// take the blockheader as is
|
||||
const bytes c_blockRLP = createBlockRLPFromFields(_o["blockHeader"].get_obj());
|
||||
const RLP c_bRLP(c_blockRLP);
|
||||
_current_BlockHeader.populateFromHeader(c_bRLP, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void doBlockTests(json_spirit::mValue& _v, bool _fillin)
|
||||
{
|
||||
for (auto& i: _v.get_obj())
|
||||
@ -214,76 +284,9 @@ void doBlockTests(json_spirit::mValue& _v, bool _fillin)
|
||||
BlockInfo current_BlockHeader = state.info();
|
||||
|
||||
// overwrite blockheader with (possible wrong) data from "blockheader" in filler;
|
||||
|
||||
if (o.count("blockHeader"))
|
||||
{
|
||||
if (o["blockHeader"].get_obj().size() != 14)
|
||||
{
|
||||
|
||||
BlockInfo tmp = current_BlockHeader;
|
||||
|
||||
if (o["blockHeader"].get_obj().count("parentHash"))
|
||||
tmp.parentHash = h256(o["blockHeader"].get_obj()["parentHash"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("uncleHash"))
|
||||
tmp.sha3Uncles = h256(o["blockHeader"].get_obj()["uncleHash"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("coinbase"))
|
||||
tmp.coinbaseAddress = Address(o["blockHeader"].get_obj()["coinbase"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("stateRoot"))
|
||||
tmp.stateRoot = h256(o["blockHeader"].get_obj()["stateRoot"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("transactionsTrie"))
|
||||
tmp.transactionsRoot = h256(o["blockHeader"].get_obj()["transactionsTrie"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("receiptTrie"))
|
||||
tmp.receiptsRoot = h256(o["blockHeader"].get_obj()["receiptTrie"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("bloom"))
|
||||
tmp.logBloom = LogBloom(o["blockHeader"].get_obj()["bloom"].get_str());
|
||||
|
||||
if (o["blockHeader"].get_obj().count("difficulty"))
|
||||
tmp.difficulty = toInt(o["blockHeader"].get_obj()["difficulty"]);
|
||||
|
||||
if (o["blockHeader"].get_obj().count("number"))
|
||||
tmp.number = toInt(o["blockHeader"].get_obj()["number"]);
|
||||
|
||||
if (o["blockHeader"].get_obj().count("gasLimit"))
|
||||
tmp.gasLimit = toInt(o["blockHeader"].get_obj()["gasLimit"]);
|
||||
|
||||
if (o["blockHeader"].get_obj().count("gasUsed"))
|
||||
tmp.gasUsed = toInt(o["blockHeader"].get_obj()["gasUsed"]);
|
||||
|
||||
if (o["blockHeader"].get_obj().count("timestamp"))
|
||||
tmp.timestamp = toInt(o["blockHeader"].get_obj()["timestamp"]);
|
||||
|
||||
if (o["blockHeader"].get_obj().count("extraData"))
|
||||
tmp.extraData = importByteArray(o["blockHeader"].get_obj()["extraData"].get_str());
|
||||
|
||||
// find new valid nonce
|
||||
|
||||
if (tmp != current_BlockHeader)
|
||||
{
|
||||
current_BlockHeader = tmp;
|
||||
cout << "new header!\n";
|
||||
ProofOfWork pow;
|
||||
MineInfo ret;
|
||||
while (!ProofOfWork::verify(current_BlockHeader.headerHash(WithoutNonce), current_BlockHeader.nonce, current_BlockHeader.difficulty))
|
||||
tie(ret, current_BlockHeader.nonce) = pow.mine(current_BlockHeader.headerHash(WithoutNonce), current_BlockHeader.difficulty, 10000, true, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// take the blockheader as is
|
||||
const bytes c_blockRLP = createBlockRLPFromFields(o["blockHeader"].get_obj());
|
||||
const RLP c_bRLP(c_blockRLP);
|
||||
current_BlockHeader.populateFromHeader(c_bRLP, false);
|
||||
}
|
||||
}
|
||||
overwriteBlockHeader(o, current_BlockHeader);
|
||||
|
||||
// write block header
|
||||
|
||||
mObject oBlockHeader;
|
||||
oBlockHeader["parentHash"] = toString(current_BlockHeader.parentHash);
|
||||
oBlockHeader["uncleHash"] = toString(current_BlockHeader.sha3Uncles);
|
||||
@ -423,7 +426,6 @@ void doBlockTests(json_spirit::mValue& _v, bool _fillin)
|
||||
BOOST_CHECK_MESSAGE(blockHeaderFromFields == blockFromRlp, "However, blockHeaderFromFields != blockFromRlp!");
|
||||
|
||||
//Check transaction list
|
||||
|
||||
Transactions txsFromField;
|
||||
|
||||
for (auto const& txObj: o["transactions"].get_array())
|
||||
@ -496,14 +498,24 @@ BOOST_AUTO_TEST_CASE(blValidBlockTest)
|
||||
dev::test::executeTests("blValidBlockTest", "/BlockTests", dev::test::doBlockTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(blInvalidTransactionRLP)
|
||||
{
|
||||
dev::test::executeTests("blInvalidTransactionRLP", "/BlockTests", dev::test::doBlockTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(blInvalidHeaderTest)
|
||||
{
|
||||
dev::test::executeTests("blInvalidHeaderTest", "/BlockTests", dev::test::doBlockTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFileBl)
|
||||
BOOST_AUTO_TEST_CASE(blForkBlocks)
|
||||
{
|
||||
dev::test::userDefinedTest("--bltest", dev::test::doBlockTests);
|
||||
dev::test::executeTests("blForkBlocks", "/BlockTests", dev::test::doBlockTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFile)
|
||||
{
|
||||
dev::test::userDefinedTest("--singletest", dev::test::doBlockTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
@ -23,8 +23,10 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
|
||||
#include <boost/random.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#include <json_spirit/json_spirit.h>
|
||||
#include <json_spirit/json_spirit_reader_template.h>
|
||||
|
1
fork.cpp
1
fork.cpp
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
#include <libethereum/Client.h>
|
||||
#include <libethereum/CanonBlockChain.h>
|
||||
#include <libethereum/EthereumHost.h>
|
||||
|
@ -22,10 +22,12 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <random>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
#include <libdevcore/CommonIO.h>
|
||||
#include <libethereum/CanonBlockChain.h>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include "TestHelper.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -21,11 +21,13 @@
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
#include <libdevcore/Log.h>
|
||||
#include <libdevcore/CommonIO.h>
|
||||
#include <libdevcrypto/TrieCommon.h>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include "TestHelper.h"
|
||||
|
||||
using namespace std;
|
||||
|
1
net.cpp
1
net.cpp
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <libdevcore/Worker.h>
|
||||
#include <libdevcrypto/Common.h>
|
||||
#include <libp2p/UDP.h>
|
||||
|
4
rlp.cpp
4
rlp.cpp
@ -22,11 +22,13 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <libdevcore/Log.h>
|
||||
#include <libdevcore/RLP.h>
|
||||
#include <libdevcore/Common.h>
|
||||
#include <libdevcore/CommonIO.h>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <algorithm>
|
||||
#include "JsonSpiritHeaders.h"
|
||||
#include "TestHelper.h"
|
||||
|
69
stMemoryStressTestFiller.json
Normal file
69
stMemoryStressTestFiller.json
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"mload32bitBound": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "17592320524892",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 1 ]] (MLOAD 4294967296) } ",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "175923205248920",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "17592320524892",
|
||||
"to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"data" : ""
|
||||
}
|
||||
},
|
||||
|
||||
"mload32bitBound2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "37791080412587",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 1 ]] (MLOAD 6294967296) } ",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "377910804219850",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "37791080412587",
|
||||
"to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"data" : ""
|
||||
}
|
||||
}
|
||||
}
|
1465
stMemoryTestFiller.json
Normal file
1465
stMemoryTestFiller.json
Normal file
File diff suppressed because it is too large
Load Diff
682
stQuadraticComplexityTestFiller.json
Normal file
682
stQuadraticComplexityTestFiller.json
Normal file
File diff suppressed because one or more lines are too long
@ -304,33 +304,135 @@
|
||||
"data" : ""
|
||||
}
|
||||
},
|
||||
"RefundOverflow" : {
|
||||
"refund_CallA" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "45678256",
|
||||
"currentGasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "400",
|
||||
"code" : "0x",
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (CALL 500 0xaaae7baea6a6c7c4c2dfeb977efac326af552aaa 0 0 0 0 0 )}",
|
||||
"storage" : {
|
||||
"0x01" : "0x01"
|
||||
}
|
||||
},
|
||||
"aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 1 ]] 0 }",
|
||||
"storage" : {
|
||||
"0x01" : "0x01"
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "2000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"transaction" : {
|
||||
"data" : "",
|
||||
"gasLimit" : "5789604461865809771178549250434395392663499233282028201972879200395656482016",
|
||||
"gasPrice" : "20",
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "1500",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
|
||||
"value" : ""
|
||||
}
|
||||
"data" : ""
|
||||
}
|
||||
},
|
||||
|
||||
"refund_CallA2" : {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (CALL 50 0xaaae7baea6a6c7c4c2dfeb977efac326af552aaa 0 0 0 0 0 )}",
|
||||
"storage" : {
|
||||
"0x01" : "0x01"
|
||||
}
|
||||
},
|
||||
"aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 1 ]] 0 }",
|
||||
"storage" : {
|
||||
"0x01" : "0x01"
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "1000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "850",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"data" : ""
|
||||
}
|
||||
},
|
||||
|
||||
"refund_CallA_OOG" : {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (CALL 1 0xaaae7baea6a6c7c4c2dfeb977efac326af552aaa 0 0 0 0 0 )}",
|
||||
"storage" : {
|
||||
"0x01" : "0x01"
|
||||
}
|
||||
},
|
||||
"aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 1 ]] 0 }",
|
||||
"storage" : {
|
||||
"0x01" : "0x01"
|
||||
}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "1000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"transaction" : {
|
||||
"nonce" : "0",
|
||||
"gasPrice" : "1",
|
||||
"gasLimit" : "850",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"data" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,14 +76,6 @@
|
||||
"//" : " if (!testCryptographicFunctions()) ",
|
||||
"//" : " res = hash(int(res) + int(0x00000f0000000000000000000000000000000000000000000000000000000000)); ",
|
||||
"//" : " ",
|
||||
"//" : " //Tested 27.01.2015 ",
|
||||
"//" : " //should run out of gas ",
|
||||
"//" : " //if (!testInfiniteLoop()) ",
|
||||
"//" : " // res = hash(int(res) + int(0x000f000000000000000000000000000000000000000000000000000000000000)); ",
|
||||
"//" : " // ",
|
||||
"//" : " //should run out of gas ",
|
||||
"//" : " //if (!testRecursiveMethods()) ",
|
||||
"//" : " // res = hash(int(res) + int(0x0000000000000000000000000000000000000000000000000000000000000000)); ",
|
||||
"//" : " } ",
|
||||
"//" : " ",
|
||||
"//" : " function testCryptographicFunctions() returns (bool res) ",
|
||||
@ -155,25 +147,6 @@
|
||||
"//" : " ",
|
||||
"//" : " } ",
|
||||
"//" : " ",
|
||||
"//" : " function testInfiniteLoop() returns (bool res) ",
|
||||
"//" : " { ",
|
||||
"//" : " res = false; ",
|
||||
"//" : " while(true){} ",
|
||||
"//" : " return true; ",
|
||||
"//" : " } ",
|
||||
"//" : " ",
|
||||
"//" : " function testRecursiveMethods() returns (bool res) ",
|
||||
"//" : " { ",
|
||||
"//" : " res = false; ",
|
||||
"//" : " testRecursiveMethods2(); ",
|
||||
"//" : " return true; ",
|
||||
"//" : " } ",
|
||||
"//" : " function testRecursiveMethods2() ",
|
||||
"//" : " { ",
|
||||
"//" : " testRecursiveMethods(); ",
|
||||
"//" : "} ",
|
||||
"//" : " ",
|
||||
"//" : " ",
|
||||
"//" : " function testContractSuicide() returns (bool res) ",
|
||||
"//" : " { ",
|
||||
"//" : " TestContract a = new TestContract(); ",
|
||||
@ -219,7 +192,6 @@
|
||||
"//" : " } ",
|
||||
"//" : " } ",
|
||||
"//" : " ",
|
||||
"//" : " ",
|
||||
"//" : " if (i == 0) ",
|
||||
"//" : " return true; ",
|
||||
"//" : " ",
|
||||
@ -361,7 +333,7 @@
|
||||
{
|
||||
"//" : "testRecursiveMethods()",
|
||||
"data" : "0x981a3165",
|
||||
"gasLimit" : "7000",
|
||||
"gasLimit" : "2000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
@ -500,7 +472,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"AmbigiousMethod" : {
|
||||
"AmbiguousMethod" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "45678256",
|
||||
@ -513,6 +485,23 @@
|
||||
{
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "100000",
|
||||
"//" : "contract contract1 ",
|
||||
"//" : "{ ",
|
||||
"//" : " uint value; ",
|
||||
"//" : " function run() ",
|
||||
"//" : " { ",
|
||||
"//" : " value = 225; ",
|
||||
"//" : " } ",
|
||||
"//" : "} ",
|
||||
"//" : " ",
|
||||
"//" : "contract contract2 ",
|
||||
"//" : "{ ",
|
||||
"//" : " uint value2; ",
|
||||
"//" : " function run() ",
|
||||
"//" : " { ",
|
||||
"//" : " value2 = 335; ",
|
||||
"//" : " } ",
|
||||
"//" : "} ",
|
||||
"code" : "0x60003560e060020a90048063c040622614601557005b601b6021565b60006000f35b61014f60008190555056",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
|
@ -2227,5 +2227,94 @@
|
||||
"secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"data": ""
|
||||
}
|
||||
},
|
||||
|
||||
"CreateHashCollision": {
|
||||
"env": {
|
||||
"previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber": "0",
|
||||
"currentGasLimit": "10000000",
|
||||
"currentDifficulty": "256",
|
||||
"currentTimestamp": 1,
|
||||
"currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (MSTORE 0 0x601080600c6000396000f3006000355415600957005b60203560003555) [[ 0 ]] (CREATE 23 3 29) }",
|
||||
"storage": {}
|
||||
},
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "",
|
||||
"storage": {}
|
||||
},
|
||||
"d2571607e241ecf590ed94b12d87c94babe36db6" : {
|
||||
"balance" : "42",
|
||||
"code" : "0x60016001016055",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
}
|
||||
},
|
||||
"transaction": {
|
||||
"nonce": "0",
|
||||
"gasPrice": "1",
|
||||
"gasLimit": "10000000",
|
||||
"to": "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value": "100000",
|
||||
"secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"data": ""
|
||||
}
|
||||
},
|
||||
|
||||
"Call10" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
|
||||
"currentDifficulty" : "45678256",
|
||||
"currentGasLimit" : "0xffffffffffffffffffffffffffffffff",
|
||||
"currentNumber" : "0",
|
||||
"currentTimestamp" : 1,
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||
},
|
||||
"pre" :
|
||||
{
|
||||
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffff",
|
||||
"code" : "",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
|
||||
"aaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "7000",
|
||||
"code" : "",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
},
|
||||
|
||||
"bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "1000",
|
||||
"code" : "{ (for {} (< @i 10) [i](+ @i 1) [[ 0 ]](CALL 0xfffffffffff 0xaaaf5374fce5edbc8e2a8697c15331677e6ebf0b 1 0 50000 0 0) ) [[ 1 ]] @i}",
|
||||
"nonce" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "0xffffffffffffffffffffffffffffff",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "",
|
||||
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"to" : "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b",
|
||||
"value" : "10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
44
state.cpp
44
state.cpp
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
#include <libdevcore/CommonIO.h>
|
||||
#include <libethereum/CanonBlockChain.h>
|
||||
@ -159,11 +160,52 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest)
|
||||
dev::test::executeTests("stBlockHashTest", "/StateTests", dev::test::doStateTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--quadratic" || arg == "--all")
|
||||
{
|
||||
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<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stMemoryStressTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--memory" || arg == "--all")
|
||||
{
|
||||
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<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stSolidityTest)
|
||||
{
|
||||
dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stMemoryTest)
|
||||
{
|
||||
dev::test::executeTests("stMemoryTest", "/StateTests", dev::test::doStateTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(stCreateTest)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
@ -200,7 +242,7 @@ BOOST_AUTO_TEST_CASE(stCreateTest)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFileState)
|
||||
{
|
||||
dev::test::userDefinedTest("--statetest", dev::test::doStateTests);
|
||||
dev::test::userDefinedTest("--singletest", dev::test::doStateTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
@ -90,8 +90,9 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
|
||||
|
||||
o["sender"] = toString(txFromFields.sender());
|
||||
}
|
||||
catch(...)
|
||||
catch(Exception const& _e)
|
||||
{
|
||||
cnote << "Transaction Exception: " << diagnostic_information(_e);
|
||||
o.erase(o.find("transaction"));
|
||||
}
|
||||
}
|
||||
@ -103,7 +104,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(TransactionTests)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TransactionTest)
|
||||
BOOST_AUTO_TEST_CASE(ttTransactionTest)
|
||||
{
|
||||
dev::test::executeTests("ttTransactionTest", "/TransactionTests", dev::test::doTransactionTests);
|
||||
}
|
||||
@ -115,7 +116,21 @@ BOOST_AUTO_TEST_CASE(ttWrongRLPTransaction)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(tt10mbDataField)
|
||||
{
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--bigdata" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
dev::test::executeTests("tt10mbDataField", "/TransactionTests", dev::test::doTransactionTests);
|
||||
|
||||
auto end = chrono::steady_clock::now();
|
||||
auto duration(chrono::duration_cast<chrono::milliseconds>(end - start));
|
||||
cnote << "test duration: " << duration.count() << " milliseconds.\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ttCreateTest)
|
||||
@ -152,9 +167,9 @@ BOOST_AUTO_TEST_CASE(ttCreateTest)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFileTT)
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFile)
|
||||
{
|
||||
dev::test::userDefinedTest("--ttTest", dev::test::doTransactionTests);
|
||||
dev::test::userDefinedTest("--singletest", dev::test::doTransactionTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
4
trie.cpp
4
trie.cpp
@ -22,12 +22,14 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <random>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "JsonSpiritHeaders.h"
|
||||
#include <libdevcore/CommonIO.h>
|
||||
#include <libdevcrypto/TrieDB.h>
|
||||
#include "TrieHash.h"
|
||||
#include "MemTrie.h"
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include "TestHelper.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -14,7 +14,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"WrongVRSTestVl27" : {
|
||||
"WrongVRSTestVl26" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
@ -29,6 +29,21 @@
|
||||
}
|
||||
},
|
||||
|
||||
"WrongVRSTestVl29" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "2000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
|
||||
"value" : "10",
|
||||
"v" : "29",
|
||||
"r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
|
||||
"s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
|
||||
}
|
||||
},
|
||||
|
||||
"WrongVRSTestVge31" : {
|
||||
"transaction" :
|
||||
{
|
||||
@ -44,6 +59,21 @@
|
||||
}
|
||||
},
|
||||
|
||||
"WrongVRSTestVOverflow" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "2000",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
|
||||
"value" : "10",
|
||||
"v" : "310",
|
||||
"r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
|
||||
"s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
|
||||
}
|
||||
},
|
||||
|
||||
"WrongVRSTestIncorrectSize" : {
|
||||
"transaction" :
|
||||
{
|
||||
@ -76,6 +106,22 @@
|
||||
}
|
||||
},
|
||||
|
||||
"DataTest" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "0x0358ac39584bc98a7c979f984b03",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "10",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "secretkey 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithTooManyRLPElements" : {
|
||||
"transaction" :
|
||||
{
|
||||
@ -136,7 +182,22 @@
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithSvalueOverflow" : {
|
||||
"TransactionWithSvalueHigh" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "11",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2e"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithSvalueTooHigh" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
@ -151,7 +212,52 @@
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithSvalueOverflow" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "11",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f0000"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithRvalueOverflow" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "11",
|
||||
"v" : "27",
|
||||
"r" : "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641410000",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithRvalueHigh" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "11",
|
||||
"v" : "27",
|
||||
"r" : "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140",
|
||||
"s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithRvalueTooHigh" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
@ -166,6 +272,51 @@
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithRvalueWrongSize" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "11",
|
||||
"v" : "27",
|
||||
"r" : "0xebaaedce6af48a03bbfd25e8cd0364141",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithSvalueWrongSize" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "11",
|
||||
"v" : "27",
|
||||
"r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
|
||||
"s" : "0xef0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithHihghNonce" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "850",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "0",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithNonceOverflow" : {
|
||||
"transaction" :
|
||||
{
|
||||
@ -181,6 +332,51 @@
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithHihghGas" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
||||
"gasPrice" : "1",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "0",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithHihghGasPrice" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "1000",
|
||||
"gasPrice" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "0",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithGasLimitxPriceOverflow" : {
|
||||
"transaction" :
|
||||
{
|
||||
"data" : "",
|
||||
"gasLimit" : "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
||||
"gasPrice" : "100000000000000000",
|
||||
"nonce" : "0",
|
||||
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
|
||||
"value" : "0",
|
||||
"v" : "27",
|
||||
"r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353",
|
||||
"s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"
|
||||
}
|
||||
},
|
||||
|
||||
"TransactionWithGasPriceOverflow" : {
|
||||
"transaction" :
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
||||
#include <libethereum/Client.h>
|
||||
#include <libethereum/CanonBlockChain.h>
|
||||
#include <libethereum/EthereumHost.h>
|
||||
|
12
vm.cpp
12
vm.cpp
@ -21,7 +21,9 @@
|
||||
*/
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <libethereum/Executive.h>
|
||||
#include <libevm/VMFactory.h>
|
||||
#include "vm.h"
|
||||
@ -518,7 +520,7 @@ BOOST_AUTO_TEST_CASE(vmPerformanceTest)
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--performance")
|
||||
if (arg == "--performance" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
@ -536,7 +538,7 @@ BOOST_AUTO_TEST_CASE(vmInputLimitsTest1)
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--inputlimits")
|
||||
if (arg == "--inputlimits" || arg == "--all")
|
||||
{
|
||||
auto start = chrono::steady_clock::now();
|
||||
|
||||
@ -554,7 +556,7 @@ BOOST_AUTO_TEST_CASE(vmInputLimitsTest2)
|
||||
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
|
||||
{
|
||||
string arg = boost::unit_test::framework::master_test_suite().argv[i];
|
||||
if (arg == "--inputlimits")
|
||||
if (arg == "--inputlimits" || arg == "--all")
|
||||
dev::test::executeTests("vmInputLimitsTest2", "/VMTests", dev::test::doVMTests);
|
||||
}
|
||||
}
|
||||
@ -592,9 +594,9 @@ BOOST_AUTO_TEST_CASE(vmRandom)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFileVM)
|
||||
BOOST_AUTO_TEST_CASE(userDefinedFile)
|
||||
{
|
||||
dev::test::userDefinedTest("--vmtest", dev::test::doVMTests);
|
||||
dev::test::userDefinedTest("--singletest", dev::test::doVMTests);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
2
vm.h
2
vm.h
@ -25,7 +25,9 @@ along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <fstream>
|
||||
#include <cstdint>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <json_spirit/json_spirit.h>
|
||||
#include <libdevcore/Log.h>
|
||||
#include <libdevcore/CommonIO.h>
|
||||
|
@ -365,6 +365,33 @@
|
||||
}
|
||||
},
|
||||
|
||||
"mul7": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 0x1234567890abcdef0fedcba0987654321 0x1234567890abcdef0fedcba0987654321 0x1234567890abcdef0fedcba0987654321 MUL MUL 0 MSTORE 32 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"sub0": {
|
||||
"env" : {
|
||||
@ -534,6 +561,34 @@
|
||||
}
|
||||
},
|
||||
|
||||
"div1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 0x2 0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 DIV 0 MSTORE 32 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"divByNonZero0": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -842,7 +897,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"sdiv5": {
|
||||
"sdiv_i256min": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
@ -870,6 +925,62 @@
|
||||
}
|
||||
},
|
||||
|
||||
"sdiv_i256min2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SDIV (- 0 57896044618658097711785492504343953926634992332820282019728792003956564819968) (- 0 1) ) }",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"sdiv_i256min3": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SDIV 115792089237316195423570985008687907853269984665640564039457584007913129639935 (- 0 57896044618658097711785492504343953926634992332820282019728792003956564819967) ) }",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"mod0": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -1150,6 +1261,90 @@
|
||||
}
|
||||
},
|
||||
|
||||
"smod5": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SMOD (- 0 57896044618658097711785492504343953926634992332820282019728792003956564819967) 57896044618658097711785492504343953926634992332820282019728792003956564819967)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"smod6": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SMOD (- 0 115792089237316195423570985008687907853269984665640564039457584007913129639935) 57896044618658097711785492504343953926634992332820282019728792003956564819967)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"smod7": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SMOD (- 0 57896044618658097711785492504343953926634992332820282019728792003956564819967) 115792089237316195423570985008687907853269984665640564039457584007913129639935)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"addmod0": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -1206,6 +1401,118 @@
|
||||
}
|
||||
},
|
||||
|
||||
"addmod1_overflowDiff": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (ADDMOD (- 0 1) (- 0 2) 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"addmod1_overflow2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (ADDMOD (- 0 1) 0 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"addmod1_overflow3": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (ADDMOD (- 0 1) 1 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"addmod1_overflow3": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (ADDMOD (- 0 1) 2 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"addmod2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -1487,6 +1794,118 @@
|
||||
}
|
||||
},
|
||||
|
||||
"mulmod1_overflow": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (MULMOD (- 0 1) 2 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"mulmod1_overflow2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (MULMOD 57896044618658097711785492504343953926634992332820282019728792003956564819968 2 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"mulmod1_overflow3": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (MULMOD 57896044618658097711785492504343953926634992332820282019728792003956564819967 2 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"mulmod1_overflow4": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (MULMOD 57896044618658097711785492504343953926634992332820282019728792003956564819969 2 5) } ",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"mulmod2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -1627,6 +2046,34 @@
|
||||
}
|
||||
},
|
||||
|
||||
"mulmod4": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 100 27 37 MULMOD 0 MSTORE8 0 1 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"mulmoddivByZero": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -4370,5 +4817,89 @@
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"not1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 123456 0 MSTORE 0 MLOAD NOT 0 MSTORE 32 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"arith1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 1 1 SWAP1 ADD 7 MUL 5 ADD 2 SWAP1 DIV 4 SWAP1 1 33 SWAP1 SDIV 21 ADD 3 MUL 5 SWAP1 SMOD 3 SUB 9 17 EXP 0 MSTORE 8 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"fibbonacci_unrolled": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 1 1 DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD DUP2 DUP2 ADD 0 MSTORE 32 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -703,6 +703,174 @@
|
||||
}
|
||||
},
|
||||
|
||||
"calldatacopy0_return": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (CALLDATACOPY 0 1 2 ) (RETURN 0 (MSIZE))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "0x1234567890abcdef01234567890abcdef",
|
||||
"gasPrice" : "1000000000",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"calldatacopyZeroMemExpansion_return": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (CALLDATACOPY 0 0 0 ) (RETURN 0 (MSIZE))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "0x1234567890abcdef01234567890abcdef",
|
||||
"gasPrice" : "1000000000",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"calldatacopy_DataIndexTooHigh_return": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (CALLDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa 0xff ) (RETURN 0 (MSIZE))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "0x1234567890abcdef01234567890abcdef",
|
||||
"gasPrice" : "1000000000",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"calldatacopy_DataIndexTooHigh2_return": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (CALLDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa 9 ) (RETURN 0 (MSIZE))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "0x1234567890abcdef01234567890abcdef",
|
||||
"gasPrice" : "1000000000",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"calldatacopy1_return": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (CALLDATACOPY 0 1 1 ) (RETURN 0 (MSIZE))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "0x1234567890abcdef01234567890abcdef",
|
||||
"gasPrice" : "1000000000",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"calldatacopy2_return": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ (CALLDATACOPY 0 1 0 ) (RETURN 0 (MSIZE))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "0x1234567890abcdef01234567890abcdef",
|
||||
"gasPrice" : "1000000000",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"codesize": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -1158,6 +1326,34 @@
|
||||
"gasPrice" : "123456789",
|
||||
"gas" : "100000000000"
|
||||
}
|
||||
},
|
||||
|
||||
"env1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "5211",
|
||||
"currentGasLimit" : "10000013",
|
||||
"currentDifficulty" : "231883281",
|
||||
"currentTimestamp" : "42",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "10000000000000033000",
|
||||
"nonce" : "88",
|
||||
"code" : "(asm PC ADDRESS BALANCE CALLER ORIGIN CALLVALUE CALLDATASIZE GASPRICE PREVHASH COINBASE TIMESTAMP NUMBER DIFFICULTY GASLIMIT PC CALLDATASIZE 0 CALLDATALOAD 38 CALLDATALOAD 19 CALLDATALOAD CODESIZE 0x1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff 0 MSTORE 32 0 0 CREATE 32 0 32 0 0 ADDRESS 3000 CALL 0 MLOAD 4096 MSTORE MSIZE 32 MUL 0 SHA3 ADDRESS SUICIDE 1 2 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "10000000001111111",
|
||||
"data" : "0xdeadbeef",
|
||||
"gasPrice" : "2015",
|
||||
"gas" : "100000000001"
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -727,6 +727,91 @@
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"jumpTo1InstructionafterJump": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "0x6003565b6001600055",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"jumpTo1InstructionafterJump_noJumpDest": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "0x6003566001600055",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"jumpTo1InstructionafterJump_jumpdestFirstInstruction": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "0x5b6003565b6001600055",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"jumpDynamicJumpSameDest": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -3003,5 +3088,482 @@
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"byte1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 0x112233445566778899001122334455667788990011223344556677889900aabb 0 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 1 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 2 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 3 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 4 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 5 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 6 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 7 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 8 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 9 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 10 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 11 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 12 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 13 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 14 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 15 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 16 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 17 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 18 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 19 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 20 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 21 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 22 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 23 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 24 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 25 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 26 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 27 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 28 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 29 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 30 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 31 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 32 BYTE 0x112233445566778899001122334455667788990011223344556677889900aabb 2014 BYTE 0 0 SSTORE)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"memory1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 2 0 MSTORE8 3 1 MSTORE8 0 MLOAD 1 MLOAD ADD 2 MSTORE 64 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"return1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 1 1000000 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"return2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [i] 1 ( if (> @i 0) { (return 39) [i] 2 } (return 1) ) }",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"stackjump1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 0x4 0x6 0x9 0x14 JUMP JUMPDEST 0xa SUB 0x0 MSTORE MSIZE 0x0 RETURN JUMPDEST 0x0 MSTORE ADD 0x9 JUMP)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"kv1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[69]] (caller) (return 0 (lll (when (= (caller) @@69) (for {} (< @i (calldatasize)) [i](+ @i 64) [[ (calldataload @i) ]] (calldataload (+ @i 32)) ) ) 0))}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"jumpi_at_the_end" : {
|
||||
"env" : {
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||
"currentDifficulty" : "256",
|
||||
"currentGasLimit" : "10000000",
|
||||
"currentNumber" : "0",
|
||||
"currentTimestamp" : "1",
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"code" : "(asm 10 0 MSTORE JUMPDEST 0 MLOAD 1 SWAP1 SUB DUP1 0 MSTORE 6 JUMPI)",
|
||||
"data" : "0x",
|
||||
"gas" : "1000",
|
||||
"gasPrice" : "100000000000000",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"code" : "(asm 10 0 MSTORE JUMPDEST 0 MLOAD 1 SWAP1 SUB DUP1 0 MSTORE 5 JUMPI)",
|
||||
"nonce" : "0",
|
||||
"storage" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"bad_indirect_jump1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 27 37 MUL JUMP JUMPDEST)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"bad_indirect_jump2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 1 3 3 MUL JUMPI 0 0 JUMP)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"for_loop1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(for [i]:10 (> @i 0) [i](- @i 1) [j](+ @i @j))",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"for_loop2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(for [i]:0 (< @i 10) [i](+ @i 1) [j](+ @i @j))",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"indirect_jump1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 4 3 ADD JUMP STOP JUMPDEST 1 0 MSTORE MSIZE 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"indirect_jump2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 8 6 ADD JUMP STOP JUMPDEST 1 0 MSTORE STOP JUMPDEST 2 0 MSTORE MSIZE 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"indirect_jump3": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 1 4 5 ADD JUMPI STOP JUMPDEST 1 0 MSTORE MSIZE 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"indirect_jump4": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 0 7 5 ADD JUMPI 1 0 MSTORE STOP JUMPDEST)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"stack_loop": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 10 JUMPDEST 1 DUP2 SUB DUP1 2 JUMPI 0 MSTORE8 1 MSTORE8 2 MSTORE8 3 MSTORE8 4 MSTORE8 5 MSTORE8 6 MSTORE8 7 MSTORE8 8 MSTORE8 9 MSTORE8 MSIZE 0 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"when": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(when (> 1 0) [i] 13)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -981,6 +981,34 @@
|
||||
}
|
||||
},
|
||||
|
||||
"push33": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 101 2002 303303 40444404 50555555505 60666666666606 7777777777777777 888888888888888888 99999999999999999999 10000000000000000000001 10111111111111111111111101 2022222222222222222222222202 303333333333333333333333333303 4044444444444444444444444444444404 505555555555555555555555555555555505 60666666666666666666666666666666666606 7077777777777777777777777777777777777707 808888888888888888888888888888888888888808 90999999999999999999999999999999999999999909 100000000000000000000000000000000000000000000001 10111111111111111111111111111111111111111111111101 2022222222222222222222222222222222222222222222222202 303333333333333333333333333333333333333333333333333303 40444444444444444444444444444444444444444444444444444404 50555555555555555555555555555555555555555555555555555555505 6066666666666666666666666666666666666666666666666666666666606 707777777777777777777777777777777777777777777777777777777777707 808888888888888888888888888888888888888888888888888888888888888808 90999999999999999999999999999999999999999999999999999999999999999909 100000000000000000000000000000000000000000000000000000000000000000000001 10111111111111111111111111111111111111111111111111111111111111111111111101 2022222222222222222222222222222222222222222222222222222222222222222222222202)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "32"
|
||||
}
|
||||
},
|
||||
|
||||
"dup1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
@ -1931,5 +1959,33 @@
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
},
|
||||
|
||||
"swapjump1": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "1000000000000000000",
|
||||
"nonce" : "0",
|
||||
"code" : "(asm 5 2 1 12 JUMPI POP POP STOP JUMPDEST SWAP1 1 22 JUMPI POP POP STOP JUMPDEST SUB 0 MSTORE 1 31 RETURN)",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "1000000000000000000",
|
||||
"data" : "",
|
||||
"gasPrice" : "100000000000000",
|
||||
"gas" : "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -201,13 +201,13 @@
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : 0,
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)}",
|
||||
"storage": {}
|
||||
}
|
||||
@ -229,13 +229,13 @@
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : 0,
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 2)}",
|
||||
"storage": {}
|
||||
}
|
||||
@ -257,13 +257,13 @@
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : 1,
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : 0,
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 0x1000000 2)}",
|
||||
"storage": {}
|
||||
}
|
||||
@ -277,5 +277,229 @@
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeNoQuadraticCost31": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 960 1)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost32": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 992 1)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost32_zeroSize": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 1024 0)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost33": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 1024 1)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost63": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 1984 1)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost64": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 2016 1)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost64_2": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 2016 32)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
|
||||
"sha3_memSizeQuadraticCost65": {
|
||||
"env" : {
|
||||
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
|
||||
"currentNumber" : "0",
|
||||
"currentGasLimit" : "1000000",
|
||||
"currentDifficulty" : "256",
|
||||
"currentTimestamp" : "1",
|
||||
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||
},
|
||||
"pre" : {
|
||||
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"nonce" : "0",
|
||||
"code" : "{ [[ 0 ]] (SHA3 2048 1)}",
|
||||
"storage": {}
|
||||
}
|
||||
},
|
||||
"exec" : {
|
||||
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||
"value" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"data" : "",
|
||||
"gasPrice" : "1",
|
||||
"gas" : "0x100000000"
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -19,7 +19,9 @@
|
||||
* @date 2014
|
||||
*/
|
||||
#include <functional>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <libp2p/Host.h>
|
||||
#include <libwhisper/WhisperPeer.h>
|
||||
#include <libwhisper/WhisperHost.h>
|
||||
|
Loading…
Reference in New Issue
Block a user