Browse Source

Merge pull request #61 from programmerTim/develop

Compiling with Visual Studio 2013
cl-refactor
Gav Wood 11 years ago
parent
commit
8e0b345026
  1. 68
      Ethereum.sln
  2. 2
      alethzero/MainWin.cpp
  3. 14
      eth/main.cpp
  4. 4
      libethereum/BlockChain.h
  5. 4
      libethereum/Client.cpp
  6. 6
      libethereum/Client.h
  7. 12
      libethereum/Common.cpp
  8. 19
      libethereum/Common.h
  9. 2
      libethereum/FileSystem.cpp
  10. 19
      libethereum/LibEthereum.props
  11. 32
      libethereum/LibEthereum.vcxproj.filters
  12. 22
      libethereum/PeerNetwork.cpp
  13. 32
      libethereum/PeerNetwork.h
  14. 10
      libethereum/RLP.cpp
  15. 4
      libethereum/RLP.h
  16. 13
      libethereum/State.cpp
  17. 6
      libethereum/TrieCommon.cpp
  18. 4
      libethereum/TrieCommon.h
  19. 17
      libethereum/TrieDB.h
  20. 2
      secp256k1/impl/num.h
  21. 212
      secp256k1/impl/num_boost.h
  22. 2
      secp256k1/num.h
  23. 12
      secp256k1/num_boost.h
  24. 8
      secp256k1/secp256k1.c
  25. 470
      secp256k1/tests.c
  26. 8
      test/crypto.cpp
  27. 10
      test/dagger.cpp
  28. 2
      test/main.cpp
  29. 4
      test/peer.cpp
  30. 15
      test/trie.cpp
  31. 6
      test/vm.cpp
  32. 111
      windows/Ethereum.sln
  33. 159
      windows/Ethereum.vcxproj
  34. 176
      windows/LibCryptoPP.vcxproj
  35. 24
      windows/LibEthereum.props
  36. 197
      windows/LibEthereum.vcxproj
  37. 47
      windows/LibEthereum.vcxproj.filters
  38. 223
      windows/LibLevelDB.vcxproj
  39. 246
      windows/LibLevelDB.vcxproj.filters
  40. 184
      windows/LibMiniUPnPc.vcxproj
  41. 110
      windows/LibSecp256k1.vcxproj
  42. 71
      windows/LibSecp256k1.vcxproj.filters
  43. 50
      windows/TestEthereum.vcxproj
  44. 63
      windows/TestSecp256k1.vcxproj
  45. 39
      windows/bootstrap.sh
  46. 23
      windows/include/LibLevelDB/port/port.h
  47. 0
      windows/include/LibLevelDB/unistd.h
  48. 14
      windows/include/LibMiniUPnPc/miniupnpcstrings.h

68
Ethereum.sln

@ -1,68 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibEthereum", "libethereum\LibEthereum.vcxproj", "{7050C7CF-7551-48BE-8E57-92235906C13A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestMining", "test\TestMining.vcxproj", "{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "test\Test.vcxproj", "{3F3E389B-88DE-41D5-A73B-4F6036E18B36}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\cryptopp562\cryptlib.vcxproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ethereum", "eth\Ethereum.vcxproj", "{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7050C7CF-7551-48BE-8E57-92235906C13A}.Debug|Win32.ActiveCfg = Debug|Win32
{7050C7CF-7551-48BE-8E57-92235906C13A}.Debug|Win32.Build.0 = Debug|Win32
{7050C7CF-7551-48BE-8E57-92235906C13A}.Debug|x64.ActiveCfg = Debug|x64
{7050C7CF-7551-48BE-8E57-92235906C13A}.Debug|x64.Build.0 = Debug|x64
{7050C7CF-7551-48BE-8E57-92235906C13A}.Release|Win32.ActiveCfg = Release|Win32
{7050C7CF-7551-48BE-8E57-92235906C13A}.Release|Win32.Build.0 = Release|Win32
{7050C7CF-7551-48BE-8E57-92235906C13A}.Release|x64.ActiveCfg = Release|x64
{7050C7CF-7551-48BE-8E57-92235906C13A}.Release|x64.Build.0 = Release|x64
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Debug|Win32.ActiveCfg = Debug|Win32
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Debug|Win32.Build.0 = Debug|Win32
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Debug|x64.ActiveCfg = Debug|x64
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Debug|x64.Build.0 = Debug|x64
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Release|Win32.ActiveCfg = Release|Win32
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Release|Win32.Build.0 = Release|Win32
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Release|x64.ActiveCfg = Release|x64
{02DC8A9B-DEF7-403B-8AE3-EF9680937D96}.Release|x64.Build.0 = Release|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|Win32.ActiveCfg = Debug|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|Win32.Build.0 = Debug|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|x64.ActiveCfg = Debug|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|x64.Build.0 = Debug|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|Win32.ActiveCfg = Release|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|Win32.Build.0 = Release|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|x64.ActiveCfg = Release|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|x64.Build.0 = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.ActiveCfg = Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.Build.0 = Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.ActiveCfg = Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.Build.0 = Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.ActiveCfg = Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.Build.0 = Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.Build.0 = Release|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|Win32.ActiveCfg = Debug|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|Win32.Build.0 = Debug|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|x64.ActiveCfg = Debug|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|x64.Build.0 = Debug|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|Win32.ActiveCfg = Release|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|Win32.Build.0 = Release|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|x64.ActiveCfg = Release|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

2
alethzero/MainWin.cpp

@ -279,7 +279,7 @@ void Main::on_connect_triggered()
if (ok && s.contains(":"))
{
string host = s.section(":", 0, 0).toStdString();
ushort port = s.section(":", 1).toInt();
unsigned short port = s.section(":", 1).toInt();
m_client->connect(host, port);
}
}

14
eth/main.cpp

@ -42,7 +42,7 @@ bytes contents(std::string const& _file)
return bytes();
// get length of file:
is.seekg (0, is.end);
int length = is.tellg();
streamoff length = is.tellg();
is.seekg (0, is.beg);
bytes ret(length);
is.read((char*)ret.data(), length);
@ -99,9 +99,9 @@ void version()
int main(int argc, char** argv)
{
ushort listenPort = 30303;
unsigned short listenPort = 30303;
string remoteHost;
ushort remotePort = 30303;
unsigned short remotePort = 30303;
bool interactive = false;
string dbPath;
eth::uint mining = ~(eth::uint)0;
@ -137,13 +137,13 @@ int main(int argc, char** argv)
{
string arg = argv[i];
if ((arg == "-l" || arg == "--listen" || arg == "--listen-port") && i + 1 < argc)
listenPort = atoi(argv[++i]);
listenPort = (short)atoi(argv[++i]);
else if ((arg == "-u" || arg == "--public-ip" || arg == "--public") && i + 1 < argc)
publicIP = argv[++i];
else if ((arg == "-r" || arg == "--remote") && i + 1 < argc)
remoteHost = argv[++i];
else if ((arg == "-p" || arg == "--port") && i + 1 < argc)
remotePort = atoi(argv[++i]);
remotePort = (short)atoi(argv[++i]);
else if ((arg == "-n" || arg == "--upnp") && i + 1 < argc)
{
string m = argv[++i];
@ -226,14 +226,14 @@ int main(int argc, char** argv)
{
eth::uint port;
cin >> port;
c.startNetwork(port);
c.startNetwork((short)port);
}
else if (cmd == "connect")
{
string addr;
eth::uint port;
cin >> addr >> port;
c.connect(addr, port);
c.connect(addr, (short)port);
}
else if (cmd == "netstop")
{

4
libethereum/BlockChain.h

@ -56,8 +56,8 @@ class Overlay;
class AlreadyHaveBlock: public std::exception {};
class UnknownParent: public std::exception {};
struct BlockChainChat: public LogChannel { static const char constexpr* name = "-B-"; static const int verbosity = 7; };
struct BlockChainNote: public LogChannel { static const char constexpr* name = "=B="; static const int verbosity = 4; };
struct BlockChainChat: public LogChannel { static const char* name() { return "-B-"; } static const int verbosity = 7; };
struct BlockChainNote: public LogChannel { static const char* name() { return "=B="; } static const int verbosity = 4; };
/**
* @brief Implements the blockchain database. All data this gives is disk-backed.

4
libethereum/Client.cpp

@ -60,7 +60,7 @@ Client::~Client()
this_thread::sleep_for(chrono::milliseconds(10));
}
void Client::startNetwork(ushort _listenPort, std::string const& _seedHost, ushort _port, NodeMode _mode, unsigned _peers, string const& _publicIP, bool _upnp)
void Client::startNetwork(unsigned short _listenPort, std::string const& _seedHost, unsigned short _port, NodeMode _mode, unsigned _peers, string const& _publicIP, bool _upnp)
{
if (m_net)
return;
@ -70,7 +70,7 @@ void Client::startNetwork(ushort _listenPort, std::string const& _seedHost, usho
connect(_seedHost, _port);
}
void Client::connect(std::string const& _seedHost, ushort _port)
void Client::connect(std::string const& _seedHost, unsigned short _port)
{
if (!m_net)
return;

6
libethereum/Client.h

@ -103,12 +103,12 @@ public:
/// Get information on the current peer set.
std::vector<PeerInfo> peers() { return m_net ? m_net->peers() : std::vector<PeerInfo>(); }
/// Same as peers().size(), but more efficient.
unsigned peerCount() const { return m_net ? m_net->peerCount() : 0; }
size_t peerCount() const { return m_net ? m_net->peerCount() : 0; }
/// Start the network subsystem.
void startNetwork(ushort _listenPort = 30303, std::string const& _seedHost = std::string(), ushort _port = 30303, NodeMode _mode = NodeMode::Full, unsigned _peers = 5, std::string const& _publicIP = std::string(), bool _upnp = true);
void startNetwork(unsigned short _listenPort = 30303, std::string const& _seedHost = std::string(), unsigned short _port = 30303, NodeMode _mode = NodeMode::Full, unsigned _peers = 5, std::string const& _publicIP = std::string(), bool _upnp = true);
/// Connect to a particular peer.
void connect(std::string const& _seedHost, ushort _port = 30303);
void connect(std::string const& _seedHost, unsigned short _port = 30303);
/// Stop the network subsystem.
void stopNetwork();
/// Get access to the peer server object. This will be null if the network isn't online.

12
libethereum/Common.cpp

@ -36,7 +36,9 @@
#endif
#include "Exceptions.h"
using namespace std;
using namespace eth;
namespace eth
{
//#define ETH_ADDRESS_DEBUG 1
@ -191,13 +193,13 @@ KeyPair KeyPair::create()
{
secp256k1_start();
static std::mt19937_64 s_eng(time(0));
std::uniform_int_distribution<byte> d(0, 255);
std::uniform_int_distribution<uint16_t> d(0, 255);
for (int i = 0; i < 100; ++i)
{
h256 sec;
for (uint i = 0; i < 32; ++i)
sec[i] = d(s_eng);
for (unsigned i = 0; i < 32; ++i)
sec[i] = (byte)d(s_eng);
KeyPair ret(sec);
if (ret.address())
@ -281,3 +283,5 @@ std::string eth::formatBalance(u256 _b)
ret << _b << " wei";
return ret.str();
}
}

19
libethereum/Common.h

@ -28,6 +28,11 @@
#pragma warning(disable:4244)
#endif
#ifdef _MSC_VER
#define _ALLOW_KEYWORD_MACROS
#define noexcept throw()
#endif
#include <ctime>
#include <chrono>
#include <array>
@ -183,12 +188,12 @@ struct ThreadLocalLogName
extern ThreadLocalLogName t_logThreadName;
inline void setThreadName(char const* _n) { t_logThreadName.m_name.reset(new std::string(_n)); }
struct LogChannel { static const char constexpr* name = " "; static const int verbosity = 1; };
struct LeftChannel: public LogChannel { static const char constexpr* name = "<<<"; };
struct RightChannel: public LogChannel { static const char constexpr* name = ">>>"; };
struct WarnChannel: public LogChannel { static const char constexpr* name = "!!!"; static const int verbosity = 0; };
struct NoteChannel: public LogChannel { static const char constexpr* name = "***"; };
struct DebugChannel: public LogChannel { static const char constexpr* name = "---"; static const int verbosity = 7; };
struct LogChannel { static const char* name() { return " "; } static const int verbosity = 1; };
struct LeftChannel: public LogChannel { static const char* name() { return "<<<"; } };
struct RightChannel: public LogChannel { static const char* name() { return ">>>"; } };
struct WarnChannel: public LogChannel { static const char* name() { return "!!!"; } static const int verbosity = 0; };
struct NoteChannel: public LogChannel { static const char* name() { return "***"; } };
struct DebugChannel: public LogChannel { static const char* name() { return "---"; } static const int verbosity = 0; };
extern int g_logVerbosity;
extern std::function<void(std::string const&, char const*)> g_logPost;
@ -212,7 +217,7 @@ public:
sstr << Id::name << " [ " << buf << " | " << *(t_logThreadName.m_name.get()) << (_term ? " ] " : "");
}
}
~LogOutputStream() { if (Id::verbosity <= g_logVerbosity) g_logPost(sstr.str(), Id::name); }
~LogOutputStream() { if (Id::verbosity <= g_logVerbosity) g_logPost(sstr.str(), Id::name()); }
template <class T> LogOutputStream& operator<<(T const& _t) { if (Id::verbosity <= g_logVerbosity) { if (_AutoSpacing && sstr.str().size() && sstr.str().back() != ' ') sstr << " "; sstr << _t; } return *this; }
std::stringstream sstr;
};

2
libethereum/FileSystem.cpp

@ -39,7 +39,9 @@ std::string eth::getDataDir()
return (boost::filesystem::path(path) / "Ethereum").string();
else
{
#ifndef _MSC_VER // todo?
cwarn << "getDataDir(): SHGetSpecialFolderPathA() failed.";
#endif
throw std::runtime_error("getDataDir() - SHGetSpecialFolderPathA() failed.");
}
#else

19
libethereum/LibEthereum.props

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(IncludePath);../../boost_1_55_0;../../leveldb-1.15.0/include;../../cryptopp562;../../secp256k1/include</IncludePath>
<OutDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir>
<IntDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>4100;4127;4505;4512;</DisableSpecificWarnings>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

32
libethereum/LibEthereum.vcxproj.filters

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="TransactionQueue.h" />
<ClInclude Include="Trie.h" />
<ClInclude Include="vector_ref.h" />
<ClInclude Include="AddressState.h" />
<ClInclude Include="BlockChain.h" />
<ClInclude Include="BlockInfo.h" />
<ClInclude Include="Common.h" />
<ClInclude Include="Dagger.h" />
<ClInclude Include="Exceptions.h" />
<ClInclude Include="Instruction.h" />
<ClInclude Include="PeerNetwork.h" />
<ClInclude Include="RLP.h" />
<ClInclude Include="State.h" />
<ClInclude Include="Transaction.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Trie.cpp" />
<ClCompile Include="AddressState.cpp" />
<ClCompile Include="BlockChain.cpp" />
<ClCompile Include="BlockInfo.cpp" />
<ClCompile Include="Common.cpp" />
<ClCompile Include="Dagger.cpp" />
<ClCompile Include="PeerNetwork.cpp" />
<ClCompile Include="RLP.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="Transaction.cpp" />
<ClCompile Include="TransactionQueue.cpp" />
</ItemGroup>
</Project>

22
libethereum/PeerNetwork.cpp

@ -80,7 +80,7 @@ bool eth::isPrivateAddress(bi::address _addressToCheck)
return false;
}
PeerSession::PeerSession(PeerServer* _s, bi::tcp::socket _socket, uint _rNId, bi::address _peerAddress, ushort _peerPort):
PeerSession::PeerSession(PeerServer* _s, bi::tcp::socket _socket, uint _rNId, bi::address _peerAddress, unsigned short _peerPort):
m_server(_s),
m_socket(std::move(_socket)),
m_reqNetworkId(_rNId),
@ -137,7 +137,7 @@ bool PeerSession::interpret(RLP const& _r)
m_networkId = _r[2].toInt<uint>();
auto clientVersion = _r[3].toString();
m_caps = _r[4].toInt<uint>();
m_listenPort = _r[5].toInt<ushort>();
m_listenPort = _r[5].toInt<unsigned short>();
m_id = _r[6].toHash<h512>();
clogS(NetMessageSummary) << "Hello: " << clientVersion << "V[" << m_protocolVersion << "/" << m_networkId << "]" << m_id.abridged() << showbase << hex << m_caps << dec << m_listenPort;
@ -170,12 +170,12 @@ bool PeerSession::interpret(RLP const& _r)
// Grab their block chain off them.
{
clogS(NetAllDetail) << "Want chain. Latest:" << m_server->m_latestBlockSent << ", number:" << m_server->m_chain->details(m_server->m_latestBlockSent).number;
unsigned count = std::min<unsigned>(c_maxHashes, m_server->m_chain->details(m_server->m_latestBlockSent).number + 1);
uint count = std::min(c_maxHashes, m_server->m_chain->details(m_server->m_latestBlockSent).number + 1);
RLPStream s;
prep(s).appendList(2 + count);
s << GetChainPacket;
auto h = m_server->m_latestBlockSent;
for (unsigned i = 0; i < count; ++i, h = m_server->m_chain->details(h).parent)
for (uint i = 0; i < count; ++i, h = m_server->m_chain->details(h).parent)
{
clogS(NetAllDetail) << " " << i << ":" << h;
s << h;
@ -407,12 +407,12 @@ bool PeerSession::interpret(RLP const& _r)
}
else
{
unsigned count = std::min<unsigned>(c_maxHashes, m_server->m_chain->details(noGood).number);
uint count = std::min(c_maxHashes, m_server->m_chain->details(noGood).number);
RLPStream s;
prep(s).appendList(2 + count);
s << GetChainPacket;
auto h = m_server->m_chain->details(noGood).parent;
for (unsigned i = 0; i < count; ++i, h = m_server->m_chain->details(h).parent)
for (uint i = 0; i < count; ++i, h = m_server->m_chain->details(h).parent)
s << h;
s << c_maxBlocksAsk;
sealAndSend(s);
@ -450,7 +450,7 @@ void PeerServer::seal(bytes& _b)
_b[1] = 0x40;
_b[2] = 0x08;
_b[3] = 0x91;
uint32_t len = _b.size() - 8;
uint32_t len = (uint32_t)_b.size() - 8;
_b[4] = (len >> 24) & 0xff;
_b[5] = (len >> 16) & 0xff;
_b[6] = (len >> 8) & 0xff;
@ -635,7 +635,7 @@ void PeerSession::doRead()
});
}
PeerServer::PeerServer(std::string const& _clientVersion, BlockChain const& _ch, uint _networkId, ushort _port, NodeMode _m, string const& _publicAddress, bool _upnp):
PeerServer::PeerServer(std::string const& _clientVersion, BlockChain const& _ch, uint _networkId, unsigned short _port, NodeMode _m, string const& _publicAddress, bool _upnp):
m_clientVersion(_clientVersion),
m_mode(_m),
m_listenPort(_port),
@ -698,10 +698,10 @@ void PeerServer::determinePublic(string const& _publicAddress, bool _upnp)
auto eip = m_upnp->externalIP();
if (eip == string("0.0.0.0") && _publicAddress.empty())
m_public = bi::tcp::endpoint(bi::address(), p);
m_public = bi::tcp::endpoint(bi::address(), (unsigned short)p);
else
{
m_public = bi::tcp::endpoint(bi::address::from_string(_publicAddress.empty() ? eip : _publicAddress), p);
m_public = bi::tcp::endpoint(bi::address::from_string(_publicAddress.empty() ? eip : _publicAddress), (unsigned short)p);
m_addresses.push_back(m_public.address().to_v4());
}
}
@ -831,7 +831,7 @@ void PeerServer::ensureAccepting()
}
}
void PeerServer::connect(std::string const& _addr, ushort _port) noexcept
void PeerServer::connect(std::string const& _addr, unsigned short _port) noexcept
{
try
{

32
libethereum/PeerNetwork.h

@ -40,13 +40,13 @@ bool isPrivateAddress(bi::address _addressToCheck);
class BlockChain;
class TransactionQueue;
struct NetWarn: public LogChannel { static const char constexpr* name = "!N!"; static const int verbosity = 0; };
struct NetNote: public LogChannel { static const char constexpr* name = "*N*"; static const int verbosity = 1; };
struct NetMessageSummary: public LogChannel { static const char constexpr* name = "-N-"; static const int verbosity = 2; };
struct NetMessageDetail: public LogChannel { static const char constexpr* name = "=N="; static const int verbosity = 3; };
struct NetAllDetail: public LogChannel { static const char constexpr* name = "=N="; static const int verbosity = 6; };
struct NetRight: public LogChannel { static const char constexpr* name = ">N>"; static const int verbosity = 8; };
struct NetLeft: public LogChannel { static const char constexpr* name = "<N<"; static const int verbosity = 9; };
struct NetWarn: public LogChannel { static const char* name() { return "!N!"; } static const int verbosity = 0; };
struct NetNote: public LogChannel { static const char* name() { return "*N*"; } static const int verbosity = 1; };
struct NetMessageSummary: public LogChannel { static const char* name() { return "-N-"; } static const int verbosity = 2; };
struct NetMessageDetail: public LogChannel { static const char* name() { return "=N="; } static const int verbosity = 3; };
struct NetAllDetail: public LogChannel { static const char* name() { return "=N="; } static const int verbosity = 6; };
struct NetRight: public LogChannel { static const char* name() { return ">N>"; } static const int verbosity = 8; };
struct NetLeft: public LogChannel { static const char* name() { return "<N<"; } static const int verbosity = 9; };
enum PacketType
{
@ -82,7 +82,7 @@ struct PeerInfo
{
std::string clientVersion;
std::string host;
ushort port;
unsigned short port;
std::chrono::steady_clock::duration lastPing;
};
@ -91,7 +91,7 @@ class PeerSession: public std::enable_shared_from_this<PeerSession>
friend class PeerServer;
public:
PeerSession(PeerServer* _server, bi::tcp::socket _socket, uint _rNId, bi::address _peerAddress, ushort _peerPort = 0);
PeerSession(PeerServer* _server, bi::tcp::socket _socket, uint _rNId, bi::address _peerAddress, unsigned short _peerPort = 0);
~PeerSession();
void start();
@ -127,14 +127,14 @@ private:
uint m_protocolVersion;
uint m_networkId;
uint m_reqNetworkId;
ushort m_listenPort; ///< Port that the remote client is listening on for connections. Useful for giving to peers.
unsigned short m_listenPort; ///< Port that the remote client is listening on for connections. Useful for giving to peers.
uint m_caps;
std::chrono::steady_clock::time_point m_ping;
std::chrono::steady_clock::time_point m_connect;
std::chrono::steady_clock::time_point m_disconnect;
unsigned m_rating;
uint m_rating;
bool m_requireTransactions;
std::set<h256> m_knownBlocks;
@ -155,13 +155,13 @@ class PeerServer
public:
/// Start server, listening for connections on the given port.
PeerServer(std::string const& _clientVersion, BlockChain const& _ch, uint _networkId, ushort _port, NodeMode _m = NodeMode::Full, std::string const& _publicAddress = std::string(), bool _upnp = true);
PeerServer(std::string const& _clientVersion, BlockChain const& _ch, uint _networkId, unsigned short _port, NodeMode _m = NodeMode::Full, std::string const& _publicAddress = std::string(), bool _upnp = true);
/// Start server, but don't listen.
PeerServer(std::string const& _clientVersion, uint _networkId, NodeMode _m = NodeMode::Full);
~PeerServer();
/// Connect to a peer explicitly.
void connect(std::string const& _addr, ushort _port = 30303) noexcept;
void connect(std::string const& _addr, unsigned short _port = 30303) noexcept;
void connect(bi::tcp::endpoint const& _ep);
/// Sync with the BlockChain. It might contain one of our mined blocks, we might have new candidates from the network.
@ -182,13 +182,13 @@ public:
std::vector<PeerInfo> peers() const;
/// Get number of peers connected; equivalent to, but faster than, peers().size().
unsigned peerCount() const { return m_peers.size(); }
size_t peerCount() const { return m_peers.size(); }
/// Ping the peers, to update the latency information.
void pingAll();
/// Get the port we're listening on currently.
ushort listenPort() const { return m_public.port(); }
unsigned short listenPort() const { return m_public.port(); }
bytes savePeers() const;
void restorePeers(bytesConstRef _b);
@ -209,7 +209,7 @@ private:
std::string m_clientVersion;
NodeMode m_mode = NodeMode::Full;
ushort m_listenPort;
unsigned short m_listenPort;
BlockChain const* m_chain = nullptr;
ba::io_service m_ioService;

10
libethereum/RLP.cpp

@ -102,9 +102,9 @@ bool RLP::isInt() const
else if (n == c_rlpDataImmLenStart)
return true;
else if (n <= c_rlpDataIndLenZero)
return m_data[1];
return m_data[1] != 0;
else if (n < c_rlpListStart)
return m_data[1 + n - c_rlpDataIndLenZero];
return m_data[1 + n - c_rlpDataIndLenZero] != 0;
else
return false;
return false;
@ -176,10 +176,10 @@ void RLPStream::noteAppended(uint _itemCount)
m_out.resize(os + encodeSize);
memmove(m_out.data() + p + encodeSize, m_out.data() + p, os - p);
if (s < c_rlpListImmLenCount)
m_out[p] = c_rlpListStart + s;
m_out[p] = (byte)(c_rlpListStart + s);
else
{
m_out[p] = c_rlpListIndLenZero + brs;
m_out[p] = (byte)(c_rlpListIndLenZero + brs);
byte* b = &(m_out[p + brs]);
for (; s; s >>= 8)
*(b--) = (byte)s;
@ -189,7 +189,7 @@ void RLPStream::noteAppended(uint _itemCount)
}
}
RLPStream& RLPStream::appendList(unsigned _items)
RLPStream& RLPStream::appendList(uint _items)
{
// cdebug << "appendList(" << _items << ")";
if (_items)

4
libethereum/RLP.h

@ -175,7 +175,7 @@ public:
std::string toStringStrict() const { if (!isData()) throw BadCast(); return payload().cropped(0, length()).toString(); }
template <class T> std::vector<T> toVector() const { std::vector<T> ret; if (isList()) { ret.reserve(itemCount()); for (auto const& i: *this) ret.push_back((T)i); } return ret; }
template <class T, size_t N> std::array<T, N> toArray() const { std::array<T, N> ret; if (itemCount() != N) throw BadCast(); if (isList()) for (uint i = 0; i < N; ++i) ret[i] = (T)operator[](i); return ret; }
template <class T, size_t N> std::array<T, N> toArray() const { if (itemCount() != N || !isList()) throw BadCast(); std::array<T, N> ret; for (uint i = 0; i < N; ++i) ret[i] = (T)operator[](i); return ret; }
/// Int conversion flags
enum
@ -288,7 +288,7 @@ public:
template <class _T, size_t S> RLPStream& append(std::array<_T, S> const& _s) { appendList(_s.size()); for (auto const& i: _s) append(i); return *this; }
/// Appends a list.
RLPStream& appendList(unsigned _items);
RLPStream& appendList(uint _items);
RLPStream& appendList(bytesConstRef _rlp);
RLPStream& appendList(bytes const& _rlp) { return appendList(&_rlp); }
RLPStream& appendList(RLPStream const& _s) { return appendList(&_s.out()); }

13
libethereum/State.cpp

@ -44,7 +44,8 @@
#include "Dagger.h"
#include "Defaults.h"
using namespace std;
using namespace eth;
namespace eth {
u256 const c_stepFee = 1;
u256 const c_dataFee = 20;
@ -286,7 +287,9 @@ bool State::cull(TransactionQueue& _tq) const
bool ret = false;
auto ts = _tq.transactions();
for (auto const& i: ts)
{
if (!m_transactions.count(i.first))
{
try
{
Transaction t(i.second);
@ -301,6 +304,8 @@ bool State::cull(TransactionQueue& _tq) const
_tq.drop(i.first);
ret = true;
}
}
}
return ret;
}
@ -310,7 +315,9 @@ bool State::sync(TransactionQueue& _tq)
bool ret = false;
auto ts = _tq.transactions();
for (auto const& i: ts)
{
if (!m_transactions.count(i.first))
{
// don't have it yet! Execute it now.
try
{
@ -332,6 +339,8 @@ bool State::sync(TransactionQueue& _tq)
_tq.drop(i.first);
ret = true;
}
}
}
return ret;
}
@ -1233,3 +1242,5 @@ void State::execute(Address _myAddress, Address _txSender, u256 _txValue, u256s
}
}
}
}

6
libethereum/TrieCommon.cpp

@ -110,14 +110,14 @@ std::string hexPrefixEncode(bytesConstRef _d1, uint _o1, bytesConstRef _d2, uint
return ret;
}
byte uniqueInUse(RLP const& _orig, byte _except)
byte uniqueInUse(RLP const& _orig, byte except)
{
byte used = 255;
for (unsigned i = 0; i < 17; ++i)
if (i != _except && !_orig[i].isEmpty())
if (i != except && !_orig[i].isEmpty())
{
if (used == 255)
used = i;
used = (byte)i;
else
return 255;
}

4
libethereum/TrieCommon.h

@ -66,7 +66,7 @@ inline bool isLeaf(RLP const& _twoItem)
{
assert(_twoItem.isList() && _twoItem.itemCount() == 2);
auto pl = _twoItem[0].payload();
return (pl[0] & 0x20);
return (pl[0] & 0x20) != 0;
}
inline NibbleSlice keyOf(bytesConstRef _hpe)
@ -84,7 +84,7 @@ inline NibbleSlice keyOf(RLP const& _twoItem)
return keyOf(_twoItem[0].payload());
}
byte uniqueInUse(RLP const& _orig, byte _except);
byte uniqueInUse(RLP const& _orig, byte except);
std::string hexPrefixEncode(bytes const& _hexVector, bool _leaf = false, int _begin = 0, int _end = -1);
std::string hexPrefixEncode(bytesConstRef _data, bool _leaf, int _beginNibble, int _endNibble, uint _offset);
std::string hexPrefixEncode(bytesConstRef _d1, uint _o1, bytesConstRef _d2, uint _o2, bool _leaf);

17
libethereum/TrieDB.h

@ -131,7 +131,7 @@ public:
iterator(GenericTrieDB const* _db)
{
m_that = _db;
m_trail.push_back(Node{_db->node(_db->m_root), std::string(1, '\0'), 255}); // one null byte is the HPE for the empty key.
m_trail.push_back({_db->node(_db->m_root), std::string(1, '\0'), 255}); // one null byte is the HPE for the empty key.
next();
}
@ -242,10 +242,13 @@ public:
else
{
// lead-on to another node - enter child.
m_trail.push_back(m_trail.back());
m_trail.back().key = hexPrefixEncode(keyOf(m_trail.back().key), NibbleSlice(bytesConstRef(&m_trail.back().child, 1), 1), false);
m_trail.back().rlp = m_that->deref(rlp[m_trail.back().child]);
m_trail.back().child = 255;
// fixed so that Node passed into push_back is constructed *before* m_trail is potentially resized (which invalidates back and rlp)
Node const& back = m_trail.back();
m_trail.push_back(Node{
m_that->deref(rlp[back.child]),
hexPrefixEncode(keyOf(back.key), NibbleSlice(bytesConstRef(&back.child, 1), 1), false),
255
});
break;
}
}
@ -727,10 +730,10 @@ template <class DB> bytes GenericTrieDB<DB>::cleve(RLP const& _orig, uint _s)
assert(_s && _s <= k.size());
RLPStream bottom(2);
bottom << hexPrefixEncode(k, isLeaf(_orig), _s) << _orig[1];
bottom << hexPrefixEncode(k, isLeaf(_orig), /*ugh*/(int)_s) << _orig[1];
RLPStream top(2);
top << hexPrefixEncode(k, false, 0, _s);
top << hexPrefixEncode(k, false, 0, /*ugh*/(int)_s);
streamNode(top, bottom.out());
return top.out();

2
secp256k1/impl/num.h

@ -11,6 +11,8 @@
#include "num_gmp.h"
#elif defined(USE_NUM_OPENSSL)
#include "num_openssl.h"
#elif defined(USE_NUM_BOOST)
#include "num_boost.h"
#else
#error "Please select num implementation"
#endif

212
secp256k1/impl/num_boost.h

@ -0,0 +1,212 @@
// Copyright (c) 2014 Tim Hughes
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef _SECP256K1_NUM_REPR_IMPL_H_
#define _SECP256K1_NUM_REPR_IMPL_H_
#include <assert.h>
#include <boost/math/common_factor.hpp>
void static secp256k1_num_init(secp256k1_num_t *r)
{
*r = 0;
}
void static secp256k1_num_free(secp256k1_num_t*)
{
}
void static secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a)
{
*r = *a;
}
int static secp256k1_num_bits(const secp256k1_num_t *a)
{
int numLimbs = a->backend().size();
int ret = (numLimbs - 1) * a->backend().limb_bits;
for (auto x = a->backend().limbs()[numLimbs - 1]; x; x >>= 1, ++ret);
return ret;
}
void static secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num_t *a)
{
for (auto n = abs(*a); n; n >>= 8)
{
assert(rlen > 0); // out of space?
r[--rlen] = n.convert_to<unsigned char>();
}
memset(r, 0, rlen);
}
void static secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, unsigned int alen)
{
*r = 0;
for (unsigned int i = 0; i != alen; ++i)
{
*r <<= 8;
*r |= a[i];
}
}
void static secp256k1_num_set_int(secp256k1_num_t *r, int a)
{
*r = a;
}
void static secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m)
{
*r %= *m;
}
void static secp256k1_num_mod_inverse(secp256k1_num_t *r, const secp256k1_num_t *n, const secp256k1_num_t *m)
{
// http://rosettacode.org/wiki/Modular_inverse
secp256k1_num_t a = *n;
secp256k1_num_t b = *m;
secp256k1_num_t x0 = 0;
secp256k1_num_t x1 = 1;
assert(*n > 0);
assert(*m > 0);
if (b != 1)
{
secp256k1_num_t q, t;
while (a > 1)
{
boost::multiprecision::divide_qr(a, b, q, t);
a = b; b = t;
t = x1 - q * x0;
x1 = x0; x0 = t;
}
if (x1 < 0)
{
x1 += *m;
}
}
*r = x1;
// check result
#ifdef _DEBUG
{
typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>> bignum;
bignum br = *r, bn = *n, bm = *m;
assert((((bn) * (br)) % bm) == 1);
}
#endif
}
int static secp256k1_num_is_zero(const secp256k1_num_t *a)
{
return a->is_zero();
}
int static secp256k1_num_is_odd(const secp256k1_num_t *a)
{
return boost::multiprecision::bit_test(*a, 0);
}
int static secp256k1_num_is_neg(const secp256k1_num_t *a)
{
return a->backend().isneg();
}
int static secp256k1_num_cmp(const secp256k1_num_t *a, const secp256k1_num_t *b)
{
return a->backend().compare_unsigned(b->backend());
}
void static secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b)
{
*r = (*a) + (*b);
}
void static secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b)
{
*r = (*a) - (*b);
}
void static secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b)
{
*r = (*a) * (*b);
}
void static secp256k1_num_div(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b)
{
*r = (*a) / (*b);
}
void static secp256k1_num_mod_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, const secp256k1_num_t *m)
{
secp256k1_num_mul(r, a, b);
secp256k1_num_mod(r, m);
}
int static secp256k1_num_shift(secp256k1_num_t *r, int bits)
{
unsigned ret = r->convert_to<unsigned>() & ((1 << bits) - 1);
*r >>= bits;
return ret;
}
int static secp256k1_num_get_bit(const secp256k1_num_t *a, int pos)
{
return boost::multiprecision::bit_test(*a, pos);
}
void static secp256k1_num_inc(secp256k1_num_t *r)
{
++*r;
}
void static secp256k1_num_set_hex(secp256k1_num_t *r, const char *a, int alen)
{
static const unsigned char cvt[256] = {
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 1, 2, 3, 4, 5, 6,7,8,9,0,0,0,0,0,0,
0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0
};
*r = 0;
for (int i = 0; i != alen; ++i)
{
*r <<= 4;
*r |= cvt[a[i]];
}
}
void static secp256k1_num_get_hex(char *r, int rlen, const secp256k1_num_t *a)
{
static const unsigned char cvt[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
for (auto n = *a; n; n >>= 4)
{
assert(rlen > 0); // out of space?
r[--rlen] = cvt[n.convert_to<unsigned char>() & 15];
}
memset(r, '0', rlen);
}
void static secp256k1_num_split(secp256k1_num_t *rl, secp256k1_num_t *rh, const secp256k1_num_t *a, int bits)
{
*rl = *a & ((secp256k1_num_t(1) << bits) - 1);
*rh = *a >> bits;
}
void static secp256k1_num_negate(secp256k1_num_t *r)
{
r->backend().negate();
}
#endif

2
secp256k1/num.h

@ -9,6 +9,8 @@
#include "num_gmp.h"
#elif defined(USE_NUM_OPENSSL)
#include "num_openssl.h"
#elif defined(USE_NUM_BOOST)
#include "num_boost.h"
#else
#error "Please select num implementation"
#endif

12
secp256k1/num_boost.h

@ -0,0 +1,12 @@
// Copyright (c) 2013 Pieter Wuille
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef _SECP256K1_NUM_REPR_
#define _SECP256K1_NUM_REPR_
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>> secp256k1_num_t ;
#endif

8
secp256k1/secp256k1.c

@ -8,6 +8,10 @@
#include "impl/ecmult.h"
#include "impl/ecdsa.h"
#ifdef __cplusplus
extern "C" {
#endif
void secp256k1_start(void) {
secp256k1_fe_start();
secp256k1_ge_start();
@ -267,3 +271,7 @@ int secp256k1_ecdsa_privkey_import(unsigned char *seckey, const unsigned char *p
secp256k1_num_free(&key);
return ret;
}
#ifdef __cplusplus
}
#endif

470
secp256k1/tests.c

@ -0,0 +1,470 @@
// Copyright (c) 2013 Pieter Wuille
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined HAVE_CONFIG_H
#include "libsecp256k1-config.h"
#endif
#include <assert.h>
#include <stdio.h>
#include "impl/num.h"
#include "impl/field.h"
#include "impl/group.h"
#include "impl/ecmult.h"
#include "impl/ecdsa.h"
#include "impl/util.h"
#ifdef ENABLE_OPENSSL_TESTS
#include "openssl/bn.h"
#include "openssl/ec.h"
#include "openssl/ecdsa.h"
#include "openssl/obj_mac.h"
#endif
static int count = 100;
/***** NUM TESTS *****/
void random_num_negate(secp256k1_num_t *num) {
if (secp256k1_rand32() & 1)
secp256k1_num_negate(num);
}
void random_num_order_test(secp256k1_num_t *num) {
do {
unsigned char b32[32];
secp256k1_rand256_test(b32);
secp256k1_num_set_bin(num, b32, 32);
if (secp256k1_num_is_zero(num))
continue;
if (secp256k1_num_cmp(num, &secp256k1_ge_consts->order) >= 0)
continue;
break;
} while(1);
}
void random_num_order(secp256k1_num_t *num) {
do {
unsigned char b32[32];
secp256k1_rand256(b32);
secp256k1_num_set_bin(num, b32, 32);
if (secp256k1_num_is_zero(num))
continue;
if (secp256k1_num_cmp(num, &secp256k1_ge_consts->order) >= 0)
continue;
break;
} while(1);
}
void test_num_copy_inc_cmp() {
secp256k1_num_t n1,n2;
secp256k1_num_init(&n1);
secp256k1_num_init(&n2);
random_num_order(&n1);
secp256k1_num_copy(&n2, &n1);
assert(secp256k1_num_cmp(&n1, &n2) == 0);
assert(secp256k1_num_cmp(&n2, &n1) == 0);
secp256k1_num_inc(&n2);
assert(secp256k1_num_cmp(&n1, &n2) != 0);
assert(secp256k1_num_cmp(&n2, &n1) != 0);
secp256k1_num_free(&n1);
secp256k1_num_free(&n2);
}
void test_num_get_set_hex() {
secp256k1_num_t n1,n2;
secp256k1_num_init(&n1);
secp256k1_num_init(&n2);
random_num_order_test(&n1);
char c[64];
secp256k1_num_get_hex(c, 64, &n1);
secp256k1_num_set_hex(&n2, c, 64);
assert(secp256k1_num_cmp(&n1, &n2) == 0);
for (int i=0; i<64; i++) {
// check whether the lower 4 bits correspond to the last hex character
int low1 = secp256k1_num_shift(&n1, 4);
int lowh = c[63];
int low2 = (lowh>>6)*9+(lowh-'0')&15;
assert(low1 == low2);
// shift bits off the hex representation, and compare
memmove(c+1, c, 63);
c[0] = '0';
secp256k1_num_set_hex(&n2, c, 64);
assert(secp256k1_num_cmp(&n1, &n2) == 0);
}
secp256k1_num_free(&n2);
secp256k1_num_free(&n1);
}
void test_num_get_set_bin() {
secp256k1_num_t n1,n2;
secp256k1_num_init(&n1);
secp256k1_num_init(&n2);
random_num_order_test(&n1);
unsigned char c[32];
secp256k1_num_get_bin(c, 32, &n1);
secp256k1_num_set_bin(&n2, c, 32);
assert(secp256k1_num_cmp(&n1, &n2) == 0);
for (int i=0; i<32; i++) {
// check whether the lower 8 bits correspond to the last byte
int low1 = secp256k1_num_shift(&n1, 8);
int low2 = c[31];
assert(low1 == low2);
// shift bits off the byte representation, and compare
memmove(c+1, c, 31);
c[0] = 0;
secp256k1_num_set_bin(&n2, c, 32);
assert(secp256k1_num_cmp(&n1, &n2) == 0);
}
secp256k1_num_free(&n2);
secp256k1_num_free(&n1);
}
void run_num_int() {
secp256k1_num_t n1;
secp256k1_num_init(&n1);
for (int i=-255; i<256; i++) {
unsigned char c1[3] = {};
c1[2] = abs(i);
unsigned char c2[3] = {0x11,0x22,0x33};
secp256k1_num_set_int(&n1, i);
secp256k1_num_get_bin(c2, 3, &n1);
assert(memcmp(c1, c2, 3) == 0);
}
secp256k1_num_free(&n1);
}
void test_num_negate() {
secp256k1_num_t n1;
secp256k1_num_t n2;
secp256k1_num_init(&n1);
secp256k1_num_init(&n2);
random_num_order_test(&n1); // n1 = R
random_num_negate(&n1);
secp256k1_num_copy(&n2, &n1); // n2 = R
secp256k1_num_sub(&n1, &n2, &n1); // n1 = n2-n1 = 0
assert(secp256k1_num_is_zero(&n1));
secp256k1_num_copy(&n1, &n2); // n1 = R
secp256k1_num_negate(&n1); // n1 = -R
assert(!secp256k1_num_is_zero(&n1));
secp256k1_num_add(&n1, &n2, &n1); // n1 = n2+n1 = 0
assert(secp256k1_num_is_zero(&n1));
secp256k1_num_copy(&n1, &n2); // n1 = R
secp256k1_num_negate(&n1); // n1 = -R
assert(secp256k1_num_is_neg(&n1) != secp256k1_num_is_neg(&n2));
secp256k1_num_negate(&n1); // n1 = R
assert(secp256k1_num_cmp(&n1, &n2) == 0);
assert(secp256k1_num_is_neg(&n1) == secp256k1_num_is_neg(&n2));
secp256k1_num_free(&n2);
secp256k1_num_free(&n1);
}
void test_num_add_sub() {
secp256k1_num_t n1;
secp256k1_num_t n2;
secp256k1_num_init(&n1);
secp256k1_num_init(&n2);
random_num_order_test(&n1); // n1 = R1
random_num_negate(&n1);
random_num_order_test(&n2); // n2 = R2
random_num_negate(&n2);
secp256k1_num_t n1p2, n2p1, n1m2, n2m1;
secp256k1_num_init(&n1p2);
secp256k1_num_init(&n2p1);
secp256k1_num_init(&n1m2);
secp256k1_num_init(&n2m1);
secp256k1_num_add(&n1p2, &n1, &n2); // n1p2 = R1 + R2
secp256k1_num_add(&n2p1, &n2, &n1); // n2p1 = R2 + R1
secp256k1_num_sub(&n1m2, &n1, &n2); // n1m2 = R1 - R2
secp256k1_num_sub(&n2m1, &n2, &n1); // n2m1 = R2 - R1
assert(secp256k1_num_cmp(&n1p2, &n2p1) == 0);
assert(secp256k1_num_cmp(&n1p2, &n1m2) != 0);
secp256k1_num_negate(&n2m1); // n2m1 = -R2 + R1
assert(secp256k1_num_cmp(&n2m1, &n1m2) == 0);
assert(secp256k1_num_cmp(&n2m1, &n1) != 0);
secp256k1_num_add(&n2m1, &n2m1, &n2); // n2m1 = -R2 + R1 + R2 = R1
assert(secp256k1_num_cmp(&n2m1, &n1) == 0);
assert(secp256k1_num_cmp(&n2p1, &n1) != 0);
secp256k1_num_sub(&n2p1, &n2p1, &n2); // n2p1 = R2 + R1 - R2 = R1
assert(secp256k1_num_cmp(&n2p1, &n1) == 0);
secp256k1_num_free(&n2m1);
secp256k1_num_free(&n1m2);
secp256k1_num_free(&n2p1);
secp256k1_num_free(&n1p2);
secp256k1_num_free(&n2);
secp256k1_num_free(&n1);
}
void run_num_smalltests() {
for (int i=0; i<100*count; i++) {
test_num_copy_inc_cmp();
test_num_get_set_hex();
test_num_get_set_bin();
test_num_negate();
test_num_add_sub();
}
run_num_int();
}
void run_ecmult_chain() {
// random starting point A (on the curve)
secp256k1_fe_t ax; secp256k1_fe_set_hex(&ax, "8b30bbe9ae2a990696b22f670709dff3727fd8bc04d3362c6c7bf458e2846004", 64);
secp256k1_fe_t ay; secp256k1_fe_set_hex(&ay, "a357ae915c4a65281309edf20504740f0eb3343990216b4f81063cb65f2f7e0f", 64);
secp256k1_gej_t a; secp256k1_gej_set_xy(&a, &ax, &ay);
// two random initial factors xn and gn
secp256k1_num_t xn;
secp256k1_num_init(&xn);
secp256k1_num_set_hex(&xn, "84cc5452f7fde1edb4d38a8ce9b1b84ccef31f146e569be9705d357a42985407", 64);
secp256k1_num_t gn;
secp256k1_num_init(&gn);
secp256k1_num_set_hex(&gn, "a1e58d22553dcd42b23980625d4c57a96e9323d42b3152e5ca2c3990edc7c9de", 64);
// two small multipliers to be applied to xn and gn in every iteration:
secp256k1_num_t xf;
secp256k1_num_init(&xf);
secp256k1_num_set_hex(&xf, "1337", 4);
secp256k1_num_t gf;
secp256k1_num_init(&gf);
secp256k1_num_set_hex(&gf, "7113", 4);
// accumulators with the resulting coefficients to A and G
secp256k1_num_t ae;
secp256k1_num_init(&ae);
secp256k1_num_set_int(&ae, 1);
secp256k1_num_t ge;
secp256k1_num_init(&ge);
secp256k1_num_set_int(&ge, 0);
// the point being computed
secp256k1_gej_t x = a;
const secp256k1_num_t *order = &secp256k1_ge_consts->order;
for (int i=0; i<200*count; i++) {
// in each iteration, compute X = xn*X + gn*G;
secp256k1_ecmult(&x, &x, &xn, &gn);
// also compute ae and ge: the actual accumulated factors for A and G
// if X was (ae*A+ge*G), xn*X + gn*G results in (xn*ae*A + (xn*ge+gn)*G)
secp256k1_num_mod_mul(&ae, &ae, &xn, order);
secp256k1_num_mod_mul(&ge, &ge, &xn, order);
secp256k1_num_add(&ge, &ge, &gn);
secp256k1_num_mod(&ge, order);
// modify xn and gn
secp256k1_num_mod_mul(&xn, &xn, &xf, order);
secp256k1_num_mod_mul(&gn, &gn, &gf, order);
// verify
if (i == 19999) {
char res[132]; int resl = 132;
secp256k1_gej_get_hex(res, &resl, &x);
assert(strcmp(res, "(D6E96687F9B10D092A6F35439D86CEBEA4535D0D409F53586440BD74B933E830,B95CBCA2C77DA786539BE8FD53354D2D3B4F566AE658045407ED6015EE1B2A88)") == 0);
}
}
// redo the computation, but directly with the resulting ae and ge coefficients:
secp256k1_gej_t x2; secp256k1_ecmult(&x2, &a, &ae, &ge);
char res[132]; int resl = 132;
char res2[132]; int resl2 = 132;
secp256k1_gej_get_hex(res, &resl, &x);
secp256k1_gej_get_hex(res2, &resl2, &x2);
assert(strcmp(res, res2) == 0);
assert(strlen(res) == 131);
secp256k1_num_free(&xn);
secp256k1_num_free(&gn);
secp256k1_num_free(&xf);
secp256k1_num_free(&gf);
secp256k1_num_free(&ae);
secp256k1_num_free(&ge);
}
void test_point_times_order(const secp256k1_gej_t *point) {
// either the point is not on the curve, or multiplying it by the order results in O
if (!secp256k1_gej_is_valid(point))
return;
const secp256k1_num_t *order = &secp256k1_ge_consts->order;
secp256k1_num_t zero;
secp256k1_num_init(&zero);
secp256k1_num_set_int(&zero, 0);
secp256k1_gej_t res;
secp256k1_ecmult(&res, point, order, order); // calc res = order * point + order * G;
assert(secp256k1_gej_is_infinity(&res));
secp256k1_num_free(&zero);
}
void run_point_times_order() {
secp256k1_fe_t x; secp256k1_fe_set_hex(&x, "02", 2);
for (int i=0; i<500; i++) {
secp256k1_ge_t p; secp256k1_ge_set_xo(&p, &x, 1);
secp256k1_gej_t j; secp256k1_gej_set_ge(&j, &p);
test_point_times_order(&j);
secp256k1_fe_sqr(&x, &x);
}
char c[65]; int cl=65;
secp256k1_fe_get_hex(c, &cl, &x);
assert(strcmp(c, "7603CB59B0EF6C63FE6084792A0C378CDB3233A80F8A9A09A877DEAD31B38C45") == 0);
}
void test_wnaf(const secp256k1_num_t *number, int w) {
secp256k1_num_t x, two, t;
secp256k1_num_init(&x);
secp256k1_num_init(&two);
secp256k1_num_init(&t);
secp256k1_num_set_int(&x, 0);
secp256k1_num_set_int(&two, 2);
int wnaf[257];
int bits = secp256k1_ecmult_wnaf(wnaf, number, w);
int zeroes = -1;
for (int i=bits-1; i>=0; i--) {
secp256k1_num_mul(&x, &x, &two);
int v = wnaf[i];
if (v) {
assert(zeroes == -1 || zeroes >= w-1); // check that distance between non-zero elements is at least w-1
zeroes=0;
assert((v & 1) == 1); // check non-zero elements are odd
assert(v <= (1 << (w-1)) - 1); // check range below
assert(v >= -(1 << (w-1)) - 1); // check range above
} else {
assert(zeroes != -1); // check that no unnecessary zero padding exists
zeroes++;
}
secp256k1_num_set_int(&t, v);
secp256k1_num_add(&x, &x, &t);
}
assert(secp256k1_num_cmp(&x, number) == 0); // check that wnaf represents number
secp256k1_num_free(&x);
secp256k1_num_free(&two);
secp256k1_num_free(&t);
}
void run_wnaf() {
secp256k1_num_t n;
secp256k1_num_init(&n);
for (int i=0; i<count; i++) {
random_num_order(&n);
if (i % 1)
secp256k1_num_negate(&n);
test_wnaf(&n, 4+(i%10));
}
secp256k1_num_free(&n);
}
void random_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_num_t *key, const secp256k1_num_t *msg, int *recid) {
secp256k1_num_t nonce;
secp256k1_num_init(&nonce);
do {
random_num_order_test(&nonce);
} while(!secp256k1_ecdsa_sig_sign(sig, key, msg, &nonce, recid));
secp256k1_num_free(&nonce);
}
void test_ecdsa_sign_verify() {
const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
secp256k1_num_t msg, key;
secp256k1_num_init(&msg);
random_num_order_test(&msg);
secp256k1_num_init(&key);
random_num_order_test(&key);
secp256k1_gej_t pubj; secp256k1_ecmult_gen(&pubj, &key);
secp256k1_ge_t pub; secp256k1_ge_set_gej(&pub, &pubj);
secp256k1_ecdsa_sig_t sig;
secp256k1_ecdsa_sig_init(&sig);
random_sign(&sig, &key, &msg, NULL);
assert(secp256k1_ecdsa_sig_verify(&sig, &pub, &msg));
secp256k1_num_inc(&msg);
assert(!secp256k1_ecdsa_sig_verify(&sig, &pub, &msg));
secp256k1_ecdsa_sig_free(&sig);
secp256k1_num_free(&msg);
secp256k1_num_free(&key);
}
void run_ecdsa_sign_verify() {
for (int i=0; i<10*count; i++) {
test_ecdsa_sign_verify();
}
}
#ifdef ENABLE_OPENSSL_TESTS
EC_KEY *get_openssl_key(const secp256k1_num_t *key) {
unsigned char privkey[300];
int privkeylen;
int compr = secp256k1_rand32() & 1;
const unsigned char* pbegin = privkey;
EC_KEY *ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);
assert(secp256k1_ecdsa_privkey_serialize(privkey, &privkeylen, key, compr));
assert(d2i_ECPrivateKey(&ec_key, &pbegin, privkeylen));
assert(EC_KEY_check_key(ec_key));
return ec_key;
}
void test_ecdsa_openssl() {
const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
secp256k1_num_t key, msg;
secp256k1_num_init(&msg);
unsigned char message[32];
secp256k1_rand256_test(message);
secp256k1_num_set_bin(&msg, message, 32);
secp256k1_num_init(&key);
random_num_order_test(&key);
secp256k1_gej_t qj;
secp256k1_ecmult_gen(&qj, &key);
secp256k1_ge_t q;
secp256k1_ge_set_gej(&q, &qj);
EC_KEY *ec_key = get_openssl_key(&key);
assert(ec_key);
unsigned char signature[80];
int sigsize = 80;
assert(ECDSA_sign(0, message, sizeof(message), signature, &sigsize, ec_key));
secp256k1_ecdsa_sig_t sig;
secp256k1_ecdsa_sig_init(&sig);
assert(secp256k1_ecdsa_sig_parse(&sig, signature, sigsize));
assert(secp256k1_ecdsa_sig_verify(&sig, &q, &msg));
secp256k1_num_inc(&sig.r);
assert(!secp256k1_ecdsa_sig_verify(&sig, &q, &msg));
random_sign(&sig, &key, &msg, NULL);
sigsize = 80;
assert(secp256k1_ecdsa_sig_serialize(signature, &sigsize, &sig));
assert(ECDSA_verify(0, message, sizeof(message), signature, sigsize, ec_key) == 1);
secp256k1_ecdsa_sig_free(&sig);
EC_KEY_free(ec_key);
secp256k1_num_free(&key);
secp256k1_num_free(&msg);
}
void run_ecdsa_openssl() {
for (int i=0; i<10*count; i++) {
test_ecdsa_openssl();
}
}
#endif
int main(int argc, char **argv) {
if (argc > 1)
count = strtol(argv[1], NULL, 0)*47;
printf("test count = %i\n", count);
// initialize
secp256k1_fe_start();
secp256k1_ge_start();
secp256k1_ecmult_start();
// num tests
run_num_smalltests();
// ecmult tests
run_wnaf();
run_point_times_order();
run_ecmult_chain();
// ecdsa tests
run_ecdsa_sign_verify();
#ifdef ENABLE_OPENSSL_TESTS
run_ecdsa_openssl();
#endif
// shutdown
secp256k1_ecmult_stop();
secp256k1_ge_stop();
secp256k1_fe_stop();
return 0;
}

