Skip to content

packaging: rocksdb by default for full nodes; docs and set-up texts aligned - #173

Merged
EnzinoBB merged 2 commits into
masterfrom
fix/defaults-and-docs
Nov 7, 2026
Merged

EnzinoBB merged 2 commits into
masterfrom
fix/defaults-and-docs

Conversation

@EnzinoBB

@EnzinoBB EnzinoBB commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

A full node now defaults to rocksdb, in Docker (CREDITS_STORAGE=full) and in the guided set-up (setup.sh, setup.ps1). The previous default, berkeleydb, cannot start from a snapshot and syncs from block 0. Pruned keeps lmdb. The node's own config.ini default (no [storage]: berkeleydb) does not change.

Existing installs do not change:

  • set-up: a database in db/ keeps its backend (as before); a full config.ini that names a backend keeps it (now including berkeleydb/berkeley/rocks); a full [storage] without db_backend (prune_keep_blocks=0) keeps berkeleydb, which is what the node runs with it;
  • Docker: config.ini is written on the first start only and always names db_backend, so existing containers keep theirs; a config without db_backend still reads as berkeleydb. New: when config.ini is missing but db/ holds a database and CREDITS_DB_BACKEND is unset, the entrypoint writes config.ini for the backend already there (.storage, then the db fingerprints) instead of the new default.

Texts aligned (found while writing docs/quick-start.md, #172):

  1. Full-node disk on rocksdb: about 250 to 300 GB (entrypoint log line, .env.example, set-up question 1 "tens of GB" and question 3b "130 GB", both scripts).
  2. Backfill: about 2 to 3 days (more on a slow disk or few cores), in both set-up scripts, .env.example, the entrypoint log and the Docker README.
  3. README requirements: linux-x64 needs glibc 2.38; linux-x64-glibc2.31 runs on glibc 2.31.
  4. docker-compose.yml: cpus: ${CREDITS_CPUS:-1.5}, mem_limit: ${CREDITS_MEMORY:-4g}. I chose .env variables over a comment only: the defaults (pruned-friendly) are unchanged, and a full-node operator sets two lines in .env, the file they already edit, instead of editing docker-compose.yml, which a later download would overwrite. Checked with docker compose config (1.5/4g by default, 4/8g when set). Documented in .env.example, the Docker README and the quick-start.
  5. docs/CHANGES.md intro: ghcr.io/creditscommunity/credits-node (historical rows unchanged).
  6. make-package.sh: the config.pruned.ini comment now says the node starts from a snapshot (--download-snapshot, or the neighbours with [snapshot] fetch=auto, the default, since config.pruned.ini has no [snapshot] section) and syncs from block 0 only when none comes within fetch_wait.
  7. docs/quick-start.md: rocksdb is the full default (Docker section and set-up table; the variable stays in the example), Docker limits via CREDITS_CPUS=4/CREDITS_MEMORY=8g. Also docs/storage.md (Docker table) and the Docker README.

The set-up's database question now lists rocksdb/lmdb/berkeleydb and says which ones start from a snapshot.

Tests

  • packaging/docker/test/test-entrypoint.sh (run locally, PASS): full default is rocksdb and downloads the snapshot; berkeleydb on request does not fetch; new case 6h: an existing full berkeleydb install (config without db_backend, then config removed with a berkeleydb db/) keeps berkeleydb.
  • setup-test.yml: the full berkeleydb step now answers berkeleydb and checks the [rocksdb] default; new step "A full berkeleydb configuration is kept on Enter" (config naming berkeleydb, and a berkeleydb database with the package's config); the full rocksdb step starts from the package's config and takes the default with Enter.
  • Local run of setup.sh on the real community.17 linux-x64 package with piped answers: fresh full → rocksdb, backfill on, fetch=auto; berkeleydb config kept on Enter; berkeleydb database kept; full [storage] without db_backend kept on berkeleydb; pruned → lmdb.

🤖 Generated with Claude Code

EnzinoBB and others added 2 commits November 7, 2026 09:04
…ligned

- Docker entrypoint and guided set-up (setup.sh, setup.ps1): a new full node
  defaults to rocksdb, which starts from a snapshot; pruned stays on lmdb.
  Existing installs keep their backend: a database already in db/, or the
  db_backend of config.ini (a full [storage] without one keeps berkeleydb,
  the node's own default). The entrypoint also detects the backend of a
  database whose config.ini was removed.
- Full node disk: about 250 to 300 GB with rocksdb (entrypoint log, .env,
  set-up questions 1 and 3b); backfill: about 2 to 3 days (more on a slow
  disk or few cores).
- docker-compose.yml: cpus and mem_limit from CREDITS_CPUS (1.5) and
  CREDITS_MEMORY (4g) in .env; a full node sets 4 and 8g.
- README: linux-x64 needs glibc 2.38, linux-x64-glibc2.31 covers older
  systems. CHANGES intro: ghcr.io/creditscommunity/credits-node.
- make-package.sh: the config.pruned.ini comment describes the snapshot
  start ([snapshot] fetch=auto, the default) instead of a sync from block 0.
- quick-start, storage.md, Docker README updated.
- ci: setup-test checks the rocksdb default and that a full berkeleydb
  configuration or database is kept; the Docker entrypoint test checks the
  rocksdb default and an existing berkeleydb install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EnzinoBB
EnzinoBB merged commit 55a74e0 into master Nov 7, 2026
16 checks passed
EnzinoBB added a commit that referenced this pull request Nov 7, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant