Browse Source

Merge branch 'newTests' into NewStateTests

Conflicts:
	test/vm.cpp
	test/vmArithmeticTestFiller.json
	test/vmSha3TestFiller.json
cl-refactor
Christoph Jentzsch 10 years ago
parent
commit
48484db5ae
  1. 15
      libdevcore/FixedHash.h
  2. 16
      libethereum/BlockChain.cpp
  3. 12
      libethereum/BlockChain.h
  4. 22
      libethereum/BlockDetails.h
  5. 2
      libethereum/ExtVM.h
  6. 2
      libethereum/State.cpp
  7. 32
      libethereum/State.h
  8. 70
      libethereum/TransactionReceipt.h
  9. 8
      test/vm.cpp
  10. 804
      test/vmArithmeticTestFiller.json
  11. 932
      test/vmBitwiseLogicOperationTestFiller.json
  12. 80
      test/vmIOandFlowOperationsTestFiller.json
  13. 134
      test/vmPushDupSwapTestFiller.json
  14. 40
      test/vmSha3TestFiller.json

15
libdevcore/FixedHash.h

@ -158,21 +158,25 @@ public:
return ret;
}
template <unsigned P, unsigned M> inline FixedHash& shiftBloom(FixedHash<M> const& _h) { return (*this |= _h.template nbloom<P, N>()); }
template <unsigned P, unsigned M> inline FixedHash& shiftBloom(FixedHash<M> const& _h)
{
return (*this |= _h.template nbloom<P, N>());
}
template <unsigned P, unsigned M> inline FixedHash<M> nbloom() const
{
static const unsigned c_bloomBytes = (M + 7) / 8;
unsigned mask = (1 << c_bloomBytes) - 1;
static const unsigned c_bloomBits = M * 8;
unsigned mask = c_bloomBits - 1;
unsigned bloomBytes = (dev::toLog2(c_bloomBits) + 7) / 8;
FixedHash<M> ret;
byte const* p = data();
for (unsigned i = 0; i < P; ++i)
{
unsigned index = 0;
for (unsigned j = 0; j < c_bloomBytes; ++j, ++p)
for (unsigned j = 0; j < bloomBytes; ++j, ++p)
index = (index << 8) | *p;
index &= mask;
ret[N - 1 - index / 8] |= (1 << (index % 8));
ret[M - 1 - index / 8] |= (1 << (index % 8));
}
return ret;
}
@ -231,6 +235,7 @@ using h520 = FixedHash<65>;
using h512 = FixedHash<64>;
using h256 = FixedHash<32>;
using h160 = FixedHash<20>;
using h512s = std::vector<h512>;
using h256s = std::vector<h256>;
using h160s = std::vector<h160>;
using h256Set = std::set<h256>;

16
libethereum/BlockChain.cpp

@ -309,10 +309,14 @@ h256s BlockChain::import(bytes const& _block, OverlayDB const& _db)
auto b = s.oldBloom();
BlockBlooms bb;
BlockTraces bt;
BlockLogBlooms blb;
BlockReceipts br;
for (unsigned i = 0; i < s.pending().size(); ++i)
{
bt.traces.push_back(s.changesFromPending(i));
bb.blooms.push_back(s.changesFromPending(i).bloom());
bt.traces.push_back(s.changesFromPending(i));
blb.blooms.push_back(s.receipt(i).bloom());
br.receipts.push_back(s.receipt(i));
}
s.cleanup(true);
td = pd.totalDifficulty + tdIncrease;
@ -334,11 +338,21 @@ h256s BlockChain::import(bytes const& _block, OverlayDB const& _db)
WriteGuard l(x_traces);
m_traces[newHash] = bt;
}
{
WriteGuard l(x_logBlooms);
m_logBlooms[newHash] = blb;
}
{
WriteGuard l(x_receipts);
m_receipts[newHash] = br;
}
m_extrasDB->Put(m_writeOptions, toSlice(newHash), (ldb::Slice)dev::ref(m_details[newHash].rlp()));
m_extrasDB->Put(m_writeOptions, toSlice(bi.parentHash), (ldb::Slice)dev::ref(m_details[bi.parentHash].rlp()));
m_extrasDB->Put(m_writeOptions, toSlice(newHash, 1), (ldb::Slice)dev::ref(m_blooms[newHash].rlp()));
m_extrasDB->Put(m_writeOptions, toSlice(newHash, 2), (ldb::Slice)dev::ref(m_traces[newHash].rlp()));
m_extrasDB->Put(m_writeOptions, toSlice(newHash, 3), (ldb::Slice)dev::ref(m_logBlooms[newHash].rlp()));
m_extrasDB->Put(m_writeOptions, toSlice(newHash, 4), (ldb::Slice)dev::ref(m_receipts[newHash].rlp()));
m_db->Put(m_writeOptions, toSlice(newHash), (ldb::Slice)ref(_block));
#if ETH_PARANOIA

12
libethereum/BlockChain.h

@ -105,6 +105,14 @@ public:
BlockTraces traces(h256 _hash) const { return queryExtras<BlockTraces, 2>(_hash, m_traces, x_traces, NullBlockTraces); }
BlockTraces traces() const { return traces(currentHash()); }
/// Get the transactions' log blooms of a block (or the most recent mined if none given). Thread-safe.
BlockLogBlooms logBlooms(h256 _hash) const { return queryExtras<BlockLogBlooms, 3>(_hash, m_logBlooms, x_logBlooms, NullBlockLogBlooms); }
BlockLogBlooms logBlooms() const { return logBlooms(currentHash()); }
/// Get the transactions' receipts of a block (or the most recent mined if none given). Thread-safe.
BlockReceipts receipts(h256 _hash) const { return queryExtras<BlockReceipts, 4>(_hash, m_receipts, x_receipts, NullBlockReceipts); }
BlockReceipts receipts() const { return receipts(currentHash()); }
/// Get a block (RLP format) for the given hash (or the most recent mined if none given). Thread-safe.
bytes block(h256 _hash) const;
bytes block() const { return block(currentHash()); }
@ -185,6 +193,10 @@ private:
mutable BlockBloomsHash m_blooms;
mutable boost::shared_mutex x_traces;
mutable BlockTracesHash m_traces;
mutable boost::shared_mutex x_logBlooms;
mutable BlockLogBloomsHash m_logBlooms;
mutable boost::shared_mutex x_receipts;
mutable BlockReceiptsHash m_receipts;
mutable boost::shared_mutex x_cache;
mutable std::map<h256, bytes> m_cache;

22
libethereum/BlockDetails.h

@ -29,6 +29,7 @@
#include <libdevcore/Log.h>
#include <libdevcore/RLP.h>
#include "Manifest.h"
#include "TransactionReceipt.h"
namespace ldb = leveldb;
namespace dev
@ -71,14 +72,35 @@ struct BlockTraces
Manifests traces;
};
struct BlockLogBlooms
{
BlockLogBlooms() {}
BlockLogBlooms(RLP const& _r) { blooms = _r.toVector<h512>(); }
bytes rlp() const { RLPStream s; s << blooms; return s.out(); }
h512s blooms;
};
struct BlockReceipts
{
BlockReceipts() {}
BlockReceipts(RLP const& _r) { for (auto const& i: _r) receipts.emplace_back(i.data()); }
bytes rlp() const { RLPStream s(receipts.size()); for (TransactionReceipt const& i: receipts) i.streamRLP(s); return s.out(); }
TransactionReceipts receipts;
};
typedef std::map<h256, BlockDetails> BlockDetailsHash;
typedef std::map<h256, BlockBlooms> BlockBloomsHash;
typedef std::map<h256, BlockTraces> BlockTracesHash;
typedef std::map<h256, BlockLogBlooms> BlockLogBloomsHash;
typedef std::map<h256, BlockReceipts> BlockReceiptsHash;
static const BlockDetails NullBlockDetails;
static const BlockBlooms NullBlockBlooms;
static const BlockTraces NullBlockTraces;
static const BlockLogBlooms NullBlockLogBlooms;
static const BlockReceipts NullBlockReceipts;
}
}

2
libethereum/ExtVM.h

@ -102,7 +102,7 @@ public:
private:
State& m_s; ///< A reference to the base state.
std::map<Address, Account> m_origCache; ///< The cache of the address states (i.e. the externalities) as-was prior to the execution.
std::map<Address, Account> m_origCache; ///< The cache of the address states (i.e. the externalities) as-was prior to the execution.
Manifest* m_ms;
};

