Skip to content

Conversation

@gladcow
Copy link

@gladcow gladcow commented Apr 19, 2018

Remove instantsenddepth option and dummy confirmations for IX transactions.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! 👍

See inline comments
+
There is no way to quickly distinguish between regular tx and IS in GUI now, you have to open tx details dialog to get some idea. Smth like 5164d34d17ff7078c90bebcf7814defa2c3bd6d6 + 4f1fd17e4d880246b79772b670ab134d3d2a7faa + 141c9b9d88e1bd30d379763dffb72d190037cbb4 should do it more or less ;)

PS. Pretty surprised that amount of changes is that small. I expected this transformation to be much more invasive originally tbh, glad that it's not the case :)

src/instantx.h Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment shouldn't be deleted

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't IsTrusted() be enough here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: change name to IsLockedByInstantSend or smth like that

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see inline comments

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err... That's not what I meant, I meant that addition of !pcoin->IsLockedIX() was excessive because it's already a part of IsTrusted(), not that smth else should be removed..

Copy link

@UdjinM6 UdjinM6 Apr 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually... I double checked and I guess I was maybe wrong in my initial comment - we don't really check if tx is final or not when MN votes for some input so IsTrusted() == false && IsLockedIX() == true could be a thing probably. Pls revert this (and the one below) to your original version. Sorry 😇

EDIT: but we do check if lock request itself is final or not... 🙄 Anyway, more checks is probably better 😅

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've missed it too, will revert it now

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Fixed" the wrong one here, should not touch this and fix GetUnconfirmedWatchOnlyBalance() instead

@UdjinM6 UdjinM6 added this to the 12.4 milestone Apr 23, 2018
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slightly tested ACK

@UdjinM6
Copy link

UdjinM6 commented Apr 23, 2018

Not really sure if we can include this in 12.3 or should we postpone this till 12.4 instead. On one hand, this only touches local wallet code and GUI/rpc, no consensus or stability critical parts are affected. On the other hand, don't want any surprises in wallet code this close to the release either and there are still some TODOs regarding icons etc. I'm leaning towards 12.4 for now unless someone voice strongly for 12.3 and is willing to draw/add icons etc.

@UdjinM6 UdjinM6 requested review from codablock and nmarley April 23, 2018 10:20
@codablock
Copy link

utACK but would strongly prefer to put this into 12.4 or 12.3.x instead of 12.3.

nmarley
nmarley previously approved these changes Apr 23, 2018
Copy link

@nmarley nmarley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, but I would also prefer to wait to merge until 12.4 or a 12.3.x patch release that can be well tested

@PastaPastaPasta
Copy link
Member

Can someone explain why this change is important/good. I see no problem with displaying the dummy confirmations.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rebase

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested again, looks good 👍

There is one small nit, see below. Plus we should probably update instantsend.md to match new logic/rpc param.

{
const CWalletTx* pcoin = &(*it).second;
if (pcoin->IsTrusted())
if(pcoin->IsTrusted())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this line should have no changes (bring the whitespace back)

The key thing to understand is that this value indicates the number of "confirmations" a successful Transaction Lock represents. When Wallet RPC commands which support `minconf` and `addlockconf` parameters (such as `listreceivedbyaddress`) are performed and `addlockconf` is `true`, then `instantsenddepth` attribute is taken into account when returning information about the transaction. In this case the value in `confirmations` field you see through RPC is showing the number of `"Blockchain Confirmations" + "InstantSend Depth"` (assuming the funds were sent via InstantSend).

There is also a field named `instantlock` (that is present in commands such as `listsinceblock`). The value in this field indicates whether a given transaction is locked via InstantSend.
There is a field named `instantlock` (that is present in commands such as `listsinceblock`). The value in this field indicates whether a given transaction is locked via InstantSend.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. But there is no underlying mechanism anymore and Examples sub-section doesn't really give any additional valuable info now, so we probably can write the whole RPC section like this:

Details pertaining to an observed "Transaction Lock" can also be retrieved through RPC. There is a boolean field named instantlock which indicates whether a given transaction is locked via InstantSend. This field is present in the output of some wallet RPC commands e.g. listsinceblock, gettransaction etc. as well as in the output of some mempool RPC commands e.g. getmempoolentry and a couple of others like getrawmempool (for verbose=true only).

Thoughts? @codablock @nmarley

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this paragraph seems more accurate (removes "underlying mechanism") and descriptive (adds info on boolean field and which RPC commands have it).

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@UdjinM6 UdjinM6 merged commit 0a6f473 into dashpay:develop Jul 28, 2018
@UdjinM6 UdjinM6 mentioned this pull request Sep 1, 2018
thephez added a commit to thephez/dash-docs that referenced this pull request Oct 22, 2018
thephez added a commit to dashpay/docs that referenced this pull request Oct 22, 2018
thephez added a commit to dash-docs/dash-docs that referenced this pull request Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants