Merge pull request #757 from langerhans/1.8.2-dev

1.8.2 dev merge
This commit is contained in:
Ross Nicoll 2014-12-25 10:08:03 +00:00
commit 44e1fa8d65
9 changed files with 73 additions and 28 deletions

View File

@ -1,9 +1,9 @@
# Dogecoin Core 1.8.1
=====================
Dogecoin Core 1.8.1 is primarily a bugfix release, bringing Dogecoin Core in
line with Bitcoin 0.9.3. Dogecoin Core 1.8.1 also adds in support for printing
paper wallets, and disables connections to pre-1.8 clients.
paper wallets, and disables connections to pre-1.8 clients. This is a RECOMMENDED
upgrade due to the large number of bug fixes, but is not a required one.
Paper wallet support has been developed by AndyMeows (IRC username), and
can be accessed via the "File" menu. It's intended for two purposes; to generate
@ -14,3 +14,55 @@ IMPORTANT: If you are producing offline paper wallets, you should do so on a
computer that's disconnected from the Internet. While the wallet generator
does not save the keys it generates, this ensures there is no risk of a virus
or similar capturing the key from memory or interfering with its generation.
## Dogecoin Core Release Notes
* Translation improvements and corrections
* Disable Transifex based translation process (not used by Dogecoin Core)
* Add checkpoints around AuxPoW switchover block (371,337)
* Disable connections from pre-1.8 Dogecoin Core clients
* Use HTTPS with dogechain.info
* Remove unreachable code introduced with AuxPoW support
* "blocknotify" option now supports %i as a format parameter, which is replaced by block height
* New option "maxoutconnections" to set the maximum number of outbound peer connections. Defaults to 8, minimum is 2, maximum is whatever "maxconnections" is set to (default 125).
## Bitcoin Core Release Notes
Full release notes for Bitcoin Core 0.9.3 are available from
https://bitcoin.org/en/release/v0.9.3 , but highlights are included
below:
* Better orphan transaction handling
* Add -maxorphantx=<n> and -maxorphanblocks=<n> options for control over the maximum orphan transactions and blocks
* key.cpp: fail with a friendlier message on missing ssl EC support
* Upgrade OpenSSL to 1.0.1i (see https://www.openssl.org/news/secadv_20140806.txt - just to be sure, no critical issues for Bitcoin Core)
## Known Issues
There is a known issue with quantities in JSON used by the RPC interface (https://github.com/dogecoin/dogecoin/issues/134).
This stems from the use of a floating point precision number to hold fixed precision data.
Currently looking at solutions, which primarily either involve JSON which is not compliant
to the specification, or making the RPC layer slightly incompatible with the conventional
Bitcoin API.
This only affects values significantly below 1 Doge, however merchants may wish to round to
the nearest Doge on all transactions for now.
## Credits
Listed in strictly alphabetical order, using name listed in Github. This
includes those whose contributions to Bitcoin Core have been merged
into Dogecoin Core:
* Abderraouf Adjal
* Andymeows
* Daniel Kraft
* Gavin Andresen
* langerhans
* michilumin
* nameEO
* Patrick Lodder
* Ross Nicoll
* Wladimir J. van der Laan
* Whit J

View File

@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 8)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2014)

View File

@ -78,7 +78,7 @@ As of 1.8 all transactions have fees applied by defaults, with no exemptions mad
## RPC Allow IP
The format of IP masks supplied to the "rpcallowip" command line option has changed.
It no longer accepts subnets like '192.168.*.*', and the format '192.168/16" should
It no longer accepts subnets like '192.168.*.*', and the format '192.168.0.0/16" should
be used instead.
## Other Changes

View File

@ -54,24 +54,12 @@ bool CAuxPow::Check(uint256 hashAuxBlock, int nChainID)
if (pc == script.end())
return error("Aux POW missing chain merkle root in parent coinbase");
if (pcHead != script.end())
{
// Enforce only one chain merkle root by checking that a single instance of the merged
// mining header exists just before.
if (script.end() != std::search(pcHead + 1, script.end(), UBEGIN(pchMergedMiningHeader), UEND(pchMergedMiningHeader)))
return error("Multiple merged mining headers in coinbase");
if (pcHead + sizeof(pchMergedMiningHeader) != pc)
return error("Merged mining header is not just before chain merkle root");
}
else
{
// For backward compatibility.
// Enforce only one chain merkle root by checking that it starts early in the coinbase.
// 8-12 bytes are enough to encode extraNonce and nBits.
if (pc - script.begin() > 20)
return error("Aux POW chain merkle root must start in the first 20 bytes of the parent coinbase");
}
// Enforce only one chain merkle root by checking that a single instance of the merged
// mining header exists just before.
if (script.end() != std::search(pcHead + 1, script.end(), UBEGIN(pchMergedMiningHeader), UEND(pchMergedMiningHeader)))
return error("Multiple merged mining headers in coinbase");
if (pcHead + sizeof(pchMergedMiningHeader) != pc)
return error("Merged mining header is not just before chain merkle root");
// Ensure we are at a deterministic point in the merkle leaves by hashing
// a nonce and our chain ID and comparing to the index.

