diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 61b5172bb..ff5208034 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -199,6 +199,8 @@ Main::Main(QWidget *parent) : } #endif + cnote << "State root: " << BlockInfo::genesis().stateRoot; + cnote << "Genesis hash:" << sha3(BlockInfo::createGenesisBlock()); cnote << "Genesis RLP:" << toHex(BlockInfo::createGenesisBlock()); ui->configDock->close(); diff --git a/libethereum/BlockInfo.cpp b/libethereum/BlockInfo.cpp index 089536170..d3a369c67 100644 --- a/libethereum/BlockInfo.cpp +++ b/libethereum/BlockInfo.cpp @@ -181,7 +181,7 @@ u256 BlockInfo::calculateGasLimit(BlockInfo const& _parent) const if (!parentHash) return 1000000; else - return (_parent.gasLimit * (1024 - 1) + (_parent.gasUsed * 6 / 5)) / 1024; + return max(10000, (_parent.gasLimit * (1024 - 1) + (_parent.gasUsed * 6 / 5)) / 1024); } u256 BlockInfo::calculateDifficulty(BlockInfo const& _parent) const diff --git a/libethereum/CommonEth.cpp b/libethereum/CommonEth.cpp index ab07bfbec..d0a94d2e4 100644 --- a/libethereum/CommonEth.cpp +++ b/libethereum/CommonEth.cpp @@ -28,7 +28,7 @@ using namespace eth; //#define ETH_ADDRESS_DEBUG 1 -const unsigned eth::c_protocolVersion = 15; +const unsigned eth::c_protocolVersion = 16; static const vector> g_units = { diff --git a/libethereum/State.cpp b/libethereum/State.cpp index 19aec35b8..12ad7b6e5 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -47,6 +47,8 @@ std::map const& eth::genesisState() s_ret[Address(fromHex("e6716f9544a56c530d868e4bfbacb172315bdead"))] = AddressState(u256(1) << 200, 0, h256(), EmptySHA3); s_ret[Address(fromHex("1e12515ce3e0f817a4ddef9ca55788a1d66bd2df"))] = AddressState(u256(1) << 200, 0, h256(), EmptySHA3); s_ret[Address(fromHex("1a26338f0d905e295fccb71fa9ea849ffa12aaf4"))] = AddressState(u256(1) << 200, 0, h256(), EmptySHA3); + s_ret[Address(fromHex("2ef47100e0787b915105fd5e3f4ff6752079d5cb"))] = AddressState(u256(1) << 200, 0, h256(), EmptySHA3); + s_ret[Address(fromHex("cd2a3d9f938e13cd947ec05abc7fe734df8dd826"))] = AddressState(u256(1) << 200, 0, h256(), EmptySHA3); } return s_ret; } @@ -82,10 +84,8 @@ State::State(Address _coinbaseAddress, Overlay const& _db): m_state.init(); eth::commit(genesisState(), m_db, m_state); m_db.commit(); - cnote << "State root: " << m_state.root(); m_previousBlock = BlockInfo::genesis(); - cnote << "Genesis hash:" << m_previousBlock.hash; resetCurrent(); assert(m_state.root() == m_previousBlock.stateRoot);