FLO-wallet-core/src
Gavin Andresen 171ca7745e estimatefee / estimatepriority RPC methods
New RPC methods: return an estimate of the fee (or priority) a
transaction needs to be likely to confirm in a given number of
blocks.

Mike Hearn created the first version of this method for estimating fees.
It works as follows:

For transactions that took 1 to N (I picked N=25) blocks to confirm,
keep N buckets with at most 100 entries in each recording the
fees-per-kilobyte paid by those transactions.

(separate buckets are kept for transactions that confirmed because
they are high-priority)

The buckets are filled as blocks are found, and are saved/restored
in a new fee_estiamtes.dat file in the data directory.

A few variations on Mike's initial scheme:

To estimate the fee needed for a transaction to confirm in X buckets,
all of the samples in all of the buckets are used and a median of
all of the data is used to make the estimate. For example, imagine
25 buckets each containing the full 100 entries. Those 2,500 samples
are sorted, and the estimate of the fee needed to confirm in the very
next block is the 50'th-highest-fee-entry in that sorted list; the
estimate of the fee needed to confirm in the next two blocks is the
150'th-highest-fee-entry, etc.

That algorithm has the nice property that estimates of how much fee
you need to pay to get confirmed in block N will always be greater
than or equal to the estimate for block N+1. It would clearly be wrong
to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay
12 uBTC and it will take LONGER".

