Author Topic: DVS Light Wallet for Mac Open Beta  (Read 6791 times)

0 Members and 1 Guest are viewing this topic.

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
Re: DVS Light Wallet for Mac Open Beta
« Reply #30 on: February 01, 2015, 10:53:12 pm »
For the windows users, I'm hoping to get my hands on a windows dev box tomorrow, so hopefully I'll get something together for you. Thanks for being patient!

Looking forward to it. Thanks!
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Re: DVS Light Wallet for Mac Open Beta
« Reply #31 on: February 01, 2015, 11:34:45 pm »
By the way, I am pretty sure I have heard this bug discussed before, but I'll mention it here since it happened while interacting with the light wallet.

I used the full client's wallet_transfer_to_address  command to transfer 10 DVS from my arhag account to the active key of my arhag-light account (DVS6AryKFGdYZRJmmT2HaSZcRcuv1Q6VvQjbWgfnGodWrUqriM8Uz). I received the 10 DVS in my arhag-light account within the light wallet.  I then used the light wallet to send 8 DVS back to arhag (which reduced my arhag-light balance to 0 since 1 DVS was the transaction fee and 1 DVS was sent as a fee to Nathan's light wallet server).

Both transactions were noted by the light wallet and the full client. However:
  • The light wallet was not able to identify the sender (arhag) or the memo I provided in the transaction that paid arhag-light 10 DVS.
  • As currently expected, the transaction sending 10 DVS to arhag-light was sent to UNKNOWN from the perspective of the full client (since I used wallet_transfer_to_address).
  • The full client thinks the transaction sending 8 DVS from arhag-light to arhag is a transaction in which arhag sent 8 DVS to arhag-light! As a result it mistakenly deducts 9 DVS from the balance column (as reported by "wallet_account_transaction history arhag") when it should instead add 8 DVS. What is even more bizarre is that in the GUI wallet, not only does it do the same reversal mistake, but it then reports that the balance after that transaction is -1.00 DVS! However, if I do the math manually based on what I remember of my transactions, the actual balance reported both in the summary balance for my account within the GUI and through the wallet_account_balance command are correct.

A portion of the output of "wallet_account_transaction_history arhag" from the full client:
Code: [Select]
TIMESTAMP           BLOCK     FROM                TO                  AMOUNT                  MEMO                                        BALANCE                 FEE                 ID     
==============================================================================================================================================================================================
...
2015-01-24T23:57:20 155748    arhag               UNKNOWN             100.00000 DVS           To: DVS2AgMj...                             (X)          DVS        1.00000 DVS         0162871b
2015-02-01T06:36:02 213806    arhag               UNKNOWN             10.00000 DVS            test                                        (X - 11)     DVS        1.00000 DVS         a95dc4a1
2015-02-01T06:39:00 213823    arhag               arhag-light         8.00000 DVS             testing                                     (X - 11 - 9) DVS        1.00000 DVS         cf9aa5c6
Obviously, I have modified the balance fields for the tiniest bit of privacy from lazy people (if you really want to know the value of X, you can get it from the blockchain with a little bit of work), but you should get the idea of what is going on from the mathematical expressions.

The transaction history has another problem as well. The value of X as reported by the transaction history is 1 DVS larger than it should be. This discrepancy can be noticed by comparing the account balance, which reports the correct (X - 11 + 7) DVS, to the account balance I would calculate if I were to simply correct transaction cf9aa5c6 in the transaction history, which would give me an account balance of (X - 11 + 8 ). The reason for this discrepancy is because the transaction history is missing my one (and only) vote_all transaction which cost me a 1 DVS fee. It used to be there, but somehow during this process (I upgraded clients a lot) it lost it.
« Last Edit: February 01, 2015, 11:40:07 pm by arhag »

Offline cgafeng

Re: DVS Light Wallet for Mac Open Beta
« Reply #32 on: February 02, 2015, 02:50:15 am »
Build the window version by vs2013 is success.
But i try to build the android version by windows and looks like it can't be done.
I use the qt for android(windows) and need to build the boost by mingw, and the lib boost_context can't build on windows by mingw, any idea?


I think i figure out how to build the boost_context, will try it later.
« Last Edit: February 02, 2015, 07:06:26 am by cgafeng »
BTC:1EYwcZ9cYVj6C9LMLafdcjK9wicVMDV376

