Gavin Andresen
8dc206a1e2
Reject non-canonically-encoded sizes
...
The length of vectors, maps, sets, etc are serialized using
Write/ReadCompactSize -- which, unfortunately, do not use a
unique encoding.
So deserializing and then re-serializing a transaction (for example)
can give you different bits than you started with. That doesn't
cause any problems that we are aware of, but it is exactly the type
of subtle mismatch that can lead to exploits.
With this pull, reading a non-canonical CompactSize throws an
exception, which means nodes will ignore 'tx' or 'block' or
other messages that are not properly encoded.
Please check my logic... but this change is safe with respect to
causing a network split. Old clients that receive
non-canonically-encoded transactions or blocks deserialize
them into CTransaction/CBlock structures in memory, and then
re-serialize them before relaying them to peers.
And please check my logic with respect to causing a blockchain
split: there are no CompactSize fields in the block header, so
the block hash is always canonical. The merkle root in the block
header is computed on a vector<CTransaction>, so
any non-canonical encoding of the transactions in 'tx' or 'block'
messages is erased as they are read into memory by old clients,
and does not affect the block hash. And, as noted above, old
clients re-serialize (with canonical encoding) 'tx' and 'block'
messages before relaying to peers.
11 years ago
Gavin Andresen
ddd0e2f616
Merge pull request #2871 from gavinandresen/simplify_maporphan
...
Simplify storage of orphan transactions, fix CVE-2013-4627
11 years ago
Gavin Andresen
1188a33d18
Merge pull request #2882 from codler/patch-4
...
Fix typo
11 years ago
Han Lin Yap
b3915841b0
fix typo in README.md
11 years ago
Gavin Andresen
7b22c8e8ca
Merge pull request #2881 from Diapolo/translations_rem_newline
...
remove a newline from a string in init.cpp
11 years ago
Philip Kaufmann
265e2657b4
remove a newline from a string in init.cpp
...
- to match all other translatable strings in init.cpp and to simplify
translations via Transifex
11 years ago
Wladimir J. van der Laan
e07d9f77e9
Merge pull request #2879 from Diapolo/translations
...
translations update for Transifex 2013-08-05
11 years ago
Philip Kaufmann
0f1c8f23eb
translations update for Transifex 2013-08-05
11 years ago
Gavin Andresen
ae759b3788
Merge pull request #2849 from petertodd/if-else-else
...
Add unittests for multiple ELSEs in a row
11 years ago
Gavin Andresen
15047f5af0
Merge pull request #2851 from TheBlueMatt/master
...
Prepare for mempool testing in pull-tester and fix multi-block transaction resurrection
11 years ago
Gavin Andresen
2af267c150
Merge pull request #2857 from Diapolo/compat_cleanup
...
cleanup compat.h Windows stuff
11 years ago
Gavin Andresen
e622f3f195
Merge pull request #2855 from Diapolo/guard_CreatePidFile
...
exclude CreatePidFile() function on WIN32 as it is unused
11 years ago
Gavin Andresen
a4ae02969e
Merge pull request #2827 from Diapolo/rpccon_winpos
...
Bitcoin-Qt: save and restore position of debug window
11 years ago
Gavin Andresen
d687aaa311
Merge pull request #2865 from Diapolo/fix_intro_translation
...
fix string in intro.cpp, which is untranslatable on Transifex
11 years ago
Gavin Andresen
159bc48193
Simplify storage of orphan transactions
...
Orphan transactions were stored as a CDataStream pointer;
this changes the mapOrphanTransactions data structures to
store orphans as a CTransaction.
This also fixes CVE-2013-4627 by always re-serializing
transactions before relaying them.
11 years ago
Gavin Andresen
8f6f92c72b
Revert "Truncate oversize 'tx' messages before relaying/storing."
...
This reverts commit c40a5aaaf4
.
11 years ago
Wladimir J. van der Laan
6d89611c3a
Merge pull request #2850 from Diapolo/fix_intro
...
fix possible infinite loop in intro.cpp thread
11 years ago
Jeff Garzik
3b2ed514d3
Merge pull request #2867 from jgarzik/miner-sep
...
Move internal miner to separate miner.cpp module
11 years ago
Jeff Garzik
d247a5d130
Move internal miner/block creation to separate miner.cpp module.
...
Public functions referenced elsewhere are added to miner.h.
11 years ago
Jeff Garzik
18946846d5
Minor miner fixes (hey hey it's fun to say)
...
* Fix UpdateCoins() definition in main.h
* Remove pwalletMain reference from BitcoinMiner(), as it is passed
a wallet argument.
11 years ago
Jeff Garzik
8351d55cd3
Merge pull request #2866 from gavinandresen/loopdefine
...
Remove #define loop from util.h
11 years ago
Gavin Andresen
050d2e953f
Remove #define loop from util.h
...
Replace the loop macro with while (true). The #define caused
problems for Qt.
11 years ago
Philip Kaufmann
bef9f573b5
fix string in intro.cpp, which is untranslatable on Transifex
...
- seems the code tags in the original string cause errors, when using the
Transifex site for translation
11 years ago
Philip Kaufmann
c431e9f1f0
Bitcoin-Qt: save and restore position of debug window
...
- move the code for saving and restoring window positions from BitcoinGUI
to GUIUtil, make it more generic and also use it for saving/restoring
debug window positions
11 years ago
Pieter Wuille
c4316fefa5
Make sure new wallet variables are initialized
11 years ago
Pieter Wuille
4bb77b4963
Merge pull request #2541 from luke-jr/bugfix_wallet_resend
...
Bugfix: Store last/next wallet resend times unique per CWallet object
11 years ago
Pieter Wuille
83a3597071
Merge pull request #2702 from vinniefalco/leveldb-subtree-at-1-10-0
...
Leveldb subtree at 1 12 0
11 years ago
Pieter Wuille
f38f452251
Merge pull request #2863 from maaku/patch-1
...
Fix typo in README.md
11 years ago
Mark Friedenbach
cb501a7d44
Fix typo in README.md
11 years ago
Philip Kaufmann
5bc6d8e580
fix possible infinite loop in intro.cpp thread
...
- it was possible to trigger an infinite loop in FreespaceChecker::check() by
simply removing the drive letter on Windows (which leads to an infinite
loop in the FreespaceChecker thread)
- this was caused by not checking if we make progress with
parentDir.parent_path()
11 years ago
Wladimir J. van der Laan
2b894bceac
Merge pull request #2847 from Diapolo/fix_QApplication_include
...
Bitcoin-Qt: fix QApplication includes to match our include defaults
11 years ago
Wladimir J. van der Laan
7d3a50ddbe
Merge pull request #2848 from Diapolo/translations
...
update bitcoin_en.ts to current master (2013-07-23)
11 years ago
Gavin Andresen
5e67e124cf
Merge pull request #1889 from tcatm/multi-wallet
...
let user select wallet file with -wallet=foo.dat
11 years ago
Philip Kaufmann
dd833a4cd8
cleanup compat.h Windows stuff
...
- remove an unneded include for mswsock.h as we use winsock2.h anyway
- move typedef u_int SOCKET; into the #ifndef WIN32 part
- remove typedef int socklen_t; as this is defined in ws2tcpip.h
11 years ago
Philip Kaufmann
a034c7ebb6
exclude CreatePidFile() function on WIN32 as it is unused
11 years ago
Matt Corallo
9bf2a4aba2
Fix multi-block reorg transaction resurrection
11 years ago
Matt Corallo
d9ace8abe8
Don't use checkpoints and accept nonstd txn on -regtest
11 years ago
Peter Todd
aff83e9c02
Add unittests for multiple ELSEs in a row
...
IF ELSE ELSE ENDIF is a valid construct; execution or non-execution
inverts on each ELSE encountered.
11 years ago
Philip Kaufmann
3960d2e4ab
update bitcoin_en.ts to current master (2013-07-23)
11 years ago
Philip Kaufmann
84ef729aa1
Bitcoin-Qt: fix QApplication includes to match our include defaults
...
- move all QApplication includes to top of included Qt headers
- undef our loop macro where it would cause compilation errors otherwise
11 years ago
Jeff Garzik
0a740650a5
Merge pull request #2795 from fanquake/log_aborted_rebuilds
...
Log aborted block database rebuilds
11 years ago
Jeff Garzik
0cb6d67e46
Merge pull request #2832 from luke-jr/bugfix_wdb_boostver
...
Bugfix: Move boost/version include from db.cpp to walletdb.cpp where BOOST_VERSION is used
11 years ago
Jeff Garzik
6c6255edb5
Merge pull request #2826 from Diapolo/fix_mingw481
...
fix invalid conversion error with MinGW 4.8.1 in net.cpp
11 years ago
Jeff Garzik
ac6561322f
Merge pull request #2836 from phelixbtc/patch-3
...
makefile.mingw: Use normal boost libraries instead of debug for Windows
11 years ago
Jeff Garzik
06c5cec84d
Merge pull request #2842 from luke-jr/bugfix_usage
...
Bugfix: Include block creation and SSL options headings in usage
11 years ago
Luke Dashjr
dabd4bd48e
Bugfix: Include block creation and SSL options headings in usage
11 years ago
phelixbtc
eda7605dfe
makefile.mingw: Use normal boost libraries instead of debug for Windows
...
https://github.com/bitcoin/bitcoin/pull/2835#issuecomment-21231694
12 years ago
Wladimir J. van der Laan
4eab2dcc81
Merge pull request #2670 from laanwj/2013_05_datadir
...
qt: allow user to choose data directory
12 years ago
Luke Dashjr
203d1ae69b
Bugfix: Store last/next wallet resend times unique per CWallet object
12 years ago
Luke Dashjr
d4e2b040ed
Bugfix: Move boost/version include from db.cpp to walletdb.cpp where BOOST_VERSION is used
12 years ago