8
test/crypto.cpp

@ -87,7 +87,7 @@ int cryptoTest()
ret = secp256k1_ecdsa_pubkey_create(pubkey.data(), &pubkeylen, privkey.data(), 1);
pubkey.resize(pubkeylen);
int good = secp256k1_ecdsa_pubkey_verify(pubkey.data(), pubkey.size());
int good = secp256k1_ecdsa_pubkey_verify(pubkey.data(), (int)pubkey.size());
cout << "PUB: " << dec << ret << " " << pubkeylen << " " << asHex(pubkey) << (good ? " GOOD" : " BAD") << endl;
}
@ -99,12 +99,12 @@ int cryptoTest()
cout << asHex(hmsg) << endl;
cout << asHex(privkey) << endl;
cout << hex << nonce << dec << endl;
int ret = secp256k1_ecdsa_sign_compact((byte const*)hmsg.data(), hmsg.size(), sig.data(), privkey.data(), (byte const*)&nonce, &v);
int ret = secp256k1_ecdsa_sign_compact((byte const*)hmsg.data(), (int)hmsg.size(), sig.data(), privkey.data(), (byte const*)&nonce, &v);
cout << "MYSIG: " << dec << ret << " " << sig.size() << " " << asHex(sig) << " " << v << endl;
bytes pubkey(65);
int pubkeylen = 65;
ret = secp256k1_ecdsa_recover_compact((byte const*)hmsg.data(), hmsg.size(), (byte const*)sig.data(), pubkey.data(), &pubkeylen, 0, v);
ret = secp256k1_ecdsa_recover_compact((byte const*)hmsg.data(), (int)hmsg.size(), (byte const*)sig.data(), pubkey.data(), &pubkeylen, 0, v);
pubkey.resize(pubkeylen);
cout << "MYREC: " << dec << ret << " " << pubkeylen << " " << asHex(pubkey) << endl;
}
@ -112,7 +112,7 @@ int cryptoTest()
{
bytes pubkey(65);
int pubkeylen = 65;
int ret = secp256k1_ecdsa_recover_compact((byte const*)hmsg.data(), hmsg.size(), (byte const*)sig64.data(), pubkey.data(), &pubkeylen, 0, (int)t.vrs.v - 27);
int ret = secp256k1_ecdsa_recover_compact((byte const*)hmsg.data(), (int)hmsg.size(), (byte const*)sig64.data(), pubkey.data(), &pubkeylen, 0, (int)t.vrs.v - 27);
pubkey.resize(pubkeylen);
cout << "RECPUB: " << dec << ret << " " << pubkeylen << " " << asHex(pubkey) << endl;
cout << "SENDER: " << hex << low160(eth::sha3(bytesConstRef(&pubkey).cropped(1))) << dec << endl;

10
test/dagger.cpp

@ -30,19 +30,17 @@ int daggerTest()
{
// Test dagger
{
Dagger d;
auto s = steady_clock::now();
cout << hex << d.eval((h256)1, (h256)0);
cout << hex << Dagger().eval((h256)1, (h256)0);
cout << " " << dec << duration_cast<milliseconds>(steady_clock::now() - s).count() << " ms" << endl;
cout << hex << d.eval((h256)1, (h256)1);
cout << hex << Dagger().eval((h256)1, (h256)1);
cout << " " << dec << duration_cast<milliseconds>(steady_clock::now() - s).count() << " ms" << endl;
}
{
Dagger d;
auto s = steady_clock::now();
cout << hex << d.eval((h256)1, (h256)0);
cout << hex << Dagger().eval((h256)1, (h256)0);
cout << " " << dec << duration_cast<milliseconds>(steady_clock::now() - s).count() << " ms" << endl;
cout << hex << d.eval((h256)1, (h256)1);
cout << hex << Dagger().eval((h256)1, (h256)1);
cout << " " << dec << duration_cast<milliseconds>(steady_clock::now() - s).count() << " ms" << endl;
}
return 0;

2
test/main.cpp

@ -34,7 +34,7 @@ int peerTest(int argc, char** argv);
#include <BlockInfo.h>
using namespace eth;
int main(int argc, char** argv)
int main(int, char**)
{
/* RLPStream s;
BlockInfo::genesis().fillStream(s, false);

4
test/peer.cpp

@ -38,11 +38,11 @@ int peerTest(int argc, char** argv)
{
string arg = argv[i];
if (arg == "-l" && i + 1 < argc)
listenPort = atoi(argv[++i]);
listenPort = (short)atoi(argv[++i]);
else if (arg == "-r" && i + 1 < argc)
remoteHost = argv[++i];
else if (arg == "-p" && i + 1 < argc)
remotePort = atoi(argv[++i]);
remotePort = (short)atoi(argv[++i]);
else
remoteHost = argv[i];
}

15
test/trie.cpp

@ -27,6 +27,11 @@
using namespace std;
using namespace eth;
inline h256 stringMapHash256(StringMap const& _s)
{
return hash256(_s);
}
int trieTest()
{
{
@ -42,13 +47,13 @@ int trieTest()
cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256({{"test", "test"}}) << endl;
cout << stringMapHash256({{"test", "test"}}) << endl;
t.insert(string("tesa"), string("testy"));
cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256({{"test", "test"}, {"te", "testy"}}) << endl;
cout << stringMapHash256({{"test", "test"}, {"te", "testy"}}) << endl;
cout << t.at(string("test")) << endl;
cout << t.at(string("te")) << endl;
cout << t.at(string("t")) << endl;
@ -56,7 +61,7 @@ int trieTest()
t.remove(string("te"));
cout << m;
cout << t.root() << endl;
cout << hash256({{"test", "test"}}) << endl;
cout << stringMapHash256({{"test", "test"}}) << endl;
t.remove(string("test"));
cout << m;
@ -72,7 +77,7 @@ int trieTest()
cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256({{"b", "B"}, {"a", "A"}}) << endl;
cout << stringMapHash256({{"b", "B"}, {"a", "A"}}) << endl;
cout << RLP(rlp256({{"b", "B"}, {"a", "A"}})) << endl;
}
{
@ -89,7 +94,7 @@ int trieTest()
cout << RLP(t.rlp()) << endl;
}
{
cout << hex << hash256({{"dog", "puppy"}, {"doe", "reindeer"}}) << endl;
cout << hex << stringMapHash256({{"dog", "puppy"}, {"doe", "reindeer"}}) << endl;
MemTrie t;
t.insert("dog", "puppy");
t.insert("doe", "reindeer");

6
test/vm.cpp

@ -21,6 +21,7 @@
*/
#include <boost/algorithm/string.hpp>
#include <boost/filesystem/operations.hpp>
#include <secp256k1.h>
#include <BlockChain.h>
#include <State.h>
@ -38,10 +39,11 @@ public:
{
c_genesisDifficulty = (u256)1;
string tmpDir = (boost::filesystem::temp_directory_path() / "vmTest").string();
KeyPair p = KeyPair::create();
Overlay o(State::openDB("/tmp/vmTest", true));
Overlay o(State::openDB(tmpDir, true));
State s(p.address(), o);
BlockChain bc("/tmp/vmTest", true);
BlockChain bc(tmpDir, true);
cout << s;

111
windows/Ethereum.sln

@ -0,0 +1,111 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{988F2383-FA1D-408B-BCF6-C0EE7AB0A560}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{6838FA95-01BF-4FF7-914C-FC209B81406E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibEthereum", "LibEthereum.vcxproj", "{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibLevelDB", "LibLevelDB.vcxproj", "{27014763-955D-486B-9BA7-69872192E6F4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibSecp256k1", "LibSecp256k1.vcxproj", "{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ethereum", "Ethereum.vcxproj", "{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSecp256k1", "TestSecp256k1.vcxproj", "{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestEthereum", "TestEthereum.vcxproj", "{3F3E389B-88DE-41D5-A73B-4F6036E18B36}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibCryptoPP", "LibCryptoPP.vcxproj", "{1CC213A4-3482-4211-B47B-172E90DAC7DE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibMiniUPnPc", "LibMiniUPnPc.vcxproj", "{1B1CA20E-39C3-4D9B-AC37-3783048E6672}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Debug|Win32.ActiveCfg = Debug|Win32
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Debug|Win32.Build.0 = Debug|Win32
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Debug|x64.ActiveCfg = Debug|x64
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Debug|x64.Build.0 = Debug|x64
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Release|Win32.ActiveCfg = Release|Win32
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Release|Win32.Build.0 = Release|Win32
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Release|x64.ActiveCfg = Release|x64
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}.Release|x64.Build.0 = Release|x64
{27014763-955D-486B-9BA7-69872192E6F4}.Debug|Win32.ActiveCfg = Debug|Win32
{27014763-955D-486B-9BA7-69872192E6F4}.Debug|Win32.Build.0 = Debug|Win32
{27014763-955D-486B-9BA7-69872192E6F4}.Debug|x64.ActiveCfg = Debug|x64
{27014763-955D-486B-9BA7-69872192E6F4}.Debug|x64.Build.0 = Debug|x64
{27014763-955D-486B-9BA7-69872192E6F4}.Release|Win32.ActiveCfg = Release|Win32
{27014763-955D-486B-9BA7-69872192E6F4}.Release|Win32.Build.0 = Release|Win32
{27014763-955D-486B-9BA7-69872192E6F4}.Release|x64.ActiveCfg = Release|x64
{27014763-955D-486B-9BA7-69872192E6F4}.Release|x64.Build.0 = Release|x64
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Debug|Win32.ActiveCfg = Debug|Win32
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Debug|Win32.Build.0 = Debug|Win32
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Debug|x64.ActiveCfg = Debug|x64
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Debug|x64.Build.0 = Debug|x64
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Release|Win32.ActiveCfg = Release|Win32
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Release|Win32.Build.0 = Release|Win32
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Release|x64.ActiveCfg = Release|x64
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}.Release|x64.Build.0 = Release|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|Win32.ActiveCfg = Debug|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|Win32.Build.0 = Debug|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|x64.ActiveCfg = Debug|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Debug|x64.Build.0 = Debug|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|Win32.ActiveCfg = Release|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|Win32.Build.0 = Release|Win32
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|x64.ActiveCfg = Release|x64
{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}.Release|x64.Build.0 = Release|x64
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Debug|Win32.ActiveCfg = Debug|Win32
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Debug|Win32.Build.0 = Debug|Win32
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Debug|x64.ActiveCfg = Debug|x64
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Debug|x64.Build.0 = Debug|x64
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Release|Win32.ActiveCfg = Release|Win32
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Release|Win32.Build.0 = Release|Win32
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Release|x64.ActiveCfg = Release|x64
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}.Release|x64.Build.0 = Release|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|Win32.ActiveCfg = Debug|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|Win32.Build.0 = Debug|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|x64.ActiveCfg = Debug|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Debug|x64.Build.0 = Debug|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|Win32.ActiveCfg = Release|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|Win32.Build.0 = Release|Win32
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|x64.ActiveCfg = Release|x64
{3F3E389B-88DE-41D5-A73B-4F6036E18B36}.Release|x64.Build.0 = Release|x64
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Debug|Win32.ActiveCfg = Debug|Win32
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Debug|Win32.Build.0 = Debug|Win32
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Debug|x64.ActiveCfg = Debug|x64
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Debug|x64.Build.0 = Debug|x64
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Release|Win32.ActiveCfg = Release|Win32
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Release|Win32.Build.0 = Release|Win32
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Release|x64.ActiveCfg = Release|x64
{1CC213A4-3482-4211-B47B-172E90DAC7DE}.Release|x64.Build.0 = Release|x64
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Debug|Win32.ActiveCfg = Debug|Win32
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Debug|Win32.Build.0 = Debug|Win32
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Debug|x64.ActiveCfg = Debug|x64
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Debug|x64.Build.0 = Debug|x64
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Release|Win32.ActiveCfg = Release|Win32
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Release|Win32.Build.0 = Release|Win32
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Release|x64.ActiveCfg = Release|x64
{1B1CA20E-39C3-4D9B-AC37-3783048E6672}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560}
{27014763-955D-486B-9BA7-69872192E6F4} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560}
{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560}
{1CC213A4-3482-4211-B47B-172E90DAC7DE} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560}
{1B1CA20E-39C3-4D9B-AC37-3783048E6672} = {988F2383-FA1D-408B-BCF6-C0EE7AB0A560}
{3BF049F8-AF7E-4E1C-9627-3E94C887AF24} = {6838FA95-01BF-4FF7-914C-FC209B81406E}
{3F3E389B-88DE-41D5-A73B-4F6036E18B36} = {6838FA95-01BF-4FF7-914C-FC209B81406E}
EndGlobalSection
EndGlobal

159
windows/Ethereum.vcxproj

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<RootNamespace>Ethereum</RootNamespace>
<ProjectName>Ethereum</ProjectName>
<ProjectGuid>{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<LargeAddressAware>true</LargeAddressAware>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<LargeAddressAware>true</LargeAddressAware>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\windows\LibEthereum.vcxproj">
<Project>{826e68cb-d3ee-4a8a-b540-59a8c3f38d4f}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\eth\main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

176
windows/LibCryptoPP.vcxproj

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\cryptopp\algparam.cpp" />
<ClCompile Include="..\..\cryptopp\cpu.cpp" />
<ClCompile Include="..\..\cryptopp\cryptlib.cpp" />
<ClCompile Include="..\..\cryptopp\filters.cpp" />
<ClCompile Include="..\..\cryptopp\fips140.cpp" />
<ClCompile Include="..\..\cryptopp\iterhash.cpp" />
<ClCompile Include="..\..\cryptopp\misc.cpp" />
<ClCompile Include="..\..\cryptopp\mqueue.cpp" />
<ClCompile Include="..\..\cryptopp\queue.cpp" />
<ClCompile Include="..\..\cryptopp\rdtables.cpp" />
<ClCompile Include="..\..\cryptopp\rijndael.cpp" />
<ClCompile Include="..\..\cryptopp\ripemd.cpp" />
<ClCompile Include="..\..\cryptopp\sha.cpp" />
<ClCompile Include="..\..\cryptopp\sha3.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\cryptopp\algparam.h" />
<ClInclude Include="..\..\cryptopp\cpu.h" />
<ClInclude Include="..\..\cryptopp\cryptlib.h" />
<ClInclude Include="..\..\cryptopp\filters.h" />
<ClInclude Include="..\..\cryptopp\fips140.h" />
<ClInclude Include="..\..\cryptopp\iterhash.h" />
<ClInclude Include="..\..\cryptopp\misc.h" />
<ClInclude Include="..\..\cryptopp\mqueue.h" />
<ClInclude Include="..\..\cryptopp\queue.h" />
<ClInclude Include="..\..\cryptopp\rijndael.h" />
<ClInclude Include="..\..\cryptopp\ripemd.h" />
<ClInclude Include="..\..\cryptopp\sha.h" />
<ClInclude Include="..\..\cryptopp\sha3.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\cryptopp\x64dll.asm">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /c /nologo /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /c /nologo /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)x64dll.obj</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)x64dll.obj</Outputs>
</CustomBuild>
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<RootNamespace>LibCryptoPP</RootNamespace>
<ProjectGuid>{1CC213A4-3482-4211-B47B-172E90DAC7DE}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

24
windows/LibEthereum.props

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>..\..\build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir>
<IntDir>..\..\build\$(ProjectName)\$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>4100;4127;4505;4512;4706</DisableSpecificWarnings>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalIncludeDirectories>include/$(ProjectName);../libethereum;../../boost;../../leveldb/include;../../cryptopp;../secp256k1;../../miniupnp</AdditionalIncludeDirectories>
<PreprocessorDefinitions>STATICLIB;LEVELDB_PLATFORM_WINDOWS;USE_NUM_BOOST;USE_FIELD_10X26;USE_FIELD_INV_BUILTIN;_WIN32_WINNT=0x0501;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>../../boost/stage/$(Platform)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

197
windows/LibEthereum.vcxproj

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\libethereum\AddressState.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\libethereum\BlockChain.cpp" />
<ClCompile Include="..\libethereum\BlockInfo.cpp" />
<ClCompile Include="..\libethereum\Client.cpp" />
<ClCompile Include="..\libethereum\Common.cpp" />
<ClCompile Include="..\libethereum\Dagger.cpp" />
<ClCompile Include="..\libethereum\Defaults.cpp" />
<ClCompile Include="..\libethereum\FileSystem.cpp" />
<ClCompile Include="..\libethereum\Instruction.cpp" />
<ClCompile Include="..\libethereum\MemTrie.cpp" />
<ClCompile Include="..\libethereum\PeerNetwork.cpp" />
<ClCompile Include="..\libethereum\RLP.cpp" />
<ClCompile Include="..\libethereum\State.cpp" />
<ClCompile Include="..\libethereum\Transaction.cpp" />
<ClCompile Include="..\libethereum\TransactionQueue.cpp" />
<ClCompile Include="..\libethereum\TrieCommon.cpp" />
<ClCompile Include="..\libethereum\TrieDB.cpp" />
<ClCompile Include="..\libethereum\TrieHash.cpp" />
<ClCompile Include="..\libethereum\UPnP.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\libethereum\AddressState.h" />
<ClInclude Include="..\libethereum\BlockChain.h" />
<ClInclude Include="..\libethereum\BlockInfo.h" />
<ClInclude Include="..\libethereum\Client.h" />
<ClInclude Include="..\libethereum\Common.h" />
<ClInclude Include="..\libethereum\Dagger.h" />
<ClInclude Include="..\libethereum\Defaults.h" />
<ClInclude Include="..\libethereum\Exceptions.h" />
<ClInclude Include="..\libethereum\FileSystem.h" />
<ClInclude Include="..\libethereum\Instruction.h" />
<ClInclude Include="..\libethereum\MemTrie.h" />
<ClInclude Include="..\libethereum\PeerNetwork.h" />
<ClInclude Include="..\libethereum\RLP.h" />
<ClInclude Include="..\libethereum\State.h" />
<ClInclude Include="..\libethereum\Transaction.h" />
<ClInclude Include="..\libethereum\TransactionQueue.h" />
<ClInclude Include="..\libethereum\TrieCommon.h" />
<ClInclude Include="..\libethereum\TrieDB.h" />
<ClInclude Include="..\libethereum\TrieHash.h" />
<ClInclude Include="..\libethereum\UPnP.h" />
<ClInclude Include="..\libethereum\vector_ref.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="LibCryptoPP.vcxproj">
<Project>{1cc213a4-3482-4211-b47b-172e90dac7de}</Project>
</ProjectReference>
<ProjectReference Include="LibLevelDB.vcxproj">
<Project>{27014763-955d-486b-9ba7-69872192e6f4}</Project>
</ProjectReference>
<ProjectReference Include="LibMiniUPnPc.vcxproj">
<Project>{1b1ca20e-39c3-4d9b-ac37-3783048e6672}</Project>
</ProjectReference>
<ProjectReference Include="LibSecp256k1.vcxproj">
<Project>{1e1175bb-c4a9-41d8-b2d1-9022f71d3cea}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{826E68CB-D3EE-4A8A-B540-59A8C3F38D4F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>LibEthereum</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib />
<ProjectReference />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

47
windows/LibEthereum.vcxproj.filters

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\libethereum\BlockInfo.cpp" />
<ClCompile Include="..\libethereum\Client.cpp" />
<ClCompile Include="..\libethereum\Common.cpp" />
<ClCompile Include="..\libethereum\Dagger.cpp" />
<ClCompile Include="..\libethereum\Defaults.cpp" />
<ClCompile Include="..\libethereum\FileSystem.cpp" />
<ClCompile Include="..\libethereum\MemTrie.cpp" />
<ClCompile Include="..\libethereum\PeerNetwork.cpp" />
<ClCompile Include="..\libethereum\RLP.cpp" />
<ClCompile Include="..\libethereum\State.cpp" />
<ClCompile Include="..\libethereum\Transaction.cpp" />
<ClCompile Include="..\libethereum\TransactionQueue.cpp" />
<ClCompile Include="..\libethereum\TrieCommon.cpp" />
<ClCompile Include="..\libethereum\TrieDB.cpp" />
<ClCompile Include="..\libethereum\TrieHash.cpp" />
<ClCompile Include="..\libethereum\UPnP.cpp" />
<ClCompile Include="..\libethereum\AddressState.cpp" />
<ClCompile Include="..\libethereum\BlockChain.cpp" />
<ClCompile Include="..\libethereum\Instruction.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\libethereum\BlockInfo.h" />
<ClInclude Include="..\libethereum\Client.h" />
<ClInclude Include="..\libethereum\Common.h" />
<ClInclude Include="..\libethereum\Dagger.h" />
<ClInclude Include="..\libethereum\Defaults.h" />
<ClInclude Include="..\libethereum\Exceptions.h" />
<ClInclude Include="..\libethereum\FileSystem.h" />
<ClInclude Include="..\libethereum\Instruction.h" />
<ClInclude Include="..\libethereum\MemTrie.h" />
<ClInclude Include="..\libethereum\PeerNetwork.h" />
<ClInclude Include="..\libethereum\RLP.h" />
<ClInclude Include="..\libethereum\State.h" />
<ClInclude Include="..\libethereum\Transaction.h" />
<ClInclude Include="..\libethereum\TransactionQueue.h" />
<ClInclude Include="..\libethereum\TrieCommon.h" />
<ClInclude Include="..\libethereum\TrieDB.h" />
<ClInclude Include="..\libethereum\TrieHash.h" />
<ClInclude Include="..\libethereum\UPnP.h" />
<ClInclude Include="..\libethereum\vector_ref.h" />
<ClInclude Include="..\libethereum\AddressState.h" />
<ClInclude Include="..\libethereum\BlockChain.h" />
</ItemGroup>
</Project>

223
windows/LibLevelDB.vcxproj

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\leveldb\db\builder.h" />
<ClInclude Include="..\..\leveldb\db\dbformat.h" />
<ClInclude Include="..\..\leveldb\db\db_impl.h" />
<ClInclude Include="..\..\leveldb\db\db_iter.h" />
<ClInclude Include="..\..\leveldb\db\filename.h" />
<ClInclude Include="..\..\leveldb\db\log_format.h" />
<ClInclude Include="..\..\leveldb\db\log_reader.h" />
<ClInclude Include="..\..\leveldb\db\log_writer.h" />
<ClInclude Include="..\..\leveldb\db\memtable.h" />
<ClInclude Include="..\..\leveldb\db\skiplist.h" />
<ClInclude Include="..\..\leveldb\db\snapshot.h" />
<ClInclude Include="..\..\leveldb\db\table_cache.h" />
<ClInclude Include="..\..\leveldb\db\version_edit.h" />
<ClInclude Include="..\..\leveldb\db\version_set.h" />
<ClInclude Include="..\..\leveldb\db\write_batch_internal.h" />
<ClInclude Include="..\..\leveldb\port\atomic_pointer.h" />
<ClInclude Include="..\..\leveldb\port\port.h" />
<ClInclude Include="..\..\leveldb\port\port_win.h" />
<ClInclude Include="..\..\leveldb\table\block.h" />
<ClInclude Include="..\..\leveldb\table\block_builder.h" />
<ClInclude Include="..\..\leveldb\table\format.h" />
<ClInclude Include="..\..\leveldb\table\iterator_wrapper.h" />
<ClInclude Include="..\..\leveldb\table\merger.h" />
<ClInclude Include="..\..\leveldb\table\two_level_iterator.h" />
<ClInclude Include="..\..\leveldb\util\arena.h" />
<ClInclude Include="..\..\leveldb\util\coding.h" />
<ClInclude Include="..\..\leveldb\util\crc32c.h" />
<ClInclude Include="..\..\leveldb\util\hash.h" />
<ClInclude Include="..\..\leveldb\util\histogram.h" />
<ClInclude Include="..\..\leveldb\util\logging.h" />
<ClInclude Include="..\..\leveldb\util\mutexlock.h" />
<ClInclude Include="..\..\leveldb\util\posix_logger.h" />
<ClInclude Include="..\..\leveldb\util\random.h" />
<ClInclude Include="..\..\leveldb\util\testharness.h" />
<ClInclude Include="..\..\leveldb\util\testutil.h" />
<ClInclude Include="..\..\leveldb\util\win_logger.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\leveldb\db\builder.cc" />
<ClCompile Include="..\..\leveldb\db\c.cc" />
<ClCompile Include="..\..\leveldb\db\dbformat.cc" />
<ClCompile Include="..\..\leveldb\db\db_bench.cc" />
<ClCompile Include="..\..\leveldb\db\db_impl.cc" />
<ClCompile Include="..\..\leveldb\db\db_iter.cc" />
<ClCompile Include="..\..\leveldb\db\filename.cc" />
<ClCompile Include="..\..\leveldb\db\log_reader.cc" />
<ClCompile Include="..\..\leveldb\db\log_writer.cc" />
<ClCompile Include="..\..\leveldb\db\memtable.cc" />
<ClCompile Include="..\..\leveldb\db\repair.cc" />
<ClCompile Include="..\..\leveldb\db\table_cache.cc" />
<ClCompile Include="..\..\leveldb\db\version_edit.cc" />
<ClCompile Include="..\..\leveldb\db\version_set.cc" />
<ClCompile Include="..\..\leveldb\db\write_batch.cc" />
<ClCompile Include="..\..\leveldb\port\port_win.cc" />
<ClCompile Include="..\..\leveldb\table\block.cc" />
<ClCompile Include="..\..\leveldb\table\block_builder.cc" />
<ClCompile Include="..\..\leveldb\table\format.cc" />
<ClCompile Include="..\..\leveldb\table\iterator.cc" />
<ClCompile Include="..\..\leveldb\table\merger.cc" />
<ClCompile Include="..\..\leveldb\table\table.cc" />
<ClCompile Include="..\..\leveldb\table\table_builder.cc" />
<ClCompile Include="..\..\leveldb\table\two_level_iterator.cc" />
<ClCompile Include="..\..\leveldb\util\arena.cc" />
<ClCompile Include="..\..\leveldb\util\cache.cc" />
<ClCompile Include="..\..\leveldb\util\coding.cc" />
<ClCompile Include="..\..\leveldb\util\comparator.cc" />
<ClCompile Include="..\..\leveldb\util\crc32c.cc" />
<ClCompile Include="..\..\leveldb\util\env.cc" />
<ClCompile Include="..\..\leveldb\util\env_boost.cc" />
<ClCompile Include="..\..\leveldb\util\hash.cc" />
<ClCompile Include="..\..\leveldb\util\histogram.cc" />
<ClCompile Include="..\..\leveldb\util\logging.cc" />
<ClCompile Include="..\..\leveldb\util\options.cc" />
<ClCompile Include="..\..\leveldb\util\status.cc" />
<ClCompile Include="..\..\leveldb\util\testharness.cc" />
<ClCompile Include="..\..\leveldb\util\testutil.cc" />
<ClCompile Include="..\..\leveldb\util\win_logger.cc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{27014763-955D-486B-9BA7-69872192E6F4}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>LibLevelDB</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);../../leveldb</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4018;4244;4267;4389;4702;4722;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

246
windows/LibLevelDB.vcxproj.filters

@ -0,0 +1,246 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="db">
<UniqueIdentifier>{d83904b1-b5d1-4c5b-b476-96f08300d103}</UniqueIdentifier>
</Filter>
<Filter Include="util">
<UniqueIdentifier>{72573022-b7fd-4b7a-a92e-a68c06bd6366}</UniqueIdentifier>
</Filter>
<Filter Include="table">
<UniqueIdentifier>{7f821e9e-4ebf-4d18-8fb4-898bd3d81376}</UniqueIdentifier>
</Filter>
<Filter Include="port">
<UniqueIdentifier>{f285a595-6c39-4350-8d30-6f696a3a7c4c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\leveldb\db\table_cache.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\version_edit.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\version_set.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\write_batch_internal.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\builder.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\db_impl.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\db_iter.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\dbformat.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\filename.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\log_format.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\log_reader.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\log_writer.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\memtable.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\skiplist.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\db\snapshot.h">
<Filter>db</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\table\merger.h">
<Filter>table</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\table\two_level_iterator.h">
<Filter>table</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\table\block.h">
<Filter>table</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\table\block_builder.h">
<Filter>table</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\table\format.h">
<Filter>table</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\table\iterator_wrapper.h">
<Filter>table</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\posix_logger.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\random.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\testharness.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\testutil.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\win_logger.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\arena.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\coding.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\crc32c.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\hash.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\histogram.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\logging.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\util\mutexlock.h">
<Filter>util</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\port\port_win.h">
<Filter>port</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\port\atomic_pointer.h">
<Filter>port</Filter>
</ClInclude>
<ClInclude Include="..\..\leveldb\port\port.h">
<Filter>port</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\leveldb\db\version_edit.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\version_set.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\write_batch.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\builder.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\c.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\db_bench.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\db_impl.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\db_iter.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\dbformat.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\filename.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\log_reader.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\log_writer.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\memtable.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\repair.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\db\table_cache.cc">
<Filter>db</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\merger.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\table.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\table_builder.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\two_level_iterator.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\block.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\block_builder.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\format.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\table\iterator.cc">
<Filter>table</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\status.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\testharness.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\testutil.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\win_logger.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\arena.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\cache.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\coding.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\comparator.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\crc32c.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\env.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\env_boost.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\hash.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\histogram.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\logging.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\util\options.cc">
<Filter>util</Filter>
</ClCompile>
<ClCompile Include="..\..\leveldb\port\port_win.cc">
<Filter>port</Filter>
</ClCompile>
</ItemGroup>
</Project>

184
windows/LibMiniUPnPc.vcxproj

@ -0,0 +1,184 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\miniupnp\miniupnpc\bsdqueue.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\codelength.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\connecthostport.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\declspec.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\igd_desc_parse.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\minisoap.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\minissdpc.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\miniupnpc.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\miniupnpctypes.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\miniwget.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\minixml.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\portlistingparse.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\receivedata.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\upnpcommands.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\upnperrors.h" />
<ClInclude Include="..\..\miniupnp\miniupnpc\upnpreplyparse.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\miniupnp\miniupnpc\connecthostport.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\igd_desc_parse.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\minisoap.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\miniupnpc.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\miniwget.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\minixml.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\portlistingparse.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\receivedata.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\upnpcommands.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\upnperrors.c" />
<ClCompile Include="..\..\miniupnp\miniupnpc\upnpreplyparse.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<RootNamespace>LibMiniUPnPc</RootNamespace>
<ProjectGuid>{1B1CA20E-39C3-4D9B-AC37-3783048E6672}</ProjectGuid>
<ProjectName>LibMiniUPnPc</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalDependencies>Iphlpapi.lib</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalDependencies>Iphlpapi.lib</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<AdditionalDependencies>Iphlpapi.lib</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4245;4267;4389;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<AdditionalDependencies>Iphlpapi.lib</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

110
libethereum/LibEthereum.vcxproj → windows/LibSecp256k1.vcxproj

@ -19,65 +19,73 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="AddressState.h" />
<ClInclude Include="BlockChain.h" />
<ClInclude Include="BlockInfo.h" />
<ClInclude Include="Common.h" />
<ClInclude Include="Dagger.h" />
<ClInclude Include="Exceptions.h" />
<ClInclude Include="Instruction.h" />
<ClInclude Include="PeerNetwork.h" />
<ClInclude Include="RLP.h" />
<ClInclude Include="State.h" />
<ClInclude Include="Transaction.h" />
<ClInclude Include="TransactionQueue.h" />
<ClInclude Include="Trie.h" />
<ClInclude Include="vector_ref.h" />
<ClInclude Include="..\secp256k1\ecdsa.h" />
<ClInclude Include="..\secp256k1\ecmult.h" />
<ClInclude Include="..\secp256k1\field.h" />
<ClInclude Include="..\secp256k1\field_10x26.h" />
<ClInclude Include="..\secp256k1\field_5x52.h" />
<ClInclude Include="..\secp256k1\field_gmp.h" />
<ClInclude Include="..\secp256k1\group.h" />
<ClInclude Include="..\secp256k1\impl\ecdsa.h" />
<ClInclude Include="..\secp256k1\impl\ecmult.h" />
<ClInclude Include="..\secp256k1\impl\field.h" />
<ClInclude Include="..\secp256k1\impl\field_10x26.h" />
<ClInclude Include="..\secp256k1\impl\field_5x52.h" />
<ClInclude Include="..\secp256k1\impl\field_5x52_asm.h" />
<ClInclude Include="..\secp256k1\impl\field_5x52_int128.h" />
<ClInclude Include="..\secp256k1\impl\field_gmp.h" />
<ClInclude Include="..\secp256k1\impl\group.h" />
<ClInclude Include="..\secp256k1\impl\num.h" />
<ClInclude Include="..\secp256k1\impl\num_boost.h" />
<ClInclude Include="..\secp256k1\impl\num_gmp.h" />
<ClInclude Include="..\secp256k1\impl\num_openssl.h" />
<ClInclude Include="..\secp256k1\impl\util.h" />
<ClInclude Include="..\secp256k1\num.h" />
<ClInclude Include="..\secp256k1\num_boost.h" />
<ClInclude Include="..\secp256k1\num_gmp.h" />
<ClInclude Include="..\secp256k1\num_openssl.h" />
<ClInclude Include="..\secp256k1\secp256k1.h" />
<ClInclude Include="..\secp256k1\util.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AddressState.cpp" />
<ClCompile Include="BlockChain.cpp" />
<ClCompile Include="BlockInfo.cpp" />
<ClCompile Include="Common.cpp" />
<ClCompile Include="Dagger.cpp" />
<ClCompile Include="PeerNetwork.cpp" />
<ClCompile Include="RLP.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="Transaction.cpp" />
<ClCompile Include="TransactionQueue.cpp" />
<ClCompile Include="Trie.cpp" />
<ClCompile Include="..\secp256k1\secp256k1.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\secp256k1\field_5x52_asm.asm" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7050C7CF-7551-48BE-8E57-92235906C13A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>LibEthereum</RootNamespace>
<RootNamespace>LibSecp256k1</RootNamespace>
<ProjectGuid>{1E1175BB-C4A9-41D8-B2D1-9022F71D3CEA}</ProjectGuid>
<ProjectName>LibSecp256k1</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -99,25 +107,19 @@
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir>
<IntDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir>
<IntDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</OutDir>
<IntDir>..\build\$(ProjectName)\$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -126,11 +128,13 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -139,12 +143,15 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -155,12 +162,15 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

71
windows/LibSecp256k1.vcxproj.filters

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="impl">
<UniqueIdentifier>{7d4db365-bce7-45c1-861c-f5f86beca992}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\secp256k1\impl\group.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\num.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\num_boost.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\num_gmp.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\num_openssl.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\util.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\ecdsa.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\ecmult.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\field.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\field_5x52.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\field_5x52_asm.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\field_5x52_int128.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\field_10x26.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\impl\field_gmp.h">
<Filter>impl</Filter>
</ClInclude>
<ClInclude Include="..\secp256k1\group.h" />
<ClInclude Include="..\secp256k1\num.h" />
<ClInclude Include="..\secp256k1\num_boost.h" />
<ClInclude Include="..\secp256k1\num_gmp.h" />
<ClInclude Include="..\secp256k1\num_openssl.h" />
<ClInclude Include="..\secp256k1\secp256k1.h" />
<ClInclude Include="..\secp256k1\util.h" />
<ClInclude Include="..\secp256k1\ecdsa.h" />
<ClInclude Include="..\secp256k1\ecmult.h" />
<ClInclude Include="..\secp256k1\field.h" />
<ClInclude Include="..\secp256k1\field_5x52.h" />
<ClInclude Include="..\secp256k1\field_10x26.h" />
<ClInclude Include="..\secp256k1\field_gmp.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\secp256k1\secp256k1.c" />
</ItemGroup>
<ItemGroup>
<None Include="..\secp256k1\field_5x52_asm.asm" />
</ItemGroup>
</Project>

50
test/Test.vcxproj → windows/TestEthereum.vcxproj

@ -20,8 +20,8 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<RootNamespace>Test</RootNamespace>
<ProjectName>Test</ProjectName>
<RootNamespace>TestEthereum</RootNamespace>
<ProjectName>TestEthereum</ProjectName>
<ProjectGuid>{3F3E389B-88DE-41D5-A73B-4F6036E18B36}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -29,46 +29,42 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -89,12 +85,9 @@
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -108,12 +101,8 @@
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -128,13 +117,10 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -152,13 +138,10 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -168,15 +151,20 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\..\cryptopp562\cryptlib.vcxproj">
<Project>{3423ec9a-52e4-4a4d-9753-edebc38785ef}</Project>
</ProjectReference>
<ProjectReference Include="..\libethereum\LibEthereum.vcxproj">
<Project>{7050c7cf-7551-48be-8e57-92235906c13a}</Project>
<ProjectReference Include="LibEthereum.vcxproj">
<Project>{826e68cb-d3ee-4a8a-b540-59a8c3f38d4f}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="..\test\crypto.cpp" />
<ClCompile Include="..\test\dagger.cpp" />
<ClCompile Include="..\test\hexPrefix.cpp" />
<ClCompile Include="..\test\main.cpp" />
<ClCompile Include="..\test\peer.cpp" />
<ClCompile Include="..\test\rlp.cpp" />
<ClCompile Include="..\test\state.cpp" />
<ClCompile Include="..\test\trie.cpp" />
<ClCompile Include="..\test\vm.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

63
eth/Ethereum.vcxproj → windows/TestSecp256k1.vcxproj

@ -18,57 +18,66 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\secp256k1\tests.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="LibSecp256k1.vcxproj">
<Project>{1e1175bb-c4a9-41d8-b2d1-9022f71d3cea}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<RootNamespace>Ethereum</RootNamespace>
<ProjectName>Ethereum</ProjectName>
<ProjectGuid>{C60C065C-2135-4B2B-AFD4-35FD7AC56B40}</ProjectGuid>
<RootNamespace>TestSecp256k1</RootNamespace>
<ProjectName>TestSecp256k1</ProjectName>
<ProjectGuid>{3BF049F8-AF7E-4E1C-9627-3E94C887AF24}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\libethereum\LibEthereum.props" />
<Import Project="LibEthereum.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -89,12 +98,10 @@
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -108,12 +115,9 @@
</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -128,13 +132,11 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -152,13 +154,11 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../libethereum</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>true</OpenMPSupport>
<DisableSpecificWarnings>4351</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -167,17 +167,6 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\..\cryptopp562\cryptlib.vcxproj">
<Project>{3423ec9a-52e4-4a4d-9753-edebc38785ef}</Project>
</ProjectReference>
<ProjectReference Include="..\libethereum\LibEthereum.vcxproj">
<Project>{7050c7cf-7551-48be-8e57-92235906c13a}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

39
windows/bootstrap.sh

@ -0,0 +1,39 @@
#!/bin/bash
# Setup script for building Ethereum using Visual Studio Express 2013.
# Execute once in directory only containing cpp-ethereum
# Prerequisites:
# - Visual Studio Express 2013 for Desktop
# - On PATH: git, git-svn, wget, 7z
# stop on errors
set -e
# fetch CryptoPP-5.6.2
git svn clone -r 541:541 svn://svn.code.sf.net/p/cryptopp/code/trunk/c5 cryptopp
# fetch MiniUPnP-1.8
git clone git@github.com:miniupnp/miniupnp.git
cd miniupnp
git checkout tags/miniupnpd_1_8
cd ..
# fetch LevelDB (windows branch)
git clone https://code.google.com/p/leveldb/
cd leveldb
git checkout origin/windows
cd ..
# fetch and unpack boost-1.55
wget -O boost_1_55_0.7z http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.7z/download
7z x boost_1_55_0.7z
mv boost_1_55_0 boost
# compile boost for x86 and x64
cd boost
cmd /c bootstrap.bat
./b2 --build-type=complete link=static runtime-link=static variant=debug,release threading=multi stage
mv stage/lib stage/Win32
./b2 --build-type=complete link=static runtime-link=static variant=debug,release threading=multi address-model=64 stage
mv stage/lib stage/x64
cd ..

23
windows/include/LibLevelDB/port/port.h

@ -0,0 +1,23 @@
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef STORAGE_LEVELDB_PORT_PORT_H_
#define STORAGE_LEVELDB_PORT_PORT_H_
#include <string.h>
// Include the appropriate platform specific file below. If you are
// porting to a new platform, see "port_example.h" for documentation
// of what the new port_<platform>.h file must provide.
#if defined(LEVELDB_PLATFORM_POSIX)
# include "port/port_posix.h"
#elif defined(LEVELDB_PLATFORM_CHROMIUM)
# include "port/port_chromium.h"
#elif defined(LEVELDB_PLATFORM_ANDROID)
# include "port/port_android.h"
#elif defined(LEVELDB_PLATFORM_WINDOWS)
# include "port/port_win.h"
#endif
#endif // STORAGE_LEVELDB_PORT_PORT_H_

0
windows/include/LibLevelDB/unistd.h

14
windows/include/LibMiniUPnPc/miniupnpcstrings.h

@ -0,0 +1,14 @@
/* $Id: miniupnpcstrings.h.in,v 1.4 2011/01/04 11:41:53 nanard Exp $ */
/* Project: miniupnp
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* Author: Thomas Bernard
* Copyright (c) 2005-2011 Thomas Bernard
* This software is subjects to the conditions detailed
* in the LICENCE file provided within this distribution */
#ifndef MINIUPNPCSTRINGS_H_INCLUDED
#define MINIUPNPCSTRINGS_H_INCLUDED
#define OS_STRING "Windows"
#define MINIUPNPC_VERSION_STRING "1.9"
#endif
Loading…
Cancel
Save