2
libethereum/State.cpp

@ -723,9 +723,7 @@ void State::cleanup(bool _fullCommit)
m_previousBlock = m_currentBlock;
}
else
{
m_db.rollback();
}
resetCurrent();
}

32
libethereum/State.h

@ -35,6 +35,7 @@
#include "TransactionQueue.h"
#include "Account.h"
#include "Transaction.h"
#include "TransactionReceipt.h"
#include "Executive.h"
#include "AccountDiff.h"
@ -52,37 +53,6 @@ struct StateChat: public LogChannel { static const char* name() { return "-S-";
struct StateTrace: public LogChannel { static const char* name() { return "=S="; } static const int verbosity = 7; };
struct StateDetail: public LogChannel { static const char* name() { return "/S/"; } static const int verbosity = 14; };
class TransactionReceipt
{
public:
TransactionReceipt(h256 _root, u256 _gasUsed, LogEntries const& _log, Manifest const& _ms): m_stateRoot(_root), m_gasUsed(_gasUsed), m_bloom(eth::bloom(_log)), m_log(_log), m_changes(_ms) {}
Manifest const& changes() const { return m_changes; }
h256 const& stateRoot() const { return m_stateRoot; }
u256 const& gasUsed() const { return m_gasUsed; }
LogBloom const& bloom() const { return m_bloom; }
LogEntries const& log() const { return m_log; }
void streamRLP(RLPStream& _s) const
{
_s.appendList(4) << m_stateRoot << m_gasUsed << m_bloom;
_s.appendList(m_log.size());
for (LogEntry const& l: m_log)
l.streamRLP(_s);
}
private:
h256 m_stateRoot;
u256 m_gasUsed;
LogBloom m_bloom;
LogEntries m_log;
Manifest m_changes; ///< TODO: PoC-7: KILL
};
using TransactionReceipts = std::vector<TransactionReceipt>;
struct PrecompiledAddress
{
unsigned gas;

70
libethereum/TransactionReceipt.h

@ -0,0 +1,70 @@
/*
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/>.
*/
/** @file TransactionReceipt.h
* @author Gav Wood <i@gavwood.com>
* @date 2014
*/
#pragma once
#include <array>
#include <map>
#include <libdevcore/Common.h>
#include <libdevcore/RLP.h>
#include <libevm/ExtVMFace.h>
#include "Manifest.h"
namespace dev
{
namespace eth
{
class TransactionReceipt
{
public:
TransactionReceipt(bytesConstRef _rlp) { RLP r(_rlp); m_stateRoot = (h256)r[0]; m_gasUsed = (u256)r[1]; m_bloom = (LogBloom)r[2]; for (auto const& i: r[3]) m_log.emplace_back(i); }
TransactionReceipt(h256 _root, u256 _gasUsed, LogEntries const& _log, Manifest const& _ms): m_stateRoot(_root), m_gasUsed(_gasUsed), m_bloom(eth::bloom(_log)), m_log(_log), m_changes(_ms) {}
Manifest const& changes() const { return m_changes; }
h256 const& stateRoot() const { return m_stateRoot; }
u256 const& gasUsed() const { return m_gasUsed; }
LogBloom const& bloom() const { return m_bloom; }
LogEntries const& log() const { return m_log; }
void streamRLP(RLPStream& _s) const
{
_s.appendList(4) << m_stateRoot << m_gasUsed << m_bloom;
_s.appendList(m_log.size());
for (LogEntry const& l: m_log)
l.streamRLP(_s);
}
private:
h256 m_stateRoot;
u256 m_gasUsed;
LogBloom m_bloom;
LogEntries m_log;
Manifest m_changes; ///< TODO: PoC-7: KILL
};
using TransactionReceipts = std::vector<TransactionReceipt>;
}
}

8
test/vm.cpp

@ -427,10 +427,10 @@ BOOST_AUTO_TEST_CASE(vmBlockInfoTest)
dev::test::executeTests("vmBlockInfoTest", "/VMTests", dev::test::doVMTests);
}
//BOOST_AUTO_TEST_CASE(vmIOandFlowOperationsTest)
//{
// dev::test::executeTests("vmIOandFlowOperationsTest", "/VMTests", dev::test::doVMTests);
//}
BOOST_AUTO_TEST_CASE(vmIOandFlowOperationsTest)
{
dev::test::executeTests("vmIOandFlowOperationsTest", "/VMTests", dev::test::doVMTests);
}
BOOST_AUTO_TEST_CASE(vmPushDupSwapTest)
{

804
test/vmArithmeticTestFiller.json

File diff suppressed because it is too large

932
test/vmBitwiseLogicOperationTestFiller.json

File diff suppressed because it is too large

80
test/vmIOandFlowOperationsTestFiller.json

@ -12,7 +12,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6002600360045057",
"code" : "0x6002600360045055",
"storage": {}
}
},
@ -40,7 +40,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x5060026003600457",
"code" : "0x5060026003600455",
"storage": {}
}
},
@ -68,7 +68,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600260035157",
"code" : "0x600260035155",
"storage": {}
}
},
@ -96,7 +96,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600260035257",
"code" : "0x600260035255",
"storage": {}
}
},
@ -488,7 +488,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6023600058",
"code" : "0x600056",
"storage": {}
}
},
@ -516,7 +516,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60236007586001600257",
"code" : "0x60236007566001600255",
"storage": {}
}
},
@ -543,7 +543,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x602360085860015d600257",
"code" : "0x602360075660015b600255",
"storage": {}
}
},
@ -571,7 +571,63 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x602360075860015d600257",
"code" : "0x602360085660015b600255",
"storage": {}
}
},
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000",
"data" : "",
"gasPrice" : "100000000000000",
"gas" : "10000"
}
},
"jump0_jumpdest2": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentNumber" : "0",
"currentGasLimit" : "1000000",
"currentDifficulty" : "256",
"currentTimestamp" : 1,
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6023600a6008505660015b600255",
"storage": {}
}
},
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000",
"data" : "",
"gasPrice" : "100000000000000",
"gas" : "10000"
}
},
"jump0_jumpdest3": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentNumber" : "0",
"currentGasLimit" : "1000000",
"currentDifficulty" : "256",
"currentTimestamp" : 1,
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6023600b6008505660015b600255",
"storage": {}
}
},
@ -599,7 +655,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x602360016009596001600257",
"code" : "0x602360016009576001600255",
"storage": {}
}
},
@ -627,7 +683,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60236001600a5960015d600257",
"code" : "0x60236001600a5760015b600255",
"storage": {}
}
},
@ -655,7 +711,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x602360006009596001600257",
"code" : "0x602360006009576001600255",
"storage": {}
}
},
@ -683,7 +739,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff596002600357",
"code" : "0x60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff576002600355",
"storage": {}
}
},

