Commit Graph

13357 Commits

Author SHA1 Message Date
Spencer Lievens
c4fe229008 Access WorkQueue::running only within the cs lock. (#1460)
This removes a race between Interrupt() and Run()
2017-05-05 14:33:26 +03:00
Spencer Lievens
e30faab6fd Make strWalletFile const (#1459)
* Make strWalletFile const

* Insert Line Space for Legibility
2017-05-05 14:31:25 +03:00
Allan Doensen
9901cf4338 Fix for dash-qt issue with startup and multiple monitors. (#1461)
* Fix for issues with startup and multiple monitors on windows.

* Improvements to centering code after a suggestion from zander.
2017-05-05 14:28:40 +03:00
Will Wray
82a4643135 Doc: fix broken formatting in markdown #headers (#1462)
* Doc: fix broken formatting in markdown #headers

Insert a space in markdown headers between the #'s and the header text.
(It appears that the space is required since a github update a year ago
https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0)

* Update REST-interface.md

* Update guide-startmany.md

* Update instantsend.md

* Update keepass.md

* Update release-process.md
2017-05-05 14:28:08 +03:00
Oleg Girko
39750439bf Force to use C++11 mode for compilation (#1463)
* build: Enable C++11 build, require C++11 compiler

Implements #6211.

* depends: use c++11

* build: update ax_cxx_compile_stdcxx to serial 4

* build: force a c++ standard to be specified

Newer compilers may switch to newer standards by default. For example, gcc6
uses std=gnu++14 by default.

* c++11: fix libbdb build against libc++ in c++11 mode

atomic_init clashes with

* c++11: CAccountingEntry must be defined before use in a list

c++11ism. This fixes builds against libc++.
2017-05-05 14:27:27 +03:00
UdjinM6
7242e29228 Refactor PS (#1437)
* split CDarksendPool

* split DoAutomaticDenominating

* CMasternode* -> masternode_info_t

* move some globals into CPrivateSendClient

* addressed PR comments
2017-05-05 14:26:27 +03:00
chaeplin
411332f94b sentinel uses status of funding votes (#1440) 2017-04-23 11:00:11 +03:00
UdjinM6
559f8421b1 Few fixes for PrivateSend (#1408)
* PS should limit entry size, not mixing amount

* There should be no fee in mixing tx

* make sure pwalletMain is not null in PrepareDenominate

*  no need for "double" in GetAverageAnonymizedRounds, "float" should be enough

* add strErrorRet
2017-04-20 23:34:47 +03:00
UdjinM6
6067896aec mix inputs with highest number of rounds first (#1248) 2017-04-20 23:34:35 +03:00
Oleg Girko
b40f8f333c Rename bitcoinconsensus library to dashconsensus. (#1432)
All names containing bitcoinconsensus remaned to contain dashconsensus.
This is needed to avoid conflicts with real bitcoinconsensus library
shipped with Bitcoin Core.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2017-04-15 09:29:09 +02:00
UdjinM6
98990b683a Refactor: CDarkSendSigner (#1410)
* Refactor: CDarkSendSigner -> CMessageSigner + CMasternodeBroadcast::IsVinAssociatedWithPubkey

* move IsVinAssociatedWithPubkey to CMasternode

* static IsVinAssociatedWithPubkey -> no params IsInputAssociatedWithPubkey
2017-04-12 10:04:06 +03:00
Oleg Girko
f3b92a95d9 c++11: don't throw from the reverselock destructor (#1421)
noexcept is default for destructors as of c++11. By throwing in reverselock's
destructor if it's lock has been tampered with, the likely result is
std::terminate being called. Indeed that happened before this change.

Once reverselock has taken another lock (its ctor didn't throw), it makes no
sense to try to grab or lock the parent lock. That is be broken/undefined
behavior depending on the parent lock's implementation, but it shouldn't cause
the reverselock to fail to re-lock when destroyed.

To avoid those problems, simply swap the parent lock's contents with a dummy
for the duration of the lock. That will ensure that any undefined behavior is
caught at the call-site rather than the reverse lock's destruction.

Barring a failed mutex unlock which would be indicative of a larger problem,
the destructor should now never throw.
2017-04-11 13:55:41 +03:00
UdjinM6
8bbcf62000 Fixed pow (test and algo) (#1415)
* Extend pow test to actually check DGW3 diff adjustment

* Refactor pow
2017-04-11 13:55:07 +03:00
UdjinM6
68e1a8c790 Safety check in CInstantSend::SyncTransaction (#1412) 2017-04-11 13:54:34 +03:00
UdjinM6
5758ae1bfc Full path in "failed to load cache" warnings (#1411) 2017-04-11 13:54:17 +03:00
UdjinM6
ff30aed68f Align with btc 0.12 (#1409)
* Implement BIP 9 GBT changes

- BIP9DeploymentInfo struct for static deployment info
- VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names
- getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN
- In this commit, all rules are considered required for clients to support

* qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates

* getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not

* getblocktemplate: Use version/force mutation to support pre-BIP9 clients

* Don't use floating point

Github-Pull: #8317
Rebased-From: 477777f250

* Send tip change notification from invalidateblock

This change is needed to prevent sync_blocks timeouts in the mempool_reorg
test after the sync_blocks update in the upcoming commit
"[qa] Change sync_blocks to pick smarter maxheight".

This change was initially suggested by Suhas Daftuar <sdaftuar@chaincode.com>
in https://github.com/bitcoin/bitcoin/pull/8680#r78209060

Github-Pull: #9196
Rebased-From: 67c6326abd

* torcontrol: Explicitly request RSA1024 private key

When generating a new service key, explicitly request a RSA1024 one.

The bitcoin P2P protocol has no support for the longer hidden service names
that will come with ed25519 keys, until it does, we depend on the old
hidden service type so make this explicit.

See #9214.

Github-Pull: #9234
Rebased-From: 7d3b627395

* Bugfix: FRT: don't terminate when keypool is empty

Github-Pull: #9295
Rebased-From: c24a4f5981

* add fundrawtransaction test on a locked wallet with empty keypool

Github-Pull: #9295
Rebased-From: 1a6eacbf3b
2017-04-11 13:53:54 +03:00
UdjinM6
4595db0ce3 Few changes for governance rpc: (#1351)
- allow filtering by all signals in `list`
- do not count/print funding votes for watchdogs
2017-04-11 13:53:13 +03:00
UdjinM6
7a5943c3a2 Merge pull request #1431 from dashpay/v0.12.2.x-merge_upstream
V0.12.2.x merge upstream
2017-04-11 13:50:56 +03:00
Holger Schinzel
b815a7b6a3 Merge remote-tracking branch 'remotes/origin/master' into v0.12.2.x
# Conflicts:
#	configure.ac
#	src/clientversion.h
2017-04-11 11:19:18 +02:00
Tim Flynn
86525601d5 V0.12.1.x multiple wd rate check (#1426)
* Modify MasternodeRateCheck to support updating buffers only on failure

* Update rate check buffer only when fAddToSeen is true
2017-04-05 19:30:08 +03:00
Tim Flynn
d7fbaf907f V0.12.1.x multiple vote fix (#1425)
* Avoid adding the same vote multiple times to the vote file

* Cleanup multiple votes in vote file
2017-04-03 23:06:33 +03:00
Tim Flynn
17a36de02d Fix potential race condition in vote processing (#1424) 2017-04-02 22:58:54 +03:00
UdjinM6
7f4ff495c9 Fix ProcessVerifyBroadcast (#1423)
- check if mn rank can be calculated
- fix "is in top" condition
2017-04-01 20:40:28 +03:00
UdjinM6
d8fd73fcd5 Reject payment vote if masternode rank can't be calculated (#1422) 2017-04-01 20:40:13 +03:00
Holger Schinzel
3069e0c81a bump to 0.12.1.5 (#1418) 2017-03-24 11:47:10 +01:00
Tim Flynn
e6543b9c7c Don't add non-current wd's to seen map (#1417) 2017-03-24 13:34:10 +03:00
Holger Schinzel
1a528d9458 bump to 0.12.2.0 (#1407) 2017-03-22 21:57:10 +01:00
UdjinM6
92eaefb830 fix docs (#1404)
- fix info about files
- add info about InstantSend
2017-03-20 04:21:04 +03:00
UdjinM6
8b6a06c09f fix unsafe vNodes access (#1403) 2017-03-20 04:20:52 +03:00
UdjinM6
828b639e36 Fix mn list sync (#1401)
* Fix mn list sync

Bump sync timeout if masternode is "initially valid" and last ping was quite a long time ago

* compare to current time
2017-03-20 04:20:43 +03:00
UdjinM6
903483c5ab Translations201703 (#1384)
* translations201703 - en part

* 80%+ translations

* ru to 100%
2017-03-20 04:20:23 +03:00
Holger Schinzel
70c872fe4a [depends] Fixing download path and sha256 hash (#1398)
* Fixing download path and sha256 hash
* typo
* package version variable
2017-03-16 00:15:36 +01:00
UdjinM6
92f965fc08 bump libevent to 2.1.8 (stable) (#1397) 2017-03-15 17:12:02 +01:00
UdjinM6
8b03216353 Fix alerts (#1326)
* Add missing alert functionality

* add alert test generation

* re-enable alerts by default
2017-03-15 12:54:34 +01:00
UdjinM6
61d56ee22e Disable salvagewallet in GUI (#1390)
* Disable salvagewallet in GUI

salvagewallet is known to cause problems and
it's way to powerful to let it be accessible in GUI
https://github.com/bitcoin/bitcoin/issues/7463

I have few reports from different users as well,
would be a disaster for them, glad we have autobackup...

* typo
2017-03-15 00:56:09 +01:00
Holger Schinzel
eaf90b7717 replace legacy dnsseed (#1395) 2017-03-15 00:55:52 +01:00
UdjinM6
9ed9474a9e Drop support for pre-12.1 nodes (#1394) 2017-03-14 09:22:00 +03:00
UdjinM6
d63080100a Overhaul of coin selection for mixing (#1364)
* Overhaul of coin selection for mixing

DoAutomaticDenominating logic should be:
- check pre-conditions,
- check denominations and collaterals,
- try using existing queue,
- try creating new queue.

Currently coins are selected too early and conditions are not quite right.

This is partially due to the fact that we no longer merge old inputs
and thus we are no longer able to calculate thresholds correctly using
SelectCoinsDark. To do this in a proper way we should use balances i.e.
GetAnonymizableBalance etc. Another issue is that we should take fee into
account when we calculate such balancies and when we select coins we should
ask for a correct denom, not just the smallest one as a minimum value.

And finally there are two bugs.
SelectCoinsGrouppedByAddresses: shouldn't push items smaller than
the smallest denom into resulting vector.
SelectCoinsDark: should allow small inputs in where "small" is defined
by nValueMin, not by some arbitrary amount.

* apply fee assumption for non-denoms only

* fix

* remove const
2017-03-14 09:21:37 +03:00
Tim Flynn
d2871209f9 Node eviction fix (#1392)
* Add keyed netgroup field to CNode

* Improved node eviction implementation

* Remove need for CNodeRef
2017-03-13 07:29:16 +01:00
UdjinM6
6aaec3ae2a Fail to proceed in listsinceblock if provided blockhash can't be found (#1393)
If daemon crashes, it can't save latest block sometimes, so querying daemon
for presumably best/last hash would result in a list of all txes recognized by
this wallet as its own since genesis block which could be confusing,
to say at least. Same applies for typos etc. This should fix it.

Not sure why but such weird behaviour was the case since listsinceblock rpc was
initially introduced in Bitcoin 0.5 (Oct 5, 2011)
3a6e468d9a
2017-03-13 07:29:01 +01:00
UdjinM6
c523205386 implement importelectrumwallet (#1377)
Imports keys from an Electrum wallet export file (.csv or .json)
2017-03-12 15:42:00 +01:00
crowning-
fb3db0a57e [UI] Typo fixed (#1391) 2017-03-12 15:41:36 +01:00
Tim Flynn
fc7eca597d Locking fix for UpdatePreferredDownload (#1389) 2017-03-09 02:36:50 +04:00
Tim Flynn
eb4e6a32dd Fix deadlocks on cs_vSend in RequestGovernanceObject (#1387) 2017-03-09 02:36:40 +04:00
Tim Flynn
c8b6199979 Periodicially request orphan objects (#1383)
* Implement RequestOrphanObjects

* Ensure governance objects are only requested from peers once per call

* Add gobject log messages

* Implemented CleanOrphanObjects

* Move governance maintenance functions from NewBlock to a time-based function

* Remove unused delcaration for mapAskedForGovernanceObject
2017-03-06 08:46:59 +01:00
Holger Schinzel
85d152bac0 bump to 0.12.1.4 (#1376) 2017-03-05 23:16:30 +04:00
Tim Flynn
9537062aff Implemented utility functions for copying/releasing vNodes vector (#1382)
* Implemented utility functions for copying/releasing vNodes vector

* Refactor code to use new utility functions CopyNodeVector/ReleaseNodeVector
2017-03-05 23:16:12 +04:00
UdjinM6
119fe83bb4 Do not send outdated MNs on sync (#1373) 2017-03-02 00:31:53 +04:00
UdjinM6
5598d640e6 Do not force disconnect for stalled nodes on sync (#1374)
They might be simply busy serving us another data
2017-03-02 00:31:41 +04:00
UdjinM6
1c63052c3e fix recently observed crash on IsValid (#1375)
* fix recently observed crash on IsValid

+some small cleanup

* txin.prevout.n should not exceed txOutpointCreated.vout.size()

* fix log output
2017-03-01 21:30:43 +01:00