Commit Graph

6 Commits

Author SHA1 Message Date
Andrea Maria Piana 532664ab84
Adds topic negotiation and partitioned topic
All the code has been implemented in statusgo: status-im/status-go#1466

Basically all the whisper filter management is done at that level.

Technical description
On startup we load all chats and send a list of them to status go:
For a public chat: {:chatId "status"}, we create a single filter, based on the name of the chat.

For each contact added by us, each user in a group chat and each one to one chat open, we send:
{:chatId "0x", :oneToOne true}. This will create a chats, to listen to their contact code.

Any previously negotiated topic is also returned.

Once loaded, we create our filters, and upsert the mailserver topics, both of which are solely based on the filters loaded.
In order to remove a chat, we delete/stopwatching first the the filter in status-react and then ask status-go to remove the filter. For a public chat we always remove, for a one-to-one we remove only if the user is not in our contacts, or in a group chat or we have a chat open. Negotiated topics are never removed, as otherwise the other user won't be able to contact us anymore.

On stopping whisper we don't have to ask status-go to remove filters as they are removed automatically.

Some more logic can be pushed in status-go, but that will be in subsequent PRs.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-06-24 13:54:43 +02:00
yenda f5c18ae7a9
[feature] use subscriptions for tokens
- removes fetching of last 100000 blocks of token transfers from
the wallet pull loop
- fetches the last 100000 blocks of token transfers at startup
- replaces pulling by subscriptions to ethlogs for token transfers
2019-05-23 10:30:32 +02:00
yenda 65f05933bc
[feature] use status-go signal subscriptions for current block
- use signal subscriptions to get latest block signals
- compute confirmations in transaction details from current block
dynamically

Signed-off-by: yenda <eric@status.im>
2019-05-13 15:36:58 +02:00
Dmitry d1325fa4e5
Update status-go to v0.24.0-beta.1
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2019-05-06 10:42:45 +02:00
Pedro Pombeiro f329ca9bdf
Add comments to STATUS_GO_VERSION to avoid manual editing
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-02 21:44:15 +02:00
Pedro Pombeiro 65e6e80349
Create Nix package for building status-go 2019-04-09 12:44:39 +02:00