diff options
| author | Adam Soltys <[email protected]> | 2026-03-16 23:38:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-16 23:38:47 -0700 |
| commit | ee88e5f213334382cbea04402cab9bc29405412a (patch) | |
| tree | af340b5582cf69c19a56c22754caafae10cc203e /sampledata | |
| parent | 988b7c1b028f0528433acc36a54a4a3c514108e3 (diff) | |
| download | coinos-server-ee88e5f213334382cbea04402cab9bc29405412a.tar.gz coinos-server-ee88e5f213334382cbea04402cab9bc29405412a.zip | |
streamline dev setup and docker images
- Rewrite setup.sh: auto-installs Docker, downloads regtest snapshot,
pulls images, starts all services. Idempotent, works on fresh Ubuntu/macOS.
- Create coinos-base image (196MB) shared by all containers: bitcoin,
elements, lightning, strfry, kvrocks, electrs, tigerbeetle, chopsticks.
Total pull ~490MB, down from ~4.3GB.
- Move all images to ghcr.io/coinos/* namespace.
- Drop nutshell (mint/wallet), postgres, mon from default dev compose.
- Comment out ark stack (optional), guard ark.ts against empty config.
- Add missing sampledata: lightningc, strfry, kvrocks, valkey configs.
- Strip strfry binary (145MB debug symbols removed).
- Use single CLN version (v25.12.1) for all 3 lightning nodes.
- Switch valkey to alpine variant (110MB → 41MB).
- Update config.ts.sample with correct service URLs.
- Regtest snapshot hosted on GitHub Releases (~2MB).
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Diffstat (limited to 'sampledata')
| -rw-r--r-- | sampledata/archive-kv/kvrocks.conf | 12 | ||||
| -rw-r--r-- | sampledata/db/valkey.conf | 5 | ||||
| -rw-r--r-- | sampledata/lightningc/config | 11 | ||||
| -rw-r--r-- | sampledata/strfry/strfry.conf | 144 |
4 files changed, 172 insertions, 0 deletions
diff --git a/sampledata/archive-kv/kvrocks.conf b/sampledata/archive-kv/kvrocks.conf new file mode 100644 index 00000000..0a75a51e --- /dev/null +++ b/sampledata/archive-kv/kvrocks.conf @@ -0,0 +1,12 @@ +bind 0.0.0.0 +port 6379 +workers 4 +dir /data + +# Low memory footprint for archival workload +rocksdb.block_cache_size 256 +rocksdb.compression zstd +rocksdb.wal_size_limit_mb 256 + +# Log to stdout for Docker +log-dir stdout diff --git a/sampledata/db/valkey.conf b/sampledata/db/valkey.conf new file mode 100644 index 00000000..712c2e63 --- /dev/null +++ b/sampledata/db/valkey.conf @@ -0,0 +1,5 @@ +dir /data +loglevel warning +save "" +appendonly yes +appendfsync everysec diff --git a/sampledata/lightningc/config b/sampledata/lightningc/config new file mode 100644 index 00000000..3ec7d15f --- /dev/null +++ b/sampledata/lightningc/config @@ -0,0 +1,11 @@ +alias=coinos +rgb=006000 +bitcoin-rpcconnect=bc +bitcoin-rpcport=18443 +bitcoin-rpcuser=admin1 +bitcoin-rpcpassword=123 +network=regtest +addr=clc:9735 +clnrest-port=3010 +clnrest-protocol=http +clnrest-host=0.0.0.0 diff --git a/sampledata/strfry/strfry.conf b/sampledata/strfry/strfry.conf new file mode 100644 index 00000000..a14d8444 --- /dev/null +++ b/sampledata/strfry/strfry.conf @@ -0,0 +1,144 @@ +## +## Default strfry config +## + +# Directory that contains the strfry LMDB database (restart required) +db = "./strfry-db/" + +dbParams { + # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required) + maxreaders = 256 + + # Size of mmap() to use when loading LMDB (default is 10TB, does *not* correspond to disk-space used) (restart required) + mapsize = 10995116277760 + + # Disables read-ahead when accessing the LMDB mapping. Reduces IO activity when DB size is larger than RAM. (restart required) + noReadAhead = false +} + +events { + # Maximum size of normalised JSON, in bytes + maxEventSize = 1000000 + + # Events newer than this will be rejected + rejectEventsNewerThanSeconds = 900 + + # Events older than this will be rejected + rejectEventsOlderThanSeconds = 94608000 + + # Ephemeral events older than this will be rejected + rejectEphemeralEventsOlderThanSeconds = 60 + + # Ephemeral events will be deleted from the DB when older than this + ephemeralEventsLifetimeSeconds = 300 + + # Maximum number of tags allowed + maxNumTags = 2000 + + # Maximum size for tag values, in bytes + maxTagValSize = 1024 +} + +relay { + # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required) + bind = "0.0.0.0" + + # Port to open for the nostr websocket protocol (restart required) + port = 7777 + + # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) + nofiles = 0 + + # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) + realIpHeader = "" + + info { + # NIP-11: Name of this server. Short/descriptive (< 30 characters) + name = "coinos relay" + + # NIP-11: Detailed information about relay, free-form + description = "coinos dev relay" + + # NIP-11: Administrative nostr pubkey, for contact purposes + pubkey = "" + + # NIP-11: Alternative administrative contact (email, website, etc) + contact = "" + + # NIP-11: URL pointing to an image to be used as an icon for the relay + icon = "" + + # List of supported lists as JSON array, or empty string to use default. Example: "[1,2]" + nips = "" + } + + # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required) + maxWebsocketPayloadSize = 131072 + + # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required) + autoPingSeconds = 55 + + # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) + enableTcpKeepalive = false + + # How much uninterrupted CPU time a REQ query should get during its DB scan + queryTimesliceBudgetMicroseconds = 10000 + + # Maximum records that can be returned per filter + maxFilterLimit = 500 + + # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time + maxSubsPerConnection = 20 + + writePolicy { + # If non-empty, path to an executable script that implements the writePolicy plugin logic + plugin = "" + } + + compression { + # Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU (restart required) + enabled = true + + # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required) + slidingWindow = true + } + + logging { + # Dump all incoming messages + dumpInAll = false + + # Dump all incoming EVENT messages + dumpInEvents = false + + # Dump all incoming REQ/CLOSE messages + dumpInReqs = false + + # Log performance metrics for initial REQ database scans + dbScanPerf = false + + # Log reason for invalid event rejection? Can be disabled to silence excessive logging + invalidEvents = true + } + + numThreads { + # Ingester threads: route incoming requests, validate events/sigs (restart required) + ingester = 3 + + # reqWorker threads: Handle initial DB scan for events (restart required) + reqWorker = 3 + + # reqMonitor threads: Handle filtering of new events (restart required) + reqMonitor = 3 + + # negentropy threads: Handle negentropy protocol messages (restart required) + negentropy = 2 + } + + negentropy { + # Support negentropy protocol messages + enabled = true + + # Maximum records that sync will process before returning an error + maxSyncEvents = 1000000 + } +} |
