mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
Each PoW job now races PoWPolicy.minerWorkers(cores) = cores/2 parallel searches (at least 1) instead of a single thread, so a post on an 8-core phone mines ~4x faster while the other half of the cores stays free for the UI, and the total CPU budget matches the old 2-job x 1-thread pool. - PoWPolicy.minerWorkers(availableProcessors) is the single definition of the per-job worker budget. - PoWPublishQueue gains minerThreads (used by its built-in miner and exposed for custom mine lambdas); AppModules wires maxConcurrent = 1 + minerThreads = half the cores. - PoWNostrSigner gains a workers param (default 1), covering reactions, reposts and reports via Account.miningSigner; the anonymous-post paths in the short-note and comment composers pass the same budget. - Gift-wrap envelope mining stays single-threaded: the template conversion is a non-suspend hook inside the synchronous NIP-59 build. - UI time estimates (settings picker, composer chip, broadcast banner) now benchmark at the queue's worker count via deviceHashesPerSecond(), and PoWEstimator caches one rate per worker count. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhaF5scnAvhP9wr9R7bTWM