Commit Graph

5019 Commits

Author SHA1 Message Date
Roman Volosovskyi 02ce0782b1
[#9061] fix fetching balances for keycard acc 2019-11-04 16:23:37 +02:00
Andrea Maria Piana 5eb314db58
Use staging fleet and upgrade status-go
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-04 15:07:12 +01:00
Andrea Maria Piana c69863cda2
Fix message ordering and improve performance rec. messages
This commit does a few things:

==== Ordering of messages ====

Change the ordering of messages from a mixture of timestamp/clock-value to use
only clock-value.

Datemarks are now not used for sorting anymore, which means that the
order of messages is always causally related (not the case before, as we
were breaking this property by sorting by datemark), but datemark
calculation is unreliable (a reply to a message might have a timestamp <
then the message that is replied to).
So for timestamp calculation we
naively group them ignoring "out-of-order timestamp" messages, although
there's much to improve.
It fixes an issue whereby the user would change their time and the
message will be displayed in the past, although it is still possible to
craft a message with a lower clock value and order it in the past
(there's no way we can prevent this to some extent, but there are ways
to mitigate, but outside the scope of this PR).

==== Performance of receiving messages ====

The app would freeze on pulling messages from a mailserver (100 or so).
This is due to the JS Thread being hogged by CPU calculation, coupled
with the fact that we always tried to process messages all in one go.

This strategy can't scale, and given x is big enough (200,300,1000) the
UI will freeze.

Instead, each message is now processed separately, and we leave a gap
between processing each message for the UI to respond to user input
(otherwise the app freezes again).
Pulling messages will be longer overall, but the app will be usuable
while this happen (albeit it might slow down).
Other strategies are possible (calculate off-db and do a big swap,
avoiding many re-renders etc), but this is the reccommended strategy by
re-frame author (Solving the CPU Hog problem), so sounds like a safe
base point.

The underlying data structure for holding messages was also changed, we
used an immutable Red and Black Tree, same as a sorted map for clojure, but we use
a js library as is twice as performing then clojure sorted map.

We also don't sort messages again each time we receive them O(nlogn), but we
insert them in order O(logn).

Other data structures considered but discarded:
1) Plain vector, but performance prepending/insertion in the middle
(both O(n)) were not great, as not really suited for these operations.

2) Linked list, appealing as append/prepend is O(1), while insertion is
O(n). This is probably acceptable as messages tend to come in order
(from the db, so adding N messages is O(n)), or the network (most of
them prepends, or close to the head), while mailserver would not follow this path.
An implementation of a linked list was built, which performed roughtly the
same as a clojure sorted-map (although faster append/prepend), but not
worth the complexity of having our own implementation.

3) Clojure sorted-map, probably the most versatile, performance were
acceptable, but nowhere near the javascript implementation we decided on

4) Priority map, much slower than a sorted map (twice as slow)

5) Mutable sorted map, js implementation, (bintrees), not explored this very much, but from
just a quick benchmark, performance were much worse that clojure
immutable sorted map

Given that each message is now processed separately, saving the chat /
messages is also debounced to avoid spamming status-go with network
requests. This is a temporary measure for now until that's done directly
in status-go, without having to ping-pong with status-react.

Next steps performance wise is to move stuff to status-go, parsing of
transit, validation, which is heavy, at which point we can re-consider
performance and how to handle messages.

Fixes also an issue with the last message in the chat, we were using the
last message in the chat list, which might not necessarely be the last
message the chat has seen, in case messages were not loaded and a more
recent message is the database (say you fetch historical messages for
1-to-1 A, you don't have any messages in 1-to-1 chat B loaded, you receive an
historical message for chat B, it sets it as last message).

Also use clj beans instead of js->clj for type conversion

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-01 23:59:26 +01:00
Serhy e579412334
E2e check if seedphrase in new acc is true
Signed-off-by: Serhy <sergii@status.im>
2019-11-01 19:04:11 +02:00
acolytec3 3cc157b0fb
Suppress remove photo option when no profile pic
Signed-off-by: yenda <eric@status.im>
2019-11-01 15:07:51 +01:00
Andrey Shovkoplyas acdad6d598
fixes animated gifs on Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2019-11-01 13:05:03 +01:00
yenda 3528dd809a
fix fleet settings not being saved to node config
Signed-off-by: yenda <eric@status.im>
2019-11-01 11:56:11 +01:00
dependabot-preview[bot] 463b4111b2 Bump @react-native-community/netinfo in /mobile/js_filesBumps [@react-native-community/netinfo](https://github.com/react-native-community/react-native-netinfo) from 4.2.2 to 4.4.0.- [Release notes](https://github.com/react-native-community/react-native-netinfo/releases)- [Changelog](https://github.com/react-native-community/react-native-netinfo/blob/master/CHANGELOG.md)- [Commits](https://github.com/react-native-community/react-native-netinfo/compare/v4.2.2...v4.4.0)Signed-off-by: dependabot-preview[bot] <support@dependabot.com> 2019-10-31 11:12:11 +01:00
Roman Volosovskyi f7cc74a29a
fix recovery with mnemonic on keycard 2019-10-31 09:47:23 +02:00
Serhy c7cc80bc60
Followup e2e fix after PN remove
Signed-off-by: Serhy <sergii@status.im>
2019-10-30 21:34:53 +02:00
Roman Volosovskyi e80b08c42e
[#9233, #9173] fix some screens
Signed-off-by: yenda <eric@status.im>
2019-10-30 15:17:28 +01:00
tbenr 88dbeead42
fixes #8877
Signed-off-by: yenda <eric@status.im>
2019-10-30 15:13:54 +01:00
Jakub Sokołowski f85ace651a
combined desktop dependency upgrades
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-30 11:43:13 +01:00
Churikova Tetiana bba6d735c3
Remove Myabe later after deleting PN
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-30 09:19:07 +01:00
Churikova Tetiana bada7c4dd4
added more waiting to some elements
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-29 18:23:38 +01:00
Serhy 5b742155d0
Soft errors handing separated per test
Signed-off-by: Serhy <sergii@status.im>
2019-10-29 16:07:27 +02:00
yenda 7bb45fdd8f
remove firebase
Signed-off-by: yenda <eric@status.im>
2019-10-29 15:03:58 +01:00
Roman Volosovskyi 0856ae12e0
[#9231] fix flow of seed recovering on keycard 2019-10-28 21:52:11 +02:00
tbenr dfe259f14e
fixes #9205 2019-10-28 19:12:29 +02:00
acolytec3 dc7724f88b
Delete account name if setting recipient manually 2019-10-28 19:10:50 +02:00
acolytec3 33af176246
Fix network status change logic and #8951 2019-10-28 10:21:29 +02:00
Serhy eb00df147d
E2E transaction appears in history
Signed-off-by: Serhy <sergii@status.im>
2019-10-28 10:04:45 +02:00
Churikova Tetiana 5561aff955
e2e account settings
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-28 09:02:20 +01:00
Jakub Sokołowski f72452d04f
fix matching deps with only one dependency
those often end with (*) since their base dep was already listed

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-25 18:00:54 +02:00
Jakub Sokołowski 78095b0a2e
avoid spawning too many Nix shells
Achieved by:
- using := the 'git rev-parse' will be called after the shell is up
- adding the SHELL setting to the _startdev-% target

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-25 18:00:23 +02:00
Serhy 8ac531ed9c
Add unblock user test
Signed-off-by: Serhy <sergii@status.im>
2019-10-24 19:29:02 +03:00
Churikova Tetiana 39b32707e2
2 mailserver e2e and small fix
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-24 18:20:49 +02:00
Andrea Maria Piana 9cd891365a
Use payload & avoid transforming in clojure objects.
This commit includes a few performance fixes:
1) Pass a string payload instead of an hex encoded string, to avoid
unecessary conversion
2) Don't js->clj on messages, as that's fairly expensive and we can get
away without
3) Don't use `pr-str` `read-string`, rather convert to json

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-10-23 15:52:32 +02:00
Andrea Maria Piana 57b1722863
Verify ens names on messages and contact requests
This commits verifies ens names when new messages or contact requests
come through.
A batch of ens names is sent to status-go which will then verifying them
and the result will be passed back in a callback to status-react.

