Commit Graph

93 Commits

Author SHA1 Message Date
Sikkie
e6d38ad6cc Rebranding 2024-02-05 23:00:22 +01:00
Tim Flynn
0c65204ee6 Merge #967: V0.12.1.x sentinel pr 1 (#967)
d371930 Added nMinGivernanceQuorum chain parameter

6e24c9c Replace hardcoded minimum with nMinGovernanceQuorum parameter

66c0d9e Added new RPC calls needed by Sentinel
 - getsuperblockcycle
 - getsuperblockbudget
 - getmingovernancequorum

6bb2338 Replaced two new RPC calls with getgovernanceinfo

c9fbd8a Changed parameter nMinGovernanceQuorum to nGovernanceMinQuorum
2016-08-28 13:15:48 -06:00
Tim Flynn
de7b2b6c51 Merge #944: V0.12.1.x governance pr - part 1 - base functionality
068c178 Added DBG macro in util.h to facilitate debugging

    - This macro allows debugging statements (typically printf's or cout's) to
      be activated or deactivated with a single comment.  Uncomment the line:
      //#define ENABLE_DASH_DEBUG
      in util.h to enable debugging statements.

    - When commented any code wrapped with the DBG() macro will simply be removed
      by the preprocessor.  When not commented all such wrapped statements will
      be present.

    - For maximum effectiveness it is best that util.h be the first effective include
      in all source files.  It is also possible to enable the macro for a single file
      by temporarily adding #define ENABLE_DASH_DEBUG to the top of the file.

    - Code committed to non-development branches should always have the define
      commented.

d125d9b V0.12.1.x -- merging trigger/generic object/superblock changes for testnet phase II

    - This commit contains the core governance system changes for 0.12.1.  Any unrelated
      changes have either been removed or moved to separate commits.

120724c File mode fixes

    - Changed mode 0755->0644 on several source files.

c7f9e11 Updated todo reminders

    - Added reminder to revert temporary reduction of number of votes
      required to trigger superblock to 1 for testing

92adc98 Made CSuperblockManager::IsValidSuperblockHeight an inline function

    - This is for efficiency since this function is called often and is
      only 1 line of code.

c050ed7 Added comment explaining rationale for no LOCK(cs) in CSuperblock::IsValid

dc933fe Removed unused CSuperblockManager::IsBlockValid function

decec88 Moved calls to SuperblockManager::IsValidSuperblockHeight into IsSuperblockTriggered.

    - Since calls to the later function are always protected by the former there's
      no reason to keep these separate and this simplifies the code in
      masternode-payments.cpp.

8672885 Reestablished expected value check for non-superblocks in IsBlockValueValid

b01cbe0 Changes to IsBlockValueValid to fix rpc test failure

a937c76 Changed include order to allow per file activation of the DBG macro

d116aa5 Fixed IsValidSuperblockHeight logic

    - Note this has an effect on testing because we can now only create
      1 superblock per day.  Devs may need to temporarily change testnet params
      for easier testing.

2d0c2de Convert superblock payments to CAmount

    - We assume that payment values in JSON are in units of DASH
      for consistency with other RPC functions, such as
      createrawtransaction.

376b833 Revert temporary testing value for nAbsVoteReq

    - Also ensure that number of votes required is never smaller than 1

8c89f4b Cleaned up CSuperblock error handling

    - Exceptions are now thrown consistently rather than using a mix of
      exceptions and return code checking.  Exceptions are now caught only
      in AddNewTrigger when the CSuperblock constructor is called.  Unnecessary object
      status members have been removed.

d7c8a6b Removed utilstrencodings header

    - This appears to help with travis tests, for unknown reasons.

c4dfc7a Fixed some minor code review issues

63c3580 Reverted locking change in miner.

    - This should have been done in the original PR but was overlooked.

4ab72de Fixed variable name to match common practice and bracket formatting

886a678 Improvements to vote conversion code

    - Replaced redundantly defined function with inclusion of governance-vote.h

    - Replaced magic numbers with their corresponding constant symbols

0a37966 Reordered governance message handling
2016-08-17 09:08:25 +02:00
UdjinM6
48d0edcbdf Merge remote-tracking branch 'bitpay/0.12.1-bitcore' into dashBitcore1
Resolved Conflicts:
	.travis.yml (ignoring changes, leaving dash version)
	src/Makefile.am
	src/main.cpp
	src/main.h
	src/rpcclient.cpp
	src/rpcserver.cpp
	src/script/script.cpp
	src/script/script.h
