BitShares Forum

Other => Graveyard => Marketplace => Topic started by: bytemaster on January 04, 2014, 05:27:52 pm

Title: 100 PTS - ProtoShares-Qt wallet that will send change to a specified [PAID]
Post by: bytemaster on January 04, 2014, 05:27:52 pm
I would like an update to the ProtoShares-Qt wallet that gives users the ability to specify the change address when they send.

To claim this bounty you must have a pull request accepted and merged by FreeTrade who will the build a Windows executable.  FreeTrade, you volunteered to do this from time to time for us, but I am more than willing to pay you some PTS as a tip for helping in this way.

Title: Re: 50 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 04, 2014, 06:11:19 pm
To understand more about change and change addresses please read this https://bitcoinspakistan.com/blog/all-about-change-and-change-addresses/

This may require more work than i thought

ok, so we need to Coin control to the wallet. bytemaster, care to x10 the bounty amount?
Title: Re: 50 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 04, 2014, 07:59:19 pm
https://github.com/bitcoin/bitcoin/pull/2343/files

is what we have to do basically. i am going to start now. does anyone want to help?
Title: Re: 50 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: 5chdn on January 04, 2014, 08:01:05 pm
This is a huge change in the client and protocol how transactions are processed.

I think this topic is worth ~ 500 PTS. A good approach would be to implement the experimental coin control from bitcoin client.

Read more on "bitcoin coin control" on google.
https://bitcointalk.org/index.php?topic=144331.0
https://github.com/bitcoin/bitcoin/pull/2343
Title: Re: 50 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: bytemaster on January 04, 2014, 08:03:13 pm
This is a huge change in the client and protocol how transactions are processed.

I think this topic is worth ~ 500 PTS. A good approach would be to implement the experimental coin control from bitcoin client.

Read more on "bitcoin coin control" on google.
https://bitcointalk.org/index.php?topic=144331.0
https://github.com/bitcoin/bitcoin/pull/2343

It should just be replacing the change address and nothing on the protocol layer.   I will up the bounty slightly.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: toast on January 04, 2014, 08:09:55 pm
It should just be replacing the change address and nothing on the protocol layer.   I will up the bounty slightly.
So will there be separate clients for people that want the usual change behavior and people that want change to come back to the same address?
(giving the user the option to choose is basically re-implementing coincontrol)
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: bytemaster on January 04, 2014, 08:18:20 pm
It should just be replacing the change address and nothing on the protocol layer.   I will up the bounty slightly.
So will there be separate clients for people that want the usual change behavior and people that want change to come back to the same address?
(giving the user the option to choose is basically re-implementing coincontrol)

I think it could be as simple as a single extra field in the sending field.  No need to control inputs, just the change address. 
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 04, 2014, 08:27:59 pm
I had already started putting Coin Control, should i stop? I'm half way done.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: bytemaster on January 04, 2014, 08:28:56 pm
I had already started putting Coin Control, should i stop? I'm half way done.

Coin control is fine!  It is even better :)
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 04, 2014, 09:47:12 pm
Nearly done adding the code, i however found this draw back commented in

Code: [Select]
// Note: We use a new key here to keep it from being obvious which side is the change.
 +                        //  The drawback is that by not reusing a previous key, the change may be lost if a
 +                        //  backup is restored, if the backup doesn't have the new private key for the change.
 +                        //  If we reused the old key, it would be possible to add code to look for and
 +                        //  rediscover unknown transactions that were written with keys of ours to recover
 +                        //  post-backup change.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: 5chdn on January 04, 2014, 10:02:13 pm
We should carefully consider all pros and cons.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: toast on January 04, 2014, 10:21:23 pm
Not sure if this is a healthy attitude but if protoshareholders are supposed to have "the resources, the interest, and the domain knowledge to invest [protoshares] wisely", should we really be doing this much hand-holding?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: bytemaster on January 04, 2014, 10:29:12 pm

Not sure if this is a healthy attitude but if protoshareholders are supposed to have "the resources, the interest, and the domain knowledge to invest [protoshares] wisely", should we really be doing this much hand-holding?

I want this tool to simplify my life as well. 


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 04, 2014, 10:39:25 pm
Not sure if this is a healthy attitude but if protoshareholders are supposed to have "the resources, the interest, and the domain knowledge to invest [protoshares] wisely", should we really be doing this much hand-holding?

toast, would you mind testing it out, am short on linux at the moment.

you'll find i commented some areas as //unsure since i could not make heads or tails of it, some files were very different.

https://drive.google.com/folderview?id=0BxCtiOzdwvPyZmtfM2llZWhSOU0&usp=sharing

the version of protshares i have has no makefile.am, weird. you will need to replace

Code: [Select]
clientversion.h compat.h core.h crypter.h db.h hash.h init.h \
with

Code: [Select]
clientversion.h coincontrol.h compat.h core.h crypter.h db.h hash.h init.h \
in src/makefile.am

and

Code: [Select]
forms/askpassphrasedialog.ui forms/editaddressdialog.ui forms/intro.ui \

with


Code: [Select]
forms/askpassphrasedialog.ui forms/coincontroldialog.ui forms/editaddressdialog.ui forms/intro.ui \
in src/qt/Makefile.am
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: toast on January 04, 2014, 11:17:31 pm
Can you put it on github?

Make an account, click "fork" on the I3 protoshares repo.
Code: [Select]
git clone <YOUR protoshares repo>
## make your changes
git add -u
git commit -m "coincontrol"
git push
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 04, 2014, 11:27:13 pm
Can you put it on github?

Make an account, click "fork" on the I3 protoshares repo.
Code: [Select]
git clone <YOUR protoshares repo>
## make your changes
git add -u
git commit -m "coincontrol"
git push

i do have an account but eveytime i have tied pushing Protoshares it refuses, everything else works except Protoshares.

:(
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: toast on January 04, 2014, 11:36:57 pm
That's really weird, are you sure you are working in your own ProtoShares fork and not the I3 one? Also try re-cloning
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 12:02:30 am
That's really weird, are you sure you are working in your own ProtoShares fork and not the I3 one? Also try re-cloning

tried re-cloning again but it's no use, i have tried all the available braches, but it refuses. I need to get a dedicated linux box next month, windows is just too complicated. 
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: toast on January 05, 2014, 12:05:33 am
That's really weird, are you sure you are working in your own ProtoShares fork and not the I3 one? Also try re-cloning

tried re-cloning again but it's no use, i have tried all the available braches, but it refuses. I need to get a dedicated linux box next month, windows is just too complicated.

What do you mean "all available"? Did you fork ProtoShares first? Is the repo url "github.com/<your github username>/ProtoShares.git"?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 12:37:51 am
yes, i forked protoshares properly.

mine shows these branches

master
0.6.2
0.7.2
0.6.3
freenode-verf
0.8.1
0.8.3
0.8.5
and psforkinit


Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: toast on January 05, 2014, 12:38:55 am
What error do you get when you try to push?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 01:19:21 am
What error do you get when you try to push?

"failed to sync this branch"
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 11:27:24 am
never mind, got one up now. https://github.com/Nameshar/Proto-coincontrol

can someone help me test this?
This is a huge change in the client and protocol how transactions are processed.

I think this topic is worth ~ 500 PTS. A good approach would be to implement the experimental coin control from bitcoin client.

Read more on "bitcoin coin control" on google.
https://bitcointalk.org/index.php?topic=144331.0
https://github.com/bitcoin/bitcoin/pull/2343

It should just be replacing the change address and nothing on the protocol layer.   I will up the bounty slightly.

lol i wish.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: 5chdn on January 05, 2014, 12:20:39 pm
I can do it. what do you need?

Download, compile, test transaction? Will I be refund if I lose PTS?   ;D
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: 5chdn on January 05, 2014, 01:22:56 pm
The source does not compile...

https://gist.github.com/donSchoe/8267693
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 02:42:17 pm
removed
Code: [Select]
static const unsigned int MAX_INV_SZ = 50000; from main.h unsure how to proceed with

Code: [Select]
main.h:615:11: error: default argument missing for parameter 3 of ‘int64 CTransaction::GetMinFee(unsigned int, bool, unsigned int, GetMinFee_mode) const’
any ideas?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: FreeTrade on January 05, 2014, 03:39:34 pm
What are you trying to achieve with this? MemoryCoin always sends change to the default or first key in the wallet - quite a small code change to do that, but why the need to specify the key?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 04:34:15 pm
a user requested the ability to specify which address his change goes to and the bounty was created.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: bytemaster on January 05, 2014, 04:37:29 pm
What are you trying to achieve with this? MemoryCoin always sends change to the default or first key in the wallet - quite a small code change to do that, but why the need to specify the key?


I am surprised you do this with memory coin, it means that all of your transactions are linked and easily tracked.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: FreeTrade on January 05, 2014, 04:48:43 pm
What are you trying to achieve with this? MemoryCoin always sends change to the default or first key in the wallet - quite a small code change to do that, but why the need to specify the key?


I am surprised you do this with memory coin, it means that all of your transactions are linked and easily tracked.

Yes - there's a usability/anonymity trade off there. For MC, it's necessary for voting to have coins stored on a single address.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 04:55:00 pm
i'm looking at your code now. i did quote the anonymity stuff earlier in the thread.

found this

 
Code: [Select]
/*if (nIndex != -1)
            vchPubKey = keypool.vchPubKey;
        else {
            if (pwallet->vchDefaultKey.IsValid()) {
                printf("CReserveKey::GetReservedKey(): Warning: Using default key instead of a new key, top up your keypool!");*/
                vchPubKey = pwallet->vchDefaultKey;
            /*} else
                return false;
        }*/

is that it?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: FreeTrade on January 05, 2014, 05:01:10 pm
Yes. This forces it to use the default key as the change address if that's what you want to achieve.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 05, 2014, 05:11:57 pm
i made a pull request on branch psforkinit, mind compiling for us?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 06, 2014, 03:28:21 am
C:\ProtoShares>make -f Makefile.Release
cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32
-DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_
SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DNDEBUG -I"..\Qt\4.8.5\include\Qt
Core" -I"..\Qt\4.8.5\include\QtGui" -I"..\Qt\4.8.5\include" -I"." -I"..\Qt\4.8.5\include\A
ctiveQt" -I"release" -I"." -I"..\Qt\4.8.5\mkspecs\win32-msvc2010" -Forelease\ @<<
<< was unexpected at this time.
make: *** [{src\qt\test}.cpp{release\}.obj] Error 255

Can't seem to get past this
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: FreeTrade on January 07, 2014, 04:17:35 pm
C:\ProtoShares>make -f Makefile.Release
cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32
-DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_
SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DNDEBUG -I"..\Qt\4.8.5\include\Qt
Core" -I"..\Qt\4.8.5\include\QtGui" -I"..\Qt\4.8.5\include" -I"." -I"..\Qt\4.8.5\include\A
ctiveQt" -I"release" -I"." -I"..\Qt\4.8.5\mkspecs\win32-msvc2010" -Forelease\ @<<
<< was unexpected at this time.
make: *** [{src\qt\test}.cpp{release\}.obj] Error 255

Can't seem to get past this

Sorry, haven't seen that error -

I found this guide very helpful for building for win32
https://bitcointalk.org/index.php?topic=149479.0

If you need a quick win32 build, my system is set up for that - let me know the exact path of the repo and I'll get that done for you, but I can't get involved with admin editing the source at all.

Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 07, 2014, 04:33:06 pm
https://github.com/Nameshar/ProtoShares

please make a build of this.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 08, 2014, 11:24:45 am
https://drive.google.com/file/d/0B-5Ax5kejTpMb2hUYnNKeGVLQWM/edit?usp=sharing

complete.

Thanks to Freetrade.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 09, 2014, 09:17:53 am
This bounty has been completed. Can we  have some confirmation please.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: bytemaster on January 09, 2014, 07:23:58 pm
This bounty has been completed. Can we  have some confirmation please.

Thank you everyone. To whom should this bounty be paid and how shall it be divided?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified address.
Post by: barwizi on January 09, 2014, 07:30:10 pm
lol, 60, 40 me and Freetrade. I'm feeling greedy.
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified [PAID]
Post by: FreeTrade on January 09, 2014, 09:36:06 pm
Is there a fun game to be played if we don't come to an agreement?
Title: Re: 100 PTS - ProtoShares-Qt wallet that will send change to a specified [PAID]
Post by: barwizi on January 09, 2014, 09:39:23 pm
Is there a fun game to be played if we don't come to an agreement?

lol, maybe. I can make one for 1000 MMC. I do however think it's time we have that conversation you said was for later.