aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* really s/doge/dis/g this timeTomo Ueda2021-09-021-2/+2
|
* Fixate BIP65 softfork heightsPatrick Lodder2021-02-131-14/+1
| | | | | | | | | - Re-introduce Params.BIP65Height - Fixate block 1854705 for testnet - Fixate block 3464751 for mainnet - Fixate block 1351 for regtest - Stop using IsSuperMajority() in validation for BIP65 - Simplify RPC SoftForkMajorityDesc
* [backport] [rpc] getblockchaininfo: add size_on_disk, prune_target_size, ↵Daniel Edgecumbe2020-07-241-10/+22
| | | | | | | | | | automatic_pruning Fix pruneheight help text. Move fPruneMode block to match output ordering with help text. Add functional tests for new fields in getblockchaininfo. Rebase-from: bitcoin#b7dfc6c4
* Fix RPC description of supermajority based forkslangerhans2019-07-141-1/+1
|
* [rpc] Add initialblockdownload to getblockchaininfoJohn Newbery2019-04-141-0/+2
|
* Introduce basic Dogecoin brandingRoss Nicoll2019-03-251-2/+2
|
* Change count type used by `gettxoutsetinfo` (#1415)Ross Nicoll2018-09-191-2/+2
| | | changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow
* Modify chain consensus parameters to be height aware (#1396)Ross Nicoll2018-09-191-3/+3
| | | | | | | | | * Modify chain consensus parameters to be height aware * Correct implementation of simplified rewards in parameters * Correct max money * Use base block version in IsSuperMajority() instead of full version * Correct mining of blocks in AuxPoW tests * Add in missing pre-AuxPoW consensus checks
* Change BIP65/66 enforcement to match Dogecoin (#1403)Ross Nicoll2018-09-191-1/+14
| | | | | | | | | | | | | | | | | | * Introduce first estimates at BIP lock-in blocks * Introduce Dogecoin BIP parameters * Re-introduce supermajority rules for BIP65 * Add BIP65 supermajority rules * Tighten v3 block constraints * Don't enforce coinbase in v2 blocks * Correct testnet majority params * Change to using base version when checking supermajority
* Merge AuxPoW support from NamecoreRoss Nicoll2018-09-191-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are as below: Wrap CBlockHeader::nVersion into a new class (CBlockVersion). This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID. Update getauxblock.py for new 'generate' RPC call. Add 'auxpow' to block JSON. Accept auxpow as PoW verification. Add unit tests for auxpow verification. Add check for memory-layout of CBlockVersion. Weaken auxpow chain ID checks for the testnet. Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks. Use this to disable the checks on testnet. Introduce CPureBlockHeader. Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two. Differentiate between uint256 and arith_uint256. This change was done upstream, modify the auxpow code. Add missing lock in auxpow_tests. Fix REST header check for auxpow headers. Those can be longer, thus take that into account. Also perform the check actually on an auxpow header. Correctly set the coinbase for getauxblock results. Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be. (BIP30 block height and COINBASE_FLAGS.) Implement getauxblock plus regression test. Turn auxpow test into FIXTURE test. This allows using of the Params() calls. Move CMerkleTx code to auxpow.cpp. Otherwise we get linker errors when building without wallet. Fix rebase with BIP66. Update the code to handle BIP66's nVersion=3. Enforce that auxpow parent blocks have no auxpow block version. This is for compatibility with namecoind. See also https://github.com/namecoin/namecoin/pull/199. Move auxpow-related parameters to Consensus::Params.
* [doc] Add hint about getmempoolentry to getrawmempool help.Karl-Johan Alm2017-06-051-0/+1
| | | | | Github-Pull: #10310 Rebased-From: 3a0a5bc2341ea6a453306f6fe1c065b937294cfb
* Return correct error codes in blockchain.cpp.John Newbery2017-06-051-6/+11
| | | | | | | | | | | | | | | | | RPCs in blockchain.cpp were returning misleading or incorrect error codes (for example getblock() returning RPC_INTERNAL_ERROR when the block had been pruned). This commit fixes those error codes: - RPC_INTERNAL_ERROR should not be returned for application-level errors, only for genuine internal errors such as corrupted data. - RPC_METHOD_NOT_FOUND should not be returned in response to a JSON request for an existing method. Those error codes have been replaced with RPC_MISC_ERROR or RPC_INVALID_PARAMETER as appropriate. Github-Pull: #9853 Rebased-From: c1190963b388590dc0a346bf625c7e84f69cee8d
* Add two hour buffer to manual pruningAlex Morcos2017-02-161-2/+4
|
* Replace FindLatestBefore used by importmuti with FindEarliestAtLeast.Gregory Maxwell2017-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | In spite of the name FindLatestBefore used std::lower_bound to try to find the earliest block with a nTime greater or equal to the the requested value. But lower_bound uses bisection and requires the input to be ordered with respect to the comparison operation. Block times are not well ordered. I don't know what lower_bound is permitted to do when the data is not sufficiently ordered, but it's probably not good. (I could construct an implementation which would infinite loop...) To resolve the issue this commit introduces a maximum-so-far to the block indexes and searches that. For clarity the function is renamed to reflect what it actually does. An issue that remains is that there is no grace period in importmulti: If a address is created at time T and a send is immediately broadcast and included by a miner with a slow clock there may not yet have been any block with at least time T. The normal rescan has a grace period of 7200 seconds, but importmulti does not.
* Merge #9472: Disentangle progress estimation from checkpoints and update itWladimir J. van der Laan2017-01-121-1/+1
|\ | | | | | | | | | | | | | | df36371 Update estimated transaction count data (Pieter Wuille) e356d9a Shorten variable names and switch to tx/s (Pieter Wuille) 6dd8116 Remove SIGCHECK_VERIFICATION_FACTOR (Pieter Wuille) 3641141 Move tx estimation data out of CCheckPointData (Pieter Wuille) a4bac66 [MOVEONLY] Move progress estimation out of checkpoints (Pieter Wuille)
| * Move tx estimation data out of CCheckPointDataPieter Wuille2017-01-041-1/+1
| |
| * [MOVEONLY] Move progress estimation out of checkpointsPieter Wuille2017-01-041-1/+1
| |
* | Merge #9518: Return height of last block pruned by pruneblockchain RPCMarcoFalke2017-01-121-3/+10
|\ \ | | | | | | | | | 918d1fb Return height of last block pruned by pruneblockchain RPC (Russell Yanofsky)
| * | Return height of last block pruned by pruneblockchain RPCRussell Yanofsky2017-01-111-3/+10
| | | | | | | | | | | | | | | Change suggested by Jonas Schnelli <[email protected]> in https://github.com/bitcoin/bitcoin/pull/7871#discussion_r95577623
* | | Merge #9297: Various RPC help outputs updatedMarcoFalke2017-01-121-3/+3
|\ \ \ | |/ / |/| | | | | 54ee3fc RPC help updated (Michael Rotarius)
| * | RPC help updatedMichael Rotarius2017-01-111-3/+3
| | |
* | | fixup! Add pruneblockchain RPC to enable manual block file pruning.Russell Yanofsky2017-01-101-1/+11
| | | | | | | | | | | | Extend pruneblockchain RPC to accept block timestamps as well as block indices.
* | | Add pruneblockchain RPC to enable manual block file pruning.mrbandrews2017-01-101-0/+31
|/ /
* | Merge #8811: rpc: Add support for JSON-RPC named argumentsWladimir J. van der Laan2017-01-101-51/+51
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e7e2e1 Update RPC argument names (John Newbery) 481f289 rpc: Named argument support for bitcoin-cli (Wladimir J. van der Laan) 9adb4e1 rpc: Argument name consistency (Wladimir J. van der Laan) 8d713f7 rpc: Named arguments for rawtransaction calls (Wladimir J. van der Laan) 37a166f rpc: Named arguments for wallet calls (Wladimir J. van der Laan) 78b684f rpc: Named arguments for mining calls (Wladimir J. van der Laan) b8ebc59 rpc: Named arguments for net calls (Wladimir J. van der Laan) 2ca9dcd test: Add test for RPC named arguments (Wladimir J. van der Laan) fba1a61 rpc: Named arguments for misc calls (Wladimir J. van der Laan) 286ec08 rpc: Add 'echo' call for testing (Wladimir J. van der Laan) 495eb44 rpc: Named arguments for blockchain calls (Wladimir J. van der Laan) 6f1c76a rpc: Support named arguments (Wladimir J. van der Laan) 5865d41 authproxy: Add support for RPC named arguments (Wladimir J. van der Laan)
| * | Update RPC argument namesJohn Newbery2017-01-101-29/+29
| | |
| * | rpc: Argument name consistencyWladimir J. van der Laan2017-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The meaning is clear from the context, and we're inconsistent here. Also save typing when using named arguments. - `bitcoinaddress` -> `address` - `bitcoinprivkey` -> `privkey` - `bitcoinpubkey` -> `pubkey`
| * | rpc: Named arguments for blockchain callsWladimir J. van der Laan2017-01-051-31/+31
| |/
* | Merge #8747: [rpc] Fix transaction size comments and RPC help text.Wladimir J. van der Laan2017-01-051-5/+5
|\ \ | |/ |/| | | d29505d Fix transaction size comments. Size now refers to virtual size as defined in BIP141. (jonnynewbs)
| * Fix transaction size comments. Size now refers to virtual size as defined in ↵jonnynewbs2016-12-081-5/+5
| | | | | | | | BIP141.
* | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | | | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* | Added missing colons in when running help commandAnditto Heristyo2016-12-221-9/+9
| |
* | Add option to return non-segwit serialization via rpcGregory Sanders2016-12-051-1/+1
| |
* | Make the optional pblock in ActivateBestChain a shared_ptrMatt Corallo2016-12-041-2/+2
| |
* | Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-1/+1
| |
* | Correct help output for waitfor RPC commandsfanquake2016-11-241-10/+10
|/
* Make CBlock::vtx a vector of shared_ptr<CTransaction>Pieter Wuille2016-11-191-3/+3
|
* instance of 'mem pool' to 'mempool'S. Matthew English2016-10-271-1/+1
| | | | there was only one instance of 'mem pool' and not 'mempool', so I changed it to conform to the others
* Eliminating Inconsistencies in Textual OutputS. Matthew English2016-10-201-3/+3
| | | There were discrepancies between usage of "block chain" and "blockchain", I've changed them to the latter. The reason for this was that Wikipedia when describing this data structure writes "A blockchain — *originally block chain*", so it seemed the more appropriate term.
* Merge #7948: RPC: augment getblockchaininfo bip9_softforks dataWladimir J. van der Laan2016-10-191-1/+3
|\ | | | | | | fc14609 RPC: augment getblockchaininfo bip9_softforks data (mruddy)
| * RPC: augment getblockchaininfo bip9_softforks datamruddy2016-10-191-1/+3
| |
* | [RPC] Give RPC commands more information about the RPC requestJonas Schnelli2016-10-191-79/+79
|/
* Merge #8865: Decouple peer-processing-logic from block-connection-logicWladimir J. van der Laan2016-10-181-2/+2
|\ | | | | | | | | | | | | | | | | | | | | a9aec5c Use BlockChecked signal to send reject messages from mapBlockSource (Matt Corallo) 7565e03 Remove SyncWithWallets wrapper function (Matt Corallo) 12ee1fe Always call UpdatedBlockTip, even if blocks were only disconnected (Matt Corallo) f5efa28 Remove CConnman parameter from ProcessNewBlock/ActivateBestChain (Matt Corallo) fef1010 Use CValidationInterface from chain logic to notify peer logic (Matt Corallo) aefcb7b Move net-processing logic definitions together in main.h (Matt Corallo) 0278fb5 Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) (Matt Corallo) 87e7d72 Make validationinterface.UpdatedBlockTip more verbose (Matt Corallo)
| * Remove CConnman parameter from ProcessNewBlock/ActivateBestChainMatt Corallo2016-10-041-2/+2
| |
* | Merge #6996: Add preciousblock RPCWladimir J. van der Laan2016-10-181-0/+40
|\ \ | | | | | | | | | | | | 5805ac8 Add preciousblock tests (Pieter Wuille) 5127c4f Add preciousblock RPC (Pieter Wuille)
| * | Add preciousblock RPCPieter Wuille2016-08-261-0/+40
| | | | | | | | | | | | Includes a bugfix by Luke-Jr.
* | | Merge #8884: Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is ↵Wladimir J. van der Laan2016-10-051-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | the lowest, not highest, block a78e542 Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is the lowest, not highest, block (Luke Dashjr)
| * | Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is the lowest, not ↵Luke Dashjr2016-10-041-1/+1
| | | | | | | | | | | | highest, block
* | | [rpc] throw JSONRPCError when utxo set can not be readMarcoFalke2016-09-281-0/+2
| | |
* | | Do not shadow variablesPavel Janík2016-09-271-4/+4
| | |
* | | Merge #8085: p2p: Begin encapsulationWladimir J. van der Laan2016-09-091-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0103c5b net: move MAX_FEELER_CONNECTIONS into connman (Cory Fields) e700cd0 Convert ForEachNode* functions to take a templated function argument rather than a std::function to eliminate std::function overhead (Jeremy Rubin) d1a2295 Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting (Jeremy Rubin) 98591c5 net: move vNodesDisconnected into CConnman (Cory Fields) fa2f8bc net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options (Cory Fields) a19553b net: Introduce CConnection::Options to avoid passing so many params (Cory Fields) bafa5fc net: Drop StartNode/StopNode and use CConnman directly (Cory Fields) e81a602 net: pass CClientUIInterface into CConnman (Cory Fields) f60b905 net: Pass best block known height into CConnman (Cory Fields) fdf69ff net: move max/max-outbound to CConnman (Cory Fields) 8a59369 net: move semOutbound to CConnman (Cory Fields) bd72937 net: move nLocalServices/nRelevantServices to CConnman (Cory Fields) be9c796 net: move SendBufferSize/ReceiveFloodSize to CConnman (Cory Fields) 63cafa6 net: move send/recv statistics to CConnman (Cory Fields) adf5d4c net: SocketSendData returns written size (Cory Fields) ee44fa9 net: move messageHandlerCondition to CConnman (Cory Fields) 960cf2e net: move nLocalHostNonce to CConnman (Cory Fields) 551e088 net: move nLastNodeId to CConnman (Cory Fields) 6c19d92 net: move whitelist functions into CConnman (Cory Fields) 53347f0 net: create generic functor accessors and move vNodes to CConnman (Cory Fields) c0569c7 net: Add most functions needed for vNodes to CConnman (Cory Fields) 8ae2dac net: move added node functions to CConnman (Cory Fields) 502dd3a net: Add oneshot functions to CConnman (Cory Fields) a0f3d3c net: move ban and addrman functions into CConnman (Cory Fields) aaf018e net: handle nodesignals in CConnman (Cory Fields) b1a5f43 net: move OpenNetworkConnection into CConnman (Cory Fields) 02137f1 net: Move socket binding into CConnman (Cory Fields) 5b446dd net: Pass CConnection to wallet rather than using the global (Cory Fields) 8d58c4d net: Pass CConnman around as needed (Cory Fields) d7349ca net: Add rpc error for missing/disabled p2p functionality (Cory Fields) cd16f48 net: Create CConnman to encapsulate p2p connections (Cory Fields) d93b14d net: move CBanDB and CAddrDB out of net.h/cpp (Cory Fields) 531214f gui: add NodeID to the peer table (Cory Fields)