20 Commits
Author SHA1 Message Date
Jonathan Rainville e3c67d06d3 feat(bot): send one-time support bot contact request
Needed for https://github.com/status-im/status-app/issues/21861

Automatically send a contact request to the Status support bot when a profile starts:

- Use a new-user or upgraded-user message based on account creation flow
- Persist request state to prevent repeat sends
- Suppress duplicates on paired devices and when the bot contact already exists
- Add settings migration, pairing handling, startup wiring, and focused tests
2026-08-25 15:10:42 -04:00
Igor Sirotin 0c15ccba2f refactor: remove the signing phrase
Part of the Go project layout migration, item 3a: the signing phrase is
no longer a feature, so nothing should generate, store or read it.

  pkg/backend/defaults.go            buildSigningPhrase and its call
  pkg/backend/seed_phrase_dictionary.go  the 626-word list it drew from,
                                     which had no other consumer
  settings.Settings.SigningPhrase    the field and its json tag
  settings/database.go               the column in INSERT and SELECT
  migrations                         ALTER TABLE settings DROP COLUMN

The column is NOT NULL with no default, so dropping it from the writes
and dropping it from the table have to land together. The migration
follows the pattern of 1779877216_drop_keycard_settings_columns.

refs #7067
2026-08-21 16:46:09 +01:00
Igor Sirotin f9cc782a6f refactor: move services to pkg/services
Part of the Go project layout migration, item 31.

Pure move plus import-path rewrite across 687 files. No API or behaviour
change.

The services keep their grouping under pkg/services/<name> rather than
being promoted to pkg/<name>: 27 top-level directories in pkg/ would read
worse than what we have, and the grouping is what makes "an RPC service"
identifiable at a glance.

Paths that follow the move: the logosstorage test target and generate
step, the two wallet token-list tools, the migration-order check (and the
pre-rebase hook symlinked to it), and the storage env helper.

refs #7067
2026-08-21 10:11:05 +02:00
Igor Sirotin 23febf1645 refactor: dissolve the root common package
`common` was a grab-bag with no domain: the issue's own preamble names
it as the kind of package that must not exist. Every symbol moves to the
package that owns it, and the directory is deleted.

  common/dbsetup            -> internal/db/dbsetup
  common/devices.go         -> internal/platform
  common/pausable*.go       -> internal/pausable
  LogOnPanic                -> internal/panics
  TruncateWithDot(N)        -> internal/logutils
  RecoverKey, ValidateDisplayName, display-name errors -> protocol/common
  IpfsGatewayURL            -> internal/ipfs.GatewayURL
  Archives/TorrentTorrentsRelativePath, MainnetEthereumNetworkURL -> params
  StatusService             -> pkg/backend/node
  ErrBigIntSetFromString    -> services/wallet
  IsNil, Ptr                -> inlined at their call sites
  IsENSName                 -> deleted, it had no callers

Notes:
- LogOnPanic gets its own package rather than living in logutils. It
  reports to Sentry, and logutils is imported by nearly everything: put
  the guard in logutils and the Sentry SDK lands in every dependency
  graph in the tree (213 -> 250 packages). internal/panics imports
  logutils and sentry, which is the direction root `common` had.
- TruncateWithDot is log redaction, not string formatting: every one of
  its 121 call sites is inside a log or error message, so it belongs
  next to the logger.
- Moving RecoverKey and ValidateDisplayName into protocol/common removes
  the common -> protocol layering inversion; all their callers were
  already inside protocol/.
- Makefile lint-panics target follows LogOnPanic to its new path.