134
test/vmPushDupSwapTestFiller.json

@ -12,7 +12,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60ff600357",
"code" : "0x60ff600355",
"storage": {}
}
},
@ -68,7 +68,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x61eeff600357",
"code" : "0x61eeff600355",
"storage": {}
}
},
@ -96,7 +96,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x62ddeeff600357",
"code" : "0x62ddeeff600355",
"storage": {}
}
},
@ -124,7 +124,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x63ccddeeff600357",
"code" : "0x63ccddeeff600355",
"storage": {}
}
},
@ -152,7 +152,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x64bbccddeeff600357",
"code" : "0x64bbccddeeff600355",
"storage": {}
}
},
@ -180,7 +180,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x65aabbccddeeff600357",
"code" : "0x65aabbccddeeff600355",
"storage": {}
}
},
@ -208,7 +208,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6699aabbccddeeff600357",
"code" : "0x6699aabbccddeeff600355",
"storage": {}
}
},
@ -236,7 +236,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x678899aabbccddeeff600357",
"code" : "0x678899aabbccddeeff600355",
"storage": {}
}
},
@ -264,7 +264,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x68778899aabbccddeeff600357",
"code" : "0x68778899aabbccddeeff600355",
"storage": {}
}
},
@ -292,7 +292,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6966778899aabbccddeeff600357",
"code" : "0x6966778899aabbccddeeff600355",
"storage": {}
}
},
@ -320,7 +320,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6a5566778899aabbccddeeff600357",
"code" : "0x6a5566778899aabbccddeeff600355",
"storage": {}
}
},
@ -348,7 +348,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6b445566778899aabbccddeeff600357",
"code" : "0x6b445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -376,7 +376,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6c33445566778899aabbccddeeff600357",
"code" : "0x6c33445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -404,7 +404,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6d2233445566778899aabbccddeeff600357",
"code" : "0x6d2233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -432,7 +432,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6e112233445566778899aabbccddeeff600357",
"code" : "0x6e112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -460,7 +460,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6f10112233445566778899aabbccddeeff600357",
"code" : "0x6f10112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -488,7 +488,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x70ff00112233445566778899aabbccddeeff600357",
"code" : "0x70ff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -516,7 +516,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x71eeff00112233445566778899aabbccddeeff600357",
"code" : "0x71eeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -544,7 +544,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x72ddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x72ddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -572,7 +572,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x73ccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x73ccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -600,7 +600,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x74bbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x74bbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -628,7 +628,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x75aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x75aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -656,7 +656,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7699aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7699aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -684,7 +684,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -712,7 +712,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x78778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x78778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -740,7 +740,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7966778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7966778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -769,7 +769,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7a5566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7a5566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -797,7 +797,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7b445566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7b445566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -825,7 +825,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7c33445566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7c33445566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -853,7 +853,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7d2233445566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7d2233445566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -881,7 +881,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7e112233445566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7e112233445566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -909,7 +909,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -937,7 +937,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7fff10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff600357",
"code" : "0x7fff10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff600355",
"storage": {}
}
},
@ -965,7 +965,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff80600357",
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff80600355",
"storage": {}
}
},
@ -993,7 +993,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff81600357",
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff81600355",
"storage": {}
}
},
@ -1021,7 +1021,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6002600181600357",
"code" : "0x6002600181600355",
"storage": {}
}
},
@ -1049,7 +1049,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60036002600182600357",
"code" : "0x60036002600182600355",
"storage": {}
}
},
@ -1077,7 +1077,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600460036002600183600357",
"code" : "0x600460036002600183600355",
"storage": {}
}
},
@ -1105,7 +1105,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6005600460036002600184600357",
"code" : "0x6005600460036002600184600355",
"storage": {}
}
},
@ -1133,7 +1133,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60066005600460036002600185600357",
"code" : "0x60066005600460036002600185600355",
"storage": {}
}
},
@ -1161,7 +1161,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600760066005600460036002600186600357",
"code" : "0x600760066005600460036002600186600355",
"storage": {}
}
},
@ -1189,7 +1189,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6008600760066005600460036002600187600357",
"code" : "0x6008600760066005600460036002600187600355",
"storage": {}
}
},
@ -1217,7 +1217,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60096008600760066005600460036002600188600357",
"code" : "0x60096008600760066005600460036002600188600355",
"storage": {}
}
},
@ -1245,7 +1245,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600a60096008600760066005600460036002600189600357",
"code" : "0x600a60096008600760066005600460036002600189600355",
"storage": {}
}
},
@ -1273,7 +1273,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600b600a6009600860076006600560046003600260018a600357",
"code" : "0x600b600a6009600860076006600560046003600260018a600355",
"storage": {}
}
},
@ -1301,7 +1301,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600c600b600a6009600860076006600560046003600260018b600357",
"code" : "0x600c600b600a6009600860076006600560046003600260018b600355",
"storage": {}
}
},
@ -1329,7 +1329,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600d600c600b600a6009600860076006600560046003600260018c600357",
"code" : "0x600d600c600b600a6009600860076006600560046003600260018c600355",
"storage": {}
}
},
@ -1357,7 +1357,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600e600d600c600b600a6009600860076006600560046003600260018d600357",
"code" : "0x600e600d600c600b600a6009600860076006600560046003600260018d600355",
"storage": {}
}
},
@ -1385,7 +1385,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600f600e600d600c600b600a6009600860076006600560046003600260018e600357",
"code" : "0x600f600e600d600c600b600a6009600860076006600560046003600260018e600355",
"storage": {}
}
},
@ -1413,7 +1413,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6010600f600e600d600c600b600a6009600860076006600560046003600260018f600357",
"code" : "0x6010600f600e600d600c600b600a6009600860076006600560046003600260018f600355",
"storage": {}
}
},
@ -1441,7 +1441,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff60039057",
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff60039055",
"storage": {}
}
},
@ -1469,7 +1469,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff60039157",
"code" : "0x7f10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff60039155",
"storage": {}
}
},
@ -1497,7 +1497,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6002600160039157",
"code" : "0x6002600160039155",
"storage": {}
}
},
@ -1525,7 +1525,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60036002600160039257",
"code" : "0x60036002600160039255",
"storage": {}
}
},
@ -1553,7 +1553,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600460036002600160039357",
"code" : "0x600460036002600160039355",
"storage": {}
}
},
@ -1581,7 +1581,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6005600460036002600160039457",
"code" : "0x6005600460036002600160039455",
"storage": {}
}
},
@ -1609,7 +1609,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60066005600460036002600160039557",
"code" : "0x60066005600460036002600160039555",
"storage": {}
}
},
@ -1637,7 +1637,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600760066005600460036002600160039657",
"code" : "0x600760066005600460036002600160039655",
"storage": {}
}
},
@ -1665,7 +1665,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6008600760066005600460036002600160039757",
"code" : "0x6008600760066005600460036002600160039755",
"storage": {}
}
},
@ -1693,7 +1693,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x60096008600760066005600460036002600160039857",
"code" : "0x60096008600760066005600460036002600160039855",
"storage": {}
}
},
@ -1721,7 +1721,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600a60096008600760066005600460036002600160039957",
"code" : "0x600a60096008600760066005600460036002600160039955",
"storage": {}
}
},
@ -1749,7 +1749,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600b600a60096008600760066005600460036002600160039a57",
"code" : "0x600b600a60096008600760066005600460036002600160039a55",
"storage": {}
}
},
@ -1777,7 +1777,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600c600b600a60096008600760066005600460036002600160039b57",
"code" : "0x600c600b600a60096008600760066005600460036002600160039b55",
"storage": {}
}
},
@ -1805,7 +1805,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600d600c600b600a60096008600760066005600460036002600160039c57",
"code" : "0x600d600c600b600a60096008600760066005600460036002600160039c55",
"storage": {}
}
},
@ -1833,7 +1833,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600e600d600c600b600a60096008600760066005600460036002600160039d57",
"code" : "0x600e600d600c600b600a60096008600760066005600460036002600160039d55",
"storage": {}
}
},
@ -1861,7 +1861,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x600f600e600d600c600b600a60096008600760066005600460036002600160039e57",
"code" : "0x600f600e600d600c600b600a60096008600760066005600460036002600160039e55",
"storage": {}
}
},
@ -1889,7 +1889,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "0x6010600f600e600d600c600b600a60096008600760066005600460036002600160039f57",
"code" : "0x6010600f600e600d600c600b600a60096008600760066005600460036002600160039f55",
"storage": {}
}
},

40
test/vmSha3TestFiller.json

@ -111,7 +111,7 @@
}
},
"sha3_3": {
"sha3_4": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentNumber" : "0",
@ -139,7 +139,7 @@
}
},
"sha3_4": {
"sha3_5": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentNumber" : "0",
@ -152,7 +152,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "{ [[ 0 ]] (SHA3 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 100)}",
"code" : "{ [[ 0 ]] (SHA3 10000 0xfffffffff )}",
"storage": {}
}
},
@ -167,7 +167,7 @@
}
},
"sha3_4": {
"sha3_6": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentNumber" : "0",
@ -180,7 +180,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"nonce" : 0,
"code" : "{ [[ 0 ]] (SHA3 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)}",
"code" : "{ [[ 0 ]] (SHA3 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)}",
"storage": {}
}
},
@ -193,33 +193,5 @@
"gasPrice" : "100000000000000",
"gas" : "10000"
}
},
// "sha3_5": {
// "env" : {
// "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
// "currentNumber" : "0",
// "currentGasLimit" : "1000000",
// "currentDifficulty" : "256",
// "currentTimestamp" : 1,
// "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
// },
// "pre" : {
// "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
// "balance" : "1000000000000000000",
// "nonce" : 0,
// "code" : "{ [[ 0 ]] (SHA3 100 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)}",
// "storage": {}
// }
// },
// "exec" : {
// "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
// "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
// "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
// "value" : "1000000000000000000",
// "data" : "",
// "gasPrice" : "100000000000000",
// "gas" : "10000"
// }
// }
}
}

Loading…
Cancel
Save