| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \ \
| | | | |
| | | | | |
Reject non-canonically-encoded CompactSize
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Two small free transaction policy changes
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Changes the maximum size of a free transaction that will be created
from 10,000 bytes to 1,000 bytes.
The idea behind this change is to make the free transaction area
available to a greater number of people; with the default 27K-per-block,
just three very-large very-high-priority transactions could fill the space.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Remove the (relay/mempool) rule that all outputs of free transactions
must be greater than 0.01 XBT. Dust spam is now taken care of by making
dusty outputs non-standard.
|
| |\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
CBlockLocator improvements & move to core
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This removes a few unused CBlockLocator methods, and moves the
construction and fork-finding logic to CChain (which can do these
more efficiently, as it has a height-indexable chain available).
It also makes CBlockLocator independent from the validation code.
|
| |/ / / / / |
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Refactor/encapsulate chain globals into a CChain class
|
| | | |_|/ /
| |/| | | |
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | | |
971bb3e Added ping time measurement. New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers. (Josh Lehan)
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
New RPC "ping" command to request ping.
Implemented "pong" message handler.
New "pingtime" field in getpeerinfo, to provide results to user.
New "pingwait" field, to show pings still in flight, to better see newly lagging peers.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
- I introduced the problem and fixed it with better readable code
|
| |/ / / /
| | | |
| | | |
| | | |
| | | | |
- prevents unneeded log messages, which could make users think something
bad was happening
|
| |\ \ \ \
| |_|_|/
|/| | | |
[wallet] Consider generated coins mature at COINBASE_MATURITY+1
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We're not seeing large reorgs that would justify waiting a large
amount past the rule required maturity, and the extra three
hours is just a nuisance. Take one more block to at least give
the 100th block time to propagate.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- moves 2 global variables from main.cpp/h to miner.cpp/h
- also removes 2 unneded includes in miner.cpp, that come from miner.h
already
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | | |
[raw] reject insanely high fees by default in sendrawtransaction
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There have been several incidents where mainnet experimentation with
raw transactions resulted in insane fees. This is hard to prevent
in the raw transaction api because the inputs may not be known.
Since sending doesn't work if the inputs aren't known, we can catch
it there.
This rejects fees > than 10000 * nMinRelayTxFee or 1 BTC with the
defaults and can be overridden with a bool at the rpc.
|
| | |/ /
|/| | |
|
| |\ \ \
| | | |
| | | | |
Longer term workaround for chainstate corruption from negative versions.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This also makes negative transaction versions non-standard.
This avoids an issue triggered in block 256818 where transactions with
negative version numbers were incorrectly serialized into the UTXO set.
On restart nodes detect the inconsistency and refuse to start so long as
a block with these transactions is inside the self-consistency check
window, logging "coin database inconsistencies found". The software
recommends reindexing, but reindexing does not correct the problem.
This should be fixed by changing the chainstate serialization, but
working around it seems harmless for now because the version is not
used by any network rule currently.
A patch free workaround is to start with -checklevel=2 which skips
the consistency checks, but the IsStandard change is important for
miners in order to protect unpatched nodes.
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- rename URL into URI in paymentserver where correct
- add some missing Qt-coding-stuff in paymentserver
- change QSpinBox to QLineEdit as base for BitcoinAmountField in .ui files
(as this is the result when converting the BAF back into base)
- remove some c_str() and replace with QString::fromStdString()
- remove several new-lines
- remove unneeded spaces
- indentation fixes
|
| |/ / |
|
| | | |
|
| | |
| |
| |
| |
| | |
This resulted in just passing all transactions to filtered wallets
which worked surprisingly well, except where it didn't.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This reduces a peer's ability to attack network resources by
using a full bloom filter, but without reducing the usability
of bloom filters. It sets a default match everything filter
for peers and it generalizes a prior optimization to
cover more cases.
|
| | | |
|
| | | |
|
| |\ \
| | |
| | | |
Detect any sufficiently long fork and alert the user just like any other alert
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Such a fork is defined as being at least 7 blocks long and
having a tip which is within 72 blocks of our best block.
|
| | |/
|/| |
|
| |\ \
| | |
| | | |
Simplify storage of orphan transactions, fix CVE-2013-4627
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
This reverts commit c40a5aaaf484855a4350fd702e8e72fd21a68155.
|
| |\ \ \
| |/ /
|/| | |
Prepare for mempool testing in pull-tester and fix multi-block transaction resurrection
|
| | | | |
|
| | |/ |
|
| | |
| |
| |
| | |
Public functions referenced elsewhere are added to miner.h.
|
| | |
| |
| |
| |
| |
| | |
* Fix UpdateCoins() definition in main.h
* Remove pwalletMain reference from BitcoinMiner(), as it is passed
a wallet argument.
|
| |/
|
|
|
| |
Replace the loop macro with while (true). The #define caused
problems for Qt.
|
| |\
| |
| | |
Log reason for non-standard transaction rejection
|
| | | |
|
| |\ \
| | |
| | | |
Wallet registration locks in main.cpp + UnregisterAllWallet() function
|
| | | |
| | |
| | |
| | | |
UnregisterAllWallets function.
|
| |\ \ \
| | | |
| | | | |
Move core implementations to core.cpp
|
| | |/ / |
|