Given a profile's wrapped-DEK file and the profile password, prints the DEK.
The secret the profile's databases and keystore files are encrypted with and
the sqlcipher pragmas needed to open the databases manually.
Part of the Go project layout migration, item 4.
internal/db/walletdatabase -> internal/db/walletdb, and its one 45-line
file splits along the two jobs it was doing:
open.go DbInitializer, InitializeDB, OpenDB
migrate.go walletCustomSteps, doMigration, MigrateDB
scripts/migration_check.sh listed this migration directory as
"walletdatabase/migrations/sql" and appdatabase's as
"appdatabase/migrations/sql". Neither path has existed since those
packages moved under internal/db/, so the check has been silently
skipping both. Both are corrected here.
refs #7067
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
Part of the Go project layout migration, item 27.
Pure move plus import-path rewrite across 502 files. No API or behaviour
change. `internal/` keeps the messaging application logic unimportable
from outside the module, which is what the issue asks for -- status-go is
consumed through the C-bindings in mobile/, not as a Go library.
Things that had to follow the move, beyond the Go imports:
- tools/generate-handlers/template.txt. messenger_handlers.go is
generated, and the template hard-codes the imports it emits, so the
generated file kept importing protocol/common and failed typecheck.
- .gitignore. The ignore rule for that generated file was pinned to the
old path; without moving it, a 1486-line generated file starts being
tracked.
- Makefile: the logosstorage and torrent test targets (both the archive
packages and ./protocol itself), the archive README, migration-protocol.
- scripts/run_unit_tests.sh, which names the protocol package explicitly
to shard its tests.
- scripts/cleanup_generated_files.sh and .golangci.yml.
scripts/migration_check.sh also needed a fix that is not specific to this
move: it validated every file the branch touched under a migration dir
against the timestamp naming rule, and a directory rename makes every
migration in it look newly added. It now excludes renames, so moving a
migration is not mistaken for adding one.
refs #7067
`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
Part of the Go project layout migration. Pure move plus import-path
rewrite; the public API is unchanged.
The "emit signals without global functions" redesign is a behavioural
change that touches the C-binding callback and is deliberately left out
of this PR.
refs #7067
Address review findings on the reconcile path:
- A single worker now owns automatic historic syncs: triggers post into a
buffered(1) channel via asyncRequestAllHistoricMessages, the worker
serializes runs, enforces historicSyncMinInterval by waiting (never by
dropping), and retries failures with backoff. The recovery-edge signal
can no longer be silently swallowed by the 20s time throttle (which
outlived its cause: it was added for cycle-era resume trigger bursts,
and #7532 removed that noise source), and a failed recovery fetch is
retried instead of lost.
- withHistoricSyncInFlight shrinks to a pure in-flight gate protecting
against a manual RPC sync racing the worker.
- Drop the dead withRetries parameter from RequestAllHistoricMessages
(retry/failover live in the store client per query).
- Waku reconcile loop: use gocommon.PausableTicker, so no ticker is armed
while the app is backgrounded and pause-state handling is shared code.
- Transport.OnHistoryReconcileNeeded: nil-guard for the offline-transport
mode (nil channel = never signals).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* fix: publish numGoroutine expvar directly in status-backend
The `numGoroutine` metric exposed at /debug/vars was provided implicitly
by github.com/anacrolix/envpprof's init(), pulled in transitively via the
torrent history-archive backend. Since #7486 moved that backend behind the
`use_torrent` build tag (default off), envpprof is no longer linked into the
default status-backend build, so `numGoroutine` disappeared from /debug/vars
and the benchmark harness recorded 0 goroutines from 2026-06-24 onward.
Publish numGoroutine directly next to numThreads so the metric no longer
depends on whether the torrent backend is compiled in.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: only publish numGoroutine when not already registered
In builds that link github.com/anacrolix/envpprof (e.g. unit tests, and any
build with the torrent history-archive backend enabled), numGoroutine is
already published by envpprof's init(), so an unconditional expvar.Publish
panics with "Reuse of exported var name: numGoroutine". Guard with
expvar.Get so we only register the metric when the dependency isn't linked.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat(messaging): resolve fleet + mode inside the Waku node
CoreParams now carries Fleet + Mode instead of a pre-resolved ClusterConfig.
The waku node resolves its peers from the fleet name via the fleets registry
and derives the peer-exchange / discv5 policy from the mode (Core = full/relay,
Edge = light) — moving peer management into the Waku object and giving the
messaging API its Start(fleet, mode) shape.
- New wakuv2.Mode (Core = relay, the default; Edge = light). It is the single
internal source of truth for the light-vs-full distinction and fully replaces
the former wakuv2.Config.LightClient flag (Config.IsLightClient() derives from
Mode). Unknown mode values are rejected by Config.Validate. Re-exported as
messaging.Mode; the app-facing WakuV2Config.LightClient bool and its DB column
are kept unchanged for backwards compatibility (bridged via ModeFromLightClient).
- wakuv2.Config gains Fleet + Mode; setDefaults resolves the fleet and derives
the node-type flags. An empty fleet leaves WakuNodes / DiscV5BootstrapNodes /
ClusterID as set directly (waku unit tests point at ephemeral nodes).
- services/ext and push-notification-server pass fleet + mode; the app no longer
pre-resolves node lists for the messaging path.
- Break the pkg/messaging/types -> waku import edge (Shard.PubsubTopic computes
its pubsub topic directly) so the waku node can own fleet resolution without
an import cycle.
Behaviour-preserving for the app: named fleets resolve to the same peers /
clusterID, and Core/Edge derives the same flags as the old LightClient path.
Note: DefaultConfig now defaults to Core, so the shared in-process test waku
enables discv5 (idle, no bootnodes) where it previously did not.
Part of pm#380 / status-go#7589 (Phase 2b).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore(params): drop dead peer fields from ClusterConfig
Now that the waku node resolves its peers from the fleet name (this PR),
ClusterConfig.WakuNodes / DiscV5BootstrapNodes have no readers and were
never persisted, and ClusterConfig.ClusterID is only written to and
reloaded from the DB, never consumed. Drop all three from the struct
(keeping Enabled + Fleet) and the orphaned DefaultWakuNodes /
DefaultDiscV5Nodes re-exports.
The cluster_id DB column is kept (no migration): it is written from the
selected fleet on save (params.DefaultClusterID) and no longer loaded back
into the struct.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(messaging): build waku config from fleet+mode in newWaku
newWaku no longer takes the whole params.WakuV2Config. Its wakuParams now
carries only what a caller actually configures — fleet + mode, plus the
port / udpPort / nameserver that some deployments set — and the waku node
builds the rest of its config from fleet+mode (peers, cluster id) and the
waku layer's setDefaults (host, discovery limit, max message size, default
shard topic).
Removed from the config build:
- identity: never read by newWaku (dead wakuParams field).
- Host / DiscoveryLimit / MaxMessageSize: only ever the waku defaults;
setDefaults fills them.
- DefaultShardPubsubTopic: setDefaults fills it.
- EnableStoreConfirmationForMessagesSent: unconditionally overridden by the
mode inside gowaku (Core -> true, Edge -> false), so the passed value was
already a no-op.
- AutoUpdate is now a fixed policy (always true, as every caller set it).
The public CoreParams (WakuConfig) is unchanged; only the messaging-internal
newWaku boundary is slimmed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat: introduce opentelemetry tracing
* chore: return associated message hasheh from segmentation layer
Required to derive trace context when a message has been segmented.
* feat: add basic tracing
- introduced `MessagingStack` which wraps protocol layers into one
entity
- split `MessageSender` into `sender` and `processor` as those two
represent different responsibilities
- simplified message sending by unifying send methods, which removes
error-prone logic duplication
- introduced `controller` that orchestrates interactions between
`sender` and `processor`
- moved application layer concerns `RawMessage`, `MessageSender`,
`StatusMessage` back to protocol
iterates: #6854
- make each messaging submodule define its own persistence interface and
SQLite implementation reference
- separate migration tables for messaging submodules
- move migrations from protocol to relevant messaging submodules
closes: #6792
- Affected code updated based on the previous commit and removal of eth-node packages.
- Updates to the `api`, `protocol`, and `services` packages to streamline functionality and reduce complexity.
- Refactoring of cryptographic operations and types to enhance usability.
- Cleanup of unused code and dependencies to optimize performance.
* feat_: enable expvar endpoint and enable pprof
* test_: track go memstats
* fix_: properly calculate go metrics
* test_: add FreeOSMemory to the end of benchmarks
* fix_: move freeosmemory method to backend
* test_: better chart
* fix_: metrics json field name
* chore_: minor fixes
* fix_: lint
Random port assignment makes infrastructure monitoring and service
discovery difficult. Fixed ports enable proper health checks,
port mapping, and integration with existing monitoring systems.
- https://github.com/status-im/infra-push-notify/issues/11
- Updated tests to utilize the new account management.
- Refactored account loading and creation methods to align with the new structure, enhancing maintainability.
- Cleaned up unused code and improved overall readability in the account package.
- This refactor further decouples the account management from direct dependencies on the go-ethereum keystore.