2016-07-19 08:49:28 +03:00
UdjinM6
078d5d932b Merge #890: Add getblockheaders RPC
3d382cb Add `getblockheaders` RPC
2016-06-20 21:53:20 +02:00
Braydon Fuller
e3d9207e5a main: add spentindex option 2016-06-02 12:15:37 -04:00
Braydon Fuller
b66eff47cf main: mempool address index 2016-06-02 12:15:14 -04:00
Braydon Fuller
0b42ba227a main: index unspent outputs by address 2016-06-02 12:15:14 -04:00
Braydon Fuller
cad092aebb main: get address deltas between range of block heights 2016-06-02 12:15:14 -04:00
Braydon Fuller
935ca8f832 main: add block timestamp index 2016-06-02 12:15:13 -04:00
Braydon Fuller
5bb6d69ff8 rpc: added getaddressbalance method using addressindex 2016-06-02 12:15:13 -04:00
Braydon Fuller
9babc7ff9f main: start of address index
Adds a configuration option for addressindex to search for txids by address. Includes
an additional rpc method for getting the txids for an address.
2016-06-02 12:15:13 -04:00
crowning-
7ee810d3b6 [UI] Rebranding: PrivateSend/InstantSend (update 2) (#804)
* [UI] Rebranding: PrivateSend/InstantSend (update 2)
* [UI] Changed name of sendtoaddress parameters: use_ix -> use_is and use_ds -> use_ps
2016-05-25 07:25:16 +02:00
Evan Duffield
e6d7f4ed7f fixing more errors 2016-05-05 10:44:46 -07:00
Evan Duffield
aee86618cd fixed greedy find/replace (opps) 2016-05-05 10:30:28 -07:00
Evan Duffield
fe5c4dd811 Converting governance system
- Generic usage of governance objects
- Added different voting types of signaling
- Removed budget commands (projection, mesc -- see sentinel https://github.com/evan82/sentinel/blob/master/docs/example4.md)
- Added various voting signaling mechanisms (origin funding, remove, valid, endorsed, milestones, outerstorage)
2016-04-19 09:51:15 -07:00
Evan Duffield
59976f3ee1 fixing more issues 2016-04-14 14:28:33 -07:00
Luv Khemani
4ce2b0214b Add autocomplete to bitcoin-qt's console window.
Removed externs
Added listCommands() to CRPCTable

Move autocomplete init to RPCConsole::setClientModel()

Closes #742
2016-03-17 08:39:05 +01:00
UdjinM6
eaf57b3fb7 Implemented masternodebroadcast
This set of rpc commands provide an ability to create masternode broadcast messages offline
and relay them from online node later (messages expire in ~1 hour).

Arguments:
1. command        (string or set of strings, required) The command to execute
2. passphrase     (string, optional) The wallet passphrase
Available commands:
  create-alias  - Create single remote masternode broadcast message by assigned alias configured in masternode.conf
  create-all    - Create remote masternode broadcast messages for all masternodes configured in masternode.conf
  decode        - Decode masternode broadcast message
  relay         - Relay masternode broadcast message to the network

Closes #741
2016-03-17 08:29:53 +01:00
UdjinM6
2fc05e5b9d Add ability to change debug category on the fly from console
NOTE: Before switching to another debug catgory you'd need to turn debugging off via "debug 0"
      and wait a bit (each thread (de)activates debug mode on its own)
2016-03-16 07:46:35 +01:00
UdjinM6
618c27a99d RPC changes
- add filter to `masternode winners`
- allow `masternode debug` right after blockchain is synced
- fix `masternode current`
- fix getpoolinfo, add ds queue size to output

Closes #725
2016-03-09 07:21:21 +01:00
UdjinM6
a5ac60b868 Merge remote-tracking branch 'bitcoin/0.12' into HEAD
+ merge fixes
+ keepass on evhttp
2016-02-06 16:48:04 +03:00
Alex Morcos
fd4bd5009e
Add RPC call abandontransaction
- Make wallet descendant searching more efficient
- Add new rpc call: abandontransaction

Unconfirmed transactions that are not in your mempool either due to eviction or other means may be unlikely to be mined.  abandontransaction gives the wallet a way to no longer consider as spent the coins that are inputs to such a transaction.  All dependent transactions in the wallet will also be marked as abandoned.

- Add RPC test for abandoned and conflicted transactions.
- [Wallet] Call notification signal when a transaction is abandoned

Github-Pull: #7312
Rebased-From: 9e697172542e2b01517e4025df2c23d0ed5447f4 01e06d1fa365cedb7f5d5e17e6bdf0b526e700c5 df0e2226d998483d247c0245170f6b8ff6433b1d d11fc1695c0453ef22a633e516726f82717dd1d9
2016-01-13 15:55:00 +01:00
MarcoFalke
333e1eaeea
Bump copyright headers to 2015
- Bump copyright headers to 2015
- [devtools] Rewrite fix-copyright-headers.py
- [devtools] Use git pretty-format for year parsing

Github-Pull: #7205
Rebased-From: fa6ad855e9159b2247da4fa0054f32fa181499ab fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35 fa71669452e57039e4270fd2b33a0e0e1635b813
2016-01-05 14:13:33 +01:00
Alex Morcos
56106a3300 Expose RPC calls for estimatesmart functions
Also add testing for estimatesmartfee in smartfees.py
2015-11-16 15:42:31 -05:00
Jonas Schnelli
9623e93473 [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2015-10-01 10:49:57 +02:00
UdjinM6
730c29fa47 add mnbudgetvoteraw 2015-09-23 03:15:23 +03:00
Wladimir J. van der Laan
be33f3f50b Implement RPCTimerHandler for Qt RPC console
Implement RPCTimerHandler for Qt RPC console, so that `walletpassphrase`
works with GUI and `-server=0`.

Also simplify HTTPEvent-related code by using boost::function directly.
2015-09-03 10:59:19 +02:00
Wladimir J. van der Laan
40b556d374 evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.

- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.

- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral

- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.

- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.

By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.

What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.

Configuration options:

- `-rpcthreads`: repurposed as "number of  work handler threads". Still
defaults to 4.

- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.

- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.

- `-debug=http`: low-level http activity logging
2015-09-03 10:59:18 +02:00
Evan Duffield
801e597d64 added mnsync command 2015-08-05 07:24:58 -07:00
Evan Duffield
5024b7d3f6 Added sendtoaddressix for api IX support 2015-07-30 11:33:56 -07:00
Matt Corallo
a1d7df3236 Add importpubkey method to import a watch-only pubkey 2015-07-20 16:01:37 -07:00
Wladimir J. van der Laan
726e28643c
Merge pull request #6247
076badb Add getblockheader RPC call (Peter Todd)
2015-07-02 18:53:18 +02:00
Wladimir J. van der Laan
91389e51c7
Merge pull request #6088
2085895 fundrawtransaction tests (Jonas Schnelli)
21bbd92 Add fundrawtransaction RPC method (Matt Corallo)
1e0d1a2 Add FundTransaction method to wallet (Matt Corallo)
2d84e22 Small tweaks to CCoinControl for fundrawtransaction (Matt Corallo)
9b4e7d9 Add DummySignatureCreator which just creates zeroed sigs (Pieter Wuille)
2015-06-23 12:40:00 +02:00
Jonas Schnelli
4e36e9bcc7 setban: rewrite to UniValue, allow absolute bantime 2015-06-17 21:40:55 +02:00
Jonas Schnelli
d930b26a26 [RPC] add setban/listbanned/clearbanned RPC commands 2015-06-17 21:40:55 +02:00
Alex van der Peet
60dbe73016 New RPC command disconnectnode 2015-06-16 14:19:41 +02:00
Matt Corallo
21bbd920e5 Add fundrawtransaction RPC method 2015-06-11 01:03:23 -07:00
Peter Todd
076badb60f
Add getblockheader RPC call
Alternative to getblock that works even when the block itself has been
pruned, returning all available information.
2015-06-05 17:07:58 -02:30
Philip Kaufmann
a9ac95c1bc use const references where appropriate 2015-06-04 19:34:18 +02:00
Jonas Schnelli
9a8897f4ac Remove JSON Spirit wrapper, remove JSON Spirit leftovers
- implement find_value() function for UniValue
- replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper
- remove JSON Spirit sources
2015-06-04 09:16:21 +02:00
Jonas Schnelli
3df0411ad9 remove JSON Spirit UniValue wrapper 2015-06-04 09:16:06 +02:00
Jeff Garzik
15982a8b69 Convert tree to using univalue. Eliminate all json_spirit uses. 2015-06-04 09:16:05 +02:00
Evan Duffield
40149c4e41 Budgeting Software / Reference Node Removal
- Added commands for using budgets "mnbudget" and "mnfinalbudget"
- Supports 100% decentralized budget control and view-only site with json meta data object
2015-05-14 18:01:15 -07:00
Wladimir J. van der Laan
1fd2d39529
Merge pull request #5420
6b4feb8 [QA] rest.py RPC test: change setgenerate() to generate() (Jonas Schnelli)
97ee866 [REST] getutxos REST command (based on Bip64) (Jonas Schnelli)
2015-05-06 16:50:05 +02:00
Evan Duffield
969826c249 Reference Node / Stubbed Out Budget System
- Removed of reference node and replaced with decentralized quorums that pick the masternodes who get paid each block.
- Made a budgeting system, where masternodes can vote on individual budgets and the data is stored perminently on each clients computer
2015-04-30 07:55:37 -07:00
Matt Corallo
59ed61b389 Add RPC call to generate and verify merkle blocks 2015-04-23 17:50:39 -07:00
Jonas Schnelli
97ee866549 [REST] getutxos REST command (based on Bip64)
has parts of @mhearn #4351
* allows querying the utxos over REST
* same binary input and outputs as mentioned in Bip64
* input format = output format
* various rpc/rest regtests
2015-04-21 20:26:49 +02:00
Jonas Schnelli
b9fb692d04 Push down RPC reqWallet flag 2015-04-12 19:37:29 +02:00
UdjinM6
64eebc3316 0.12 dirty merge'n'fix (bitcoin 0.10) 2015-04-04 19:24:37 +03:00