jaros1 / Money-Network

Demo with complementary and alternative money. Implemented in ZeroNet and AngularJS. Focus on privacy, encryption, max data in client and min data on ZeroNet. Work in progress.
GNU General Public License v2.0
4 stars 4 forks source link

Money Transaction - add transaction status #262

Closed jaros1 closed 6 years ago

jaros1 commented 6 years ago

Wallets and MN must be able to see current money transaction status. Can only be encrypted with money_transactionid (encryption layer 3). New optional file every time transaction status changes. Use extension -s for status? file with greatest timestamp is current transaction status. One transaction status for each wallet (two status for same transactions).

jaros1 commented 6 years ago

add money transaction status to chat msg. Could be from wallet notifications. Could be from read special files with money transaction status. Two kind of status. State in MN (approved, rejected, edited) and status info from money transaction processing (only approved transactions).

jaros1 commented 6 years ago

Added status option to send_message. Test 1 failed. Publish failed in w2 session and failed publish is not reported back to mn session. 4 fails sitePublish calls in W2 session.

issue262-test1-ui.log issue262-test1-w2.log issue262-test1-mn.log

1) problem with published message. Json validation error:

11:01:21.768 MoneyNetworkAPI.js:3287 MoneyNetworkAPI.send_message: encrypt2/1017: request = {"msgtype":"published","cb_id":4,"res":{"error":"Content publish failed."},"last_published_at":0}
11:01:21.768 MoneyNetworkAPI.js:3287 MoneyNetworkAPI.send_message: encrypt2/1017: msgtype = published, subsystem = api, optional = -p
11:01:21.769 MoneyNetworkAPI.js:1689 MoneyNetworkAPILib.validate_json: json_error =  {message: "Invalid type: object (expected string)", params: {…}, code: 0, dataPath: "/res", schemaPath: "/properties/res/type", …}
11:01:21.769 MoneyNetworkAPI.js:3287 MoneyNetworkAPI.send_message: encrypt2: Cannot send message. Error in published JSON. {"message":"Invalid type: object (expected string)","params":{"type":"object","expected":"string"},"code":0,"dataPath":"/res","schemaPath":"/properties/res/type","subErrors":null}
11:01:21.770 MoneyNetworkAPI.js:3287 MoneyNetworkAPI.send_message: encrypt2: request = {"msgtype":"published","cb_id":4,"res":{"error":"Content publish failed."},"last_published_at":0}

Fixed. Now "ok", res.error or JSON.stringify(res) in published request.

2) problem with siteSign calls within sitePublish calls. sitePublish is done within a "transaction". siteSign is not. Should not change content.json duing a sitePublish process. Received start_publish request from MN, started publish callback (sitePublish) and sends OK start_publish response to MN. Should wait with publish callback until OK response has been sent to MN. Fixed. Now sending OK start_publish response before starting sitePublish.

3) problem with z_publish call in w2. Started a new z_publish in W2 in a publishing transaction. Maybe retry after failed publish. But cannot send a new queue_publish message to MN while waiting for an old sitePublish request to finish.

jaros1 commented 6 years ago

Test 6. Expects wallet file update in torando and montreal.

issue262-test6-w2-torando.log issue262-test6-w2-montreal.log

jaros1 commented 6 years ago

Test 9. Added status_mt to MoneyNetworkAPI, changed msgtype, added validation + added receive status_mt in W2

issue262-test9-w2-torando.log issue262-test9-w2-montreal.log

jaros1 commented 6 years ago

Test 8. Added status_mt update after receive w2_cleanup_mt.

issue262-test8-w2-torando.log issue262-test8-w2-montreal.log

Test 8 failed. Invalid update_wallet_status call.

jaros1 commented 6 years ago

Test 10. Should write status_mt update after receive w2_cleanup_mt.

Test notes.

issue262-test10-torando issue262-test10-mn-torando.log issue262-test10-w2-torando.log

issue262-test10-montreal issue262-test10-mn-montreal.log issue262-test10-w2-montreal.log

jaros1 commented 6 years ago

Test 11. A few changed for waiting_for_file message. Test failed. Only one notification in torando wallet.

