Skip to content

Commit

Permalink
Merge pull request #434 from Chia-Network/dependency-cleanup
Browse files Browse the repository at this point in the history
Dependency cleanup
  • Loading branch information
BrandtH22 committed Dec 5, 2023
2 parents 049f68d + c5a3e79 commit 5c48f32
Show file tree
Hide file tree
Showing 26 changed files with 6,373 additions and 5,324 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ permissions:
jobs:
deploy:
runs-on: ubuntu-latest
container: node:16-alpine
container: node:18-alpine
steps:
- name: 'Install deps'
run: |
apk add python3 make g++ git
- name: Checkout Code
uses: actions/checkout@v3
- name: 'yarn deps'
- name: 'npm install and build'
run: |
yarn
- name: 'yarn deploy'
npm ci
npm install
npm run build
- name: 'npm deploy'
run: |
# postBuffer documented at: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httppostBuffer
# Needed due to commit/push errors over https related to the remote hanging up unexpectedly
git config --global http.postBuffer 10000000
git config --global user.name 'ChiaAutomation'
git config --global user.email 'automation@chia.net'
GIT_USER=ChiaAutomation GIT_PASS=${{ github.token }} yarn deploy
GIT_USER=ChiaAutomation GIT_PASS=${{ github.token }} npm run deploy
2 changes: 1 addition & 1 deletion .github/workflows/deploy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
container: node:16-alpine
container: node:18-alpine
steps:
- name: 'Install deps'
run: |
Expand Down
8 changes: 4 additions & 4 deletions docs/block-validation/block-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The following sections list all of the required checks to ensure validity of a b
- The generator ref list length must be less than or equal to MAX_GENERATOR_REF_LIST_SIZE entries
- The generator ref list must not point to a height >= this block's height
- If we have a generator reference list, we must have a generator
- Check that cost <= MAX_BLOCK_COST_CLVM
- Check that cost \<= MAX_BLOCK_COST_CLVM
- The CLVM program must not return any errors
9. Check that the correct cost is in the transactions info
10. Check additions for max coin amount (be careful to check for 64 bit overflows in other languages. This is the max 64 bit unsigned integer)
Expand All @@ -137,9 +137,9 @@ The following sections list all of the required checks to ensure validity of a b
14. Check for duplicate spends inside block.
15. Check if removals exist and were not previously spent. (coin_db up to the fork point + fork block + this_block).
Be careful with forks and with ephemeral coins (added and removed in same block).
16. Check that the total coin amount for added is <= removed.
17. Check that the assert fee sum <= fees, and that each reserved fee is non-negative.
18. Check that the fee amount + farmer reward < maximum coin amount.
16. Check that the total coin amount for added is \<= removed.
17. Check that the assert fee sum \<= fees, and that each reserved fee is non-negative.
18. Check that the fee amount + farmer reward \< maximum coin amount.
19. Check that the computed fees are equal to the fees in the block header.
20. Verify that removed coin puzzle_hashes match with calculated puzzle_hashes.
21. Verify CLVM conditions.
Expand Down
25 changes: 15 additions & 10 deletions docs/cli-reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ title: CLI Overview
slug: /cli
---

```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```

# CLI Commands Reference

This page should provide additional high-level documentation and explanation beyond just `chia -h`.
Expand Down Expand Up @@ -83,15 +88,15 @@ Command: `chia start {service}`
- Service `node` will start only the full node.
- Service `farmer` will start the farmer, harvester, a full node, and the wallet.
- positional arguments:
{all,node,harvester,farmer,farmer-no-wallet,farmer-only,timelord,timelord-only,timelord-launcher-only,wallet,wallet-only,introducer,simulator}
\{all,node,harvester,farmer,farmer-no-wallet,farmer-only,timelord,timelord-only,timelord-launcher-only,wallet,wallet-only,introducer,simulator}

**Flags**

`-r, --restart`: Restart of running processes

# plotters

In 2.1.0 the option to use different plotters including compressed plotter was introduced. Each plotter has slightly different hardware requirements and may need slightly different options specified.
In 2.1.0 the option to use different plotters including compressed plotter was introduced. Each plotter has slightly different hardware requirements and may need slightly different options specified.
The cli reference for all plotters can be found in the [Plotters CLI Page](/plotters-cli). Learn more about the alternative plotters in the [Alternative Plotters page](/plotting-software).

