Browse Source

Protocol 20 changes.

Added my new address to the premine.
cl-refactor
Gav Wood 11 years ago
parent
commit
7f4176a787
  1. 11
      alethzero/MainWin.cpp
  2. 8
      eth/main.cpp
  3. 2
      libethcore/CommonEth.cpp
  4. 5
      libethereum/BlockChain.cpp
  5. 8
      libethsupport/Common.cpp
  6. 5
      libethsupport/Common.h
  7. 2
      lllc/main.cpp
  8. 8
      neth/main.cpp
  9. 6
      walleth/MainWin.cpp

11
alethzero/MainWin.cpp

@ -184,7 +184,7 @@ Main::Main(QWidget *parent) :
#if ETH_DEBUG
m_servers.append("192.168.0.10:30301");
#else
int pocnumber = QString(ETH_QUOTED(ETH_VERSION)).section('.', 1, 1).toInt();
int pocnumber = QString(eth::EthVersion).section('.', 1, 1).toInt();
if (pocnumber == 4)
m_servers.push_back("54.72.31.55:30303");
else if (pocnumber == 5)
@ -202,7 +202,10 @@ Main::Main(QWidget *parent) :
}
#endif
cerr << "State root: " << BlockChain::genesis().stateRoot << endl << "Block Hash: " << sha3(BlockChain::createGenesisBlock()) << endl << "Block RLP: " << RLP(BlockChain::createGenesisBlock()) << endl << "Block Hex: " << toHex(BlockChain::createGenesisBlock()) << endl;
cerr << "State root: " << BlockChain::genesis().stateRoot << endl;
cerr << "Block Hash: " << sha3(BlockChain::createGenesisBlock()) << endl;
cerr << "Block RLP: " << RLP(BlockChain::createGenesisBlock()) << endl;
cerr << "Block Hex: " << toHex(BlockChain::createGenesisBlock()) << endl;
cerr << "Network protocol version: " << eth::c_protocolVersion << endl;
ui->configDock->close();
@ -382,7 +385,7 @@ Address Main::fromString(QString const& _a) const
void Main::on_about_triggered()
{
QMessageBox::about(this, "About AlethZero PoC-" + QString(ETH_QUOTED(ETH_VERSION)).section('.', 1, 1), QString("AlethZero/v" ETH_QUOTED(ETH_VERSION) "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM) "\n" ETH_QUOTED(ETH_COMMIT_HASH)) + (ETH_CLEAN_REPO ? "\nCLEAN" : "\n+ LOCAL CHANGES") + "\n\nBy Gav Wood, 2014.\nBased on a design by Vitalik Buterin.\n\nTeam Ethereum++ includes: Eric Lombrozo, Marko Simovic, Alex Leverington, Tim Hughes and several others.");
QMessageBox::about(this, "About AlethZero PoC-" + QString(eth::EthVersion).section('.', 1, 1), QString("AlethZero/v") + eth::EthVersion + "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM) "\n" ETH_QUOTED(ETH_COMMIT_HASH) + (ETH_CLEAN_REPO ? "\nCLEAN" : "\n+ LOCAL CHANGES") + "\n\nBy Gav Wood, 2014.\nBased on a design by Vitalik Buterin.\n\nTeam Ethereum++ includes: Eric Lombrozo, Marko Simovic, Alex Leverington, Tim Hughes and several others.");
}
void Main::on_paranoia_triggered()
@ -1058,7 +1061,7 @@ void Main::on_net_triggered()
{
ui->port->setEnabled(!ui->net->isChecked());
ui->clientName->setEnabled(!ui->net->isChecked());
string n = "AlethZero/v" ETH_QUOTED(ETH_VERSION);
string n = string("AlethZero/v") + eth::EthVersion;
if (ui->clientName->text().size())
n += "/" + ui->clientName->text().toStdString();
n += "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM);

8
eth/main.cpp

@ -111,13 +111,13 @@ string credits(bool _interactive = false)
{
std::ostringstream cout;
cout
<< "Ethereum (++) " << ETH_QUOTED(ETH_VERSION) << endl
<< "Ethereum (++) " << eth::EthVersion << endl
<< " Code by Gav Wood, (c) 2013, 2014." << endl
<< " Based on a design by Vitalik Buterin." << endl << endl;
if (_interactive)
{
string vs = toString(ETH_QUOTED(ETH_VERSION));
string vs = eth::EthVersion;
vs = vs.substr(vs.find_first_of('.') + 1)[0];
int pocnumber = stoi(vs);
string m_servers;
@ -135,7 +135,7 @@ string credits(bool _interactive = false)
void version()
{
cout << "eth version " << ETH_QUOTED(ETH_VERSION) << endl;
cout << "eth version " << eth::EthVersion << endl;
cout << "Build: " << ETH_QUOTED(ETH_BUILD_PLATFORM) << "/" << ETH_QUOTED(ETH_BUILD_TYPE) << endl;
exit(0);
}
@ -278,7 +278,7 @@ int main(int argc, char** argv)
if (!clientName.empty())
clientName += "/";
Client c("Ethereum(++)/" + clientName + "v" ETH_QUOTED(ETH_VERSION) "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM), coinbase, dbPath);
Client c("Ethereum(++)/" + clientName + "v" + eth::EthVersion + "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM), coinbase, dbPath);
cout << credits();
cout << "Address: " << endl << toHex(us.address().asArray()) << endl;

2
libethcore/CommonEth.cpp

@ -28,7 +28,7 @@ using namespace eth;
//#define ETH_ADDRESS_DEBUG 1
const unsigned eth::c_protocolVersion = 19;
const unsigned eth::c_protocolVersion = 20;
static const vector<pair<u256, string>> g_units =
{

5
libethereum/BlockChain.cpp

@ -70,10 +70,9 @@ std::map<Address, AddressState> const& eth::genesisState()
{
static std::map<Address, AddressState> s_ret;
if (s_ret.empty())
{
// Initialise.
for (auto i: vector<string>({
"8a40bfaa73256b60764c1bf40675a99083efb075",
"51ba59315b3a95761d0863b05ccc7a7f54703d99",
"e6716f9544a56c530d868e4bfbacb172315bdead",
"1e12515ce3e0f817a4ddef9ca55788a1d66bd2df",
"1a26338f0d905e295fccb71fa9ea849ffa12aaf4",
@ -83,8 +82,6 @@ std::map<Address, AddressState> const& eth::genesisState()
"e4157b34ea9615cfbde6b4fda419828124b70c78"
}))
s_ret[Address(fromHex(i))] = AddressState(0, u256(1) << 200, h256(), EmptySHA3);
}
return s_ret;
}

8
libethsupport/Common.cpp

@ -24,5 +24,9 @@
using namespace std;
using namespace eth;
#pragma GCC diagnostic ignored "-Wunused-variable"
namespace { char dummy; };
namespace eth
{
char const* EthVersion = "0.5.11";
}

5
libethsupport/Common.h

@ -23,9 +23,6 @@
#pragma once
// define version
#define ETH_VERSION 0.5.10
// way to many uint to size_t warnings in 32 bit build
#ifdef _M_IX86
#pragma warning(disable:4244)
@ -52,6 +49,8 @@ using byte = uint8_t;
namespace eth
{
extern char const* EthVersion;
// Binary data types.
using bytes = std::vector<byte>;
using bytesRef = vector_ref<byte>;

2
lllc/main.cpp

@ -46,7 +46,7 @@ void help()
void version()
{
cout << "LLLC, the Lovely Little Language Compiler " << ETH_QUOTED(ETH_VERSION) << endl;
cout << "LLLC, the Lovely Little Language Compiler " << eth::EthVersion << endl;
cout << " By Gav Wood, (c) 2014." << endl;
cout << "Build: " << ETH_QUOTED(ETH_BUILD_PLATFORM) << "/" << ETH_QUOTED(ETH_BUILD_TYPE) << endl;
exit(0);

8
neth/main.cpp

@ -121,11 +121,11 @@ string credits()
{
std::ostringstream ccout;
ccout
<< "NEthereum (++) " << ETH_QUOTED(ETH_VERSION) << endl
<< "NEthereum (++) " << eth::EthVersion << endl
<< " Code by Gav Wood & , (c) 2013, 2014." << endl
<< " Based on a design by Vitalik Buterin." << endl << endl;
string vs = toString(ETH_QUOTED(ETH_VERSION));
string vs = toString(eth::EthVersion);
vs = vs.substr(vs.find_first_of('.') + 1)[0];
int pocnumber = stoi(vs);
string m_servers;
@ -142,7 +142,7 @@ string credits()
void version()
{
cout << "neth version " << ETH_QUOTED(ETH_VERSION) << endl;
cout << "neth version " << eth::EthVersion << endl;
cout << "Build: " << ETH_QUOTED(ETH_BUILD_PLATFORM) << "/" << ETH_QUOTED(ETH_BUILD_TYPE) << endl;
exit(0);
}
@ -412,7 +412,7 @@ int main(int argc, char** argv)
if (!clientName.empty())
clientName += "/";
Client c("NEthereum(++)/" + clientName + "v" ETH_QUOTED(ETH_VERSION) "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM), coinbase, dbPath);
Client c("NEthereum(++)/" + clientName + "v" + eth::EthVersion + "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM), coinbase, dbPath);
cout << credits();
std::ostringstream ccout;

6
walleth/MainWin.cpp

@ -115,7 +115,7 @@ Main::Main(QWidget *parent) :
on_net_triggered(true);
}
});
QNetworkRequest r(QUrl("http://www.ethereum.org/servers.poc" + QString(ETH_QUOTED(ETH_VERSION)).section('.', 1, 1) + ".txt"));
QNetworkRequest r(QUrl("http://www.ethereum.org/servers.poc" + QString(eth::EthVersion).section('.', 1, 1) + ".txt"));
r.setHeader(QNetworkRequest::UserAgentHeader, "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.0 Safari/537.36");
m_webCtrl.get(r);
srand(time(0));
@ -140,7 +140,7 @@ void Main::timerEvent(QTimerEvent *)
void Main::on_about_triggered()
{
QMessageBox::about(this, "About Walleth PoC-" + QString(ETH_QUOTED(ETH_VERSION)).section('.', 1, 1), "Walleth/v" ETH_QUOTED(ETH_VERSION) "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM) " - " ETH_QUOTED(ETH_COMMIT_HASH) "\nBy Gav Wood, 2014.\nBased on a design by Vitalik Buterin.\n\nTeam Ethereum++ includes: Tim Hughes, Eric Lombrozo, Marko Simovic, Alex Leverington and several others.");
QMessageBox::about(this, "About Walleth PoC-" + QString(eth::EthVersion).section('.', 1, 1), QString("Walleth/v") + eth::EthVersion + "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM) " - " ETH_QUOTED(ETH_COMMIT_HASH) "\nBy Gav Wood, 2014.\nBased on a design by Vitalik Buterin.\n\nTeam Ethereum++ includes: Tim Hughes, Eric Lombrozo, Marko Simovic, Alex Leverington and several others.");
}
void Main::writeSettings()
@ -232,7 +232,7 @@ void Main::refresh()
void Main::on_net_triggered(bool _auto)
{
string n = "Walleth/v" ETH_QUOTED(ETH_VERSION);
string n = string("Walleth/v") + eth::EthVersion;
if (m_clientName.size())
n += "/" + m_clientName.toStdString();
n += "/" ETH_QUOTED(ETH_BUILD_TYPE) "/" ETH_QUOTED(ETH_BUILD_PLATFORM);

Loading…
Cancel
Save