Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Discord Link + Fix 6 Security Vulnerabilities. #1366

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/prism.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable import/no-extraneous-dependencies */

module.exports = {
theme: require("prism-react-renderer/themes/github"),
darkTheme: require("prism-react-renderer/themes/dracula"),
//theme: require("prism-react-renderer/themes/github"),
//darkTheme: require("prism-react-renderer/themes/dracula"),
/* Optional */
additionalLanguages: ["rust"],
magicComments: [
Expand Down
55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,49 @@
"commit": "lint-staged"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^0.10.0",
"@crowdin/cli": "3",
"@docusaurus/core": "^2.4.0",
"@docusaurus/plugin-content-docs": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.0",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"@docusaurus/core": "^3.0.0",
"@docusaurus/plugin-content-docs": "^3.1.1",
"@docusaurus/preset-classic": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@svgr/webpack": "^6.0.0",
"algoliasearch": "^4.1.0",
"clsx": "^1.1.1",
"docusaurus-plugin-sass": "^0.2.3",
"docusaurus-plugin-sass": "^0.2.5",
"dotenv": "^16.0.3",
"file-loader": "^6.2.0",
"js-cookie": "^3.0.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-instantsearch-hooks-web": "^6.40.1",
"react-transition-group": "^4.4.5",
"sass": "^1.49.0",
"url-loader": "^4.1.1"
"url-loader": "^4.1.1",
"webpack": "^5.90.1"
},
"devDependencies": {
"@actions/core": "^1.6.0",
"@docusaurus/module-type-aliases": "^2.4.0",
"@tsconfig/docusaurus": "^1.0.5",
"@types/react": "^17.0.15",
"@docusaurus/module-type-aliases": "3.0.0",
"@docusaurus/tsconfig": "3.0.0",
"@types/react": "^18.2.29",
"@types/react-helmet": "^6.1.2",
"@types/react-router-dom": "^5.1.8",
"@typescript-eslint/eslint-plugin": "4.7.0",
"@typescript-eslint/parser": "4.7.0",
"@typescript-eslint/eslint-plugin": "6.10.0",
"@typescript-eslint/parser": "6.10.0",
"alex": "^9.1.0",
"ansi-styles": "^5.2.0",
"eslint": "7.13.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint": "8.53.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"glob": "^7.2.0",
"husky": "^6.0.0",
"lint-staged": "10.5.3",
"prettier": "2.2.1",
"husky": "^8.0.3",
"lint-staged": "^13.0.0",
"prettier": "^2.0.0",
"pretty-quick": "^3.1.1",
"puppeteer": "^13.1.3",
"textlint": "^11.3.1",
Expand All @@ -81,10 +82,10 @@
"textlint-rule-stop-words": "^1.0.17",
"textlint-rule-terminology": "^1.1.30",
"textlint-rule-write-good": "^1.6.2",
"typescript": "^4.3.5"
"typescript": "^5.2.2"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
},
"engineStrict": true,
"browserslist": {
Expand All @@ -105,6 +106,6 @@
]
},
"peerDependencies": {
"@docusaurus/theme-common": "^2.3.1"
"@docusaurus/theme-common": "^3.0.0"
}
}
4 changes: 1 addition & 3 deletions source/docs/casper/concepts/economics/staking/delegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ As a result, when performing a [delegation using the command line](../../../deve

<p align="center"><img src={useBaseUrl("/image/economic-delegationDetails.png")} alt="details" width="400" /> </p>

<p align="center">

**Figure 2** : On Testnet or Mainnet, the transaction fee for a delegation is a little bit higher than 2.5 CSPR </p>
<p align="center">**Figure 2** : On Testnet or Mainnet, the transaction fee for a delegation is a little bit higher than 2.5 CSPR </p>

---

Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/glossary/H.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ A hash is the output of a cryptographic function that creates a fixed-length out

## Highway {#highway}

A consensus protocol that allows clients to use different confidence thresholds to convince themselves that a given block is _finalized_. The full paper is found in GitHub: <https://github.com/casper-network/highway>.
A consensus protocol that allows clients to use different confidence thresholds to convince themselves that a given block is _finalized_. The full paper is found in GitHub: [github.com/casper-network/highway](https://github.com/casper-network/highway).
2 changes: 1 addition & 1 deletion source/docs/casper/developers/cli/sending-deploys.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you want to follow the [lifecycle](../../concepts/design/casper-design.md#exe

- The IP address of a [peer](../prerequisites.md#acquire-node-address-from-network-peers) on the network
- The port specified as the `event_stream_server.address` in the node's *config.toml*, which is by default 9999 on Mainnet and Testnet
- The URL for DeployAccepted events, which is <HOST:PORT>/events/deploys
- The URL for DeployAccepted events, which is `<HOST:PORT>/events/deploys`

With the following command, you can start watching the event stream for DeployAccepted events. Note the event ID recorded when you send the Deploy in the next section.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ casper-client transfer \
```

**Request fields:**

```
- `id` - Optional JSON-RPC identifier applied to the request and returned in the response. If not provided, a random integer will be assigned
- `transfer-id` -<64-BIT INTEGER> The `transfer-id` is a memo field, providing additional information about the recipient, which is necessary when transferring tokens to some recipients. For example, if depositing tokens into an account's purse where off-chain management keeps track of individual sub-balances, it is necessary to provide a memo ID uniquely identifying the actual recipient. If this is not necessary for a given recipient, you may pass `0` or some `u64` value that is meaningful to you
- `node-address` - Hostname or IP and port of a node on a network bound to a JSON-RPC endpoint \[default:<http://localhost:7777>\]
Expand All @@ -44,7 +44,7 @@ casper-client transfer \

- `target-account` - Hex-encoded public key of the account that will receive the funds in its main purse
- `payment-amount` - The payment for the transfer in motes. The payment amount varies based on each deploy and network [chainspec](../../../concepts/glossary/C.md#chainspec). For Testnet node version [1.5.1](https://github.com/casper-network/casper-node/blob/release-1.5.1/resources/production/chainspec.toml), you can specify 10^8 motes

```
**Important response fields:**

- `"result"."deploy_hash"` - The address of the deploy, needed to look up additional information about the transfer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The `casper-contract` package can be installed using the following command:
npm i casper-contract
```

The Assemblyscript contract API documentation can be found at <https://www.npmjs.com/package/casper-contract>.
The Assemblyscript contract API documentation can be found at [npmjs.com/package/casper-contract](https://www.npmjs.com/package/casper-contract).

### Creating a Project {#creating-a-project}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ The following video tutorial complements this guide.

These Rust resources are excellent and we highly recommend them:

1. <https://doc.rust-lang.org/book/foreword.html>
2. <https://rustwasm.github.io/docs/book/>
3. <https://doc.rust-lang.org/stable/rust-by-example>
1. [https://doc.rust-lang.org/book/foreword.html](https://doc.rust-lang.org/book/foreword.html)
2. [rustwasm.github.io/docs/book](https://rustwasm.github.io/docs/book/)
3. [doc.rust-lang.org/stable/rust-by-example](https://doc.rust-lang.org/stable/rust-by-example)
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you were a previous validator and still exist on the [Validators Auction](htt

All auction information is returned with the `casper-client get-auction-info` command. It would help if you filtered this down to your public key.

You can replace the <public_key> with your public key manually and run this command:
You can replace the `<public_key>` with your public key manually and run this command:

```bash
casper-client get-auction-info | jq '.result.auction_state.bids[] | select( .public_key == "<public_key>")'
Expand Down
3 changes: 2 additions & 1 deletion source/docs/casper/operators/setup-network/chain-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ The following settings manage `br_table` Wasm opcodes.

The following settings specify costs for low-level bindings for host-side ("external") functions. More documentation and host function declarations are located in [smart_contracts/contract/src/ext_ffi.rs](https://github.com/casper-network/casper-node/blob/release-1.5.2/smart_contracts/contract/src/ext_ffi.rs).

```
- add = { cost = 5_800, arguments = [0, 0, 0, 0] }
- add_associated_key = { cost = 9_000, arguments = [0, 0, 0] }
- add_contract_version = { cost = 200, arguments = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }
Expand Down Expand Up @@ -195,7 +196,7 @@ The following settings specify costs for low-level bindings for host-side ("exte
- update_associated_key = { cost = 4_200, arguments = [0, 0, 0] }
- write = { cost = 14_000, arguments = [0, 0, 0, 980] }
- write_local = { cost = 9_500, arguments = [0, 1_800, 0, 520] }

```
## system_costs

The following settings manage protocol operating costs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A node is usually run by executing the `casper-node-launcher`, which executes th

The `casper-node-launcher` can be installed via a Debian package, which also creates the `casper` user and directory structures and sets up a `systemd` unit and logging.

The `casper-node-launcher` Debian package can be obtained from <https://repo.casperlabs.io>. You only need to run the steps detailed there once.
The `casper-node-launcher` Debian package can be obtained from [repo.casperlabs.io](https://repo.casperlabs.io). You only need to run the steps detailed there once.

Then, proceed to install the `casper-node-launcher` by running these commands:

Expand Down
4 changes: 1 addition & 3 deletions source/docs/casper/resources/beginner/upgrade-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,8 @@ Disabled contract versions can no longer be executed. As such, if there is only
<!--TODO This link is only a guess until 1.5.4 releases and the auto-docs populate.-->
[Enable_contract_version](https://docs.rs/casper-contract/latest/casper_contract/contract_api/storage/fn.enable_contract_version.html) allows you to re-enable a previously disabled contract version.

::note

:::note
Be aware that calling a contract package will use the most recent contract version. It is not necessary to disable a previous contract version, unless you have a specific need to do so.

:::

## Creating a Locked Contract Package {#locked-contract-package}
Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/users/csprlive/delegate-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following instructions will take you through the delegation process, startin

The delegation initiates as soon as the corresponding deploy is signed. You can review the details and status of the deploy by clicking the **Deploy Details** highlighted above.

Remember to [Monitor your Stake](/staking/#monitoring-rewards). Staking rewards are delivered to your account's main purse after each era, which is currently set to 2 hours. Note that it may take up to 2 eras (4 hours) for the first reward to appear after delegation. The rewards are automatically added to your current stake on the corresponding validator. You may view them under the _Rewards_ tab on your account page on <https://cspr.live/>.
Remember to [Monitor your Stake](/staking/#monitoring-rewards). Staking rewards are delivered to your account's main purse after each era, which is currently set to 2 hours. Note that it may take up to 2 eras (4 hours) for the first reward to appear after delegation. The rewards are automatically added to your current stake on the corresponding validator. You may view them under the _Rewards_ tab on your account page on [cspr.live](https://cspr.live/).

If you want to undelegate your tokens, you can do so at any time. See the [Undelegation Guide](./undelegate-ui.md) for details.

Expand Down
6 changes: 3 additions & 3 deletions source/docs/casper/users/funding-from-exchanges.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ This guide demonstrates a withdrawal from [Coinlist](https://coinlist.co/) to th

## Prerequisites

Before starting, copy the public key where you wish to transfer funds. The screenshot below shows the account page on <https://cspr.live/> and the field you need to specify in the withdrawal request from Coinlist.
Before starting, copy the public key where you wish to transfer funds. The screenshot below shows the account page on [cspr.live](https://cspr.live/) and the field you need to specify in the withdrawal request from Coinlist.

<img class="align-center" src={useBaseUrl("/image/tutorials/exchanges/1.account-public-key.png")} alt="Account public key from CSPR.live"/>

## Transfers from Coinlist to Casper Mainnet

Try these steps with a small amount of CSPR first. After one successful transfer, you will be more comfortable transferring larger amounts.

1. Log into your <https://coinlist.co/> account.
1. Log into your [coinlist.co](https://coinlist.co/) account.
2. Go to the "Wallet" tab.

<img class="align-center" src={useBaseUrl("/image/tutorials/exchanges/2.coinlist-wallet.png")} alt="Coinlist Wallet tab" width="200" />
Expand All @@ -43,5 +43,5 @@ Try these steps with a small amount of CSPR first. After one successful transfer

8. Click "Review".

9. Submit the transfer request. Wait approximately 5 minutes, and then go to the <https://cspr.live/> site to verify your account details. On the account page, you should see that the "Liquid Account Balance" reflects the amount you have transferred.
9. Submit the transfer request. Wait approximately 5 minutes, and then go to the [cspr.live](https://cspr.live/) site to verify your account details. On the account page, you should see that the "Liquid Account Balance" reflects the amount you have transferred.

2 changes: 1 addition & 1 deletion source/docs/casper/users/ledger/staking-ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This portion will vary slightly depending on where your funds are currently stor

Once you have tokens in your account, staking (delegating) with a validator is easy.

1. Go back to your account, but this time open the "delegate" tab located at: <https://cspr.live/delegate-stake> (alternatively, click on `Wallet ⇒ Delegate Stake` to go there).
1. Go back to your account, but this time open the "delegate" tab located at [cspr.live/delegate-stake](https://cspr.live/delegate-stake) (alternatively, click on `Wallet ⇒ Delegate Stake` to go there).
2. From the validator list, choose any validator you like. You will notice that validators charge different fees and have different amounts staked to them. This may inform your decision to choose the right validator for you.
3. Specify the amount you wish to stake or click "Delegate max" as shown below. Notes:
1. Remember that the total delegation amount to one validator cannot be less than 500 CSPR.
Expand Down
Loading
Loading