Offline cn-members

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: DVS Light Wallet for Mac Open Beta
« Reply #33 on: February 02, 2015, 12:22:55 pm »
Build the window version by vs2013 is success.
But i try to build the android version by windows and looks like it can't be done.
I use the qt for android(windows) and need to build the boost by mingw, and the lib boost_context can't build on windows by mingw, any idea?


I think i figure out how to build the boost_context, will try it later.

guide please? I never get to know how to use VS, but certainly I want to build the Windows version. Thanks
BTS中文区发言人公共账号,帮助社区有效沟通与交流。
Chinese Community Spokesman Account,to help the effective communication between Chinese and other members of the community.We're not translators to do regular translations , but will help with vital ones as we see fit and available at that time.

Offline cgafeng

Re: DVS Light Wallet for Mac Open Beta
« Reply #34 on: February 02, 2015, 01:43:29 pm »
Build the window version by vs2013 is success.
But i try to build the android version by windows and looks like it can't be done.
I use the qt for android(windows) and need to build the boost by mingw, and the lib boost_context can't build on windows by mingw, any idea?


I think i figure out how to build the boost_context, will try it later.

guide please? I never get to know how to use VS, but certainly I want to build the Windows version. Thanks

不知道你是到哪一步卡住了,假设你已经能能用vs编译命令行的钱包,如果不行的话看BUILD_WIN32.md文件。

编译轻钱包另外用到了库qml-extras和qml-material,qt开发包Qt 5.4.0 for Windows 32-bit (VS 2013, OpenGL) ,Qt 5.4.0 for Android (Windows 32-bit),可以在http://www.qt.io/download-open-source/#section-3下载。

Qt5.4或5.3版本应该都可以,用qt5.4 for android其实只是用来编译qml-extras和qml-material,用Qt 5.4.0 for Windows 32-bit (MinGW 4.9.1)也可以。
编译qml-extras和qml-material一样,都用命令行设置环境变量后用mingw编译。假设qt for android安装在d:/qt/qtAndroid
Code: [Select]
set PATH=D:\Qt\qtAndroid\5.4\mingw491_32\bin;D:\Qt\qtAndroid\Tools\mingw491_32\bin;%PATH%;
qmake
mingw32-make.exe
mingw32-make.exe check
mingw32-make.exe install
编译成功后D:\Qt\qtAndroid\5.4\mingw491_32\qml目录下就会有material,拷贝material到Qt for Window目录下D:\Qt\Qt5.4.0\5.4\msvc2013_opengl\qml。我觉着ubuntu下编译出来的material应该也可以直接拷贝过来用。


在能编译命令行钱包的基础上添加环境变量,设置vs使用的qt库目录
CMAKE_PREFIX_PATH D:\Qt\Qt5.3.0\5.3\msvc2013
添加编译轻钱包
INCLUDE_LIGHT_WALLET TRUE

这样就行了。
BTC:1EYwcZ9cYVj6C9LMLafdcjK9wicVMDV376

Offline cn-members

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: DVS Light Wallet for Mac Open Beta
« Reply #35 on: February 02, 2015, 03:05:51 pm »
Build the window version by vs2013 is success.
But i try to build the android version by windows and looks like it can't be done.
I use the qt for android(windows) and need to build the boost by mingw, and the lib boost_context can't build on windows by mingw, any idea?


I think i figure out how to build the boost_context, will try it later.

guide please? I never get to know how to use VS, but certainly I want to build the Windows version. Thanks

不知道你是到哪一步卡住了,假设你已经能能用vs编译命令行的钱包,如果不行的话看BUILD_WIN32.md文件。

编译轻钱包另外用到了库qml-extras和qml-material,qt开发包Qt 5.4.0 for Windows 32-bit (VS 2013, OpenGL) ,Qt 5.4.0 for Android (Windows 32-bit),可以在http://www.qt.io/download-open-source/#section-3下载。

Qt5.4或5.3版本应该都可以,用qt5.4 for android其实只是用来编译qml-extras和qml-material,用Qt 5.4.0 for Windows 32-bit (MinGW 4.9.1)也可以。
编译qml-extras和qml-material一样,都用命令行设置环境变量后用mingw编译。假设qt for android安装在d:/qt/qtAndroid
Code: [Select]
set PATH=D:\Qt\qtAndroid\5.4\mingw491_32\bin;D:\Qt\qtAndroid\Tools\mingw491_32\bin;%PATH%;
qmake
mingw32-make.exe
mingw32-make.exe check
mingw32-make.exe install
编译成功后D:\Qt\qtAndroid\5.4\mingw491_32\qml目录下就会有material,拷贝material到Qt for Window目录下D:\Qt\Qt5.4.0\5.4\msvc2013_opengl\qml。我觉着ubuntu下编译出来的material应该也可以直接拷贝过来用。


