Compare commits

...

3 Commits

Author SHA1 Message Date
Gavin Andresen
40809aed65 Bump version numbers for 0.8.3 release 2013-06-25 10:27:24 -04:00
Pieter Wuille
65c20dbf55 Dump addresses every 15 minutes instead of 10 seconds 2013-06-25 10:21:02 -04:00
Peter Todd
7cc960f8f5 Truncate oversize 'tx' messages before relaying/storing.
Fixes a memory exhaustion attack on low-memory peers.
2013-06-25 09:59:31 -04:00
10 changed files with 37 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = bitcoin-qt
macx:TARGET = "Bitcoin-Qt"
VERSION = 0.8.2
VERSION = 0.8.3
INCLUDEPATH += src src/json src/qt
QT += network
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE

View File

@@ -18,7 +18,7 @@ WORKINGDIR="/tmp/bitcoin"
TMPFILE="hashes.tmp"
#this URL is used if a version number is not specified as an argument to the script
SIGNATUREFILE="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.8.2/SHA256SUMS.asc"
SIGNATUREFILE="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.8.3/SHA256SUMS.asc"
SIGNATUREFILENAME="SHA256SUMS.asc"
RCSUBDIR="test/"

View File

@@ -1,4 +1,4 @@
Bitcoin 0.8.2 BETA
Bitcoin 0.8.3 BETA
====================
Copyright (c) 2009-2013 Bitcoin Developers
@@ -43,4 +43,4 @@ Other Pages
- [Release Notes](release-notes.md)
- [Multiwallet Qt Development](multiwallet-qt.md)
- [Unit Tests](unit-tests.md)
- [Translation Process](translation_process.md)
- [Translation Process](translation_process.md)

View File

@@ -1,4 +1,4 @@
Bitcoin 0.8.2 BETA
Bitcoin 0.8.3 BETA
Copyright (c) 2009-2013 Bitcoin Developers
Distributed under the MIT/X11 software license, see the accompanying

View File

@@ -1,6 +1,17 @@
(note: this is a temporary file, to be added-to by anybody, and deleted at
release time)
0.8.3 changes
=============
Fix a memory exhaustion attack that could crash low-memory nodes.
Fix a regression that caused excessive writing of the peers.dat file.
0.8.2 changes
=============
Fee Policy changes
------------------

View File

@@ -5,7 +5,7 @@ SetCompressor /SOLID lzma
# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
!define VERSION 0.8.2
!define VERSION 0.8.3
!define COMPANY "Bitcoin project"
!define URL http://www.bitcoin.org/
@@ -45,13 +45,13 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English
# Installer attributes
OutFile bitcoin-0.8.2-win32-setup.exe
OutFile bitcoin-0.8.3-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin
CRCCheck on
XPStyle on
BrandingText " "
ShowInstDetails show
VIProductVersion 0.8.2.2
VIProductVersion 0.8.3.0
VIAddVersionKey ProductName Bitcoin
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"

View File

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

View File

@@ -3508,6 +3508,16 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
CInv inv(MSG_TX, tx.GetHash());
pfrom->AddInventoryKnown(inv);
// Truncate messages to the size of the tx in them
unsigned int nSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
unsigned int oldSize = vMsg.size();
if (nSize < oldSize) {
vMsg.resize(nSize);
printf("truncating oversized TX %s (%u -> %u)\n",
tx.GetHash().ToString().c_str(),
oldSize, nSize);
}
bool fMissingInputs = false;
CValidationState state;
if (tx.AcceptToMemoryPool(state, true, true, &fMissingInputs))

View File

@@ -21,6 +21,9 @@
#include <miniupnpc/upnperrors.h>
#endif
// Dump addresses to peers.dat every 15 minutes (900s)
#define DUMP_ADDRESSES_INTERVAL 900
using namespace std;
using namespace boost;
@@ -1855,7 +1858,7 @@ void StartNode(boost::thread_group& threadGroup)
threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "msghand", &ThreadMessageHandler));
// Dump network addresses
threadGroup.create_thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 10000));
threadGroup.create_thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, DUMP_ADDRESSES_INTERVAL * 1000));
}
bool StopNode()

View File

@@ -531,7 +531,7 @@ inline uint32_t ByteReverse(uint32_t value)
// Standard wrapper for do-something-forever thread functions.
// "Forever" really means until the thread is interrupted.
// Use it like:
// new boost::thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 10000));
// new boost::thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 900000));
// or maybe:
// boost::function<void()> f = boost::bind(&FunctionWithArg, argument);
// threadGroup.create_thread(boost::bind(&LoopForever<boost::function<void()> >, "nothing", f, milliseconds));
@@ -544,8 +544,8 @@ template <typename Callable> void LoopForever(const char* name, Callable func,
{
while (1)
{
func();
MilliSleep(msecs);
func();
}
}
catch (boost::thread_interrupted)