## plotnft
Expand Down Expand Up @@ -159,12 +164,12 @@ For more detail, you can read about the DiskProver commands in [chiapos](https:/
**What does the ratio of full proofs vs expected proofs mean?**

- If the ratio is >1, your plot was relatively lucky for this run of challenges.
- If the ratio is <1, your plot was relatively unlucky.
- This shouldn't really concern you unless your ratio is <0.70 # If so, do a more thorough `chia plots check` by increasing your `-n`
- If the ratio is \<1, your plot was relatively unlucky.
- This shouldn't really concern you unless your ratio is \<0.70 # If so, do a more thorough `chia plots check` by increasing your `-n`

The plots check challenge is a static challenge. For example if you run a plots check 20 times, with 30 tries against the same file, it will produce the same result every time. So while you may see a plot ratio << 1 for a plot check with `x` number of tries, it does not mean that the plot itself is worthless. It just means that given these static challenges, the plot is producing however many proofs. As the number of tries (`-n`) increases, we would expect the ratio to not be << 1. Since Mainnet is live, and given that the blockchain has new challenges with every signage point - just because a plot is having a bad time with one specific challenge, does not mean it has the same results versus another challenge. "Number of plots" and "k-size" are much more influential factors at winning blocks than "proofs produced per challenge".
The plots check challenge is a static challenge. For example if you run a plots check 20 times, with 30 tries against the same file, it will produce the same result every time. So while you may see a plot ratio \<< 1 for a plot check with `x` number of tries, it does not mean that the plot itself is worthless. It just means that given these static challenges, the plot is producing however many proofs. As the number of tries (`-n`) increases, we would expect the ratio to not be \<< 1. Since Mainnet is live, and given that the blockchain has new challenges with every signage point - just because a plot is having a bad time with one specific challenge, does not mean it has the same results versus another challenge. "Number of plots" and "k-size" are much more influential factors at winning blocks than "proofs produced per challenge".

**In theory**, a plot with a ratio >> 1 would be more likely to win challenges on the blockchain. Likewise, a plot with a ratio << 1 would be less likely to win. However, in practice, this isn't actually going to be noticeable. Therefore, don't worry if your plot check ratios are less than 1, unless they're _significantly_ less than 1 for _many_ `-n`.
**In theory**, a plot with a ratio >> 1 would be more likely to win challenges on the blockchain. Likewise, a plot with a ratio \<< 1 would be less likely to win. However, in practice, this isn't actually going to be noticeable. Therefore, don't worry if your plot check ratios are less than 1, unless they're _significantly_ less than 1 for _many_ `-n`.

# db

Expand Down Expand Up @@ -203,8 +208,8 @@ Command: `chia db backup [add flags and parameters]`

- This will vacuum (compress) and backup your database and may take several hours to complete. Use at your own leisure.
- You do not need to stop your Chia node while performing the upgrade.
- The new database file will be written to the same folder as the original with "vacuumed_" prepended to the name.
- To use the backup database: Close the chia client, remove/delete the main database, rename the backup database to remove "vacuumed_", and restart the chia client. Note the initial start will take extra time as the client verifies the backup db file.
- The new database file will be written to the same folder as the original with "vacuumed\_" prepended to the name.
- To use the backup database: Close the chia client, remove/delete the main database, rename the backup database to remove "vacuumed\_", and restart the chia client. Note the initial start will take extra time as the client verifies the backup db file.

## [validate](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/cmds/db.py)

Expand Down Expand Up @@ -333,9 +338,9 @@ See our [official NFT reference](/nft-cli).
$ chia

Options:
--root-path PATH Config file root
--root-path PATH Config file root
[default: ~\.chia\mainnet]
--keys-root-path PATH Keyring file root
--keys-root-path PATH Keyring file root
[default: ~\.chia_keys]
--passphrase-file FILENAME File or descriptor to read the keyring
passphrase from
Expand Down
37 changes: 18 additions & 19 deletions docs/cli-reference/datalayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ Usage: `chia data add_missing_files [OPTIONS]`

Options:

| Short Command | Long Command | Type | Required | Description |
| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
| -i | --ids | TEXT | True | The hexadecimal store id(s) |
| -o | --override | None | False | If set, will overwrite files that already exist (default: not set) |
| -n | --no-override | None | False | If set, will not overwrite files that already exist (default: set) |
| -d | --directory | TEXT | False | If specified, use a non-default directory to write the files (default: `~/.chia/mainnet/data_layer/db/server_files_location_<network>`) |
| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml |
| -f | --fingerprint | INTEGER | False | Fingerprint of the wallet to use |
| -h | --help | None | False | Show a help message and exit |
| Short Command | Long Command | Type | Required | Description |
| :------------ | :-------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
| -i | --ids | TEXT | True | The hexadecimal store id(s) |
| -o | --override | None | False | If set, will overwrite files that already exist (default: not set) |
| -n | --no-override | None | False | If set, will not overwrite files that already exist (default: set) |
| -d | --directory | TEXT | False | If specified, use a non-default directory to write the files (default: `~/.chia/mainnet/data_layer/db/server_files_location_<network>`) |
| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml |
| -f | --fingerprint | INTEGER | False | Fingerprint of the wallet to use |
| -h | --help | None | False | Show a help message and exit |

<details>
<summary>Example</summary>
Expand Down Expand Up @@ -168,7 +168,6 @@ Options:
| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
| -h | --help | None | False | Show a help message and exit |


<details>
<summary>Example</summary>

Expand Down Expand Up @@ -360,7 +359,7 @@ Options:
| -c | --coin_id | TEXT | True | The coin_id of the mirror to delete (obtainable from the [get_mirrors](#get_mirrors) command) |
| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH |
| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml |
| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
| -h | --help | None | False | Show a help message and exit |

<details>
Expand Down Expand Up @@ -830,9 +829,9 @@ Commands: `check` (Calls the plugin_info endpoint on all configured plugins)

Options:

| Short Command | Long Command | Type | Required | Description |
| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- |
| -h | --help | None | False | Show a help message and exit |
| Short Command | Long Command | Type | Required | Description |
| :------------ | :----------- | :--- | :------- | :--------------------------- |
| -h | --help | None | False | Show a help message and exit |

Note that currently `check` is the only sub-command under the `plugins` command. This command is shown in the example.

Expand Down Expand Up @@ -999,9 +998,10 @@ Options:
:::info

The `unsubscribe` command may or may not delete any data, depending on which version of Chia you are running:
* Prior to version 2.1, the command did not delete the .dat files, nor did it delete from the database.
* As of version 2.1, the command deletes the .dat files, but does not delete from the database.
* In a future release, the command will also delete from the database.

- Prior to version 2.1, the command did not delete the .dat files, nor did it delete from the database.
- As of version 2.1, the command deletes the .dat files, but does not delete from the database.
- In a future release, the command will also delete from the database.

:::

Expand Down Expand Up @@ -1183,8 +1183,7 @@ Response:
</details>

<details>
<summary>Example 6 -- Show a key/value pair that was inserted into the Climate Warehouse
</summary>
<summary>Example 6 -- Show a key/value pair that was inserted into the Climate Warehouse</summary>

```bash
[{"action":"insert","key":"70726f6a6563747c37353339656336392d636238652d343464362d383832332d653062313135303162643433","value":"7b2263757272656e745265676973747279223a2243756c7469766f222c2272656769737472794f664f726967696e223a2243756c7469766f222c226f726967696e50726f6a6563744964223a224d6163546573743135222c2270726f6772616d223a224d6163546573743135222c2270726f6a6563744964223a224d6163546573743135222c2270726f6a6563744e616d65223a224d6163546573743135222c2270726f6a6563744c696e6b223a224d6163546573743135222c2270726f6a656374446576656c6f706572223a224d6163546573743135222c22736563746f72223a22456e6572677920646973747269627574696f6e222c2270726f6a65637454797065223a224f7a6f6e65204465706c6574696e67205375627374616e636573222c22636f766572656442794e4443223a224f757473696465204e4443222c226e6463496e666f726d6174696f6e223a224d6163546573743135222c2270726f6a656374537461747573223a22436f6d706c65746564222c22756e69744d6574726963223a2274434f3265222c226d6574686f646f6c6f6779223a22426173656c696e65204d6574686f646f6c6f677920666f72206465636f6d706f736974696f6e206f66204e324f2066726f6d206578697374696e672061646970696320616369642070726f64756374696f6e20706c616e7473202d2d2d2056657273696f6e20332e30222c2270726f6a65637454616773223a224d6163546573743135222c2276616c69646174696f6e426f6479223a22436172626f6e20436865636b2028496e646961292050726976617465204c74642e222c2270726f6a65637453746174757344617465223a22323032302d30332d32385430303a30303a30302e3030305a222c2276616c69646174696f6e44617465223a22323032322d30332d30315430303a30303a30302e3030305a222c2277617265686f75736550726f6a6563744964223a2237353339656336392d636238652d343464362d383832332d653062313135303162643433222c2274696d65537461676564223a313634363639343630322c226f7267556964223a2230623039643861653437626665323731366263323532383231333463653661613931616333646364663933363335616338656436626362333031626234636238227d"}]
Expand Down
Loading

0 comments on commit 5c48f32

Please sign in to comment.