issue262-test11-mn-torando.log issue262-test11-w2-torando.log issue262-test11-mn-montreal.log issue262-test11-w2-montreal.log

file e72f18bc89.1513506989195 was not distributed from torando to montreal. Maybe a content.json distribution problem?

issue262-test11-content-json-torando.txt 1513507058 = Sunday, December 17, 2017 11:37:38 AM issue262-test11-content-json-montreal.txt 1513506980 = Sunday, December 17, 2017 11:36:20 AM Torando content.json is 78 sec newer than montreal content.json file and no reason for missing distribution. vpn off in torando. vpn on in montreal.

Did w2 wallet data hub update, check files, stop+start ui server in montreal without any luck. issue262-test11-ui-montreal.log

Looks like at problem with sitePublish followed by a siteSign. OK content.json sitePublish was never distributed on ZeroNet https://github.com/HelloZeroNet/ZeroNet/issues/1206

Run test 12. Test 11 continued without any problems. issue262-test12-mn-torando.log issue262-test12-w2-torando.log issue262-test12-mn-montreal.log issue262-test12-w2-montreal.log

jaros1 commented 6 years ago

Changed set_last_published for failed publish. Now using current time as last published timestamp after failed publish. Maybe preventing "RateLimit Added to queue" messages in UI-server

jaros1 commented 6 years ago

Test 13. Expects OK money transaction processing.

issue262-test13-mn-torando.log issue262-test13-w2-torando.log issue262-test13-mn-montreal.log issue262-test13-w2-montreal.log

Test notes:

jaros1 commented 6 years ago

Test 14. Expects OK money transaction processing. vpn=on in both clients. Test failed. JS exception in montreal.

issue262-test14-montreal-mn.log issue262-test14-montreal-w2.log

Fixed JS errors in MoneyNetworkAPI and restarted test 14 (reloaded wallet sessions). Vpn=on in both sessions. Should use optional files for money transactions. issue262-test14b-torando-mn.log issue262-test14b-torando-w2.log issue262-test14b-montreal-mn.log issue262-test14b-montreal-w2.log

Test OK

jaros1 commented 6 years ago

Show transaction status in MN UI. One transaction status from each wallet session. MN should not download transaction status from other wallet. That is done by current wallet session. Use message_demon?

screenshot from 2017-12-18 18-25-47

jaros1 commented 6 years ago

Test 15. Expects money transaction status update in MN UI.

Test 15a. Failed. Problem with invalid chat msg in MN UI. issue262-test15a-montreal issue262-test15a-torando-mn.log issue262-test15a-montreal-mn.log