refs #7067
2026-08-20 20:59:45 +02:00
osmaczkoandIgor Sirotin 67f8720f54 refactor: remove deadcode (#7279)
Remove code reported by golang.org/x/tools/cmd/deadcode.

Co-authored-by: Igor Sirotin <igor@logos.co>
2026-08-14 09:36:13 +01:00
Jonathan Rainville 8d01427a4a perf(login): speed up login
Part of https://github.com/status-im/status-app/issues/21462

- Open existing app and wallet SQLCipher databases concurrently, while preserving sequential initialization for new or legacy databases.
- Speed up account selection by preloading the profile keypair and decrypting only the chat private key instead of the full extended key.
- Defer token manager startup until after login completes and run it asynchronously outside the critical startup path.
- Load cached leaderboard market data asynchronously, waiting only when the data is accessed or the service stops.

Before: about 2.15 s for the backend login request
After: about 0.47–0.50 s
Improvement: roughly 1.65–1.70 s saved
Relative reduction: about 77–78%
Speed multiplier: approximately 4.3–4.5× faster
2026-08-04 11:28:33 -04:00
Sale Djenic 500c7b0b3c feat(keypair): make a key pair signing method alignment for paired devices optional
- `auto-apply-keypair-migrations` setting introduce, true by default, device-local, never-synced
  - when enabled behavior is unchanged,
  - when disabled, incoming syncs apply key pair metadata only (name,
    accounts, positions...) the local cold wallet state, migration-derived operability transitions, and
    the profile-migration-needed setting are never touched, so each device keeps its own
    login/signing method (keycard vs password).

- local pairing avoids the setting so a newly paired device is a copy of the pairing source device
2026-07-27 15:03:17 +02:00
Marcin Czenko a1f739a6f6 fix: logos_storage_config migration timestamp 2026-06-23 17:09:19 -04:00
Marcin Czenko e956b77fcb feat: logos storage for History Archives (#7486)
* chore: adds setting file for NeoVim

* feat: wires up LogosStorageConfig db setup

* feat: adds implementation of ArchiveManagerLogosStorage and wires it up

* feat: wire LogosStorage history archive runtime control

* feat: expose history archive index completion signal

* feat: expose LogosStorage debug and connect APIs

* feat: add history archive timing knobs

* chore: align functional archive build toggles

* chore: refactors token permissions tests

* feat: wire LogosStorage archive APIs, request plumbing, and functional test

* fix: use UniversalChatID() for archive link distribution

* fix: functional archive tests

* feat: respecting online status in history archive task

* feat: more control over "ratchetNotFoundDelay"

* test: run storage-related functional tests only when USE_LOGOS_STORAGE is true

* test: adds LogosStorage backend tests

* build: updates testing on CI

* build: updates linting on CI

* fix: make sure archive_manager_torrent_test has use_torrent guard

* fix: formatting

* chore: updates nvim settings to include CGO paths

* chore: removes redundant "special disabled" files

* fix: Python linting issues

* build: use system Nim for libstorage native and Docker builds

* fix: initialize LogosStorage node config in DefaultNodeConfig

* fix: rebase

* fix: final review

* build: cleans up the vars in test storage and torrent targets in Makefile

* fix: stop unseeding before calling CreateHistoryArchiveFromDB (logos)

* test: cleans up some noise when closing websockets in functional tests

* test: further increase test coverage

* fix: linting

* chore: update local project nvim config

* chore: refactors ArchiveManagerLogosStorage

* chore: updates CONTRIBUTING.md

* build: temporarily add mc2 convenience scripts

* build: reset shared dependency repos before checkout in Makefile

Adds `git reset --hard` before `git checkout` in the `clone-nim-sds`
and `clone-storage` Makefile targets. Prevents CI failures when the
shared `../nim-sds` or `../logos-storage-nim` directories contain
unexpected local modifications from previous builds.

* fix: use shorter waku message retention policy only for LogosStorage tests

* fix: rename COMMUNITY_IMPORTING_HISTORY_ARCHIVE_MESSAGES_FINISHED to COMMUNITY_HISTORY_ARCHIVES_DOWNLOAD_AND_IMPORT_FINISHED

* build: move STORAGE and TORRENT envs close to their respective targets

* build: more robust cloning target for sds and storage
2026-06-23 18:03:37 +02:00
Sale Djenic 86547d0ba4 refactor: drop keycard columns from settings DB
- Drop KeycardInstanceUID, KeycardPairedOn, KeycardPairing fields from
  settings.Settings struct
- Drop matching SettingField vars and their AllSettingFields entries from columns.go
- Rest of the code updated according to the above changes
2026-06-22 11:33:04 +02:00
Sale Djenic 2fcf00b3a0 refactor: drop keycard type and keycards persistence layer
- Delete keycard_database.go and tests (keycards/keycards_accounts tables dropped)
- Drop Keycard struct and Keycards field from accounts-management types
- Drop keycard-only error codes/vars from accounts-management/errors
- ErrKeypairIsNotKeycard renamed to ErrKeypairIsNotColdWallet
- Rest of the code updated according to the above changes
2026-06-22 11:33:04 +02:00
6b3f8258a6 chore: cherry-picked commits from 'release/10.34.x' into develop (#7479)
* fix(waku): Avoid peer reconnection storm (#7447)

* fix(waku): Avoid peer reconnection storm

This commit is fixing 2 issues in waku:
1. Unnecesary disconnect/reconnects
2. dns failure at startup will silently give up - no retries

- filter connection changes and forward the signal only when a change happened
- dnsDiscovery: retry on failure with exponential backoff

* chore: bump logos-delivery

Include https://github.com/logos-messaging/logos-delivery-go/pull/1302

* chore: add usds to mandatory tokens (#7455)

* feat(preferences): add secure storage for app settings (#7460)

* Should replace QSettings that are stored in files

refs status-im/status-app#20922

---------

Co-authored-by: Alex Jbanca <47811206+alexjba@users.noreply.github.com>
Co-authored-by: Andrey Bocharnikov <andrey.bocharnikov@gmail.com>
2026-05-26 14:18:15 +02:00
Igor Sirotin 24d0132145 chore: fix numbered import names (#7416) 2026-04-16 13:22:54 +01:00
Marcin Czenko 94e1ae5abd refactor: prepare ArchiveService for LogosStorage extension (#7312)
* refactor: new ArchiveService architecture

* refactor: improves thread safety in ArchiveManagerTorrent

* refactor: IsReady is duplicate of IsStarted => IsReady removed

* fix: broken link in README.md

* refactor: PR review comments

* test: adds convenience scripts that make running functional tests locally slightly easier

* fix: broken path in set-test-env.sh after moving to scripts dir

* test: adds message for nix env when running set-test-env.sh

* refactor: better file name for the community manager tests with torrent archives

* test: improves naming in ManagerSuite

* test: extract torrent archive tests to a separate file and moves to where it belongs

* fix: use closure in shutdown tasks for the archive manager

* build: removes redundant convenience scripts

* chore: ignore .codex AI files

* fix: removes reference to ArchiveManager.SetPaused - to be added in a separate PR
2026-04-13 18:03:11 +02:00
saledjenic d97fe93305 feat: add xpub and cold wallet fields to keypair (#7407)
Added xpub (representing extended public key) and cold wallet (representing the cold wallet, StatusKeycard, Ledger, Trezor...) fields to keypair type and updated related database and migration files.
2026-04-09 15:38:15 +02:00
Jonathan Rainville 2bdb442c8f chore(auto_message): remove auto message setting and feature (#7276)
Part of https://github.com/status-im/status-app/issues/19684
2026-01-19 14:20:07 -05:00
Igor Sirotin 30935148c4 refactor: project layout (crypto, logutils, rpc, accounts-management) (#7226)
* refactor: internal/crypto

* refactor: internal/logutils

* chore: internal/rpc

* refactor: internal/accounts-management
2025-12-18 12:24:40 +00:00
Igor Sirotin a2ac4a97d0 refactor: project layout (testutils, static, t) (#7223)
* refactor: delete unused files

* refactor: move emojis.txt to protocol/identity/emojihash

* chore: remove t/utils and unused t/config

* refactor: pks/testutils/fake

* refactor: remove unused t/helpers/peers.go

* refactor: move testutils to internal

* refactor: split testutils/fake

* refactor: moved t/helpers to internal/testutils

* fix: fake community
2025-12-17 15:21:08 +00:00
Igor Sirotin 15423beabb refactor: project layout (nodecfg, centralizedmetrics, healthmanager, constants, errors, node, eth-node) (#7222)
* refactor: internal/nodecfg

* refactor: split constants package

* refactor: move internal/errors

* chore: node types to messaging

* refactor: merge eth-node ens into protocol ens

* refactor: internal/centralizedmetrics

* refactor: internal/healthmanager
2025-12-17 13:53:51 +00:00
Igor Sirotin 6c9070fbe9 refactor: project layout (databases, abi-spec, connection) (#7205)
* chore: move databases to internal/db

* chore: move internal/db/sqlite

* chore: internal/abi-spec

* chore: move internal/connection

* chore: internal/circuitbreaker

* chore: internal/transactions

* fix: rebase issues
2025-12-15 12:01:03 +00:00