A single block will not contribute more than 10 entries to any one
bucket, so a single miner and a large block cannot overwhelm
the estimates.
2014-06-06 10:44:57 -04:00
..
compat build: add symbol for upcoming gcc 4.9's libstdc++ 2014-04-11 19:02:01 -04:00
json json_spirit: #include <stdint.h> 2014-05-13 11:41:59 +02:00
leveldb Merge src/leveldb changes for LevelDB 1.17. 2014-05-09 18:23:34 +02:00
m4 build: avoid the use of top_ and abs_ dir paths 2014-06-05 16:05:57 -04:00
obj
obj-test
qt Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
test build: add stub makefiles for easier subdir builds 2014-06-05 16:05:43 -04:00
addrman.cpp Remove redundant .c_str()s 2014-01-23 16:05:01 +01:00
addrman.h Remove redundant c_str 2014-05-22 00:23:03 +07:00
alert.cpp Fixed compile error on Debian jessie (gcc version 4.8.2 (Debian 4.8.2-16)) 2014-03-18 22:54:47 +01:00
alert.h
allocators.cpp
allocators.h
base58.cpp Move base58.h implementation code to base58.cpp 2014-05-10 00:42:31 +02:00
base58.h Move base58.h implementation code to base58.cpp 2014-05-10 00:42:31 +02:00
bitcoin-cli-res.rc qt: Update remaining "The Bitcoin Core Developers" 2014-01-14 11:19:52 +01:00
bitcoin-cli.cpp SetupEnvironment() - clean commit 2014-05-13 10:15:00 +00:00
bitcoind-res.rc qt: Update remaining "The Bitcoin Core Developers" 2014-01-14 11:19:52 +01:00
bitcoind.cpp Remove fDaemon flag checking on return from main(), which is useless and looks really strange. 2014-05-20 01:22:33 +08:00
bloom.cpp Fix bloom filter not to use bit_mask 2014-03-20 13:21:23 +09:00
bloom.h
chainparams.cpp Move {Get,Set}Compact from bignum to uint256 2014-05-09 16:44:59 +02:00
chainparams.h Reduce bignum.h now it is only needed for scriptnum_tests 2014-05-09 17:38:44 +02:00
checkpoints.cpp Fix incorrect checkpoint data for testnet3 2014-05-13 16:38:36 -04:00
checkpoints.h [Qt] rescan progress 2014-04-02 03:48:07 +02:00
checkqueue.h
clientversion.h VERSION obtained from source instead of the previous git tag. 2014-04-15 21:48:44 -10:00
coincontrol.h
coins.cpp
coins.h
compat.h reorder includes to compile on OpenBSD 2014-05-02 20:45:03 +02:00
core.cpp Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
core.h estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
crypter.cpp
crypter.h
db.cpp unified and better log/error messages for CDBEnv/CDB 2014-04-01 09:41:49 +02:00
db.h
hash.cpp
hash.h
init.cpp estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
init.h Remove global strWalletFile 2014-06-05 14:52:34 +02:00
key.cpp remove CPubKey::VerifyCompact( ) which is never used 2014-05-20 14:58:21 +02:00
key.h remove CPubKey::VerifyCompact( ) which is never used 2014-05-20 14:58:21 +02:00
keystore.cpp Check redeemScript size does not exceed 520 byte limit 2014-05-08 00:55:01 -04:00
keystore.h Update moved and dead links 2014-03-24 20:26:02 +00:00
leveldbwrapper.cpp Wrap create_directory calls in try...catch blocks. 2014-03-31 09:51:58 +02:00
leveldbwrapper.h Remove redundant c_str 2014-05-22 00:23:03 +07:00
limitedmap.h
main.cpp estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
main.h estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
Makefile.am build: fix version dependency 2014-06-05 16:05:57 -04:00
Makefile.qt.include build: quit abusing AM_CPPFLAGS 2014-06-05 16:05:57 -04:00
Makefile.qttest.include build: quit abusing AM_CPPFLAGS 2014-06-05 16:05:57 -04:00
Makefile.test.include build: quit abusing AM_CPPFLAGS 2014-06-05 16:05:57 -04:00
miner.cpp Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
miner.h
mruset.h Limit number of known addresses per peer 2014-05-30 12:01:53 +02:00
net.cpp Merge pull request #4247 from Diapolo/listen 2014-06-04 15:00:38 -04:00
net.h Merge pull request #4247 from Diapolo/listen 2014-06-04 15:00:38 -04:00
netbase.cpp Merge pull request #4183 2014-05-25 16:19:54 +02:00
netbase.h remove dup of extern int nConnectTimeout; in netbase 2014-05-31 12:04:34 +02:00
noui.cpp Copyright header updates s/2013/2014 on files whose last git commit was done in 2014. 2014-02-09 21:06:06 -05:00
noui.h
protocol.cpp Copyright header updates s/2013/2014 on files whose last git commit was done in 2014. 2014-02-09 21:06:06 -05:00
protocol.h Reduce bignum.h now it is only needed for scriptnum_tests 2014-05-09 17:38:44 +02:00
rpcblockchain.cpp VerifyDB progress 2014-06-03 15:21:47 +02:00
rpcclient.cpp estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
rpcclient.h
rpcdump.cpp [Qt] importwallet progress 2014-04-23 01:50:25 +02:00
rpcmining.cpp estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
rpcmisc.cpp Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
rpcnet.cpp Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
rpcprotocol.cpp Replace non-threadsafe gmtime and setlocale 2014-05-23 15:23:11 +02:00
rpcprotocol.h Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost 2014-05-13 07:23:23 +02:00
rpcrawtransaction.cpp switch from boost int types to <stdint.h> 2014-05-13 11:41:59 +02:00
rpcserver.cpp estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
rpcserver.h estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
rpcwallet.cpp Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
script.cpp Remove template matching params from GetOpName() 2014-05-31 01:23:53 +08:00
script.h Remove redundant c_str 2014-05-22 00:23:03 +07:00
serialize.h remove an assignment which is never used. 2014-03-28 20:22:00 +09:00
sync.cpp Wallet locking fixes for -DDEBUG_LOCKORDER 2014-02-18 12:11:46 -05:00
sync.h Use mutex pointer instead of name for AssertLockHeld 2013-12-19 09:46:11 +01:00
threadsafety.h
tinyformat.h Make tinyformat errors raise an exception instead of assert()ing 2014-02-28 09:25:00 +01:00
txdb.cpp Move {Get,Set}Compact from bignum to uint256 2014-05-09 16:44:59 +02:00
txdb.h Move {Get,Set}Compact from bignum to uint256 2014-05-09 16:44:59 +02:00
txmempool.cpp estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
txmempool.h estimatefee / estimatepriority RPC methods 2014-06-06 10:44:57 -04:00
ui_interface.h VerifyDB progress 2014-06-03 15:21:47 +02:00
uint256.h Deduplicate uint* comparison operator logic 2014-05-09 16:45:00 +02:00
util.cpp rename fNoListen to fListen and move to net 2014-05-29 14:01:39 +02:00
util.h rename fNoListen to fListen and move to net 2014-05-29 14:01:39 +02:00
version.cpp VERSION obtained from source instead of the previous git tag. 2014-04-15 21:48:44 -10:00
version.h
wallet.cpp Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
wallet.h Type-safe CFeeRate class 2014-06-06 10:34:18 -04:00
walletdb.cpp Remove dummy PRIszX macros for formatting 2014-05-06 15:29:16 +02:00
walletdb.h Add -zapwallettxes cli/config option, used for wallet recovery 2014-02-14 11:33:07 -05:00