Hi Me  Click to chat {"local_msg_seq":1703,"folder":"inbox","message":{"msgtype":"invalid","error":"Error in chat msg JSON. Ignoring invalid message.
Error {\"message\":\"Additional properties not allowed\",\"params\":{},\"code\":303,\"dataPath\":\"/this_money_transaction_status\",\"schemaPath\":\"/additionalProperties\",\"subErrors\":null}","message":{"msgtype":"chat msg","message":"https://github.com/jaros1/Money-Network/issues/262 Test 15. Expects money transaction status update in MN UI.","money_transactions":[{"wallet_url":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","wallet_sha256":"593af9949006a3f1b27c00c10baec3719b2978b7d34224fa606f63ab167fe1de","wallet_name":"MoneyNetworkW2","action":"Send","code":"tBTC","name":"Test Bitcoin","amount":0.00026214,"money_transactionid":"qnZ0WpLZDvHRUt9ZQ7SNRiSI9PjN4r5QF9IWb65Dd4QFvmpiXSKLQzUDJbul","json":{"return_address":"2MvewNfsc5eh6FWsDQp9LAWE5SrAtcRpWHc"}},{"wallet_url":"1LqUnXPEgcS15UGwEgkbuTbKYZqAUwQ7L1","wallet_sha256":"593af9949006a3f1b27c00c10baec3719b2978b7d34224fa606f63ab167fe1de","wallet_name":"MoneyNetworkW2","action":"Request","code":"tBTC","name":"Test Bitcoin","amount":0.00026214,"money_transactionid":"qnZ0WpLZDvHRUt9ZQ7SNRiSI9PjN4r5QF9IWb65Dd4QFvmpiXSKLQzUDJbul","json":{"address":"2N1PNEWjfxWL7WxYd9VgqhHk7s5ScNoJEk4"}}],"this_money_transaction_status":["N/A"],"other_money_transaction_status":["N/A"],"local_msg_seq":7931,"sender_sha256":"eee908fda8302abd83ac0897cfba3ffe49448dfd7ec6973bbc619efeba9d7437"}},"zeronet_msg_id":"d64616b84c6a5698bd3e618f5c14ef6ae0c4040b079a534f704879f38a9eedec","sent_at":1513671262575,"receiver_sha256":"141eba08d09e8369cae9592ae18b4e7266360bed02039a39975d3fef4ea1886a","received_at":1513671270843,"encryption":1,"ls_msg_size":1696,"seq":239,"reactions":[]}
jaros1 commented 6 years ago

Test 16. Fixed error with this_transaction_status and other_transaction_status in sent message. Retesting.

jaros1 commented 6 years ago

Test 17. Fixed error with this_transaction_status and other_transaction_status in sent message. Retesting. Test failed. My wallet transaction status was inserted into MN UI but money transaction processing failed. todo: add wallet transaction status to ingoing messages also

issue262-test17-torando issue262-test17-torando-mn.log issue262-test17-torando-w2.log issue262-test17-montreal-mn.log issue262-test17-montreal-w2.log

Many fails publish in torando W2 session. Increasing publish interval 30, 60, 120 etc between each failed publish. Must publish failed and next publish in 8.5 hours .... Restarted UI server, reloaded W2 session and sending test 18. Maybe problem with not distributed content.json file?

jaros1 commented 6 years ago

Test 18 failed. Money transaction was aborted. Torando: Money transaction failed. Missing pubkeys message. Cannot start encrypted communication

issue262-test18-torando-mn.log issue262-test18-torando-w2.log issue262-test18-montreal-mn.log issue262-test18-montreal-w2.log

jaros1 commented 6 years ago

Restarted wallet sesions. Test 17 OK but MN UI was not updated. No Money transaction messages for test 18.

issue262-test17b-torando-mn.log issue262-test17b-torando-w2.log issue262-test17b-montreal-mn.log issue262-test17b-montreal-w2.log

jaros1 commented 6 years ago

Fixed a few errors in MN UI for receive status_mt message (money transaction status). Restarted wallet sessions. Expected test 18 to restart and finish. Test failed.

issue262-test18c-torando-mn.log issue262-test18c-torando-w2.log issue262-test18c-montreal-mn.log issue262-test18c-montreal-w2.log

W2: session_info.error = "Money transaction failed. Missing pubkeys message. Cannot start encrypted communication" Test 18 money transaction session is not loaded by w2. Error is not correct. pubkeys message from montreal b3ea2fa04e.1513678048630 is in content.json and has been downloaded by torando wallet. See https://github.com/jaros1/Money-Network/issues/262#issuecomment-352699327 Error in wait_for_pubkeys_message. should check for normal and optional files. Was only checking optional files.

jaros1 commented 6 years ago

deleted session_info.error for money_transactionid .... and restarted W2 sessions. Money transaction OK. Some errors in processing. 3 * Wallet publish hanging, Internal error: TypeError: actionSitePublish() got an unexpected keyword argument 'group_deb ug_seq'. Check log files for test18d

issue262-test18d-torando-mn.log issue262-test18d-torando-w2.log issue262-test18d-montreal-mn.log issue262-test18d-montreal-w2.log

UI server error:

[12:47:39] Site:1JeHa6..mCXk WebSocket handleRequest error: TypeError: actionSitePublish() got an unexpected keyword argument 'group_debug_seq' in UiWebsocket.py line 81 > UiWebsocket.py line 254 > MergerSitePlugin.py line 203 > MergerSitePlugin.py line 192 
 {"cmd":"sitePublish","params":{"inner_path":"merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/content.json","group_debug_seq":797},"wrapper_nonce":"dcd1953ea9727cfad7314770b01fad608b912b357e7521d18709e1ed03b41a47","id":12198}

console.log error:

12:47:38.157 MoneyNetworkAPI.js:937 MoneyNetworkAPILib.message_demon dbQuery callback: Rejected incoming message
merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/9aa3b38fef.1513770457032. Expected incoming messages for this session to come from merged-MoneyNetwork/1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/
jaros1 commented 6 years ago

Test 19. vpn=on in torando. vpn=off in montreal. OK money transaction. Some error message in console.log. MN UI was not updated 100%. Must add $apply() to refresh angularJS UI in MN

issue262-test19-torando-w2.log issue262-test19-torando-mn.log issue262-test19-montreal-w2.log issue262-test19-montreal-mn.log

Test 19: received a waiting_for_file request for a message in test 18. Add waiting_for_file cleanup. Outgoing waiting_for_file request is deleted after W2 page reload. Not in session_info.files. Add cleanup to MoneyNetworkAPI.

jaros1 commented 6 years ago

Test 20. vpn=off in torando. has to enable and disabloe vpn in montreal. cross domain error. Test failed. JS errors in W2 montreal log.

issue262-test20-torando-w2.log issue262-test20-torando-mn.log issue262-test20-montreal-mn.log issue262-test20-montreal-w2.log

jaros1 commented 6 years ago

Test 20b. Resumed test 20. Hanging transaction on torando wallet. Problem seen before.

issue262-test20b-torando-mn.log issue262-test20b-torando-w2.log issue262-test20b-montreal-w2.log issue262-test20b-montreal-mn.log

torando: start transaction 1513862207098 before fileWrite and siteSign operations
         todo: siteInfo operation 811/144 is hanging forever ....

14:16:47.098 MoneyNetworkAPI.js:4167 MoneyNetworkAPI.send_message: calling start_transaction
14:16:47.098 MoneyNetworkAPI.js:2371 MoneyNetworkAPILib.start_transaction: added transaction with timestamp 1513862207098 to transactions. calling_pgm = MoneyNetworkAPI.send_message: 
14:16:47.098 MoneyNetworkAPI.js:253 MoneyNetworkAPI.send_message: siteInfo started (811/144). 8 pending ZeroNet API operations (209/205,789/787,792/790,795/793,798/796,809,810,811/144)

added MoneyNetworkAPI.z_site_info wrapper. Now waiting max 1 sec for site_info. and added rootScope.apply() to MN. Money transaction status should update now.

jaros1 commented 6 years ago

Test 21. Test OK. Money transaction status updated in both UIs (torando and montreal).

issue262-test21-torando issue262-test21-torando-mn.log issue262-test21-torando-w2.log

issue262-test21-montreal issue262-test21-montreal-mn.log issue262-test21-montreal-w2.log

jaros1 commented 6 years ago

Done

jaros1 commented 6 years ago

Test 22 failed. Hanging money transaction. Could not find the reason. Add better debug messages for publish and transactions. Maybe a hanging transaction?

issue262-test22-mn-torando.log issue262-test22-w2-torando.log
issue262-test22-montreal-w2.log issue262-test22-montreal-mn.log

jaros1 commented 6 years ago

Added better log messages. Added reason to queue_publish and better log message for transactions (long lasting operations). Resumed test 22 with OK test result. Nice confirm popup from W2 with info about btc.com cross domain problem (vpn=montreal). Issue https://github.com/jaros1/Money-Network-W2/issues/34 tested OK.

issue262-test22b-montreal-mn.log issue262-test22b-montreal-w2.log issue262-test22b-torando-mn.log issue262-test22b-torando-w2.log

issue262-test22-montreal-mn

jaros1 commented 6 years ago

Many publish operations in w2 session:

Removed publish in initialize. Now only publish from cleanup_offline_session_files that is running after initialize.

jaros1 commented 6 years ago

Test 23. Expects one less publish after W2 page reload.

reload w2 montreal. No file deletes in initialize. Only file deletes in cleanup_offline_session_files. issue262-test23a-montreal-w2.log

Started test 23. Send money transaction from torando to montreal. Money transaction is hanging issue262-test23b-torando-mn.log issue262-test23b-torando-w2.log issue262-test23b-montreal-mn.log issue262-test23b-montreal-w2.log Pubkeys message 08d301ea3d.1515143632242 from torando was never received by montreal (vpn off and using normal file). Pubkeys message 08d301ea3d.1515143632242 from montreal was never received by torando (vpn on and using optional files)

Manually updated W2 wallet data hub in hello ZeroNet. Some activity but still hanging money transaction. issue262-test23c-montreal-mn.log issue262-test23c-montreal-w2.log issue262-test23c-torando-mn.log issue262-test23c-torando-w2.log Torando received w2_check_mt message before pubkeys message. Cannot encrypt w2_start_mt response. JS error in wait_for_pubkeys workaround:

11:17:46.311 all.js:139383 MoneyNetworkW2Service.process_incoming_message/909: Using group_debug_seq 909 for this receive w2_check_mt message operation
11:17:46.311 all.js:139391 MoneyNetworkW2Service.process_incoming_message/909: processing inner_path = merged-MoneyNetwork/1HXzvtSLuvxZfh6LgdaqTk4FSVf7x8w7NJ/data/users/1CCiJ97XHgVeJrkbnzLgfXvYRr8QEWxnWF/5759be8360-o.1515147435360 with encrypt3
11:17:46.311 all.js:139392 MoneyNetworkW2Service.process_incoming_message/909: now = 1515147466311, extra = {"optional_file":true,"timeout_count":5,"group_debug_seq":909,"file_info":{"inner_path":"data/users/1CCiJ97XHgVeJrkbnzLgfXvYRr8QEWxnWF/5759be8360-o.1515147435360","uploaded":0,"is_pinned":0,"time_accessed":0,"site_id":37,"is_downloaded":0,"file_id":25836,"peer":0,"time_added":1515147439,"hash_id":53029,"time_downloaded":0,"size":1808},"db_query_at":1515147440521,"fileget_at":1515147466259,"decrypt_at":1515147466311,"modified":1515147436,"fileget":true,"decrypt":true,"send_overhead":1000,"receive_overhead":25790,"total_overhead":26790}
11:17:46.312 all.js:139397 MoneyNetworkW2Service.process_incoming_message/909: filename = 5759be8360-o.1515147435360
11:17:46.312 all.js:139402 MoneyNetworkW2Service.process_incoming_message/909: file_timestamp = 1515147435360

11:17:46.312 all.js:139466 MoneyNetworkW2Service.process_incoming_message/909: request = {"msgtype":"w2_check_mt","money_transactions":[{"action":"Send","code":"tBTC","amount":0.00026223,"json":{"address":"2Mt7mD44iEusYngEb44RPWCjJM2mJB7vtke","return_address":"2N9PRF2TBmoEDodWycbGqDc6sJZPKkvcMmC"}},{"action":"Request","code":"tBTC","amount":0.00026223,"json":{"address":"2MzgdxbD6xrZ8xvSYdSxyjwdg628AKRrZET","return_address":"2Mve27MbdG3GkRRhcQdUh6yvciXweDxpjPA"}}]}
11:17:46.313 MoneyNetworkAPI.js:253 MoneyNetworkW2Service.read_w_session: serverInfo started (969/909). 2 pending ZeroNet API operations (963/903,969/909)
11:17:46.316 MoneyNetworkAPI.js:275 MoneyNetworkW2Service.read_w_session: serverInfo finished. res = "OK". elapsed time 3 ms (969/909). 1 pending ZeroNet API operation (963/903)
11:17:46.317 all.js:140881 MoneyNetworkW2Service.process_incoming_message.w2_check_mt read_w_session callback 1/909: session_info = {"money_transactionid":"tls7dBXQprEQT34PLiWne8IFN6yl8vQ2UGDaCvAuMBif3bUJU6ioTJF26jmF","sender":true,"contact":{"alias":"1CCiJ97XHgVeJ","cert_user_id":"1CCiJ97XHgVeJ@moneynetwork.bit","auth_address":"1CCiJ97XHgVeJrkbnzLgfXvYRr8QEWxnWF"},"money_transactions":[{"action":"Send","code":"tBTC","amount":0.00026223,"json":{"return_address":"2N9PRF2TBmoEDodWycbGqDc6sJZPKkvcMmC"}},{"action":"Request","code":"tBTC","amount":0.00026223,"json":{"address":"2MzgdxbD6xrZ8xvSYdSxyjwdg628AKRrZET"}}],"files":{"08d301ea3d.1515143632242":{"msgtype":"pubkeys","pubkey":"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJlE/AZFyhyxWsvj3RYwE0YZXR\nczKNyCV0DgixIH3fA5T2ODJFEB/4W+xwhKA4SsbZxpNDaQaRC/6ZfB8CUoa+X6ag\nUdkUBMc0lFQVvNO0uGwKfq0TCj4odjj5oSUmBGkWswCieduLoMjg6c6jKnK6IioN\nXmYsevfi7xlqHPhAZQIDAQAB\n-----END PUBLIC KEY-----","pubkey2":"Aj/el0Ct+DTWdejUsbn57+7yvsqRVNUvngxJLYtvS7NG"}},"ip_external":false,"prvkey":"-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCJlE/AZFyhyxWsvj3RYwE0YZXRczKNyCV0DgixIH3fA5T2ODJF\nEB/4W+xwhKA4SsbZxpNDaQaRC/6ZfB8CUoa+X6agUdkUBMc0lFQVvNO0uGwKfq0T\nCj4odjj5oSUmBGkWswCieduLoMjg6c6jKnK6IioNXmYsevfi7xlqHPhAZQIDAQAB\nAoGAYpkf7sn+eRWKmxpcQ0uo+VlWfZ0JhgMClIHaSNb4XnO6thrgLA66WsvGT309\nNhqhGEHwGEeUpS7rcCQ8NPXgClIZDB+vp0Pa+xjChrpw8QGMmR5YmO7T172+X6Qp\nZn7JAcpGssVkJ2GtVXym07/sMFIi8Q/pHPKrbCinT8ZIfQECQQDHL67Tblmyk3zd\njjb2oVPIBJJ4UBpd0WQWH5OGuGGfHlr7/7cvSiCJl1AY/dQoxuFW3Ty60uBmVc70\n5MwF1H3dAkEAsNIsRKoXIp4eE30CrUz1WqMPqgAOCu7CRhPrQam2F63iz1UBBwfz\nttipT3ZT6zcpKm0yCPyeTCOh4v086Or4KQJBAMTYk76xfIWlii3ugNUFpCW0lwe9\nqgDzkSTn+cSW7SryNdp64Y8jg7pWRjschpHx0folVAIRquCXhpqwjgxo7iUCQF+x\nnxuaIeMuR4CsiyJXIAHpdbS/StpH1QQwC4YB3vZ5uOIUUvYHK7KtFxRWKZyGwdSg\nPA/5B4KVViuOecRkReECQHlpvT6gfKNGCHRiRCWOkoSMKPvllcekJgbOSj/jLv8M\nZKgMzw5qEgb+ZRXo5F4ojuMUb7J3q9oYuuT6g/XBilY=\n-----END RSA PRIVATE KEY-----","userid2":611,"this_status":"1: pubkeys sent, waiting for w2_check_mt","other_status":"2: w2_check_mt sent, waiting for w2_start_mt"}
11:17:46.317 all.js:140897 MoneyNetworkW2Service.process_incoming_message.w2_check_mt read_w_session callback 1/909: waiting for pubkeys message from other wallet session. cannot encrypt send w2_start_mt message without public keys
11:17:46.318 all.js:139210 MoneyNetworkW2Service.wait_for_pubkeys_message: w2_query_6 = select filename from files where filename like '5759be8360%'  union all select filename from files_optional where filename like '5759be8360%'
11:17:46.318 MoneyNetworkAPI.js:253 MoneyNetworkW2Service.wait_for_pubkeys_message: w2 query 6 dbQuery started (970/909). 2 pending ZeroNet API operations (963/903,970/909)
11:17:46.322 MoneyNetworkAPI.js:275 MoneyNetworkW2Service.wait_for_pubkeys_message: w2 query 6 dbQuery finished. res = "OK. Returned 3 rows". elapsed time 4 ms (970/909). 1 pending ZeroNet API operation (963/903)
11:17:46.322 all.js:139216 MoneyNetworkW2Service.wait_for_pubkeys_message dbQuery callback 1/909: res = [{"filename":"5759be8360-o.0000000000002"},{"filename":"5759be8360-o.1515143665885"},{"filename":"5759be8360-o.1515147435360"}]
11:17:46.322 all.js:139225 MoneyNetworkW2Service.wait_for_pubkeys_message dbQuery callback 1/909: res = [{"filename":"5759be8360-o.0000000000002"},{"filename":"5759be8360-o.1515143665885"},{"filename":"5759be8360-o.1515147435360"}]
11:17:46.323 all.js:139228 MoneyNetworkW2Service.wait_for_pubkeys_message dbQuery callback 1/909: old res.length = 3
11:17:46.323 all.js:139234 Uncaught ReferenceError: file_timestamp is not defined
    at Object. (all.js:139234)
    at ZeroFrame.onMessage (all.js:27016)
    at all.js:26982
(anonymous) @ all.js:139234
ZeroFrame.onMessage @ all.js:27016
(anonymous) @ all.js:26982
postMessage (async)
Wrapper.sendInner @ all.js?rev=3171&lang=en:1387
Wrapper.onMessageWebsocket @ all.js?rev=3171&lang=en:882
(anonymous) @ all.js?rev=3171&lang=en:815

Fixed JS error in wait_for_pubkeys_message. restarted W2 sessions: issue262-test23d-torando-mn.log issue262-test23d-torando-w2.log issue262-test23d-montreal-mn.log issue262-test23d-montreal-w2.log

Must be retested. Minor error in initialize.done. cleanup_offline_session_files was never called after deleting files in initialize.done!

jaros1 commented 6 years ago

Test 24. Money transaction was processed OK but problem with MN publish queue after end of transaction processing. MN publish queue in torando sends repeating publish requests to W2 but no publish operation in W2. Problems with cb_id = -1 in MN-W2 communication.

issue262-test24a-torando-mn.log issue262-test24a-torando-w2.log issue262-test24a-montreal-w2.log issue262-test24a-montreal-mn.log

Fixed some issues. Better log msg. No ratelimit error check in W2 session. Now only checking for ratelimit error in MN. Using different negative cb_id for each forced start_publish request after ratelimit problems.

jaros1 commented 6 years ago

Test 25. Wallet ping failed in torando. Problem with transactions in W2 session. Transaction with transaction timestamp 1515233819529 was never removed from transactions hash. Failed send_message just before stopping UI server. 11:17:00.053 MoneyNetworkAPI.js:253 MoneyNetworkAPI.encrypt_2: n/a aesEncrypt started (815/173). aesEncrypt cb was never called issue262-test25a-torando-mn.log issue262-test25a-torando-w2.log added force end transaction after 60 seconds. should prevent session hanging forever.

Send money transaction. Hanging after w2_start_mt message. issue262-test25b-torando-mn.log issue262-test25b-torando-w2.log issue262-test25b-montreal-mn.log issue262-test25b-montreal-w2.log Torando: w2_check_mt was received before pubkeys message. error in wait_for_pubkeys_message workaround.

Restarted test 25. Money transaction OK issue262-test25c-montreal-mn.log issue262-test25c-montreal-w2.log issue262-test25c-montreal-mn.log issue262-test25c-montreal-w2.log

Reloaded W2 session after test 25. todo. check cleanup and publish after startup issue262-test25d-montreal-w2.log issue262-test25d-montreal-w2.log

Test 25 OK. Fixed some minor things in log. Now using seperate group_debug_seq for notification + removed some todos. Nice wallet reload after test25. 2 files deleted in initialize.done (sign only + publish pending) and 2 files deleted cleanup_offline_session_files (published).