books: user-book for cuprated 0.0.2#402
Conversation
| **⚠️ This project is still in development; do NOT use `cuprated` for any serious purposes ⚠️** | ||
|
|
||
| `cuprated` is fine to run for casual purposes and has a similar attack surface to other network connected services. | ||
| `cuprated` is fine to run for non-serious purposes and has a similar attack surface to other network connected services. |
There was a problem hiding this comment.
@SyntheticBird45 I used casual here as the opposite of serious, although looking back I agree that better phrasing could be used, any suggestions?
There was a problem hiding this comment.
Sorry, I don't see any other suggestion. non-serious may convey a negative but is straight to the point.
| /// # Documentation | ||
| /// Consider using the following style when adding documentation: | ||
| /// | ||
| /// ```rust | ||
| /// struct Config { | ||
| /// /// BRIEF DESCRIPTION. | ||
| /// /// | ||
| /// /// (optional) LONGER DESCRIPTION. | ||
| // /// | ||
| /// /// Type | (optional) FIELD TYPE | ||
| /// /// Valid values | EXPRESSION REPRESENTING VALID VALUES | ||
| /// /// Examples | (optional) A FEW EXAMPLE VALUES | ||
| /// field: (), | ||
| /// } | ||
| /// ``` | ||
| /// | ||
| /// For example: | ||
| /// ```rust | ||
| /// struct Config { | ||
| /// /// Enable/disable fast sync. | ||
| /// /// | ||
| /// /// Fast sync skips verification of old blocks by | ||
| /// /// comparing block hashes to a built-in hash file, | ||
| /// /// disabling this will significantly increase sync time. | ||
| /// /// New blocks are still fully validated. | ||
| /// /// | ||
| /// /// Type | boolean | ||
| /// /// Valid values | true, false | ||
| /// fast_sync: bool, | ||
| /// } | ||
| /// ``` | ||
| /// | ||
| /// Language for types: | ||
| /// | ||
| /// | Rust type | Wording used in user-book | | ||
| /// |--------------|---------------------------| | ||
| /// | bool | boolean | ||
| /// | u{8-64} | Number | ||
| /// | i{8-64} | Signed number | ||
| /// | f{32,64} | Floating point number | ||
| /// | str, String | String | ||
| /// | enum, struct | `DataStructureName` (e.g. `Duration`) or $DESCRIPTION (e.g. `IP address`) | ||
| /// | ||
| /// If some fields are redundant or unnecessary, do not add them. | ||
| /// | ||
| /// # Field documentation length | ||
| /// In order to prevent wrapping/scrollbars in the user book and in editors, | ||
| /// add newlines when a documentation line crosses ~70 characters, around this long: | ||
| /// | ||
| /// `----------------------------------------------------------------------` |
There was a problem hiding this comment.
This PR adds docs to the config similar to #304 (comment).
I do have diffs to add these sections to the book, but it means we'll have to maintain two sets of key/value pairs + docs, so I think we should put all this info in the config since it's now automated. Since the user-book shows the config, it acts as the docs, not as pretty but more practical.
There was a problem hiding this comment.
I did try think about ways to make it prettier but yeah decided on just dumping the raw toml in the user book. The practicality justifies the looks.
| ## `--version` | ||
| The `--version` flag outputs the following info in JSON. | ||
|
|
||
| | Field | Type | Description | | ||
| |-------------------------|--------|-------------| | ||
| | `major_version` | Number | Major version of `cuprated` | | ||
| | `minor_version` | Number | Minor version of `cuprated` | | ||
| | `patch_version` | Number | Patch version of `cuprated` | | ||
| | `rpc_major_version` | Number | Major RPC version (follows `monerod`) | | ||
| | `rpc_minor_version` | Number | minor RPC version (follows `monerod`) | | ||
| | `rpc_version` | Number | RPC version (follows `monerod`) | | ||
| | `hardfork` | Number | Current hardfork version | | ||
| | `blockchain_db_version` | Number | Blockchain database version (separate from `monerod`) | | ||
| | `semantic_version` | String | Semantic version of `cuprated` | | ||
| | `build` | String | Build of `cuprated`, either `debug` or `release` | | ||
| | `commit` | String | `git` commit hash of `cuprated` | | ||
| | `killswitch_timestamp` | Number | Timestamp at which `cuprated`'s killswitch activates | No newline at end of file |
| | Target | Notes | | ||
| |-----------------------------|--------| | ||
| | `x86_64-pc-windows-msvc` | x64 Windows (MSVC, Windows Server 2022+) | ||
| | `x86_64-apple-darwin` | x64 macOS |
There was a problem hiding this comment.
Mistake, this was in the wrong section.
What
Adds information covering changes for
cuprated v0.0.2to the User Book.Closes #411.