在能编译命令行钱包的基础上添加环境变量,设置vs使用的qt库目录
CMAKE_PREFIX_PATH D:\Qt\Qt5.3.0\5.3\msvc2013
添加编译轻钱包
INCLUDE_LIGHT_WALLET TRUE

这样就行了。

多謝 我再試試看
BTS中文区发言人公共账号,帮助社区有效沟通与交流。
Chinese Community Spokesman Account,to help the effective communication between Chinese and other members of the community.We're not translators to do regular translations , but will help with vital ones as we see fit and available at that time.

Offline cn-members

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: DVS Light Wallet for Mac Open Beta
« Reply #36 on: February 02, 2015, 03:07:20 pm »
I found the robohash is different on qt-wallet and light-wallet:




any suggestions?
BTS中文区发言人公共账号,帮助社区有效沟通与交流。
Chinese Community Spokesman Account,to help the effective communication between Chinese and other members of the community.We're not translators to do regular translations , but will help with vital ones as we see fit and available at that time.

Offline modprobe

Re: DVS Light Wallet for Mac Open Beta
« Reply #37 on: February 02, 2015, 06:16:44 pm »
Builds for android are technically possible, but no one has any idea how to build fc for android, so that's a non-starter for now. Someday I'll look into it further.

Unfortunately, robohash.org has taken to giving unreliable results for their hashes. The Qt wallet even shows different images for the same thing on different pages. This is not our bug.

@arhag: I'm not entirely sure what all issues you're describing... I note that if you used transfer_to_address, memos will *not* be sent, as it's impossible to send a memo without a public key (and transfer_to_address doesn't use a key; only an address) so it's expected behavior that the recipient won't have the memo. Are you reporting that the light wallet listed an incorrect balance, or an incorrect transaction display?

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Re: DVS Light Wallet for Mac Open Beta
« Reply #38 on: February 02, 2015, 10:54:02 pm »
I note that if you used transfer_to_address, memos will *not* be sent, as it's impossible to send a memo without a public key (and transfer_to_address doesn't use a key; only an address) so it's expected behavior that the recipient won't have the memo.

Oh, okay. Is there a way to send a non-TITAN (since I presume the light wallet has no way right now of knowing about received funds via TITAN) to an account rather than an address from the full client? I basically want to send some DVS to arhag-light, have the sending client grab the public key of arhag-light from the blockchain, use it as the address to send funds to (so the light wallet is aware of the funds received), and use the one-time key included with the transaction and the public key of arhag-light to derive the shared secret that encrypts the memo and sender information.

Are you reporting that the light wallet listed an incorrect balance, or an incorrect transaction display?

The main issue I was reporting is that a transfer initiated in the light wallet from arhag-light to another account (arhag) causes the full client holding the keys to that arhag account to believe (at least according to the transaction history) that it was the one that sent the funds rather than the one that received the funds.
« Last Edit: February 02, 2015, 10:57:38 pm by arhag »

Offline bytemaster

Re: DVS Light Wallet for Mac Open Beta
« Reply #39 on: February 02, 2015, 10:59:51 pm »
I note that if you used transfer_to_address, memos will *not* be sent, as it's impossible to send a memo without a public key (and transfer_to_address doesn't use a key; only an address) so it's expected behavior that the recipient won't have the memo.

Oh, okay. Is there a way to send a non-TITAN (since I presume the light wallet has no way right now of knowing about received funds via TITAN) to an account rather than an address from the full client? I basically want to send some DVS to arhag-light, have the sending client grab the public key of arhag-light from the blockchain, use it as the address to send funds to (so the light wallet is aware of the funds received), and use the one-time key included with the transaction and the public key of arhag-light to derive the shared secret that encrypts the memo and sender information.

Are you reporting that the light wallet listed an incorrect balance, or an incorrect transaction display?

The main issue I was reporting is that a transfer initiated in the light wallet from arhag-light to another account (arhag) causes the full client holding the keys to that arhag account to believe (at least according to the transaction history) that it was the one that sent the funds rather than the one that received the funds.

I helped Nathan fix that bug earlier today.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Re: DVS Light Wallet for Mac Open Beta
« Reply #40 on: February 02, 2015, 11:35:08 pm »
I helped Nathan fix that bug earlier today.

 +5% This? I think that fix also explains why the withdraw was unnecessarily split into 2 DVS and 8 DVS rather than a single 10 DVS.

So what command should I use to properly (non-TITAN) send funds to a light wallet account with memo and sender info working?

Offline vikram

Re: DVS Light Wallet for Mac Open Beta
« Reply #41 on: February 02, 2015, 11:58:34 pm »
So what command should I use to properly (non-TITAN) send funds to a light wallet account with memo and sender info working?

If you pull latest devshares branch (c6b6e4624d19a65cba0464aa06490f88f1a34b78 right now which should be good), you should just be able to do a normal wallet_transfer to arhag-light, assuming that it's set to a "public_account" on the blockchain.

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Re: DVS Light Wallet for Mac Open Beta
« Reply #42 on: February 03, 2015, 12:05:27 am »
If you pull latest devshares branch (c6b6e4624d19a65cba0464aa06490f88f1a34b78 right now which should be good), you should just be able to do a normal wallet_transfer to arhag-light,

Great, I'm building now. And I assume that also works from the GUI?

assuming that it's set to a "public_account" on the blockchain.

Can you provide more detail on this? What do I need to do to check this and change it if necessary? And specifically, what about accounts created with the light wallet? Are they public_accounts by default? I assume they should be because the light wallet can't handle TITAN and certainly doesn't currently provide any way to run advanced console commands.

Offline vikram

Re: DVS Light Wallet for Mac Open Beta
« Reply #43 on: February 03, 2015, 12:12:20 am »
Great, I'm building now. And I assume that also works from the GUI?

It should.

Can you provide more detail on this? What do I need to do to check this and change it if necessary? And specifically, what about accounts created with the light wallet? Are they public_accounts by default? I assume they should be because the light wallet can't handle TITAN and certainly doesn't currently provide any way to run advanced console commands.

Accounts can publish their preference to be a "public_account" or "titan_account". TITAN deposits should only be sent to registered accounts with the latter preference (but the current BTS release right now also attempts TITAN in other cases I believe). If you look at the spec for "wallet_account_register", it currently defaults to titan. You can update your preference using "wallet_account_update_registration". I'm not sure if the GUI currently shows the preference anywhere, or even if it's currently pretty printed in the CLI. If you do "enable_raw" to get the raw json output then do "blockchain_get_account <name>", you should be able to see the current setting. Light wallet always registers as public_account.

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Re: DVS Light Wallet for Mac Open Beta
« Reply #44 on: February 03, 2015, 12:48:38 am »
Accounts can publish their preference to be a "public_account" or "titan_account". TITAN deposits should only be sent to registered accounts with the latter preference (but the current BTS release right now also attempts TITAN in other cases I believe). If you look at the spec for "wallet_account_register", it currently defaults to titan. You can update your preference using "wallet_account_update_registration". I'm not sure if the GUI currently shows the preference anywhere, or even if it's currently pretty printed in the CLI. If you do "enable_raw" to get the raw json output then do "blockchain_get_account <name>", you should be able to see the current setting. Light wallet always registers as public_account.

Thanks for your help. Although, the help for "wallet_account_update_registration" doesn't appear to allow an "account_type" argument.

I sent some DVS from arhag to arhag-light using the GUI and then sent it back (minus fees), which worked fine (as far as the balances are concerned).

Of course, now there is a different issue where the transactions are not showing up in the light wallet or the full client. In fact, none of the old transaction history is showing up in this new build of the full client (as of this commit). The output of "wallet_account_transaction_history" is:
Code: [Select]
>> wallet_account_transaction_history

20017 invalid_name: invalid account name
Invalid account name!
    {"account_name":"GENESIS"}
    th_a  wallet.cpp:809 is_valid_account

    {}
    th_a  transaction_ledger.cpp:1618 get_pretty_transaction_history

    {}
    th_a  wallet_api.cpp:979 wallet_account_transaction_history

    {}
    th_a  common_api_client.cpp:3474 wallet_account_transaction_history

    {"command":"wallet_account_transaction_history"}
    th_a  cli.cpp:626 execute_command

Now, I see that there was a commit just one hour ago that may solve this bug. When I posted "Great, I'm building now." I had already started the build, and now I realize I was building an older commit than the one you referenced (c6b6e4624d19a65cba0464aa06490f88f1a34b78). I guess it's time to build again...