The Wayback Machine - https://web.archive.org/web/20201228010312/https://github.com/dashpay/dash/pull/3488
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change litemode from disabling all Dash specific features to disabling governance validation #3488

Merged
merged 14 commits into from Jun 13, 2020

Conversation

@PastaPastaPasta
Copy link
Collaborator

@PastaPastaPasta PastaPastaPasta commented May 16, 2020

This does a couple of things, it's an alternative to #3484, and works on #3485.

This changes litemode from "disable almost all Dash stuff" to "disable governance validation"

With this change I was able to start a node with ./src/qt/dash-qt --testnet --litemode --txindex=0 --prune=945 allowing me to mix, have IS/CL stuff and do almost full validation, all while not needing txindex and while not saving the whole chain on disk.

@PastaPastaPasta PastaPastaPasta requested a review from UdjinM6 May 16, 2020
// mixing is disabled by default in lite mode
throw JSONRPCError(RPC_INTERNAL_ERROR, "Mixing is disabled in lite mode, use -enableprivatesend command line option to enable mixing again");
} else if (!gArgs.GetBoolArg("-enableprivatesend", true)) {
if (!gArgs.GetBoolArg("-enableprivatesend", true)) {

This comment has been minimized.

@10xcryptodev

10xcryptodev May 16, 2020

code reading suggestion: use gArgs.GetBoolArg("-enableprivatesend", false) as this example:
https://github.com/dashpay/dash/blob/develop/src/wallet/wallet.cpp#L906

This comment has been minimized.

@PastaPastaPasta

PastaPastaPasta May 17, 2020
Author Collaborator

this shouldn't be the case. That second argument is the default, what this line is saying is if "-enableprivatesend" isn't specified, assume that privatesend is enabled, so that someone would have to specifically disable privatesend with "-enableprivatesend=0"

This comment has been minimized.

@10xcryptodev

10xcryptodev May 17, 2020

you are right, i thought that was comparing but the second argument is the default value indeed

Copy link

@UdjinM6 UdjinM6 left a comment

See below + should tweak few lines with !fLiteMode && settings.value("fShowMasternodesTab").toBool() (drop !fLiteMode && part) in src/qt/bitcoingui.cpp and rc/qt/walletview.cpp.

src/init.cpp Show resolved Hide resolved
src/spork.cpp Show resolved Hide resolved
src/privatesend/privatesend-server.cpp Show resolved Hide resolved
@PastaPastaPasta
Copy link
Collaborator Author

@PastaPastaPasta PastaPastaPasta commented May 17, 2020

see latest commits: have not tested yet

src/masternode/masternode-sync.cpp Show resolved Hide resolved
src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
src/qt/bitcoingui.cpp Show resolved Hide resolved
Copy link

@thephez thephez left a comment

If this PR renders #3478 changes inaccurate those messages (re: litemode) should be removed.

@forro68
Copy link

@forro68 forro68 commented Jun 9, 2020

Excellent PR, thank you Pasta for looking into this. Not only would this benefit normal users on the desktop, the breakthrough here could show the way forward for privatesend on native mobile apps.
I hope this can be included in 0.17.

0.15 Lite mode downloads full blockchain. #3341
0.15 Choice at first launch: Lite Mode or Full Mode #3340

@PastaPastaPasta
Copy link
Collaborator Author

@PastaPastaPasta PastaPastaPasta commented Jun 10, 2020

I think all has been resolved

Signed-off-by: Pasta <pasta@dashboost.org>
…must be MN, so must have litemode off already

Signed-off-by: Pasta <pasta@dashboost.org>
…er dash features

Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: pasta <pasta@dashboost.org>
Signed-off-by: pasta <pasta@dashboost.org>
add back
Signed-off-by: pasta <pasta@dashboost.org>
@PastaPastaPasta PastaPastaPasta force-pushed the PastaPastaPasta:litemode-is branch from 8ebbf9b to 299e6d3 Jun 10, 2020
@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jun 10, 2020

A couple more fixes are needed imo, pls see https://github.com/UdjinM6/dash/commits/pr3488

UdjinM6 added 4 commits Jun 10, 2020
@PastaPastaPasta
Copy link
Collaborator Author

@PastaPastaPasta PastaPastaPasta commented Jun 10, 2020

Looks good, cherry-picked

@PastaPastaPasta PastaPastaPasta changed the title Litemode changes Change litemode from disableing all Dash specific features to disabling governance validation Jun 10, 2020
@UdjinM6 UdjinM6 changed the title Change litemode from disableing all Dash specific features to disabling governance validation Change litemode from disabling all Dash specific features to disabling governance validation Jun 11, 2020
@UdjinM6 UdjinM6 added this to the 17 milestone Jun 12, 2020
Copy link

@UdjinM6 UdjinM6 left a comment

Seems to be working as expected 👍

Slightly tested ACK

Copy link
Collaborator

@xdustinface xdustinface left a comment

Looks good 👍

utACK

@UdjinM6 UdjinM6 merged commit 5ea76e8 into dashpay:develop Jun 13, 2020
1 of 2 checks passed
1 of 2 checks passed
label label
Details
ci/gitlab/gitlab.com Pipeline passed on GitLab
Details
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Jun 14, 2020
…g governance validation (dashpay#3488)

* enable privatesend by default in litemode

Signed-off-by: Pasta <pasta@dashboost.org>

* remove useless litemode check in CPrivateSendServer::ProcessMessage, must be MN, so must have litemode off already

Signed-off-by: Pasta <pasta@dashboost.org>

* change litemode to mean, doesn't validate governance, but has all other dash features

Signed-off-by: Pasta <pasta@dashboost.org>

* litemode must be off for MNs cont

Signed-off-by: Pasta <pasta@dashboost.org>

* change litemode help text

Signed-off-by: Pasta <pasta@dashboost.org>

* don't skip MN sync in litemode

Signed-off-by: Pasta <pasta@dashboost.org>

* drop fLiteMode in bitcoingui.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* skip governance sync in litemode

Signed-off-by: pasta <pasta@dashboost.org>

* remove fLiteMode in walletview.cpp

Signed-off-by: pasta <pasta@dashboost.org>

* add back

Signed-off-by: pasta <pasta@dashboost.org>

* fix comments

* fix cache loading

* fix scheduled tasks

* Fix help text for some rpcs (revert what's left of 3478)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
@forro68
Copy link

@forro68 forro68 commented Jun 26, 2020

Is there any chance this could be included in 0.16? I think it could be useful to allow us to use it as beta testers, then maybe make a bigger announcement for it in 0.17.

@PastaPastaPasta
Copy link
Collaborator Author

@PastaPastaPasta PastaPastaPasta commented Jun 26, 2020

Hmm, yeah. I think it probably makes sense to include in 0.16 now... Thoughts @UdjinM6?

@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jun 27, 2020

it probably makes sense to include in 0.16 now

Agree, changes look trivial-ish. Tweaked the milestone.

@PastaPastaPasta PastaPastaPasta deleted the PastaPastaPasta:litemode-is branch Jun 27, 2020
xdustinface added a commit to xdustinface/dash that referenced this pull request Jul 28, 2020
…g governance validation (dashpay#3488)

* enable privatesend by default in litemode

Signed-off-by: Pasta <pasta@dashboost.org>

* remove useless litemode check in CPrivateSendServer::ProcessMessage, must be MN, so must have litemode off already

Signed-off-by: Pasta <pasta@dashboost.org>

* change litemode to mean, doesn't validate governance, but has all other dash features

Signed-off-by: Pasta <pasta@dashboost.org>

* litemode must be off for MNs cont

Signed-off-by: Pasta <pasta@dashboost.org>

* change litemode help text

Signed-off-by: Pasta <pasta@dashboost.org>

* don't skip MN sync in litemode

Signed-off-by: Pasta <pasta@dashboost.org>

* drop fLiteMode in bitcoingui.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* skip governance sync in litemode

Signed-off-by: pasta <pasta@dashboost.org>

* remove fLiteMode in walletview.cpp

Signed-off-by: pasta <pasta@dashboost.org>

* add back

Signed-off-by: pasta <pasta@dashboost.org>

* fix comments

* fix cache loading

* fix scheduled tasks

* Fix help text for some rpcs (revert what's left of 3478)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Aug 23, 2020
…g governance validation (dashpay#3488)

* enable privatesend by default in litemode

Signed-off-by: Pasta <pasta@dashboost.org>

* remove useless litemode check in CPrivateSendServer::ProcessMessage, must be MN, so must have litemode off already

Signed-off-by: Pasta <pasta@dashboost.org>

* change litemode to mean, doesn't validate governance, but has all other dash features

Signed-off-by: Pasta <pasta@dashboost.org>

* litemode must be off for MNs cont

Signed-off-by: Pasta <pasta@dashboost.org>

* change litemode help text

Signed-off-by: Pasta <pasta@dashboost.org>

* don't skip MN sync in litemode

Signed-off-by: Pasta <pasta@dashboost.org>

* drop fLiteMode in bitcoingui.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* skip governance sync in litemode

Signed-off-by: pasta <pasta@dashboost.org>

* remove fLiteMode in walletview.cpp

Signed-off-by: pasta <pasta@dashboost.org>

* add back

Signed-off-by: pasta <pasta@dashboost.org>

* fix comments

* fix cache loading

* fix scheduled tasks

* Fix help text for some rpcs (revert what's left of 3478)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
@PastaPastaPasta
Copy link
Collaborator Author

@PastaPastaPasta PastaPastaPasta commented Sep 8, 2020

backported in #3670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.