On Windows MSYS2 runners, the default shell is 'msys2' which doesn't
understand 'git submodule' commands the same way. Adding shell: bash
forces the step to use bash, which properly executes git and finds
submodule content.
Affected jobs: build-windows-qt, build-windows-daemon
The secp256k1 submodule (src/secp256k1/) was not being checked out
by the default shallow checkout, causing CMake to fail with:
'src/secp256k1 is empty. Run: git submodule update --init --recursive'
All 6 build jobs (Linux unit/sanitizer, Windows Qt/daemon, Linux Qt/daemon,
macOS) now:
1. Use fetch-depth:0 to get full git history (needed for submodules)
2. Run 'git submodule update --init --recursive' after checkout
3. Proceed with the normal build steps
- HTTPAuthorized: validate strAuth length before substr(6), wrap DecodeBase64 in try-catch
- RPCAcceptHandler: wrap body in try-catch to ensure counter decrement and conn cleanup
- ThreadRPCServer3: wrap while loop in try-catch for graceful exception handling
Bad auth attempts now return HTTP 401 without killing the RPC listener.
Previously the bootstrap auto-download was guarded by #ifndef QT_GUI,
meaning the Windows Qt wallet would never auto-bootstrap on fresh installs.
This left GUI users stuck at block ~570 during IBD with no way to recover.
Now both GUI and daemon builds automatically download bootstrap data from
bootstrap.cryptographic-triangles.org when no blockchain data is found.
Progress is shown in the GUI status bar via uiInterface.InitMessage.
1. tor_process.cpp: Auto-recover legacy 'state' subdirectory
- Old builds created tor_data/state/ as a directory and set
DataDirectory to point at it. Tor 0.4.9+ rejects this because
it expects to write a 'state' FILE inside DataDirectory.
- Fix: Point DataDirectory at tor_data/ itself. On startup,
if a legacy 'state/' directory exists, migrate contents up
and remove it.
2. init.cpp: Allow -notor to actually bypass Tor requirement
- Previously, -notor made StartEmbeddedTor() return false,
which hit the 'Tor failed to start' error path and killed
the wallet. Now -notor enables clearnet-only mode for
diagnostics, benchmarking, and recovery.
- Updated help text to reflect actual behavior.
Latent header-hygiene bug: crypter.h calls OPENSSL_cleanse at lines 99-100
but never declared the dependency. Built fine because the precompiled
header on triangles_common pulled in <openssl/crypto.h> transitively, so
every translation unit that included crypter.h also got the symbol.
Surfaced by enabling -DBUILD_TESTS=ON: test_triangles is configured
without REUSE_FROM the PCH, so test/sigopcount_tests.cpp fails to find
OPENSSL_cleanse when crypter.h is reached transitively via key.h/wallet.h.
Adding the explicit include is the principled fix — headers should
declare their own dependencies rather than rely on the consumer's
precompiled-header configuration.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contabo seed nodes now have persistent Tor hidden service volumes.
New onion addresses:
- seed-1: vmepp7...qtpfad
- seed-2: nsldmf...uykqd
- seed-3: on4nok...y3eqd
- seed-4: 3uyzlt...iqad
Also added Hetzner Helsinki (nawqqo...j26taid).
Reconciles two parallel implementations of multi-backend chain DB:
local kept its MakeChainDB factory + std::filesystem + unconditional
RocksDB + abstracted utxosnapshot, since those are downstream of the
boost-cleanup, smessage-RocksDB-port, and CTxDBBase abstraction work.
Preserved from origin (Krystie's branch):
- Block 2,203,594 checkpoint and matching mapSnapshotHashes entry
for P2P snapshot verification (src/checkpoints.cpp)
- Headers-first IBD stall-recovery path: during IBD, replace the
legacy PushGetBlocks fallback with RequestHeaderSyncRefillAllPeers
+ QueueHeaderSyncBlocksParallel so a stall on a weak peer set
doesn't park at a low common ancestor (src/main.cpp SendMessages)
Discarded from origin:
- src/txdb.cpp (CActiveTxDB wrapper) — superseded by txdb-factory.cpp
- BUILD_ROCKSDB-gated paths and inline LevelDB+RocksDB code in
utxosnapshot.cpp — already factored out behind CTxDBBase
- Public ReadRawBytes/WriteRawBytes/... wrappers added to
CTxDBBase for CActiveTxDB; no remaining callers
- GetActiveChainDbDirName / UseRocksDbBackend in bootstrap.cpp;
switched to GetChainDataDir()
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Aligns the recorded commit with the v0.7.1 tag actually checked out
in the working tree. Carrying forward; no code change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add libsecp256k1 v0.7.1 as src/secp256k1 submodule and introduce
crypto_ecdsa / crypto_ecdh wrappers as drop-in replacements for the
OpenSSL ECDSA_verify / ECDSA_sign / ECDH_compute_key call sites used
by key.cpp and smessage.cpp. Wrappers preserve on-chain compatibility
(lax DER parsing, 65-byte recoverable compact sigs, SEC1 priv-key
DER round-trip, raw-X ECDH output for smsg KDF).
CMake wires the submodule and new sources into the build. Mid-refactor;
landing as a checkpoint before stacking sync-pipeline work on top.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This issue was created to exercise the autonomous runner end-to-end.
**Acceptance:** runner picks this up, demo worker appends a line to docs/krystie-runner-log.md, branch krystie-wip/triangles_v5-1 is pushed, gate fast-forwards to master, this issue auto-closes.
Closes#1
Refs: krystie-wip/triangles_v5-1
Gitea PATCH /repos/{owner}/{repo}/branches/{branch} is for renaming branches, not for moving refs; it always returned failure even when master had not diverged. Replace with a plain git push (token in extra header) which fast-forwards iff the update is FF-clean — same safety, correct mechanism.
Adds the gate workflow + check script + Krystie public key under .gitea/.
This commit is intentionally unsigned so the gate treats it as an admin
bootstrap rather than a Krystie commit (which the gate would otherwise
require to land via krystie-wip/* + auto-merge).
After this, master branch protection will be enabled requiring the
Krystie Gate workflow to pass on all future pushes. Krystie will push
to krystie-wip/<task-id> branches and the workflow auto-merges on green.
See: krystie-buildout/workflows/* in the krystie repo for sources.
Pre-v5.10 the secure-messaging store was backed by LevelDB at
<datadir>/smsgDB/. Phase 3a switched it to RocksDB; existing nodes
upgrading to v5.10 would otherwise lose their pubkey cache and
inbox/outbox because RocksDB can't open a LevelDB tree.
Detection: presence of CURRENT without IDENTITY in smsgDB/. RocksDB
writes IDENTITY on first open; LevelDB never does.
Migration path:
1. Atomic rename smsgDB/ → smsgDB.leveldb-backup/
2. Open backup with leveldb::DB (read-only)
3. Open smsgDB/ with rocksdb::DB (create_if_missing)
4. Iterate every key, copy in 5000-entry batches
5. Leave the backup in place — never deleted by the migration code,
so the user can roll back manually if needed
Triggered lazily inside SecMsgDB::Open so no separate flag or RPC is
needed. Already-migrated nodes (IDENTITY present) skip the path. Once
all users are on v5.10+ the helper and the leveldb headers it pulls
in can be dropped.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bignum.h calls std::reverse and std::reverse_copy unqualified, relying
on ADL plus <algorithm> being transitively pulled in by an earlier
header. The Qt build path on Windows MSYS2 doesn't satisfy that
assumption — the moc-generated TUs reach bignum.h before <algorithm>
shows up via any other include. Add the explicit include.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1. rocksdb::WriteBatch::Handler typeinfo missing on Ubuntu's librocksdb-dev.
Both SecMsgBatchScanner (smessage.cpp) and CRocksBatchScanner
(txdb-rocksdb.cpp) inherited from Handler to scan an active WriteBatch
for pending writes/deletes; that subclass-based scan fails to link
because Ubuntu's package hides the parent's typeinfo. Replaced both
scanners with a parallel std::map<std::string, std::optional<std::string>>
maintained alongside each WriteBatch — Put adds a value entry, Delete
adds a nullopt entry, ScanBatch becomes an O(log n) map lookup. Same
semantics, no Handler dependency.
2. macOS Homebrew's RocksDB 10.x removed the raw DB** overload of
DB::Open; only std::unique_ptr<DB>* remains. txdb-rocksdb.cpp called
the raw form, breaking the macOS build. Added the same SFINAE Open
wrapper used in smessage.cpp (commit 4265343) that picks whichever
overload the linked rocksdb actually has.
3. CSignal<>'s SignalState::slots member collided with Qt's `#define slots`
to empty, stripping the member name in any TU that pulls in <QtCore>
(e.g. moc-generated files that include util_signal.h transitively).
Renamed to slot_map.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two issues surfaced once configure stopped failing:
1. CTxDBBase::NewIterator() was protected, but the snapshot dump/load
code (commits 76579e3, ccfada5) calls it externally. Moved to public —
the iterator interface is intentional public API.
2. RocksDB DB::Open's raw DB** overload was removed in newer releases.
Homebrew's macOS package (10.x) only exposes the std::unique_ptr<DB>*
form; Ubuntu 22.04 (rocksdb 6.x) and MSYS2 (8/9.x) still expose DB**.
Added a SFINAE wrapper OpenSmsgDB() in smessage.cpp that picks
whichever overload the linked rocksdb actually has, so we don't need
version macros or per-distro #ifdefs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
C++20 broke two things in the prior bump:
1. std::allocator no longer exposes pointer/const_pointer/reference/
const_reference member typedefs, and the 2-arg allocate(n, hint) was
removed. Both secure_allocator and zero_after_free_allocator inherited
these from std::allocator. Define the typedefs ourselves and switch
the secure_allocator allocate() to the single-arg form.
2. Bundled src/leveldb uses `std::memory_order::memory_order_relaxed`
which was valid in C++17 but became a hard error in C++20 (memory_order
is now a scoped enum class — the values are at namespace scope or
memory_order::relaxed, not memory_order::memory_order_relaxed). LevelDB
itself only needs C++11, so pin its targets to C++17 in BuildLevelDB.cmake
instead of patching vendored code.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Walks the active chain in [start_height, end_height] and runs the existing
VerifySignature path on every non-coinbase input. Returns counts plus the
first 100 failures.
Intended use: capture a pre-migration baseline (should be all-zero
failures), then re-run after switching the underlying ECDSA primitive
(e.g. OpenSSL EC -> libsecp256k1) to catch behavioural regressions before
they hit IBD on a peer.
Defaults: start = max(1, tip-1000), end = tip.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two CI failures from the prior push:
1. MSYS2 mingw64's RocksDB headers (8.x+) use `using enum` and defaulted
operator== on user-defined types — both C++20-only. Bumped
CMAKE_CXX_STANDARD from 17 to 20 across the project. GCC 11.4 (Ubuntu),
GCC 14.x (MSYS2), and Apple Clang 16 all support what we need.
2. Ubuntu 22.04's librocksdb-dev ships neither a CMake config package nor
a rocksdb.pc file, so both find_package(RocksDB CONFIG) and
pkg_check_modules(rocksdb) fail. Added a manual find_path/find_library
fallback that creates a RocksDB::rocksdb IMPORTED target from the
raw header dir + .so, with a clear FATAL_ERROR if all three probes miss.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LoadSnapshot previously opened LevelDB directly at <datadir>/txleveldb to
write the snapshot in. Refactored to use the CTxDBBase abstraction:
- WipeChainDataDir() removes the configured backend's chain DB dir
- MakeChainDB("c+") opens fresh via the factory
- High-level methods (WriteBlockIndex, WriteUtxo, WriteHashBestChain,
WriteVersion, WriteDbFormat) replace manual key/value construction
- TxnBegin/Commit cycles every 1000 headers / 50000 UTXOs preserve the
prior batching cadence
The IsRocksDbChainBackend() guard added in 76579e3 is dropped — snapshot
loading now works on either backend.
Two adjacent paths in init.cpp also hardcoded "txleveldb": the snapshot
auto-load guard (Step 6c) and the -reindex datadir wipe. Both updated to
GetChainDataDir() / WipeChainDataDir() so they pick the right directory
for the configured backend.
Helpers added to txdb.h / txdb-factory.cpp:
- GetChainDataDir(): on-disk path of the configured backend's chain DB
- WipeChainDataDir(): rm -rf the same path
Bootstrap archive paths (bootstrap.cpp lines 721+) intentionally still
reference txleveldb specifically — the prebuilt-index distribution
remains LevelDB-format until that pipeline is ported separately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>