-
Notifications
You must be signed in to change notification settings - Fork 0
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
slimcoind getaddressesbyaccount and slimcoind listreceivedbyaddress reliability #221
Comments
I have indeed been able to reproduce the steps and it seems you are correct. Good find. I have also found some Stackexchange conversations related to this problem. The basic problem seems to be that Bitcoin stores change addresses in a separate category and they are not accessed by the account-related commands and also not by Solving this by adding pywallet would solve the problem for the I've to think about if its worth to spend time on this thus. In theory only one function of the pacli code could be changed and use pywallet instead of There is also an intermediate possible solution: a script transferring the change addresses which are not detected by I got also another idea: without pywallet, it would be perhaps possible to detect the change addresses with a command using |
I agree that the last option would be straightest one. By other hand I was also thinking that the implementation of the However I understand that the time to code things can't be unlimited. |
This "dependency" on slimcoind is a structural design decision of the pacli application. Once you select a "provider" via the pacli.conf file, and this "provider" is slimcoind (the setting value corresponding to slimcoind is And pywallet would only allow very few "static" commands to work, like the Labels and named addresses can even be shown without any "provider" dependency. But again, this would need structural changes to pacli. Anyway that's sort of OT here (I've still not taken a decision, that can take time in this case), I only want to avoid false hopes. The problem I have with adding pywallet directly to the package is mostly the security issue (potential exposure of private keys). Currently I think the benefits would not be high enough to counter that. |
Maybe we can limit the |
A funny discovery I've just made: it's possible to set the "outside" (change) address that is not visible by |
Just FYI: I've already implemented partly the solution to search for the change addresses via the I've currently implemented it only for
Yes, when you create a label of an address it will become part of the addresses shown by Basically once you know the address, pacli can work with it. The complicated thing is to create a list of all change addresses with slimcoind commands, and thats where I'm currently working on.
The code could be manipulated, but that would need more work, and as written above, it's likely we don't need it. |
Ok, looking forward to the upgrade. |
The following text was originally written as replay to your last remark for the issue #204.
However I've realized that I would be largely off-topic there so I've decided to close that issue and to open this one.
_
I apologize for it seems like I'm always trying to defend my old
wallet.dat
file :-) but also in this case I'm not sure it to be broken.I've tested these days on the new
wallet.dat
I have and discovered thatslimcoind
creates the change addresses that are not visible bypacli
and neither withslimcoind getaddressesbyaccount ""
(the same for any other account displayed inslimcoind listaccounts
output) nor withslimcoind listreceivedbyaddress 0 true | grep ADDRESS
, but are visible withslimcoind validateaddress THE_SAME_ADDRESS
command.The steps to reproduce the issue are the following:
slimcoind sendtoaddress ANY_ADDRESS_HERE 1
;pacli transaction show TX_ID_FROM_THE_PREVIOUS_STEP -s
;slimcoind listaccounts
;slimcoind getaddressesbyaccount ANY_ACCOUNT_FROM_THE_PREVIOUS_STEP | grep CHANGE_ADDRESS
- no results;slimcoind listreceivedbyaddress 0 true | grep CHANGE_ADDRESS
- no results;slimcoind validateaddress CHANGE_ADDRESS
-slimcoind
sees that address and considers it as belonging to the currentwallet.dat
.I assume, as you mentioned,
bitcoind
had the same issue in the past and probably also for that reason people were usingpywallet.py
, for instance, to dump thewallet.dat
(becausebitcoind
was not providing thedumpwallet
command at that epoch asslimcoind
is not providing it now). Probablyslimcoind
code was forked at that stage so we are experiencing now the same kind of issue.I was wondering whether we can include the
pywallet.py
into ourpacli
package until we upgrade the oldslimcoind
code and to use its results instead of the originalslimcoind
commands' so to feedpacli
with more reliable data, but unfortunately it seems like the versions of that program available in the internet are obsolete (the most recent version I've found is 3 years old) and they are all relying on the deprecatedbsddb
package.However there is a more modern
bsddb3
package although not compatible with the existingpywallet.py
versions but, if I've got it right, it provides the possibility to read the Berkley DB data from thewallet.dat
file, that is basically whatslimcoind
should do and we'd need.(There are also other utilities to read a file created with Berkley DB, for instance by installing the library
libdb1-compat
that was making part of Ubuntu18.04 one would be able to dump the Berkley DB file by running thedb_dump[BDB_version_here]
command and there is a solution I've found here, utilizing other libraries).In any case I don't know whether at this stage of our development it would make sense for us to dedicate our time to this matter.
Maybe we can basically mention somewhere in our documentation or in commands' help that the transactions created by
slimcoind
and not bypacli
may not be displayed bypacli
correctly so one should avoid usingslimcoind
in place of pacli.The text was updated successfully, but these errors were encountered: