GithubHelp home page GithubHelp logo

money-network-w2's People

Watchers

 avatar  avatar

Forkers

cryptobuks

money-network-w2's Issues

sign and publish - suspend file update operations

w2 publish error in full send money test 29.

sign and publish should wait for file update operations to finish.
file update operations should wait for sign and publish to finish.
See MN start_content_update, end_content_update and zeronet_site_publish.

        // keep track of other processes updating content.json
        // 1) publish must wait for other content.json updates to finish (for example cleanup outgoing wallet messages)
        // 2) other content.json update processes must wait for publish to finish
        // used by:
        // 1) moneyNetworkHubService.create_sessions.step_3_find_old_outgoing_files (post login util)
        var content_status = {
            publishing: false
        } ;
        var content_update_cbs = [] ; // callbacks waiting for publish to finish
        function start_content_update (pgm, cb) {
            content_status[pgm] = new Date().getTime() ;
            if (content_status.publishing) {
                // wait
                content_update_cbs.push(cb) ;
                return ;
            }
            cb() ;
        }
        function end_content_update (pgm) {
            var cb ;
            delete content_status[pgm] ;
            cb = content_update_cbs.shift() ;
            if (cb) cb() ;
        }

Change optional files pattern

New unsafe pattern validation in ZeroNet
{n} expressions are no longer allowed in optional files pattern.
Change optional files pattern and add files_optional validation after sign and before publish.

Notification about failed send money operations

Add UI notification about failed send money operations.
Both as sender and as receiver.
For example received w2_end_mt message from other wallet with send money error message:
request = {"msgtype":"w2_end_mt","pay_results":[null,"Origin is not allowed by Access-Control-Allow-Origin"]}

Must also be implemented in w2_start_mt.

First wallet.json write fails on proxy

site_info with auth_address and without cert_user_id

[Wrapper] Setting title to MoneyNetworkW2 - ZeroNet  all.js:1511:14
WalletCtrl.check_merger_permission siteInfo callback 1: old_cert_user_id = -1  all.js:136597:17

note: auth_address 15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9 and cert_user_id null

WalletCtrl.check_merger_permission siteInfo callback 1: site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9","feed_follow_num":null,"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":null,"started_task_num":0,"content_updated":null}  all.js:136598:17
WalletCtrl.check_merger_permission mergerSiteList callback 2: merger_sites =  {"1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh":"MoneyNetwork","1922ZMkwZdFjKbSAdFR1zA5YBHMsZC51uc":"MoneyNetwork","1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":"MoneyNetwork"}  all.js:136612:21
MoneyNetworkW2Service.read_pubkeys fileGet callback 2: timestamps: file_timestamp = 1497161803, content_signed = 1497161836, now = 1497161812  all.js:136344:25
MoneyNetworkW2Service.read_pubkeys fileGet callback 2: todo: validate pubkeys json message  all.js:136348:25
MoneyNetworkW2Service.read_pubkeys fileGet callback 2: MoneyNetwork session keys: pubkey2 = Axf8s59wWNJ7nAEwn9l24JrBYApzmy4F/b9YfiQ11gCf, pubkey = -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkTA/Y4ydKYIdAo9j/7n1
VfJW4n9Xmtvfq0QU9ZQJ4+eG6SjJs4dq8eKaf/4VQy+4hhdpakUvRp73A75cNDUe
J62D43p8vkKuhuyK/W2pZeH7q5qditWWUL10ZHi+kYrNT9xPMSmxnR6mUQ0HpIBS
/rM5qa4S1UBguy0AB7J9IVlSXR0Gs3QA/AIUDTZTHa2JNvUYU0M7qq34qGjkCWZA
dc+dnTgqCdGUAD85aM9OjTYh9PIPagRQBtLWug0XnGAwxN6MXBhx/AQQmqKG53Op
iDLNatATTGUvY8dS3/WGQztFB2WRWUEFv1YjByxtv5OXcmDcwcPCJjIvXt04ZAMz
MwIDAQAB
-----END PUBLIC KEY-----  all.js:136350:25
MoneyNetworkAPI.setup_encryption: Encryption setup: waiting for this_session_prvkey  MoneyNetworkAPI.js:35:14
MoneyNetworkW2Service.get_my_hub mergerSiteList callback 1: user_data_hubs = ["1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ"]  all.js:135956:21
MoneyNetworkW2Service.get_my_hub mergerSiteList callback 1: query 17 (MS OK) = select substr(json.directory, 1, instr(json.directory,'/')-1) as hub from json, keyvalue where (json.directory = '1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ/data/users/15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9' ) and json.file_name = 'content.json' and keyvalue.json_id = json.json_id and keyvalue.key = 'modified' order by keyvalue.key desc  all.js:135979:21
MoneyNetworkW2Service.get_my_hub dbQuery callback 2: hub = 1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ  all.js:136009:25
WalletCtrl 1: check_merger_permission callback: res = true  all.js:136622:13
WalletCtrl 1: calling create_session  all.js:136624:17
MoneyNetworkAPI.setup_encryption: Encryption setup done  MoneyNetworkAPI.js:34:39
MoneyNetworkW2Service.create_session get_wallet_json callback 1: wallet = {}  all.js:136269:21
MoneyNetworkW2Service.create_session get_wallet_json callback 1: wallet = {"wallet_address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","wallet_title":"MoneyNetworkW2","wallet_description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro"}  all.js:136275:21


error: logged in with auth_address 15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9 and cert_user_id null!!!

MoneyNetworkW2Service.write_wallet_json fileWrite callback 2: res = {"error":"Forbidden, you can only modify your own files"}  all.js:136251:25
MoneyNetworkW2Service.create_session get_wallet_json callback 1: res = {"error":"Forbidden, you can only modify your own files"}  all.js:136277:25
WalletCtrl 1 create_session callback: res = {"error":"Forbidden, you can only modify your own files"}  all.js:136627:21
MoneyNetworkW2Service.write_wallet_json fileWrite callback 2: res = {"error":"Forbidden, you can only modify your own files"}  all.js:136251:25
MoneyNetworkW2Service.add_optional_files_support write_wallet_json callback 3a: merged-MoneyNetwork/1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ/data/users/15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9/wallet.json fileWrite failed. error = {"error":"Forbidden, you can only modify your own files"}  all.js:136101:37


WalletCtrl.select_zeronet_cert: click  all.js:136634:13
hideProgress  all.js:593:7
WalletCtrl.zeronet_cert_changed: old_cert_user_id = null  all.js:136646:13
WalletCtrl.zeronet_cert_changed: ZeroFrame.site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"1KfYLGq9R6qAFiG4RmxMnhXY5CpwrfwXfq","feed_follow_num":null,"event":["cert_changed","moneynetwork.bit"],"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":"[email protected]","started_task_num":0,"content_updated":null}  all.js:136647:13


note: auth_address was changed from 
- 15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9 (cert_user_id null) to 
- 1KfYLGq9R6qAFiG4RmxMnhXY5CpwrfwXfq (cert_user_id [email protected])

WalletCtrl.zeronet_cert_changed: self.site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"15uz9hU5guLYtA5BdUUAK3kqx6pQy63ZG9","feed_follow_num":null,"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":null,"started_task_num":0,"content_updated":null}  all.js:136648:13
WalletCtrl.zeronet_cert_changed: calling check_merger_permission  all.js:136649:13
WalletCtrl.check_merger_permission siteInfo callback 1: old_cert_user_id = null  all.js:136597:17

WalletCtrl.check_merger_permission siteInfo callback 1: site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"1KfYLGq9R6qAFiG4RmxMnhXY5CpwrfwXfq","feed_follow_num":null,"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":"[email protected]","started_task_num":0,"content_updated":null}  all.js:136598:17
WalletCtrl.check_merger_permission mergerSiteList callback 2: merger_sites =  {"1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh":"MoneyNetwork","1922ZMkwZdFjKbSAdFR1zA5YBHMsZC51uc":"MoneyNetwork","1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":"MoneyNetwork"}  all.js:136612:21
WalletCtrl.zeronet_cert_changed: check_merger_permission callback: res = true  all.js:136651:17


WalletCtrl.select_zeronet_cert: click  all.js:136634:13
hideProgress  all.js:593:7
WalletCtrl.zeronet_cert_changed: old_cert_user_id = null  all.js:136646:13
WalletCtrl.zeronet_cert_changed: ZeroFrame.site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"1KfYLGq9R6qAFiG4RmxMnhXY5CpwrfwXfq","feed_follow_num":null,"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":"[email protected]","started_task_num":0,"content_updated":null}  all.js:136647:13
WalletCtrl.zeronet_cert_changed: self.site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"1KfYLGq9R6qAFiG4RmxMnhXY5CpwrfwXfq","feed_follow_num":null,"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":"[email protected]","started_task_num":0,"content_updated":null}  all.js:136648:13
WalletCtrl.zeronet_cert_changed: calling check_merger_permission  all.js:136649:13
WalletCtrl.check_merger_permission siteInfo callback 1: old_cert_user_id = null  all.js:136597:17
WalletCtrl.check_merger_permission siteInfo callback 1: site_info = {"tasks":0,"size_limit":10,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","next_size_limit":10,"auth_address":"1KfYLGq9R6qAFiG4RmxMnhXY5CpwrfwXfq","feed_follow_num":null,"auth_key_sha512":"37963578f8f72a5f738cad0592f4afb28b060ba16bfc49d9dcd8c84666c361fd","content":{"files":7,"description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","includes":1,"address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","cloneable":true,"favicon":"favicon.ico","inner_path":"content.json","settings":{"default_hubs":{"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":{"description":"Money Network - W2 - Wallet hub - runner jro","title":"W2 - Wallet hub"}}},"files_optional":0,"title":"MoneyNetworkW2","signs_required":1,"modified":1497161198,"ignore":"((js|css)/(?!all.(js|css))|.idea|.git|data/users/.*/.*|merged-.*)","zeronet_version":"0.5.5","postmessage_nonce_security":true},"peers":181,"auth_key":"5ffbe7653e8b9e1beac58ff72ba1eb86a3bbe09b84fe4abb049f805296ca637c","settings":{"added":1494401018,"bytes_recv":194492050,"optional_downloaded":0,"cache":{},"bytes_sent":262711279,"peers":180,"modified":1497161198,"size_optional":0,"serving":true,"own":false,"permissions":["Merger:MoneyNetwork"],"size":6079808},"bad_files":0,"workers":0,"cert_user_id":"[email protected]","started_task_num":0,"content_updated":null}  all.js:136598:17
WalletCtrl.check_merger_permission mergerSiteList callback 2: merger_sites =  {"1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh":"MoneyNetwork","1922ZMkwZdFjKbSAdFR1zA5YBHMsZC51uc":"MoneyNetwork","1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ":"MoneyNetwork"}  all.js:136612:21
WalletCtrl.zeronet_cert_changed: check_merger_permission callback: res = true  all.js:136651:17

Backup notification(s)

More clear backup notifications.

  • create new btc.com wallet. Now backup info in console.log for wallet restore. Must add better backup info in log and in UI. Button to show backup info. Checkbox to confirm that btc.com wallet backup info has been save secure.
  • save login choice 1. Save wallet login in MoneyNetworkW2 (browser/localStorage) encrypted with my ZeroId certificate. User should backup W2 localStorage. Add button to export/import localStorage. See MN user page. Display date for last backup.
  • save login choice 2. Save wallet login in MoneyNetwork (browser/localStorage) encrypted with my MoneyNetwork password. User should backup MN and W2 localStorage. Add export/import button. Display date for last backup.

MN ping is being processed by wrong session instance

Error in W2. Note userid = "121"! Must be a random userid used in W2W communication.

MoneyNetworkAPI.js:1765 Uncaught MoneyNetworkAPI.decrypt_2 eciesDecrypt callback 1: key eciesDecrypt failed. key = yrhruqN3SAUMVv8Hey/INgLKACDThCvx5UGWDu+oOCUcHoUWNQUNWBnkd7zGZQ0IqW/oZgAgOJmHL6mIi4pWDANvYR9iT3kJppt/4qmvhAMED6MsqimsOpvVJg2KGJ+6I0PBFEjYRS0sRAkYeJXD318HiOdlU4Jq2QSU5dr2Nq+H/8Q1hhEcS3uZnlnckvYN18D4TckYgmWKFEqbqrOKi8hi+D3v/g==, userid2 = "121, MoneyNetworkAPILib.get_this_session_userid2 = 121"
(anonymous) @ MoneyNetworkAPI.js:1765
ZeroFrame.onMessage @ all.js:27016
(anonymous) @ all.js:26982
postMessage (async)
Wrapper.sendInner @ all.js?rev=3098&lang=en:1379
Wrapper.onMessageWebsocket @ all.js?rev=3098&lang=en:882
(anonymous) @ all.js?rev=3098&lang=en:815

127.0.0.1-1508592533931.log

New user - merger site error

Looks like the same problems in MoneyNetworkW2 as just being solved in MoneyNetwork.
See jaros1/Money-Network#200

  • other errors

screenshot from 2017-10-03 16-48-37

[16:47:58] Site:1LqUnX..Q7L1 WebSocket handleRequest error: Exception: Merger site (MoneyNetwork) does not have permission for merged site: 1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ (None) in UiWebsocket.py line 211 > MergerSitePlugin.py line 152 > MergerSitePlugin.py line 127 > MergerSitePlugin.py line 40

json error:

16:49:48.998 all.js:139330 MoneyNetworkW2Service.initialize step 2 check_merger_permission callback 1: initialize step 3: check ZeroNet login
16:49:48.999 all.js:139336 MoneyNetworkW2Service.initialize step 3.5 get_permissions callback 2: res = "No encrypted permissions was found for 1LAdJDN675135dPTK42nK1HXFbVL9ysm1n"
16:49:48.999 all.js:139338 MoneyNetworkW2Service.initialize step 3.5 get_permissions callback 2: initialize step 4: update wallet.json
16:49:49.043 all.js:138409 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: wallet = {}


16:49:49.044 all.js:138416 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: deleting invalid wallet.json. error = required msgtype is missing in json message


16:49:49.050 MoneyNetworkAPI.js:1028 MoneyNetworkAPILib.validate_json: json_error =  Object
16:49:49.051 all.js:138440 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: wallet_sha256 = null
16:49:49.051 all.js:138448 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: updating wallet.json
16:49:49.051 all.js:138449 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: changed msgtype. old = undefined, new = wallet
16:49:49.051 all.js:138451 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: changed hub. old = undefined, new = 1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ
16:49:49.051 all.js:138471 MoneyNetworkW2Service.update_wallet_json get_wallet_json callback 2: query = select count(*) as no from (  select keyvalue.json_id, count(*) as no   from keyvalue as wallet_sha256, json, keyvalue   where wallet_sha256.key = 'wallet_sha256'   and wallet_sha256.value = 'null'   and json.json_id = wallet_sha256.json_id   and json.directory like '1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ/%'   and keyvalue.json_id = wallet_sha256.json_id   and keyvalue.value is not null   and keyvalue.key like 'wallet_%'   group by keyvalue.json_id   having count(*) >= 4)
16:49:49.055 all.js:138482 MoneyNetworkW2Service.update_wallet_json dbQuery callback 3: write_full_info = true
16:49:49.055 all.js:138492 MoneyNetworkW2Service.update_wallet_json dbQuery callback 3: wallet = {"msgtype":"wallet","wallet_address":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","wallet_title":"MoneyNetworkW2","wallet_description":"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro","currencies":[{"code":"tBTC","name":"Test Bitcoin","url":"https://en.bitcoin.it/wiki/Testnet","fee_info":"Fee is calculated by external API (btc.com) and subtracted from amount. Calculated from the last X block in block chain. Lowest fee that still had more than an 80% chance to be confirmed in the next block.","units":[{"unit":"BitCoin","factor":1},{"unit":"Satoshi","factor":1e-8}]}],"api_url":"https://www.blocktrail.com/api/docs","hub":"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ","wallet_sha256":null}


16:49:49.060 MoneyNetworkAPI.js:1028 MoneyNetworkAPILib.validate_json: json_error =  Object
16:49:49.061 all.js:139342 MoneyNetworkW2Service.initialize update_wallet_json callback 3:
res = "cannot write invalid wallet.json.
error = Error in wallet JSON. {\"message\":\"Invalid type: null (expected string)\",\"params\":{\"type\":\"null\",\"expected\":\"string\"},\"code\":0,\"dataPath\":\"/wallet_sha256\",\"schemaPath\":\"/properties/wallet_sha256/type\",\"subErrors\":null},
wallet = {\"msgtype\":\"wallet\",\"wallet_address\":\"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1\",\"wallet_title\":\"MoneyNetworkW2\",\"wallet_description\":\"Money Network - Wallet 2 - BitCoins www.blocktrail.com - runner jro\",\"currencies\":[{\"code\":\"tBTC\",\"name\":\"Test Bitcoin\",\"url\":\"https://en.bitcoin.it/wiki/Testnet\",\"fee_info\":\"Fee is calculated by external API (btc.com) and subtracted from amount. Calculated from the last X block in block chain. Lowest fee that still had more than an 80% chance to be confirmed in the next block.\",\"units\":[{\"unit\":\"BitCoin\",\"factor\":1},{\"unit\":\"Satoshi\",\"factor\":1e-8}]}],\"api_url\":\"https://www.blocktrail.com/api/docs\",\"hub\":\"1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ\",\"wallet_sha256\":null}"


16:49:49.062 all.js:139470 MoneyNetworkW2Service.initialize update_wallet_json callback 3: initialize step 5: check old session
16:49:49.062 all.js:139160 MoneyNetworkW2Service.is_old_session: no old sesions found in ls. ls = {"save_login":{"1LAdJDN675135dPTK42nK1HXFbVL9ysm1n":{"choice":"0"}}}
16:49:49.063 all.js:139473 MoneyNetworkW2Service.initialize is_old_session callback 4: sessionid = undefined

Loading wallet Id and wallet pwd from localStorage

VM2 W2 is saving wallet login in localStorage encrypted with cryptMessage.
Now done after all other processes (MN-W2 session handshake and startup messages).
Loading info from localStorage should be done at an earlier time

W2 publish after startup

Why publish? Should only publish if wallet.json is changed.
Publish should wait until MN-W2 session handshake is complete and use MN publish queue

w2_check_mt before pubkeys message

Distribution problems can create the situation where w2_check_mt message is received before pubkeys message.
Cannot encrypt w2_check_mt response without public keys from pubkeys message.
The workaround is to retry receive pubkeys and w2_check_mt messages.
Not tested. Add some JS code to this test this workround.
Or maybe delete and add pubkeys message manually

5 full wallet.json per hub

Now only checking for 5 full wallet.json for all hubs (now only one hub).
Should be 5 full wallet.json files per hub.

Invalid old session

In VM2. Old session cannot connect to MN. MN wallet test (new session) can connect to W2.
W2 must replace old session information with new session information after OK session handshake with MN

MN permissions

Now save wallet choice like this:
screenshot from 2017-08-25 13-28-32

Remove last option "Save wallet login in MoneyNetwork and grant MoneyNetwork full access to wallet (send, receive, donate money + pay and receive payment)" and add permissions checkboxes.
Allow open wallet, get balance, close wallet, send money etc checkboxes

VM2 netherlands - pubkeys handskake failed

Old ubuntu VM2 running vpn=netherlands. MN wallet test. W2 session fails to process incoming pubkeys message from MN

127.0.0.1-1510210494431.log

Pubkeys message not found:

2017-11-09 07:49:16.616 all.js:140275 MoneyNetworkW2Service.read_pubkeys dbQuery callback 2: Error. MN-W2 session handshake failed. pubkeys message was not found
2017-11-09 07:49:16.616 all.js:140276 MoneyNetworkW2Service.read_pubkeys dbQuery callback 2: query = 
select 
  json.directory, substr(json.directory, 1, instr(json.directory,'/')-1) as hub,  
  substr(json.directory, instr(json.directory,'/data/users/')+12) as auth_address,  
  files_optional.filename, keyvalue.value as modified from files_optional, json, keyvalue 
where files_optional.filename like '6c6b6e424c%' 
and json.json_id = files_optional.json_id and keyvalue.json_id = json.json_id 
and keyvalue.key = 'modified' 
order by files_optional.filename desc

process_incoming_message is reading pubkeys message. problem pubkeys message is both used for MN-W2 session handshake and for W2-W2 session handshake.

2017-11-09 07:49:19.612 all.js:138716 MoneyNetworkW2Service.process_incoming_message: processing inner_path = merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/1L35kvUCsuk3t6R1KC2WKZan5tJxzYkLWN/6c6b6e424c-i.1510210151584 with true
2017-11-09 07:49:19.612 all.js:138721 MoneyNetworkW2Service.process_incoming_message: file_timestamp = 1510210151584
2017-11-09 07:49:19.613 all.js:138743 MoneyNetworkW2Service.process_incoming_message: request = {"msgtype":"pubkeys","pubkey":"-----BEGIN PUBLIC KEY-----\nMIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgFzFHDFP8iS1zf+34tnuSNVrgJDm\nq3abbwpUo6hXZWOABCklmyWSxrgDCvkPDswl6Cw6aGuHxpSmZK+fmvA21p83EDuT\nGuR36dKW93akVxrC7Tp0q2PRgHjx29lHlOHbgpX7dvpc7KQX1QXupiImLhm901xP\nHs4A7CfCoDBcAwI7AgMBAAE=\n-----END PUBLIC KEY-----","pubkey2":"AuJUK3fco2ykKplPLPQ4eEABJJSvQhaH3zRBB/9nJMUk"}
2017-11-09 07:49:19.613 all.js:140206 MoneyNetworkW2Service.process_incoming_message: Cannot read property '6c6b6e424c40e9b70b26e1da1b85122c947e7a64bf06b1548da74fdfc6a94c40' of undefined
2017-11-09 07:49:19.614 all.js:140207 TypeError: Cannot read property '6c6b6e424c40e9b70b26e1da1b85122c947e7a64bf06b1548da74fdfc6a94c40' of undefined
    at all.js:139728
    at process_incoming_message (all.js:139890)
    at step_3_run_cb (MoneyNetworkAPI.js:648)
    at MoneyNetworkAPI.js:654
    at MoneyNetworkAPI.decrypt_json (MoneyNetworkAPI.js:2760)
    at step_2_decrypt (MoneyNetworkAPI.js:653)
    at MoneyNetworkAPI.js:683
    at Object.cb2 (MoneyNetworkAPI.js:1605)
    at ZeroFrame.onMessage (all.js:27016)
    at all.js:26982
2017-11-09 07:49:19.614 MoneyNetworkAPI.js:649 MoneyNetworkAPILib.message_demon dbQuery callback: Error when processing incomming message merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/1L35kvUCsuk3t6R1KC2WKZan5tJxzYkLWN/6c6b6e424c-i.1510210151584. error = Cannot read property '6c6b6e424c40e9b70b26e1da1b85122c947e7a64bf06b1548da74fdfc6a94c40' of undefined

Pubkeys message from MN is being read by "process_incoming_message" callback (wallet to wallet handshake). Should be read by "read_pubkeys" function

Rename wallet pubkeys message to w2_pubkeys

MN-W2 handshake pubkeys message should be read and processed by read_pubkeys.
W2-W2 pubkeys message should be read and processed by process_incoming_message.
Only a problem after failed read_pubkeys processing but better to use different msgtype for the two different messages. Better error messages in log.

issue303-test5-w2-torando.log

wallet json schemas and message workflow

Json schema definitions and message workflow in wallet.json file would be a nice tool in a compatibility check between two different wallet sites supporting same currency. For example two sites using different external API for bitcoin operations.

W2 example:
json schemaes: pubkeys, w2_check_mt and w2_start_mt.
workflow sender: send pubkeys, receive pubkeys, receive w2_check_mt, send w2_start_mt.
workflow receiver: send pubkeys, receive pubkeys, send w2_check_mt, receive w2_start_mt.

See jaros1/Money-Network#272

Drop hanging file notifications

Example of notification:
Hanging money transaction
Timeout while waiting for 465402b240-o.1515599010772
Check ZeroPort/VPN status
Maybe restart ui-server
Maybe reload wallet page

Okay with hanging fileGet operations. Other wallet session may be offline + many other reasons. Now using waiting_for_file messages for important missing files. No reason to notify user.

port closed - use normal files for W2W communication

Now using optional files in MoneyNetworkAPI for wallet to wallet communication.
Other wallet fileGet operation will hang forever in case of closed ZeroNet port.
Use normal files for wallet to wallet communication in case of closed port.
Must be very small and very few files (normal files are replicated to all ZeroNet clients).

send balance

Send balance to MoneyNetwork after any change in wallet balance

Add check_mt processing to W2

Sending money transaction from client A to client B:

  1. sending: prepare_mt_request and prepare_mt_response OK (validating transaction in client A wallet).
  2. sending: send_mt and OK response (send money transaction).
  3. receiving: ping wallet in incoming money transaction OK.
  4. receiving: check_mt request fails in W2 with error message Unknown msgtype check_mt.

screenshot from 2017-10-23 14-41-41

request = {
    "msgtype": "check_mt",
    "contact": {
        "alias": "1MirY1KnJK3MK",
        "cert_user_id": "[email protected]",
        "auth_address": "1MirY1KnJK3MKzgZiyZZM8FkyzHRJgmMh8"
    },
    "open_wallet": true,
    "money_transactions": [{
        "action": "Send",
        "code": "tBTC",
        "amount": 0.0001,
        "json": {"return_address": "2Mxufcnyzo8GvTGHqYfzS862ZqYaFYjxo5V"}
    }],
    "money_transactionid": "3R1R46sRFEal8zWx0wYvYyo6VDLJmpFzVNsyIOhglPV4bcUgXqUDLOWrOkZA"
};

w2_check_mt without pubkeys

Test error:

12:27:52.110 VM1024 all.js:140430 MoneyNetworkW2Service.process_incoming_message.w2_check_mt dbQuery callback 2/724: res = [{"filename":"b626de3c09-o.1511695644101"}]
12:27:52.110 VM1024 all.js:140439 MoneyNetworkW2Service.process_incoming_message.w2_check_mt dbQuery callback 2/724: res = [{"filename":"b626de3c09-o.1511695644101"}]
12:27:52.111 VM1024 all.js:140442 MoneyNetworkW2Service.process_incoming_message.w2_check_mt dbQuery callback 2/724: old res.length = 1
12:27:52.111 VM1024 all.js:140456 MoneyNetworkW2Service.process_incoming_message.w2_check_mt dbQuery callback 2/724: could not find any pubkeys message before this w2_check_mt message
12:27:52.111 VM1024 all.js:138912 MoneyNetworkW2Service.process_incoming_message.w2_check_mt dbQuery callback 2/724: Money transaction failed. Missing pubkeys message. Cannot start encrypted communication
12:27:52.112 VM1024 all.js:138924 MoneyNetworkW2Service.process_incoming_message.w2_check_mt dbQuery callback 2/724: request = {"msgtype":"notification","type":"error","message":"Money transaction failed
Missing pubkeys message
Cannot start encrypted communication"}

Checked content.json file and only w2_check_mt message in files_optional. No log from w2 test. w2 page reload doing test. Retesting

Remove status.json file

remove status.json update from w2.
Added as a attempt to force content.json distribution.
The problem was ratelimit error / publish interval < 30 seconds and was solved with MN publish queue

old wallet session cleanup

Now saved forever in localStorage.
There should be a cleanup function removing old wallet sessions after startup.

rename localStorage variables

rename sessions to mn_sessions.
rename transactions to wallet_sessions.

            //ls = {
            //    "save_login": {
            //        "18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ": {
            //            "choice": "1",
            //            "permissions": {
            //                "encryption": 2,
            //                "message": "[\"b/3l7U8pIt5bnJTc4bOohwLKACAMY5dg42XKaK4zcAF0tc23si69C6RAIzqksjNwxA0UqQAgtS+js0qGCx2oxSLutHZXyKcUrPv7tQCCh8PO8B4ViUSaKHvkeXvPFy6alSxpwUWc1j2cbhcc83qX9DsFyt3sFhnxd/TIzcr5TeUUC+jjVKeBmBWAAV22i5/Ngdv5eslD7Ha/V8+4UYFKZo7KZOjGRw==\",\"osQiwYyvmGU4jBMHpjvUDw==\",\"B+hy1k4kGDkMPi6Jw8W0xJw3DGInfXFFxZEWlgyCmi5/0nGlPvcb/wdWEapZ7geYKiz7MHm2Fl/QEmVKqOlq01jQMFJRA1VMzBWg15CEO8ZKQk+E4oaLim6XaSUdF45A+qjH7ItJNjVay5G/TTZIEHZVcs7bKNuvuHXKZ2qckbJz3yfXUiu7dQSakqUJYD6ppxcoNx0jgBozog0Vyff/AA==\"]"
            //            },
            //            "login": {
            //                "encryption": 2,
            //                "message": "[\"6n1bj8fVcDDsfieevqFxwALKACCJMCifjojRvLpxnnAzFlqdbRngr8xGeyYCQqwvZdMNWAAgj8QseOIdrp+xtb+9Szb8L99olhI20qQxGfSVTX4aPWMzWD4cQ2C6AeKHxGFaGirO48zWp6gfqIb0RrVxR0jMHL7nA/tlBjDgFwdu1gp9kVrcdIsDd18btRgiUNzULgd1+mzIRnhA9coKH+EJc2ss1g==\",\"DRbUxJjtaMJSSaK1jNpQ+Q==\",\"94+a1HgliFNJfYKpY7woNO1YHBxWM/C371cDV7IYETnsoToH0HUl5bWvosjW5vY9evMQTwLlTLPfgdTFnuaNZLRqNCzaT38xJhC8lHTsNxqIVWOU7LEXDfG17d/BINVEKf23bpjeOG7YC6SEJcmaOQ==\"]"
            //            }
            //        }
            //    },
            //    "sessions": {
            //        "18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ": {
            //            "this_pubkey": "-----BEGIN PUBLIC KEY-----\nMIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgGIQnT7AZjmmKJswjbDYeSv4V3D6\n3oNGaMT24VFTwyksQAzV3L+ghC5jo/UjOshRM7QlNw+W9eTV5hNgzvQqxkj4BAiS\nEw81FfKxXy9+oPubTNXC8uaxaMr7W7EG5Edfj51PENyB58fMdIoy4D7QOB2sB7LV\nvYOTzldDfyAdC3PLAgMBAAE=\n-----END PUBLIC KEY-----",
            //            "this_pubkey2": "Ahn94vCUvT+S/nefej83M02n/hP8Jvqc8KbxMtdSsT8R",
            //            "other_pubkey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0pMuMJyynH1BmhMJ6vvd\nQZplIBgiiOQSqwu2SpYKICm+P1gGNHnICQic/Nuqi9t93rxJLfWCsl0+lCtoJLen\nf78xz4XzEcGPBeBFn2TbQqPO9loylNlaOgiqDG5qcSc9n7yEF0xmpReDGATwzECi\nJrpZBImwhUMO48iS08b4IfQaMsbnUVY8hdUeJiQ831kMkNQLtxWaeRiyn8cTbKQ6\nLXCDG7GDaFN6t+x3cv/xBX06+ykuYQ0gNIBySiIz69RYzhvOkqOQggLWPF+NMW1J\nO6VRqvX7Sybwm51v3kGGKWeX4znvGY+GwVCpwiH+b2hbGZHIqFp9ogimGVE0WPgu\nnwIDAQAB\n-----END PUBLIC KEY-----",
            //            "other_pubkey2": "A4RQ77ia8qK1b3FW/ERL2HdW33jwCyKqxRwKQLzMw/yu",
            //            "encrypted_info": "[\"sn53LVGGihpV2d8drGWuwALKACC0v1nnRX3J/7RndNzgY0mf1Iscvh4Qu1sbYvA9a2hTJwAgDznVN4TeSgnY0b0St3ONhVcqTB14IZBT8nEauiG/UrEkZKPIY602dAmztkrnE5TlVhKp5i9+1MqZveQ+tzl1G4HI//mXOPF/xA583Z1IF/ZFbZnygHP8w1nsjmGKsTqzb/zHjL20m42fXyNA1lGx1Q==\",\"2GyYG+cI/1xKV23IthSMCg==\",\"he0SPrDzG0iBh+Vf3xiuxtKejb3Ennjw0yRpD5XfQYlnUE9csHfcd9LzhwPJabnvedkb/L1DahNE9aH21ovhCMzS4gQlsv5WkTouu8ONt05ZOEk8hjnu8hFtX80WGRcy\"]",
            //            "prvkey": "U2FsdGVkX18dRxJbzKepCZLCm1y+Vb7BX6ty/NxLYRiYGVuu4q9TU7csFcu6PhoGr9IFGpH8CpIc24uqEOWQz3TpLqen6gTP7tCMHhfpyariODvHR5HAuOQeNVZHCXRwello6A9pmaq2iRXWmOXu53veYejV9dsqPlEGGBOxPWauiCCJDpnX7LCOKv4sep8InhlxeJvIxJncRugH+F6ZvNSNx6JCFHFmnqm7+nAbtbjja2FvCQ5ZhinC4PCS/pVJQsuEKRqek3IEpHO2eE+Hz0AKezDiuKiG3ifIaXdp9d5E99JdkABDQRZrYJtotukLOKBrNCPaVehRFVP4Z8LornSmot+01uKYOmtYwvoBsAHD3yPA4YF+N+8L7VJxA79lHXbXPIPV2wQZVs0Y00r6Q9upiU20nKopcRT84hcbv1BLQ0YE1gk7Ojx1Rjm/dEEgAGrKZJBI+JJjqgYCjxR7H3BQh2N3y8jY5xXWoH+wvbqANqI1ZmLXBOgzeE6wnBM+8O23ShfRw/v9W4dFdEFY4lIaH7I7hI6lzrWcfHh9AW19ntokmSM5C88Hg/BF20vvXLZgQLV+fV0IrlN0goRKDRpvL/yb4CR4VcK581bEV1iQZhMcRAubaYB8WFkk245ALPzngEyNJK4MMdgOMbbBkCi404l+X1Z1IZ6nusC8EAXeqYuTZqh2qvUTbFe+JFcZCMjCqkIvAKX9H0gfRLKhTajDxI2llKhJ0HMQS/VFcwZzsSH6gVO/N+yNQu5zBQzl9Qh3+F9EatZgVYuc1gQHObR8/lbJieTBcsF4PCP1WBDM/KN6RTOH0TKzZD/x8cDjnVDlLtNy6/hFPMmft8nBYn10kaNPg5Ho0lWljOBFYDcWWsNpvB4AHDArJ4UsiS0E9rSramA0+xgTO7QVkNokBuLge9ihJ2Rop55GCmIt3Y8NY7fKiagy5WFZNtiCtHCQc5MJO12Jvqg76lq2rlptzXlzhtpgVJhvZvKfu6RQFDQn4gNnmxG4penVBU5y2N69612HFi2BTB5RICkN+6tjS07lf2Ets+f7nFTqN+xJ4rV4bKO3mNkOQKoTn3a0rRHO7GefLqnomRufaCrteISbGIy7KIXJWR4B7xSDQC1skMO063YkCrJu7NpTlzThJa0jwM2peMMpWCDFx+YQjU+6qQak9mdLGA4tZcvtPz8RFyEGKJ1jlEv+cRyEYOBeoq3w",
            //            "sessionid": "U2FsdGVkX1/eobzTw2IF55TPF1Wy21wSqyYN6Jlx7T3iSmiUZP23r93gbcq8LvgyF+VyzafV331MDXkOfhqo4vPS2vWzCkGex6I4pU1DXfo="
            //        }
            //    },
            //    "transactions": {
            //        "18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ": {
            //            "1a85fd6465e75f61656c08ccc2c21b6feaa09b41fb25afe20dd8677da751f590": {
            //                "encryption": 2,
            //                "message": "[\"7aKr3+VWui7XRWnVgddu9wLKACDrXUVe0cv7Y6z07vmbyBV01855YoJEfvYioTX4mM1YNwAgssK7M0FR/JP9ybH6KOJVq4sIPiNlTJQzIzqan5aKL1besed7FLoVIxkhs/zNGVxQp1YRFR+gllB9dnQPSQGgSXduX2IATj2pGzy6PoxAfPBhciDdyrv+fv1ARwFMhcMm9J2/wBFrQAH7G3ITp38/QA==\",\"ntFOD3S/czU4CQ4tp5lXBw==\",\"xQmB2Uy9Cea6Cxbt2wZgNzpeiP7ZdANOdF0nWsHY+g3Bv3SP/8r6X8LJ07ybhmM10at6HfEJhonzYJxZOkItTYF+HH49fUwjbAmUxhU301GE+h1V9cqrro8aqfgjvA9WjIIl02uXfxoAOH8F5ZOKAkoABaRoOvSj+8ZlVeQeNW9joFuA3hyNP3LqbT5pJCrWfSuVd5CxqkiRN6Za3fxIhnXQvC6FXMFe5gv2yX6bL3EfbliImh+F/n6C6BwA5mbNAgYo4QEK3BevFbqB4DQdVwFb0CymOIscqDOOmBKEhhJQtXoGBqvu7R5zTe/FiJuCEuuHoDUUXaQYcwvBgVHxCawTGwtcKdUQkYKqYXAwPK4B3sAbNU0qlhGCDkrn7PgwOL0otht2EWP4fmX6v1QWAEJgboowpsExk5ISB9OixUw5C7dE1nMtKzUDHAHPRwCheIjlPYSAKzI7/2/+XGzpgk1TjIQE3l3OimA1+pt4WmOFjEOj4cTebqEg5vjoUCI+IY/eslXD3dxhIzJWys4dn7FDLPzWQV7D3iaYX/6m3YY+iDYeZUXr2go3aETu69Z2nFcicjUk6j2OrWo939T7uPO9V4j9Tvg1dioujYRPob6Li2WjpD1HwJVm4fAQUYkE9c5Btd5VkN0OwivW1hoQVHZb6B9uRFtpf4UQjXVgfg4c2huerJiMkG5fYfiLK6pn1QUlBfAFHdRrZZdis7jvC2fYXyK0TPqV7nnuejfuLvqWHsbu6AlhNIIjesG4pz1yU/gJmazKzbiL47AE5FEjsukuuvnFcwkVdivc9VRiBPci1nJe0IFhKgmsuRHoGv1Su67tP3VG7jbazRTfI6IAqO5ge7+q1nRLh4tvqw+7Q1z6TqATxfKQWfdVnUz9c8o/mv8P5uYE9J0V1OK9IFgu5n8dF2+nI23Oa81lUji5Ig5+3VZ38MeSRVL/veGHRNdHmGKKRCmtQDLqX6bEFfWONGZlPd0IaTyIcq9zPnjA7qQxwSQKeFYrMBHk5l4g6O+NGklJdsNisCGrkgMQruqxmpxyo0IsLglyGq4lMW+VJ4t9oJrl1T2KRgFIqmUYVQVQs/4FEJyR9hsj6m6rTjPQDvT0iBvJd53cxnv/5/ugS9nPlO0Dfv5GzI6rjBQFFAwEkwklGEvIWcYkzDIVIGrRBLNbYuZK8cZh7XwPIiFejFEMm/wpbO+jYOLrKbIzh5OAeUc0YIJQk4zWILYWkOySyXt2dPn6Z1lkNA562Hfoj1k9/inDYT4HL+SrvQCgAmBgDT8qRpdDVo1paFgoQSWnXjMpn2KbjNPPF5tpZmb8HsPBHXAQ6a/mcWGjaDXLtLPzN3USDFwvJ1zQMd+med/PWmaSc4maG2UjLafj4AXY+ugq6sRnVvotCxhCMSGY032g\"]"
            //            }
            //        }
            //    }
            //};

One wallet - multiple MN accounts

Tried to get a new MN-wallet pubkeys handshake between new MN account z and wallet. Problem is multiple public/private key sets in MN and only one pubkey/private key set in wallet session. Wallet should accept new MN-wallet pubkeys handshake and create a new session with new encryption keys and empty session data in ls.

127.0.0.1-1510212066377.log

MoneyNetworkAPI.js:2418 Uncaught MoneyNetworkAPI.setup_encryption: invalid call. pubkey cannot be changed. please use new MoneyNetworkAPI to initialize a new instance with new pubkey. old value was undefined. new value is -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhlPcW9fCZYC90dmAmuUJ
qznYBAcZfOBZzAEaT5eWY5jnhpqlz5tvQCcoH6s0072kaZTbYyMEg6M23WikG2I+
U8Mbyti7DV9kXxxA7KWfeutZTcLpQK+tNjKBl2NcOiAlnXLrGcu+lIqc3tVYOKf5
jZTWnHFm7O0gT4njY29akuElyJbrmW63Y3NETKQ47RSAEauq7KSBoQD2Tvk6W0Sg
H21LxHTyncQPTE8fTmN1BusZakca9ynH8KIQNYlMGcyrkBR9T4dpAAHcuWBixZTn
UIL02W/MZg3Lr9RtubhFDEBVtsBWdpP7K7r93ytSSNDyh6ekJLjiS4KbGgbfrX8S
oQIDAQAB
-----END PUBLIC KEY-----

Add hub to wallet.json

A W2 user should only be one and only one W2 user data hub.
Always use W2 user data hub with last updated content.json modified timestamp.
hub = random other W2 user data hub. Used for list of W2 user data hubs

Add w2_end_mt message

result = "b060af84c49f6305f68d5bb180ff983a41277f7aa3417c65116e20fc58ead18c"
other session must receive and validate result.

Hanging fileGet

After first failed fileGet (60 seconds).
Save name of missing file in a file, publish and try again.
Other process now can see communication problems and may change file to a normal file or other processes may help with distribution

clone. get new API_Key and API_Secret

MoneyNetworkW2 clone should be with "dummy" API_Key and API_Secret.
Owner of new clone should register and get new keys.
Startup notification or message in console.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.