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

Remove IP transaction check #8546

Closed
wants to merge 1 commit into from
Closed

Remove IP transaction check #8546

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 19, 2016

The old Pull Request was junk and it's moved.

@ghost ghost mentioned this pull request Aug 19, 2016
@maflcko
Copy link
Member

maflcko commented Aug 19, 2016

Please also get rid of the other tr("From"). No need to keep useless information/code around.

@maflcko maflcko added the GUI label Aug 19, 2016
@ghost
Copy link
Author

ghost commented Aug 19, 2016

@MarcoFalke Done.

@maflcko
Copy link
Member

maflcko commented Aug 19, 2016

@maflcko maflcko changed the title Remove IP transaction check [CLEAN] Remove IP transaction check Aug 19, 2016
@ghost
Copy link
Author

ghost commented Aug 19, 2016

Did I remove the wrong one?

I removed two tr("From") lines. The first one I deleted was this.

@maflcko
Copy link
Member

maflcko commented Aug 19, 2016

Concept ACK, but this needs review and tests with actual "online" transactions (IP transactions).

@ghost
Copy link
Author

ghost commented Aug 19, 2016

@MarcoFalke I cannot find the binaries for v0.7.2 and compiling is difficult. If you give me its link, I can test the Pull Request.

@sipa
Copy link
Member

sipa commented Aug 19, 2016 via email

@ghost
Copy link
Author

ghost commented Aug 19, 2016

Status

This feature has been removed from Bitcoin Core as-of v0.8.0

https://en.bitcoin.it/wiki/IP_transaction

@sipa
Copy link
Member

sipa commented Aug 19, 2016 via email

@ghost
Copy link
Author

ghost commented Aug 19, 2016

Yes, you were right. The last version it exists is 4.0rc2, thanks for reminding me.

@jonasschnelli
Copy link
Contributor

utACK 8fd27c6

@@ -167,9 +146,6 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco

if (fAllFromMe)
{
if(fAllFromMe & ISMINE_WATCH_ONLY)
strHTML += "<b>" + tr("From") + ":</b> " + tr("watch-only") + "<br>";
Copy link
Member

@laanwj laanwj Aug 22, 2016

Choose a reason for hiding this comment

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

Now that this no longer uses From:, do we still have a way to indicate in the transation details that a transaction is watch-only?

Copy link
Member

@maflcko maflcko Aug 22, 2016 via email

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

There's an eye-icon, but that is shown in the transaction list, not in the transaction details.

Copy link
Member

Choose a reason for hiding this comment

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

Please leave a "Watch-only" notice in the transaction details.

Copy link
Author

Choose a reason for hiding this comment

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

Should I bring back these lines?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but word it differently please. There is no need to display this as From: watch-only. But it needs to be visible that the transaction is watch-only.

Copy link
Author

@ghost ghost Aug 24, 2016

Choose a reason for hiding this comment

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

Also isn't this part of code inefficient?

if (fAllFromMe)
         {
           if(fAllFromMe & ISMINE_WATCH_ONLY)

I am going to replace this with this:

if (fAllFromMe)
         {
           if(ISMINE_WATCH_ONLY)

Am I right or should I keep this?

Copy link
Member

Choose a reason for hiding this comment

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

Eh, no don't do that. Firstly, don't optimize things which are not a bottleneck - one comparison is negligible to all the bit blitting and pixel pushing happening in Qt itself.
It's also far from equivalent: & is a bitwise AND operator, its matching a bit field.

@maflcko
Copy link
Member

maflcko commented Aug 23, 2016

Regardless of testing this pull, an old wallet.dat would be helpful for general compatibility testing, too.

@ghost
Copy link
Author

ghost commented Aug 24, 2016

@MarcoFalke If you need, you can use this wallet.dat.zip which I just created (created by v0.8.6).

EDIT: Wait for a newer wallet.dat. This old one has no transactions.

@maflcko
Copy link
Member

maflcko commented Aug 24, 2016 via email

@ghost
Copy link
Author

ghost commented Aug 24, 2016

Nope, not yet. I couldn't find 0.3.24's compiled version, and I'll compile it by myself after I install wxWidgets.

@laanwj
Copy link
Member

laanwj commented Aug 26, 2016

Nope, not yet. I couldn't find 0.3.24's compiled version, and I'll compile it by myself after I install wxWidgets.

Do you really need the GUI? was there no way to do IP transactions through bitcoind? I don't remember, could well be true.

@laanwj
Copy link
Member

laanwj commented Sep 1, 2016

If actually testing with such an old version is a problem, maybe it would be possible to emulate such a transaction, e.g. take the code and artificially inject it into the wallet? That would make a good test.

@sipa
Copy link
Member

sipa commented Sep 1, 2016

I really don't know if we need to do that much effort for a feature that has been disabled by default since september 30th 2010 (almost 6 years ago). Sure, it shouldn't crash if anyone has records left from such transactions in their wallet, but I also don't think we should show anything useful about them.

@laanwj
Copy link
Member

laanwj commented Sep 1, 2016

I agree, the only thing to check here is that it doesn't crash.

@ghost
Copy link
Author

ghost commented Sep 2, 2016

This happened after I entered the command below. What might be causing it?

 make -f makefile.unix
g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -DUSE_UPNP=0 -I/usr/local/lib/wx/include/gtk2-unicode-static-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -DGUI -o obj/util.o util.cpp
In file included from util.cpp:4:0:
headers.h:43:20: fatal error: db_cxx.h: No such file or directory
compilation terminated.

@sipa
Copy link
Member

sipa commented Sep 2, 2016 via email

@luke-jr
Copy link
Member

luke-jr commented Sep 10, 2016

Try make -f makefile.unix bitcoind DEBUGFLAGS="-I/usr/include/db4.8"

@ghost
Copy link
Author

ghost commented Sep 10, 2016

Does bitcoind have IP transaction support?
Also what's wrong here?
(Both make -f makefile.unix and make -f makefile.unix bitcoind DEBUGFLAGS="-I/usr/include/db4.81 is causing this)

net.cpp: In functionvoid ThreadMapPort2(void*)’:
net.cpp:1076:63: error: too few arguments to functionUPNPDev* upnpDiscover(int, const char*, const char*, int, int, int*)’
     devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
 (There's an ^ showing 0)
In file included from net.cpp:23:0:
/usr/include/miniupnpc/miniupnpc.h:58:1: note: declared here
 upnpDiscover(int delay, const char * multicastif,
 (There's an ^ showing upnpDiscovery)
net.cpp:1090:58: error: too few arguments to functionint UPNP_AddPortMapping(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*)’
                          port, port, lanaddr, 0, "TCP", 0);
There's an ^ showing the last 0.

@luke-jr
Copy link
Member

luke-jr commented Sep 10, 2016

miniupnpc breaks APIs often.

Try make -f makefile.unix bitcoind USE_UPNP= DEBUGFLAGS="-I/usr/include/db4.8"

Note that's a null value for USE_UPNP.

(I don't know anything about IP transactions...)

@luke-jr
Copy link
Member

luke-jr commented Sep 10, 2016

Reviewing historical code, it looks like you need to go back to v0.3.20 to receive IP transactions.

Note also that "to" is still supported today by RPC sendtoaddress's comment-to...

@luke-jr
Copy link
Member

luke-jr commented Sep 10, 2016

Oh, and the receiving IP txns looks like it's part of the GUI... I don't think I ever managed to build the wx GUI, so I can't help with that. :(

@ghost
Copy link
Author

ghost commented Sep 10, 2016

https://gist.github.com/mcccs/5b43d4638e303a6b0556b865cfd1f264

Maybe we should close this Pull Request, because it needs too much work for non-important feature.

@luke-jr
Copy link
Member

luke-jr commented Sep 10, 2016

Simulating an IP transaction may very well be easier. But if you've reduced it to link errors like those, it's probably just a matter of getting the LDFLAGS right now...

@ghost
Copy link
Author

ghost commented Sep 13, 2016

Assembler messages:
Fatal error: can't create obj/nogui/util.o: No such file or directory
makefile.unix:69: recipe for target 'obj/nogui/util.o' failed
make: *** [obj/nogui/util.o] Error 1

@luke-jr What am I missing now?

@jonasschnelli
Copy link
Contributor

What's the status here?
IMO there is no need for the 0.14 GUI to support IP transactions. I think its acceptable if it breaks wallets used back in 0.3.x in conjunction with IP transactions.

@laanwj
Copy link
Member

laanwj commented Oct 18, 2016

I'm closing this for now. I'm not convinced that this only removes code related to pay-to-IP transactions, and seems unfeasible to test. Doesn't hurt to leave this code around for a little longer.

@laanwj laanwj closed this Oct 18, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants