Skip to content

Conversation

hinto-janai
Copy link
Contributor

@hinto-janai hinto-janai commented Mar 12, 2025

What

Adds information covering changes for cuprated v0.0.2 to the User Book.

Closes #411.

@hinto-janai hinto-janai added this to the cuprated v0.0.2 milestone Mar 12, 2025
@github-actions github-actions bot added A-books Area: Related to Cuprate's books. A-book-user Area: Related to the User book. labels Mar 12, 2025
@github-actions github-actions bot added the A-docs Area: Related to documentation. label Mar 20, 2025
**⚠️ 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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SyntheticBird45 I used casual here as the opposite of serious, although looking back I agree that better phrasing could be used, any suggestions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't see any other suggestion. non-serious may convey a negative but is straight to the point.

@github-actions github-actions bot added the A-binaries Area: Related to binaries. label Apr 7, 2025
@hinto-janai hinto-janai marked this pull request as ready for review April 8, 2025 00:11
Comment on lines +12 to +61
/// # 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:
///
/// `----------------------------------------------------------------------`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 19 to 35
## `--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 |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| Target | Notes |
|-----------------------------|--------|
| `x86_64-pc-windows-msvc` | x64 Windows (MSVC, Windows Server 2022+)
| `x86_64-apple-darwin` | x64 macOS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistake, this was in the wrong section.

@Boog900 Boog900 merged commit 550d859 into Cuprate:main Apr 9, 2025
12 checks passed
@hinto-janai hinto-janai deleted the user-book branch April 9, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-binaries Area: Related to binaries. A-book-user Area: Related to the User book. A-books Area: Related to Cuprate's books. A-docs Area: Related to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User book: build-essentials should be build-essential

3 participants