View File

@ -11,7 +11,7 @@
// These need to be macros, as version.cpp's and dogecoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 8
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build

View File

@ -230,6 +230,7 @@ std::string HelpMessage(HelpMessageMode hmm)
strUsage += " -externalip=<ip> " + _("Specify your own public address") + "\n";
strUsage += " -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n";
strUsage += " -maxconnections=<n> " + _("Maintain at most <n> connections to peers (default: 125)") + "\n";
strUsage += " -maxoutconnections=<n> " + _("Maintain at most <n> outbound connections to peers (default: 8)") + "\n";
strUsage += " -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n";
strUsage += " -maxsendbuffer=<n> " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n";
strUsage += " -onion=<ip:port> " + _("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)") + "\n";
@ -535,6 +536,8 @@ bool AppInit2(boost::thread_group& threadGroup)
if (nFD - MIN_CORE_FILEDESCRIPTORS < nMaxConnections)
nMaxConnections = nFD - MIN_CORE_FILEDESCRIPTORS;
nMaxOutboundConnections = GetArg("-maxoutconnections", 8);
nMaxOutboundConnections = std::min(std::max(nMaxOutboundConnections, 2), nMaxConnections);
// ********************************************************* Step 3: parameter-to-internal-flags
fDebug = !mapMultiArgs["-debug"].empty();

View File

@ -28,6 +28,7 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
@ -2318,6 +2319,7 @@ bool ActivateBestChain(CValidationState &state) {
if (!IsInitialBlockDownload() && !strCmd.empty())
{
boost::replace_all(strCmd, "%s", chainActive.Tip()->GetBlockHash().GetHex());
boost::replace_all(strCmd, "%i", boost::lexical_cast<std::string>(chainActive.Height()));
boost::thread t(runCommand, strCmd); // thread runs free
}
}

View File

@ -39,8 +39,6 @@
using namespace std;
using namespace boost;
static const int MAX_OUTBOUND_CONNECTIONS = 8;
bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
@ -59,6 +57,7 @@ uint64_t nLocalHostNonce = 0;
static std::vector<SOCKET> vhListenSocket;
CAddrMan addrman;
int nMaxConnections = 125;
int nMaxOutboundConnections = 8;
vector<CNode*> vNodes;
CCriticalSection cs_vNodes;
@ -916,7 +915,7 @@ void ThreadSocketHandler()
if (nErr != WSAEWOULDBLOCK)
LogPrintf("socket error accept failed: %s\n", NetworkErrorString(nErr));
}
else if (nInbound >= nMaxConnections - MAX_OUTBOUND_CONNECTIONS)
else if (nInbound >= nMaxConnections - nMaxOutboundConnections)
{
closesocket(hSocket);
}
@ -1709,7 +1708,7 @@ void StartNode(boost::thread_group& threadGroup)
{
if (semOutbound == NULL) {
// initialize semaphore
int nMaxOutbound = min(MAX_OUTBOUND_CONNECTIONS, nMaxConnections);
int nMaxOutbound = min(nMaxOutboundConnections, nMaxConnections);
semOutbound = new CSemaphore(nMaxOutbound);
}
@ -1753,7 +1752,7 @@ bool StopNode()
LogPrintf("StopNode()\n");
MapPort(false);
if (semOutbound)
for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
for (int i=0; i<nMaxOutboundConnections; i++)
semOutbound->post();
MilliSleep(50);
DumpAddresses();

View File

@ -104,6 +104,7 @@ extern uint64_t nLocalServices;
extern uint64_t nLocalHostNonce;
extern CAddrMan addrman;
extern int nMaxConnections;
extern int nMaxOutboundConnections;
extern std::vector<CNode*> vNodes;
extern CCriticalSection cs_vNodes;