aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
Commit message (Collapse)AuthorAgeFilesLines
* really s/Doge/Dis/g this timeTomo Ueda2021-09-021-7/+7
|
* really s/doge/dis/g this timeTomo Ueda2021-09-021-1/+1
|
* Add functionality to generate auxpow blocks in regtestMD Islam2021-05-251-18/+47
| | | | | | | | | This roughly reverts the work done here that disabled auxpow generation in regtest: https://github.com/dogecoin/dogecoin/pull/1431/files\#diff-ccc24453c13307f815879738d3bf00eec351417537fbf10dde1468180cacd2f1R127-R137 This is a pretty severe functionality change since auxpow is critical to Dogecoin and wallet integrators need to be able to parse the extra data in auxpow blocks. For future wallet integrators: Dogecoin follows similar schemes as Namecoin for the merged mining support and the spec is here: https://en.bitcoin.it/wiki/Merged_mining_specification pr review: GetHash -> GetPoWHash
* Revert behaviour change in getauxblockRoss Nicoll2019-07-131-4/+4
| | | | Change getauxblock to respond with a "target" field instead of "_target".
* Introduce basic Dogecoin brandingRoss Nicoll2019-03-251-1/+1
|
* Update RPC tests for Dogecoin (#1431)Ross Nicoll2018-09-191-5/+6
| | | | | | | | | * Make most of the RPC tests pass * Add AUXPoW rpc tests - Tests the auxpow rpc interface `getauxblock` - Tests consensus constraints for auxpow: - Minimum block height - Valid scrypt proof of work - Foreign chain ID
* [auxpow] Guarantee backward compatibility on getauxblockPatrick Lodder2018-09-191-1/+13
| | | | | Adds a wrapper around getauxblock to return boolean responses for getauxblock rather than bip22 responses.
* Change result from getauxblock to BIP22 validation stateRoss Nicoll2018-09-191-1/+1
|
* Modify chain consensus parameters to be height aware (#1396)Ross Nicoll2018-09-191-5/+7
| | | | | | | | | * 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
* Sync mining code from Namecore to resolve unit test failures (#1385)Ross Nicoll2018-09-191-203/+120
|
* Merge AuxPoW support from NamecoreRoss Nicoll2018-09-191-3/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Check transaction count early in submitblock.Gregory Maxwell2017-04-041-0/+4
| | | | | | | | | | | | There is no point in even hashing a submitted block which doesn't have a coinbase transaction. This also results in more useful error reporting on corrupted input. Thanks to rawodb for the bug report. Github-Pull: #10146 Rebased-From: 4f15ea102d15eb237b63464725508dc509e98819
* Don't require segwit in getblocktemplate for segwit signalling or miningSuhas Daftuar2017-03-161-4/+14
| | | | | | | | | Segwit's version bit will be signalled for all invocations of CreateNewBlock, and not specifying segwit only will cause CreateNewBlock to skip transactions with witness from being selected. Github-Pull: #9955 Rebased-From: abe7b3d3abe10e3554b770f40824174b3b217490
* Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activatesLuke Dashjr2017-02-201-2/+6
| | | | | Github-Pull: #9619 Rebased-From: 9fc7f0bce94f1cea0239b1543227f22a3f3b9274
* Remove redundant semicolonspracticalswift2017-01-141-2/+2
|
* Merge #8811: rpc: Add support for JSON-RPC named argumentsWladimir J. van der Laan2017-01-101-31/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+11
| |
| * rpc: Named arguments for mining callsWladimir J. van der Laan2017-01-051-22/+22
| |
* | Merge #8747: [rpc] Fix transaction size comments and RPC help text.Wladimir J. van der Laan2017-01-051-2/+4
|\ \ | |/ |/| | | 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-2/+4
| | | | | | | | 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-4/+4
| |
* | Remove unused CDiskBlockPos* argument from ProcessNewBlockMatt Corallo2016-12-041-2/+2
| |
* | Switch pblock in ProcessNewBlock to a shared_ptrMatt Corallo2016-12-041-3/+5
| | | | | | | | | | This (finally) fixes a performance regression in b3b3c2a5623d5c942d2b3565cc2d833c65105555
* | Merge #9260: Mrs Peacock in The Library with The Candlestick (killed ↵Pieter Wuille2016-12-021-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | main.{h,cpp}) 76faa3c Rename the remaining main.{h,cpp} to validation.{h,cpp} (Matt Corallo) e736772 Move network-msg-processing code out of main to its own file (Matt Corallo) 87c35f5 Remove orphan state wipe from UnloadBlockIndex. (Matt Corallo)
| * | Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-1/+1
| | |
* | | Disable fee estimates for a confirm target of 1 blockAlex Morcos2016-11-291-0/+2
|/ /
* / Always add default_witness_commitment with GBT client supportPieter Wuille2016-11-211-1/+3
|/
* Make CBlock::vtx a vector of shared_ptr<CTransaction>Pieter Wuille2016-11-191-2/+3
|
* Replace CValidationState param in ProcessNewBlock with BlockCheckedMatt Corallo2016-11-091-11/+5
|
* Remove pfrom parameter from ProcessNewBlockMatt Corallo2016-11-091-2/+2
| | | | This further decouples ProcessNewBlock from networking/peer logic.
* Revert "RPC: Give more details when "generate" fails"Matt Corallo2016-11-081-1/+1
| | | | | This only returned information in the case of CheckBlock failure, but breaks future changes.
* RPC: Give more details when "generate" failsJorge Timón2016-11-081-1/+1
|
* Merge #9026: Fix handling of invalid compact blocksPieter Wuille2016-11-071-2/+2
|\ | | | | | | | | | | d4833ff Bump the protocol version to distinguish new banning behavior. (Suhas Daftuar) 88c3549 Fix compact block handling to not ban if block is invalid (Suhas Daftuar) c93beac [qa] Test that invalid compactblocks don't result in ban (Suhas Daftuar)
| * Fix compact block handling to not ban if block is invalidSuhas Daftuar2016-11-031-2/+2
| |
* | Remove priority estimationAlex Morcos2016-11-071-2/+2
|/
* 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
* [RPC] Give RPC commands more information about the RPC requestJonas Schnelli2016-10-191-45/+45
|
* Merge #8951: RPC/Mining: getblocktemplate: Update and fix formatting of helpWladimir J. van der Laan2016-10-191-30/+36
|\ | | | | | | 59daa58 RPC/Mining: getblocktemplate: Update and fix formatting of help (Luke Dashjr)
| * RPC/Mining: getblocktemplate: Update and fix formatting of helpLuke Dashjr2016-10-191-30/+36
| |
* | 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 #8223: [c++11] Use std::unique_ptr for block creation.Wladimir J. van der Laan2016-10-181-7/+3
|\ \ \ | | | | | | | | | | | | 9fce062 [c++11] Use std::unique_ptr for block creation. (Daniel Kraft)
| * | | [c++11] Use std::unique_ptr for block creation.Daniel Kraft2016-06-181-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | CreateNewBlock returns a pointer for which the caller takes ownership. Use std::unique_ptr to make this explicit and simplify handling of these objects in getblocktemplate.
* | | | RPC: Chainparams: Remove Chainparams::fTestnetToBeDeprecatedFieldRPCJorge Timón2016-10-181-2/+0
| |/ / |/| |
* | | Do not shadow variablesPavel Janík2016-09-271-2/+2
| | |
* | | net: Add most functions needed for vNodes to CConnmanCory Fields2016-09-081-1/+4
| | |
* | | net: Pass CConnman around as neededCory Fields2016-09-081-2/+2
| | |
* | | Merge #8163: Do not shadow global RPC table variable (tableRPC)Wladimir J. van der Laan2016-08-311-2/+2
|\ \ \ | | | | | | | | | | | | de1bbe3 Do not shadow global RPC table variable (tableRPC) (Pavel Janík)
| * | | Do not shadow global RPC table variable (tableRPC)Pavel Janík2016-08-251-2/+2
| | | |