Also temporary skipped test_ens_in_public_chat until we merge the ENS
code (blocked currently by 1.9 upgrade)

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-10-23 12:32:28 +02:00
Roman Volosovskyi 474ff00c7f
[#8650] Tappable "backup seed" notification in wallet
- notification is tappable
- appears only if user has nonzero balance and hasn't backed up seed yet
- Fix e2e test for this change
2019-10-22 18:14:13 +03:00
Churikova Tetiana dbb4dfa61b
e2e about dapp popup, fix e2e for switching mailserver, skipped low-prio blocked e2e
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-21 14:51:59 +02:00
Serhy c0945c41d6
New e2e tests and fix
Signed-off-by: Serhy <sergii@status.im>
2019-10-21 11:53:50 +03:00
Andrey Shovkoplyas cbe17cbe02
[#8940] Redesign Back, swipe-to-the-left and hardware device Back buttons to align the behavior
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-10-18 17:27:03 +02:00
Churikova Tetiana 8fc823f94b
e2e about switching accounts in DApp
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-18 15:49:14 +02:00
Andrey Shovkoplyas 1c51731aea
[#8446] [Multi-Account] Build account settings for individual wallet
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-10-18 12:09:47 +02:00
Jakub Sokołowski 647bde7c6b
fix type of shell used for s3cmd uploads
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-18 11:27:37 +02:00
Vitaliy Vlasov f28fd8fc9c
customize TMPDIR and clean it
Also:
- parallelize upload and achive stages
- fix s3cmd uploads for combined Jenkinsfile
- fix failing TestFlight clean job

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-18 09:40:11 +02:00
Jakub Sokołowski b8d3ef3aa5
combined node package upgrade prs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-17 12:43:17 +02:00
Pedro Pombeiro d317d8a6c7
Filter for security updates only in Dependabot
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-17 11:05:34 +02:00
Jakub Sokołowski afc2412514
desktop builds need GnuPG
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-17 11:03:41 +02:00
yenda 7b6dfad702
[fix 8853] fix change of whisper id in ens registration
A user can type in their existing name in the registration flow. Status can
confirm if they own it. After signing a transaction, the user can update the
Whisper ID to their new one.

Instead of using a hardcoded contract for stateofus, the standard `owner`
method is called to find the resolver contract of a ens name.
This allows users to set the pubkey even for ens names that are not
subdomains of stateofus

Signed-off-by: yenda <eric@status.im>
2019-10-16 17:32:07 +02:00
Churikova Tetiana 1f24722db0
resolve ENS in wallet
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-16 15:35:35 +02:00
yenda 500d2cc787
fix navigation reset
currently navigation-reset only works properly if you reset to a simple route

this fix allows us to use navigation reset with more complex routes, by
ensuring that the navigation stack is populated properly so that navigate
back doesn't end up emptying the stack.

this is temporary as the proper way to do navigation in general would be
to get rid of view id and navigation-stack entirely, since it is a duplication
of the state of react-navigation

Signed-off-by: yenda <eric@status.im>
2019-10-16 15:02:26 +02:00
Andrea Maria Piana 1314c6e7d7
Disable spinner when generating multiaccount
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-10-16 14:28:17 +02:00
Jakub Sokołowski 95e48a4159
add info about MacOS Catalina workaround
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-16 09:12:33 +02:00
Pedro Pombeiro 8e90103e96
nix: Upgrade expected Xcode version to 11.1
Also:
- nix: Disable symlink store check
- Add comments to dependabot config file

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-15 18:40:26 +02:00
Andrey Shovkoplyas da4d95d85c
drop les
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-10-15 13:55:39 +02:00
acolytec3 2ddfcd4f88
Point network to correct current-network
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-10-15 13:54:59 +02:00
Churikova Tetiana e88472a0e0
fix some testrail links and add new test for checking log_level and fleet
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-15 11:54:04 +02:00
Churikova Tetiana 114b4da2d9
fix deleteing dapps
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-14 14:22:56 +02:00