diff --git a/README.md b/README.md index d72ae3162..2ea38da9d 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Indicative requirements: | Operating system | Linux x86-64 (glibc 2.31 or later: Ubuntu 20.04, Debian 11 and later), Windows 10 or later (x64), macOS on Apple Silicon | same | | CPU | 2 cores | 4 cores or more (the backfill checks signatures on several threads) | | Memory | 4 GB (8 GB recommended) | 8 GB | -| Disk | about 10 GB | about 200 to 250 GB with RocksDB, 400 GB or more with LMDB or BerkeleyDB; an SSD | +| Disk | about 10 GB | about 250 to 300 GB with RocksDB, 400 GB or more with LMDB or BerkeleyDB; an SSD | | Network | 3 Mbit/s | 5 Mbit/s or more | See [docs/storage.md](docs/storage.md) for the storage options. diff --git a/client/config/config.cpp b/client/config/config.cpp index 43441e0c8..eccd1faf2 100644 --- a/client/config/config.cpp +++ b/client/config/config.cpp @@ -38,7 +38,7 @@ const NodeVersion NODE_VERSION = 532; // the community release (4.2.532-community.N); also announced to peers in host_data bits 32-47 -const uint8_t MINOR_NODE_VERSION = 16; +const uint8_t MINOR_NODE_VERSION = 17; const std::string BLOCK_NAME_PARAMS = "params"; const std::string BLOCK_NAME_HOST_INPUT = "host_input"; diff --git a/docs/CHANGES.md b/docs/CHANGES.md index 0420f180a..34e9adf81 100644 --- a/docs/CHANGES.md +++ b/docs/CHANGES.md @@ -30,6 +30,8 @@ lines under the new release. against the chain; consensus keeps priority. See [storage.md](storage.md). - **Wallet state digest.** A digest of all wallet state, logged every 1000 blocks, lets different nodes and builds compare their state. +- **Wallet.** A terminal wallet, `credits-wallet`, ships in every package and in the Docker image; + the set-up can use the node's own key as its account. - **Continuous integration.** - unit tests; - private networks of 5 to 61 nodes, with smart contracts read and written; @@ -40,6 +42,10 @@ lines under the new release. ## Not released yet +Nothing yet. + +## community.17 — 2026-11-05 + | PR | Change | |---|---| | #157 | client: at start the console and the log show a banner, the CREDITS logo with "community" under it, the release from `VERSION`, the protocol, the build commit, the storage, snapshot serving and the backfill; `[params] banner=off` keeps the text lines only (the start used to log nothing about the version) | @@ -56,6 +62,16 @@ lines under the new release. | #168 | solver: the `stage3 inputs` line of #167 is logged at info level only when a stage-3 check fails (once per iteration, before the first `stage3 check failed`), at debug level every round, so a healthy node logs none of the stage-3 diagnostics | | #169 | config: the node writes `NodePrivate.txt` (generated, encrypted or re-encrypted) and the `--dumpkeys` JSON with mode 0600 on POSIX (`open` with 0600 and `fchmod`, which also narrows an existing wider file) instead of `std::ofstream`, which left them 0644 (readable by every user) under the usual umask; `NodePublic.txt` and Windows unchanged | | #170 | config: safer handling of the encrypted key file (atomic re-encryption, no empty file on failure, clear errors); the file format is unchanged and stays compatible with the official node. Re-encryption (`--encryptkey`, the change of password at start, a new key at first start) writes `NodePrivate.txt.tmp`, flushes it and renames it over the key file (MoveFileEx on Windows), so a crash or a full disk leaves the previous file and the log reports the failure instead of success; a failed encryption never writes an empty key file; a key file of an unexpected length stops the node with "Bad private key file in ... (N bytes)" instead of asking for a password; a failed key derivation is an error instead of a crash; a file used as password is wiped from memory after use | +| — | release: the version announced to peers (`MINOR_NODE_VERSION`) is 17; ships credits-wallet 0.1.0 and contract executor community-3 (build 1558) | + +The terminal wallet `credits-wallet` is in every package and in the Docker image, pinned by hash +(#166); the set-up offers it, with the node's own key as the account and the choice of the token +cache. The diagnostic API tells the network identity (#162). Stage-3 diagnostics help to find why +a node disagrees with its peers (#167, #168). Contract API fixes (#164, #165) and the executor +community-3, which reports compile errors. The node key file is written with mode 0600 (#169), and +the encrypted key file is handled more safely, with the format unchanged (#170). Also the start-up +banner (#157), the clean-up of obsolete folders (#158), the sample clients and contracts (#159, +#161) and the Docker health check (#160). ## community.16 — 2026-11-03 diff --git a/docs/FEATURES.md b/docs/FEATURES.md index 2969e2a60..68941e789 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -6,7 +6,7 @@ consensus with them. This page lists what it adds; each item links the pull requ The full list of changes is in [CHANGES.md](CHANGES.md), the operational details in [differences.md](differences.md). -Everything listed here is in release 4.2.532-community.16 or earlier. +Everything listed here is in release 4.2.532-community.17 or earlier. ## Storage @@ -104,6 +104,23 @@ Everything listed here is in release 4.2.532-community.16 or earlier. contract code that runs past its time limit, or whose caller has gone, is stopped. Contract results are the same as with the official build 1518. [#137](https://github.com/CreditsCommunity/node/pull/137) +- **Executor community-3** (build 1558): a contract that does not compile reports the compiler's + errors with their line numbers instead of a bare failure. +- **Contract API fixes.** `ContractAllMethodsGet` returns the annotations of each method and + argument, so a client can tell a getter; a CS payment to a payable contract is no longer listed + as a deploy, and the contract lists no longer fail on a page holding one. + [#164](https://github.com/CreditsCommunity/node/pull/164), [#165](https://github.com/CreditsCommunity/node/pull/165) +- **Example clients and contracts** in Python, Go, Java, Rust, C# and JavaScript (status, balance, + transactions, signed transfers, deploy, call, get), and sample contracts (a counter, a token, a + payable tip jar, a faucet), checked in CI. + [#159](https://github.com/CreditsCommunity/node/pull/159), [#161](https://github.com/CreditsCommunity/node/pull/161) + +## Network identity + +- **Which network is this?** The diagnostic API's `GetNodeInfo` returns the network identifier (the + same on every node of a network, taken from block 1) and the community release, so that a wallet + can tell mainnet from a test network. + [#162](https://github.com/CreditsCommunity/node/pull/162) ## Consensus robustness @@ -122,6 +139,13 @@ Everything listed here is in release 4.2.532-community.16 or earlier. pruned peers could otherwise wait for ever for its first blocks. [#136](https://github.com/CreditsCommunity/node/pull/136) +## Diagnostics + +- **Stage-3 diagnostics.** When a node's signed stage 3 disagrees with its peers', the log shows + what the node signed and why a peer's stage failed, at info level only when a check fails; a + healthy node logs none of it. See [consensus-diagnostics.md](consensus-diagnostics.md). + [#167](https://github.com/CreditsCommunity/node/pull/167), [#168](https://github.com/CreditsCommunity/node/pull/168) + ## Crash and safety fixes Remote crashes and out-of-bounds reads in packet and block parsing, a data race, and failures of @@ -158,8 +182,21 @@ limits in the p2p layer (a fork of the p2p library), and two races in the cache [#43](https://github.com/CreditsCommunity/node/pull/43), [#44](https://github.com/CreditsCommunity/node/pull/44) - **Guided set-up** in every package (`setup.sh`, `setup.bat`): pruned or full, database, how the first start gets the chain, the history of a full node (backfill), snapshot sharing and the - contract executor. + contract executor, and the wallet (below). [#131](https://github.com/CreditsCommunity/node/pull/131), [#154](https://github.com/CreditsCommunity/node/pull/154) +- **A terminal wallet in every package and in the Docker image.** `credits-wallet`, the community + wallet, comes with the node, downloaded from its release and accepted only with a pinned + SHA-256, with its user guide. The set-up offers to use the node's own key as the wallet's account + (the key stays in place, with owner-only permissions), or a separate account, and asks whether to + keep the token cache. In Docker, the key and the token cache are set with variables. + [#166](https://github.com/CreditsCommunity/node/pull/166) +- **Start-up banner and Docker health check.** The node shows its release, protocol, build and + storage at start; the Docker health check no longer reports a node at the head as unhealthy after + a log rotation. + [#157](https://github.com/CreditsCommunity/node/pull/157), [#160](https://github.com/CreditsCommunity/node/pull/160) +- **Key file.** `NodePrivate.txt` is written readable by its owner only (mode 0600), and the + encrypted key file is re-encrypted atomically, with clear errors; the format is unchanged. + [#169](https://github.com/CreditsCommunity/node/pull/169), [#170](https://github.com/CreditsCommunity/node/pull/170) ## Tested on every change diff --git a/docs/storage.md b/docs/storage.md index 0ada4feab..1325ad741 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -87,8 +87,8 @@ restart. that is about 186 million blocks: about two to three days (measured on mainnet: about 1,000 blocks/s, the `backfill_rate` default, with the signatures checked on verifier threads; slower on a node with few cores or a slow disk), and the disk of a full node: 400 GB or more with lmdb or - berkeleydb, about 200 to 250 GB with rocksdb (measured: 128 GB, transaction index included, for - the newest 75 million blocks; keep room to spare). Set `backfill=off` to keep only the blocks of the snapshot. + berkeleydb, about 250 to 300 GB with rocksdb (measured: 128 GB, transaction index included, for + the newest 75 million blocks, then about 1.4 to 1.5 KB per block in the 70 to 110 million range; keep room to spare). Set `backfill=off` to keep only the blocks of the snapshot. - Requests go out only while the node is in sync (not syncing forward, not in a bootstrap round, not fetching a snapshot); a trusted node keeps fetching, at most `backfill_store_per_turn` blocks per turn of the thread that also runs consensus. diff --git a/packaging/docker/README.md b/packaging/docker/README.md index 77c4d7473..e20e7d69b 100644 --- a/packaging/docker/README.md +++ b/packaging/docker/README.md @@ -9,7 +9,7 @@ docker compose up -d && docker compose logs -f A pruned node (the default) starts from a snapshot instead of syncing from block 0 for days. On its first start, with `CREDITS_SNAPSHOT=github` (the default), the container runs `node --download-snapshot`: it downloads the latest snapshot published on GitHub, checks every file against its signed manifest and restores it. When that fails, the node looks for a snapshot among its p2p neighbours (the community nodes that serve one) and, after `fetch_wait` (10 minutes) without one, syncs from block 0. `CREDITS_SNAPSHOT=p2p` skips the GitHub download, `off` syncs from block 0. The node checks a restored snapshot's state digest at its first start and stops if it differs. -A full node on lmdb or rocksdb (`CREDITS_STORAGE=full`, `CREDITS_DB_BACKEND=lmdb` or `rocksdb`) starts from the snapshot the same way. Then it fetches the older blocks from its neighbours in the background, down to block 0 (backward sync). It takes part in the network meanwhile, and the API serves each block and history as it arrives. On mainnet that is about 186 million blocks: about two to three days, and the disk of a full node, 400 GB or more with lmdb or about 200 to 250 GB with rocksdb. `CREDITS_BACKFILL=off` keeps only the snapshot's blocks. A full node on berkeleydb (the full default) syncs from block 0, as the official node does: a berkeleydb database cannot start above block 0. See `docs/storage.md`, "Backward sync". +A full node on lmdb or rocksdb (`CREDITS_STORAGE=full`, `CREDITS_DB_BACKEND=lmdb` or `rocksdb`) starts from the snapshot the same way. Then it fetches the older blocks from its neighbours in the background, down to block 0 (backward sync). It takes part in the network meanwhile, and the API serves each block and history as it arrives. On mainnet that is about 186 million blocks: about two to three days, and the disk of a full node, 400 GB or more with lmdb or about 250 to 300 GB with rocksdb. `CREDITS_BACKFILL=off` keeps only the snapshot's blocks. A full node on berkeleydb (the full default) syncs from block 0, as the official node does: a berkeleydb database cannot start above block 0. See `docs/storage.md`, "Backward sync". The node also serves its own snapshots to its neighbours (`CREDITS_SERVE_SNAPSHOT=on`, the default; at most 2 MB/s, half while it is a confidant). See `docs/snapshots.md`. diff --git a/packaging/executor-tag b/packaging/executor-tag index 30f70bb36..1a06a9231 100644 --- a/packaging/executor-tag +++ b/packaging/executor-tag @@ -1 +1 @@ -executor-community-2 +executor-community-3 diff --git a/packaging/make-package.sh b/packaging/make-package.sh index 21721a203..249458f7b 100755 --- a/packaging/make-package.sh +++ b/packaging/make-package.sh @@ -157,7 +157,7 @@ A pruned node can start from the published snapshot: $start --config-file config A full node can too, on lmdb or rocksdb: set db_backend=lmdb (or rocksdb) in the [storage] section of config.ini, run $start --download-snapshot, then start it. It fetches the older blocks from its neighbours in the background down to block 0 (backward sync: about two to three days and 400 GB or more with lmdb, - 200 to 250 GB with rocksdb, on mainnet; [storage] backfill=off keeps only the snapshot's blocks). A + 250 to 300 GB with rocksdb, on mainnet; [storage] backfill=off keeps only the snapshot's blocks). A pruned node switched to full (prune_keep_blocks=0) fetches the blocks it pruned the same way. https://github.com/CreditsCommunity/node/blob/master/docs/storage.md#a-full-node-from-a-snapshot EOF