Note: this only reflects my personal work this month. Visit the BTC Map Blog for consolidated monthly reports.
Table of Contents
Android
Map
The filter (merchants, events, exchanges, notes) became four independent toggles, persisted across restarts, so you can mix and match layers instead of being forced to see only one at a time. Exchanges start hidden on a fresh install because ATMs are dense and tend to drown out merchants.
The desktop map’s right-click menu is now a reusable context menu with the same add-place, add-event and add-note actions as the search field, plus a copy-coordinates entry.
Events
Events can be edited straight from the Android/desktop app. An event manager, admin or root sees a pencil on the event sheet, which opens the add-event form pre-filled with the event’s fields and saves through the new REST API endpoint.
The event form also gained an OpenStreetMap link. Type a name, pick a result from Nominatim, and the form stores a canonical node/<id>, way/<id> or relation/<id> reference and moves the positioning pin to it.
Distribution
Beta distribution moved to one manifest. builds/metadata.json is a dictionary of build entries keyed by channel and platform, and every deploy merges its own entry instead of overwriting the file. The Android beta publishes an android-beta entry with the APK URL, build time and checksum, while the old flat beta manifest is still written so installed betas migrate on their next update.
The Linux beta AppImage can update itself. It reads the appimage-beta entry, downloads the new build through the CDN with an origin fallback, verifies the SHA-256, replaces the running file atomically and restarts after the old process exits. The settings screen gained an About section with the running version and a manual check, and the window finally carries the BTC Map icon instead of the Java mascot.
devtools deploy now takes --android, --linux, --windows and --macos.
API
Event Editing
PATCH /v4/events/{id} lets event managers, admins and roots edit an event over REST. The body uses tri-state semantics: omitted fields stay, null clears area_id, ends_at, place_osm_id or description, and starts_at cannot be cleared. The resulting location, whether supplied or stored, has to pass the geofence check, so a geofenced manager can neither edit an event outside their fence nor move one out of it. Soft-deleted events read as 404, and status still changes only through PUT /v4/events/{id}/status.
The event table gained two nullable columns: place_osm_id, stored in canonical <type>/<id> form, and a free-form description. Both are on create and edit and appear in every v4 response.
OpenGraph Images
The OpenGraph cards got a rework. A single og table in the image database now caches every card under a string id such as place:123 or event:123, with format and size columns. Place cards moved to /v4/places/{id}/og, event cards to /v4/events/{id}/og, and /og/element/{id} is deprecated now.
The rendering changed too. Instead of stitching OpenStreetMap raster tiles, cards are drawn from OpenFreeMap vector tiles through a new crate (see below), with the local marker sprite composited on top. Event cards work for every review status, so a pending submission has a preview.
Responsiveness
A few changes targeted load. Request logging moved to the background, and a failed log write is now a warning instead of a failed response, so a busy log.db can no longer break successful requests.
The Overpass element merge indexes cached elements before matching instead of scanning them per row, which removed an O(n²) loop that pinned an actix worker for tens of seconds every ten minutes. The RPC error handler no longer unwraps a missing error, outbound HTTP calls got timeouts, and background syncs now hold a process-wide flag so a slow upstream cannot pile up overlapping runs.
Static Maps
I published a new crate this month: rustaticmap, a static map renderer built on MapLibre Native and the OpenFreeMap styles. It takes a center, zoom, bearing, pitch, size and style and returns a PNG or JPEG. All five OpenFreeMap styles are supported (liberty, bright, positron, dark, fiord). A request without a center renders the whole world.
Rendering a vector map is heavy, so the service serializes renders and queues up to 100 requests behind the active one. When the queue is full, callers get 503 Service Unavailable with Retry-After: 1 instead of an unbounded backlog.
The crate is a workspace with a library and an axum service. The library API is async and runs the actual render on a blocking thread, with a Renderer::with_concurrency knob for hosts that can afford parallel renders. The README covers deploying the service with a DynamicUser systemd unit behind Caddy.
Ansible
Request Logs
log.db was 4.6 GB and grew by about 1 GB every 20 days because nothing trimmed the request table. Deleting the whole retention window in one statement held the write lock for minutes and made API requests hit busy_timeout and return 500s. The new trim-log job deletes in 2,000-row batches, 0.2 seconds apart, and finishes with a PASSIVE checkpoint that never blocks the API’s writers. On a copy of the real database it removed 626k rows in 314 batches in 74 seconds.
The API healthcheck got the same treatment: a shared request helper, 3-second connect and 10-second total timeouts, mktemp instead of fixed /tmp names, and set -euo pipefail. It now runs every check even when an earlier one fails.
Lightning
lnd’s REST API listened on 0.0.0.0:443 so that two clients could reach it, which exposed the whole RPC surface, including the by-design unauthenticated WalletUnlocker, to the internet. An unknown host had been calling WalletUnlocker.ChangePassword about 70 times a minute since November 20. I decided to set up nftables and whitelist the API consumers by IP. We never hold anything too valuable in hot wallets, but still.
Certificate renewal moved to lnd’s existing HTTP-01 listener on port 80, so port 443 never has to be opened for Let’s Encrypt.
Future Plans
- Wait for the upstream Compose Multiplatform 1.13 release, which will fully unlock desktop beta builds and let us publish them properly.
- Keep polishing the app, which now covers both Android and desktop.
- Focus on reducing API-side technical debt.