mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-22 00:00:55 +01:00
Compare commits
4 Commits
v0.13.1rc2
...
v0.8.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34d62a8efe | ||
|
|
3f45e08738 | ||
|
|
fc6deb5217 | ||
|
|
8bd0288189 |
@@ -1,6 +1,6 @@
|
||||
TEMPLATE = app
|
||||
TARGET = bitcoin-qt
|
||||
VERSION = 0.8.0
|
||||
VERSION = 0.8.1
|
||||
INCLUDEPATH += src src/json src/qt
|
||||
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
|
||||
CONFIG += no_include_pwd
|
||||
|
||||
@@ -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.0/SHA256SUMS.asc"
|
||||
SIGNATUREFILE="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.8.1/SHA256SUMS.asc"
|
||||
|
||||
SIGNATUREFILENAME="SHA256SUMS.asc"
|
||||
RCSUBDIR="test/"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Bitcoin 0.8.0 BETA
|
||||
Bitcoin 0.8.1 BETA
|
||||
|
||||
Copyright (c) 2009-2013 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Bitcoin 0.8.0 BETA
|
||||
Bitcoin 0.8.1 BETA
|
||||
|
||||
Copyright (c) 2009-2013 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
|
||||
@@ -1,99 +1,5 @@
|
||||
(note: this is a temporary file, to be added-to by anybody, and deleted at
|
||||
release time)
|
||||
|
||||
Building this from
|
||||
|
||||
$ git shortlog --no-merges v0.7.1..
|
||||
|
||||
Incompatible Changes
|
||||
--------------------
|
||||
|
||||
This release no longer maintains a full index of historical transaction ids
|
||||
by default, so looking up an arbitrary transaction using the getrawtransaction
|
||||
RPC call will not work. If you need that functionality, you must run once
|
||||
with -txindex -reindex to rebuild block-chain indices (see below for more
|
||||
details).
|
||||
|
||||
Improvements
|
||||
------------
|
||||
|
||||
Mac and Windows binaries are signed with certificates owned by the Bitcoin
|
||||
Foundation, to be compatible with the new security features in OSX 10.8 and
|
||||
Windows 8.
|
||||
|
||||
LevelDB, a fast, open-source, non-relational database from Google, is
|
||||
now used to store transaction and block indices. LevelDB works much better
|
||||
on machines with slow I/O and is faster in general. Berkeley DB is now only
|
||||
used for the wallet.dat file (public and private wallet keys and transactions
|
||||
relevant to you).
|
||||
|
||||
Pieter Wuille implemented many optimizations to the way transactions are
|
||||
verified, so a running, synchronized node uses much less memory and does
|
||||
much less I/O. He also implemented parallel signature checking, so if you
|
||||
have a multi-CPU machine all CPUs will be used to verify transactions.
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
"Bloom filter" support in the network protocol for sending only relevant transactions to
|
||||
lightweight clients.
|
||||
|
||||
contrib/verifysfbinaries is a shell-script to verify that the binary downloads
|
||||
at sourceforge have not been tampered with. If you are able, you can help make
|
||||
everybody's downloads more secure by running this occasionally to check PGP
|
||||
signatures against download file checksums.
|
||||
|
||||
contrib/spendfrom is a python-language command-line utility that demonstrates
|
||||
how to use the "raw transactions" JSON-RPC api to send coins received from particular
|
||||
addresses (also known as "coin control").
|
||||
|
||||
New/changed settings (command-line or bitcoin.conf file)
|
||||
--------------------------------------------------------
|
||||
|
||||
dbcache : now controls LevelDB memory usage. Running with (for example) -dbcache=1000
|
||||
will use a gigabyte of memory and might make the initial blockchain download faster.
|
||||
|
||||
par : controls how many threads to use to validate transactions. Defaults to the number
|
||||
of CPUs on your machine, use -par=1 to limit to a single CPU.
|
||||
|
||||
txindex : maintains an extra index of old, spent transaction ids so they will be found
|
||||
by the getrawtransaction JSON-RPC method. Can only be set when the database is
|
||||
initialized.
|
||||
|
||||
reindex : rebuild block and transaction indices from the downloaded block data.
|
||||
|
||||
New JSON-RPC API Features
|
||||
-------------------------
|
||||
|
||||
lockunspent / listlockunspent allow locking transaction outputs for a period of time so
|
||||
they will not be spent by other processes that might be accessing the same wallet.
|
||||
|
||||
addnode / getaddednodeinfo methods, to connect to specific peers without restarting.
|
||||
|
||||
importprivkey now takes an optional boolean parameter (default true) to control whether
|
||||
or not to rescan the blockchain for transactions after importing a new private key.
|
||||
|
||||
gettxout retrieves a single transaction output from the current set of unspent outputs.
|
||||
Optionally, the mempool transactions are taken into account.
|
||||
|
||||
gettxoutsetinfo calculates statistics about the current set of unspent outputs.
|
||||
|
||||
Important Bug Fixes
|
||||
-------------------
|
||||
|
||||
Privacy leak: the position of the "change" output in most transactions was not being
|
||||
properly randomized, making network analysis of the transaction graph to identify
|
||||
users' wallets easier.
|
||||
|
||||
Zero-confirmation transaction vulnerability: accepting zero-confirmation transactions
|
||||
(transactions that have not yet been included in a block) from somebody you do not
|
||||
trust is still not recommended, because there will always be ways for attackers to
|
||||
double-spend zero-confirmation transactions. However, this release includes a bug
|
||||
fix that makes it a little bit more difficult for attackers to double-spend a
|
||||
certain type ("lockTime in the future") of zero-confirmation transaction.
|
||||
|
||||
Dependency Changes
|
||||
------------------
|
||||
|
||||
Qt 4.8.3 (compiling against older versions of Qt 4 should continue to work)
|
||||
|
||||
Version 0.8.1 introduces a temporary block validation rule to avoid an incompatibility
|
||||
with version 0.7.2 and earlier.
|
||||
|
||||
@@ -5,7 +5,7 @@ SetCompressor /SOLID lzma
|
||||
|
||||
# General Symbol Definitions
|
||||
!define REGKEY "SOFTWARE\$(^Name)"
|
||||
!define VERSION 0.8.0
|
||||
!define VERSION 0.8.1
|
||||
!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.0-win32-setup.exe
|
||||
OutFile bitcoin-0.8.1-win32-setup.exe
|
||||
InstallDir $PROGRAMFILES\Bitcoin
|
||||
CRCCheck on
|
||||
XPStyle on
|
||||
BrandingText " "
|
||||
ShowInstDetails show
|
||||
VIProductVersion 0.8.0.0
|
||||
VIProductVersion 0.8.1.0
|
||||
VIAddVersionKey ProductName Bitcoin
|
||||
VIAddVersionKey ProductVersion "${VERSION}"
|
||||
VIAddVersionKey CompanyName "${COMPANY}"
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace Checkpoints
|
||||
(193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
|
||||
(210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
|
||||
(216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
|
||||
(225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
|
||||
;
|
||||
|
||||
static MapCheckpoints mapCheckpointsTestnet =
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// 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 0
|
||||
#define CLIENT_VERSION_REVISION 1
|
||||
#define CLIENT_VERSION_BUILD 0
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
|
||||
23
src/main.cpp
23
src/main.cpp
@@ -2053,6 +2053,25 @@ bool CBlock::CheckBlock(CValidationState &state, bool fCheckPOW, bool fCheckMerk
|
||||
if (vtx.empty() || vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
|
||||
return state.DoS(100, error("CheckBlock() : size limits failed"));
|
||||
|
||||
// Special short-term limits to avoid 10,000 BDB lock limit:
|
||||
if (GetBlockTime() >= 1363867200 && // start enforcing 21 March 2013, noon GMT
|
||||
GetBlockTime() < 1368576000) // stop enforcing 15 May 2013 00:00:00
|
||||
{
|
||||
// Rule is: #unique txids referenced <= 4,500
|
||||
// ... to prevent 10,000 BDB lock exhaustion on old clients
|
||||
set<uint256> setTxIn;
|
||||
for (size_t i = 0; i < vtx.size(); i++)
|
||||
{
|
||||
setTxIn.insert(vtx[i].GetHash());
|
||||
if (i == 0) continue; // skip coinbase txin
|
||||
BOOST_FOREACH(const CTxIn& txin, vtx[i].vin)
|
||||
setTxIn.insert(txin.prevout.hash);
|
||||
}
|
||||
size_t nTxids = setTxIn.size();
|
||||
if (nTxids > 4500)
|
||||
return error("CheckBlock() : 15 May maxlocks violation");
|
||||
}
|
||||
|
||||
// Check proof of work matches claimed amount
|
||||
if (fCheckPOW && !CheckProofOfWork(GetHash(), nBits))
|
||||
return state.DoS(50, error("CheckBlock() : proof of work failed"));
|
||||
@@ -4133,6 +4152,10 @@ CBlockTemplate* CreateNewBlock(CReserveKey& reservekey)
|
||||
// Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity:
|
||||
nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SIZE-1000), nBlockMaxSize));
|
||||
|
||||
// Special compatibility rule before 15 May: limit size to 500,000 bytes:
|
||||
if (GetAdjustedTime() < 1368576000)
|
||||
nBlockMaxSize = std::min(nBlockMaxSize, (unsigned int)(MAX_BLOCK_SIZE_GEN));
|
||||
|
||||
// How much of the block should be dedicated to high-priority transactions,
|
||||
// included regardless of the fees they pay
|
||||
unsigned int nBlockPrioritySize = GetArg("-blockprioritysize", 27000);
|
||||
|
||||
66
src/test/checkblock_tests.cpp
Normal file
66
src/test/checkblock_tests.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// Unit tests for block.CheckBlock()
|
||||
//
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include "main.h"
|
||||
#include "wallet.h"
|
||||
#include "net.h"
|
||||
#include "util.h"
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(CheckBlock_tests)
|
||||
|
||||
bool
|
||||
read_block(const std::string& filename, CBlock& block)
|
||||
{
|
||||
namespace fs = boost::filesystem;
|
||||
fs::path testFile = fs::current_path() / "test" / "data" / filename;
|
||||
#ifdef TEST_DATA_DIR
|
||||
if (!fs::exists(testFile))
|
||||
{
|
||||
testFile = fs::path(BOOST_PP_STRINGIZE(TEST_DATA_DIR)) / filename;
|
||||
}
|
||||
#endif
|
||||
FILE* fp = fopen(testFile.string().c_str(), "rb");
|
||||
if (!fp) return false;
|
||||
|
||||
fseek(fp, 8, SEEK_SET); // skip msgheader/size
|
||||
|
||||
CAutoFile filein = CAutoFile(fp, SER_DISK, CLIENT_VERSION);
|
||||
if (!filein) return false;
|
||||
|
||||
filein >> block;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(May15)
|
||||
{
|
||||
// Putting a 1MB binary file in the git repository is not a great
|
||||
// idea, so this test is only run if you manually download
|
||||
// test/data/Mar12Fork.dat from
|
||||
// http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/Mar12Fork.dat/download
|
||||
unsigned int tMay15 = 1368576000;
|
||||
SetMockTime(tMay15); // Test as if it was right at May 15
|
||||
|
||||
CBlock forkingBlock;
|
||||
if (read_block("Mar12Fork.dat", forkingBlock))
|
||||
{
|
||||
CValidationState state;
|
||||
BOOST_CHECK(!forkingBlock.CheckBlock(state, true, true));
|
||||
BOOST_CHECK(!forkingBlock.CheckBlock(state, false, false));
|
||||
|
||||
// After May 15'th, big blocks are OK:
|
||||
forkingBlock.nTime = tMay15; // Invalidates PoW
|
||||
BOOST_CHECK(forkingBlock.CheckBlock(state, false, false));
|
||||
}
|
||||
|
||||
SetMockTime(0);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
Reference in New Issue
Block a user