Commit Graph

81 Commits

Author SHA1 Message Date
Michal Iskierko b38a9f5878 fix_: Publish token actions to privileged members
Send information to owners and token masters about operations: burn, airdrop, remote destruct.
Add CommunityTokenActionSignal to signalize client side.

Fix #13371
2024-06-03 12:19:19 +02:00
Michal Iskierko 574450289c feat_: Move community tokens transaction listening to status-go
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
2024-05-16 16:18:15 +02:00
Jonathan Rainville 5f4aab3121
feat(community)_: send signals about member reevaluation in progress (#5120)
Needed for https://github.com/status-im/status-desktop/issues/14378
2024-05-08 15:55:30 -04:00
Jonathan Rainville 1c42c07760
feat(discord_import): send signal when the import was cleaned up (#4693)
This is to let the front end know that the community was deleted so it can also delete it from the UI
2024-02-12 16:04:12 -05:00
Boris Melnik 1d08b403e6
feat(discord): Split import channel signals and community import signals (#4232) 2023-11-07 13:44:10 +03:00
Sale Djenic b348cca15c feat: added functionality to ask a client to sign a transaction and an endpoint to continue sending using provided signature
This functionality is needed in case the user wants to send a transaction and
signs it using the signature provided by the keycard (or any other compatible way).
2023-10-17 19:42:06 +02:00
frank 6bcf5f1289
Removed settings.Usernames and reactivate PreferredName (#3964)
* sync preferred name;
remove settings.usernames

* update account name when handle settings.preferred_name from backup message

* fix Error:Field validation for 'KeycardPairingDataFile' failed on the 'required' tag

* bump version

* rebase
2023-09-16 09:20:23 +08:00
Volodymyr Kozieiev 7560540392
Regularly update the list of curated communities (#3827)
Regularly update the list of curated communities
2023-08-07 13:54:00 +01:00
Andrea Maria Piana e08aad7d73 Send account/settings on login 2023-07-06 17:35:32 +01:00
Sale Djenic 61527f8c78 chore: synchronization improvements applied to keypairs/accounts
This is the first step of improvements over keypairs/keycards/accounts.
- `SyncKeypairFull` protobuf removed
- `SyncKeypair` protobuf is used for syncing all but the watch only accounts
- `SyncAccount` is used only for syncing watch only accounts
- related keycards are synced together with a keypair
- on any keypair change (either it's just a keypair name or any change made over an
account which belongs to that keypair) entire keypair is synced including related keycards
- on any watch only account related change, that account is synced with all its details
2023-07-05 14:41:26 +02:00
Alex Jbanca 43b2c3b7ce
perf(sqlCipher): Increase cipher page size to 8192 (#3591)
* perf(sqlCipher): Increase cipher page size to 8192

Increasing the cipher page size to 8192 requires DB re-encryption. The process is as follows:
//Login to v3 DB
PRAGMA key = 'key';
PRAGMA cipher_page_size = 1024"; // old Page size
PRAGMA cipher_hmac_algorithm = HMAC_SHA1";
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1";
PRAGMA kdf_iter = kdfIterationsNumber";

//Create V4 DB with increased page size
ATTACH DATABASE 'newdb.db' AS newdb KEY 'key';
PRAGMA newdb.cipher_page_size = 8192; // new Page size
PRAGMA newdb.cipher_hmac_algorithm = HMAC_SHA1"; // same as in v3
PRAGMA newdb.cipher_kdf_algorithm = PBKDF2_HMAC_SHA1"; // same as in v3
PRAGMA newdb.kdf_iter = kdfIterationsNumber"; // same as in v3
SELECT sqlcipher_export('newdb');
DETACH DATABASE newdb;

//Login to V4 DB
...

Worth noting:
The DB migration will happen on the first successful login.
The new DB version will have a different name to be able to distinguish between different DB versions.Versions naming mirrors sqlcipher major version (naming conventions used by sqlcipher), meaning that we're migrating from V3 to V4 DB (even if we're not fully aligned with V4 standards). The DB is not migrated to the v4 standard `SHA512` due to performance reasons. Our custom `SHA1` implementation is fully optimised for perfomance.

* perf(sqlCipher): Fixing failing tests

Update the new DB file format in Delete account, Change password and Decrypt database flows

* perf(SQLCipher): Increase page size - send events to notify when the DB re-encryption starts/ends
2023-06-13 18:20:21 +03:00
Sale Djenic eeaaf0ce3f feat: accounts improvements applied
- old `accounts` table is moved/mapped to `keypairs` and `keypairs_accounts`
- `keycards` table has foreign key which refers to `keypairs.key_uid`
- `Keypair` introduced as a new type
- api endpoints updated according to this change
2023-05-25 19:46:47 +02:00
Sale Djenic f1e3ae5b46 feat: sync and backup wallet accounts
Changes applied here introduce:
- improvements to sync wallet accounts among devices (including all account types)
- backing up wallet accounts to and fetch them from waku (an information about received
wallet accounts is sent via `waku.backedup.wallet-account` signal to a client)
2023-04-21 16:35:24 +02:00
Sale Djenic 93de01e32e feat: backup keycards to and fetch them from waku
Changes applied here introduce backing up keycards data to and fetch them from waku.
Information about received keycards data is sent via `sync.from.waku.keycards` signal.
2023-02-28 19:23:36 +01:00
frank 9137257638
synchronize display name (#2989) 2022-12-29 14:16:19 +08:00
Sale Djenic 1340a55c1d feat: backup profile data to waku and sync them from waku
Changes applied here introduce backing up profile data (display name and identity
images) to waku and fetch them from waku. Information about those data is sent
as a separate signal to a client via `sync.from.waku.profile` signal.

New signal `sync.from.waku.progress` is introduced which will be used to notify a client
about the progress of fetching data from waku.
2022-12-23 15:07:14 +01:00
Richard Ramos f25ac111db chore: remove unneeded success signal 2022-12-07 12:15:23 -04:00
Pascal Precht 22b5690cda feat: add signal indicating that history messages are being imported
In order to give clients more insights about archive messages being
processed, we're adding this additional signal that informs clients when
the import of downloaded history archive messages has started.
2022-12-05 10:51:53 +01:00
Pascal Precht 194f26f3b4 feat: add signal for starting history archive downloads 2022-12-01 16:12:00 +01:00
Richard Ramos eaced1c1e9 fix(store): generate signals per storenode request with custom requestIDs 2022-11-28 08:40:58 -04:00
Pascal Precht 0bdb596d3b feat: introduce discord import tool 2022-10-28 09:52:26 +02:00
Samuel Hawksby-Robinson 9a7f38fcdf Added portManager debug logging 2022-10-26 10:26:59 +01:00
frank 6e4ac1c495 Use image server for all kind of images and integrate identity rings 2022-09-16 09:52:08 +01:00
Andrea Maria Piana f58fd4517f WIP 2022-09-16 09:52:08 +01:00
Pascal Precht fd4488e504 feat: add signal to inform clients when all archives have been downloaded and handled
This adds a new `DownloadingHistoryArchivesFinished` signal to the
family of community archive signals. It's emitted when all to be
downloaded archives have been downloaded and handled.
2022-09-16 09:43:49 +02:00
Samuel Hawksby-Robinson 8b56cb7bfa Smoke test on API and signals 2022-09-09 13:24:56 +01:00
Pascal Precht 9c568c58cf feat: introduce messenger APIs to extract discord channels
As part of the new Discord <-> Status Community Import functionality,
we're adding an API that extracts all discord categories and channels
from a previously exported discord export file.

These APIs can be used in clients to show the user what categories and
channels will be imported later on.

There are two APIs:

1. `Messenger.ExtractDiscordCategoriesAndChannels(filesToimport
   []string) (*MessengerResponse, map[string]*discord.ImportError)`

   This takes a list of exported discord export (JSON) files (typically one per
   channel), reads them, and extracts the categories and channels into
   dedicated data structures (`[]DiscordChannel` and `[]DiscordCategory`)

   It also returns the oldest message timestamp found in all extracted
   channels.

   The API is synchronous and returns the extracted data as
   a `*MessengerResponse`. This allows to make the API available
   status-go's RPC interface.

   The error case is a `map[string]*discord.ImportError` where each key
   is a file path of a JSON file that we tried to extract data from, and
   the value a `discord.ImportError` which holds an error message and an
   error code, allowing for distinguishing between "critical" errors and
   "non-critical" errors.

2. `Messenger.RequestExtractDiscordCategoriesAndChannels(filesToImport
   []string)`

   This is the asynchronous counterpart to
   `ExtractDiscordCategoriesAndChannels`. The reason this API has been
   added is because discord servers can have a lot of message and
   channel data, which causes `ExtractDiscordCategoriesAndChannels` to
   block the thread for too long, making apps potentially feel like they
   are stuck.

   This API runs inside a go routine, eventually calls
   `ExtractDiscordCategoriesAndChannels`, and then emits a newly
   introduced `DiscordCategoriesAndChannelsExtractedSignal` that clients
   can react to.

   Failure of extraction has to be determined by the
   `discord.ImportErrors` emitted by the signal.

**A note about exported discord history files**

We expect users to export their discord histories via the
[DiscordChatExporter](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#exportguild)
tool. The tool allows to export the data in different formats, such as
JSON, HTML and CSV.

We expect users to have their data exported as JSON.

Closes: https://github.com/status-im/status-desktop/issues/6690
2022-08-04 14:34:23 +02:00
Parvesh Monu 60a49fc7d9
Timeout automatic status updates (#2757) 2022-08-03 04:38:01 +05:30
Jakub Sokołowski 530f3c7a3a
rename status-react to status-mobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-17 15:37:14 +02:00
Richard Ramos 30f8bd6dfb
feat: add service for checking if there are new versions available (#2552) 2022-06-08 08:38:26 -04:00
Pascal Precht 7032fc9dcc Introduce community history archive routine
This introduces logic needed to:

- Create WakuMessageArchives and and indices from store waku messages
- History archive torrent data to disk and create .torrent file from
  that
- Seed and unseed history archive torrents as necessary
- Starting/stopping the torrent client
- Enabling/disabling community history support for individual components
  and starting/stopping the routine intervals accordingly

This does not yet handle magnet links (#2568)

Closes #2567
2022-04-06 13:00:33 +02:00
Pascal Precht 86926258ee Intrododuce `NodeConfig.TorrentConfig` and CLI flags
This commit introduces a new `TorrentConfig` as per #2563 with dedicated
default values and new options/flags for the status-go CLI.

Since it's part of `NodeConfig`, which is stored per user in the
database, this commit also adds a migration script that adds a new
`torrent_config` table and database APIs to insert and retreive the
torrent config.

Closes #2563
2022-03-21 12:59:09 +01:00
Andrea Maria Piana d60a6713fe Enable mailserver cycle by default
This commit enables mailserver cycle logic by default and make a few
changes:

1) Nodes are graylisted instead of being blacklisted for a set amount of
   time. The reason is that if we blacklist, any cut in connectivity
   might result in long delays before reconnecting, especially on spotty
   connections.

2) Fixes an issue on the devp2p server, whereby the node would not
   connect to one of the static nodes since all the connection slots
   where filled. The fix is a bit inelegant, it always connects to
   static nodes, ignoring maxpeers, but it's tricky to get it to work
   since the code is clearly not written to select a specific node.

3) Adds support to pinned mailservers

4) Add retries to mailservers requests. It uses a closure for now, I
   think we should eventually have a channel etc, but I'd leave that for
   later.
2022-03-19 08:56:22 +00:00
Richard Ramos 98784b752a
feat: desktop mailserver cycle (#2481) 2022-01-12 12:02:01 -04:00
Andrea Maria Piana 301325a22e Add backing up of contacts
We periodically check whether we should backup contacts through waku.

Currently it's not tied to any event, it will only schedule a backup on
a tick, or through the provided API endpoint.
2021-11-15 18:53:35 +00:00
Richard Ramos 7440c184c0
feat: add batch information and request ID in history requests (#2397) 2021-11-09 16:16:19 -05:00
Richard Ramos 3b05d379bd
feat: add signals that are emitted before/after history messages are requested (#2378)
* fix: sqlite variable limit

* feat: add signal for history messages
2021-09-28 14:41:35 -04:00
Vitaliy Vlasov 049afe5765 Pass connection status chan to go-waku
Fix conn status chan gorouting never quitting

Fix import cycle

Add keepAlive interval to wakuv2 node

Add CustomNodes

Do not resume wakuv2 store
2021-09-23 19:00:40 +03:00
RichΛrd facad9f07e
feat: upload/download rate for waku v1 messages (#2286)
* feat: upload/download rate for waku v1 messages

* reorganize code

* fix failing test
2021-08-03 15:27:15 -04:00
Andrea Maria Piana cf6ef3171a Add mailserver logic 2021-05-21 07:22:58 +02:00
Volodymyr Kozieiev 8a370c1c41
Request info about community from mailserver (#2177) 2021-04-19 15:09:46 +03:00
Andrea Maria Piana c55659b4f6
Add community notifications (#2160)
This commit introduces the following changes:

- `local-notifications` require as body an interface complying with
`json.Marshaler`
- removed unmarshaling of `Notifications` as not used (we only Marshal
notifications)
- `protocol/messenger.go` creates directly a `Notification` instead of
having an intermediate format
- add community notifications on request to join
- move parsing of text in status-go for notifications
2021-03-31 18:23:45 +02:00
Volodymyr Kozieiev c38439e664
Listen for delivered messages (#2150) 2021-02-23 17:47:45 +02:00
Gheorghe Pinzaru d04e54e54e
Local notifications service (#2026)
Also adds implementation for eth transactions notifications
2020-10-28 10:56:14 +03:00
Adam Babik 79b8112f89
Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
Pedro Pombeiro c8a911ebd1 Use goimports instead of gofmt 2020-01-06 10:17:23 +01:00
Adam Babik 1ac515f19e remove reSelectAccount from backend, SelectKeyPair and SelectedKeyPairID methods from Whisper 2019-12-30 12:56:05 +01:00
yenda 024f30f0b9 Put settings in a table with schema (#1746)
Move settings table schema from a key-value store to a one row table with many columns.

We now save the first row with initial data in saveAccountAndLogin and follow up saveSetting calls are only saving one setting at a time.

Co-authored-by: Adam Babik <a.babik@designfortress.com>
2019-12-27 10:58:25 +01:00
Andrea Maria Piana fd49b0140e
Move to protobuf for Message type (#1706)
* Use a single Message type `v1/message.go` and `message.go` are the same now, and they embed `protobuf.ChatMessage`

* Use `SendChatMessage` for sending chat messages, this is basically the old `Send` but a bit more flexible so we can send different message types (stickers,commands), and not just text.

* Remove dedup from services/shhext. Because now we process in status-protocol, dedup makes less sense, as those messages are going to be processed anyway, so removing for now, we can re-evaluate if bringing it to status-go or not.

* Change the various retrieveX method to a single one:
`RetrieveAll` will be processing those messages that it can process (Currently only `Message`), and return the rest in `RawMessages` (still transit). The format for the response is:
`Chats`: -> The chats updated by receiving the message
`Messages`: -> The messages retrieved (already matched to a chat)
`Contacts`: -> The contacts updated by the messages
`RawMessages` -> Anything else that can't be parsed, eventually as we move everything to status-protocol-go this will go away.
2019-12-05 17:25:34 +01:00
Pedro Pombeiro 26b6d7c36a Create a home submodule for Eth node bridges- Rename StatusBackend to GethStatusBackend 2019-11-27 17:02:09 +01:00