diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index c26b849e98b9..1a14241e07bb 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -60,9 +60,9 @@ extra_css: # Socials extra: social: - - icon: fontawesome/brands/github-alt + - icon: fontawesome/brands/github link: https://github.com/ChainSafe/lodestar - - icon: fontawesome/brands/twitter + - icon: fontawesome/brands/x-twitter link: https://twitter.com/lodestar_eth - icon: fontawesome/brands/discord link: https://discord.gg/yjyvFRP @@ -122,6 +122,7 @@ nav: # - Bug Reports: contribution/bug-reports.md - Dependency Graph: contribution/depgraph.md # - Repo: contribution/repo.md + - Dev CLI Reference: contribution/dev-cli.md - Testing: - Overview: contribution/testing/index.md # - Unit Tests: contribution/testing/unit-tests.md @@ -142,4 +143,4 @@ nav: # - Block Exploration: advanced-topics/block-exploration.md # - Slashing Protection: advanced-topics/slashing-protection.md - Setting Up a Testnet: advanced-topics/setting-up-a-testnet.md - # - Doppelganger Detection: advanced-topics/doppelganger-detection.md \ No newline at end of file + # - Doppelganger Detection: advanced-topics/doppelganger-detection.md diff --git a/docs/pages/advanced-topics/setting-up-a-testnet.md b/docs/pages/advanced-topics/setting-up-a-testnet.md index a6350b3a03de..4a57f6db423e 100644 --- a/docs/pages/advanced-topics/setting-up-a-testnet.md +++ b/docs/pages/advanced-topics/setting-up-a-testnet.md @@ -58,7 +58,7 @@ The exact ENR of node to connect to is then supplied via the `--bootnodes` flag. Once the second node starts, you should see an output similar to the following in either of the terminals: -``` +```txt Eph 167991/6 6.007 [] info: Searching peers - peers: 1 - slot: 5375718 (skipped 5375718) - head: 0 0xcc67…3345 - finalized: 0x0000…0000:0 ``` @@ -70,7 +70,7 @@ For example, making the request on the first node via the following command: will give a result similar to the following: -``` +```json { "data": [ { diff --git a/docs/pages/beacon-management/networking.md b/docs/pages/beacon-management/networking.md index 1afd80c9cea3..579fbdef8fe0 100644 --- a/docs/pages/beacon-management/networking.md +++ b/docs/pages/beacon-management/networking.md @@ -44,7 +44,7 @@ Note that bootnodes are announced via ENR. Lodestar prints out its own ENR on startup, the logs will show something similar to the following -``` +```txt info: discv5 worker started peerId=16Uiu...t9LQ3, initialENR=enr:-Iu4QGE...WRwgiMo, bindAddr4=/ip4/0.0.0.0/udp/9000 ``` diff --git a/docs/pages/getting-started/starting-a-node.md b/docs/pages/getting-started/starting-a-node.md index 665a39b0df80..1641cd7d9115 100644 --- a/docs/pages/getting-started/starting-a-node.md +++ b/docs/pages/getting-started/starting-a-node.md @@ -68,7 +68,7 @@ In case execution-layer clients are available at different locations, use `--exe Immediately you should see confirmation that the node has started -```bash +```txt pr-20 15:12:45.274[] info: Lodestar network=mainnet, version=v1.7.2, commit= Apr-20 15:12:45.327[] info: Connected to LevelDB database path=/data/mt1/chain-db Apr-20 15:12:57.747[] info: Initializing beacon from a valid db state slot=6264480, epoch=195765, stateRoot=0x8133cd4d0be59c3e94405f902fe0ad68ffaa5013b525dddb6285b91ad79716f6, isWithinWeakSubjectivityPeriod=true @@ -136,35 +136,35 @@ Lodestar beacon sync log aims to provide information of utmost importance about See the following example of different kinds of sync log: -``` +```txt Apr-20 15:24:08.034[] info: Searching peers - peers: 0 - slot: 6265018 - head: 6264018 0xed93…7b0a - exec-block: syncing(17088476 0x9649…) - finalized: 0xbf30…7e7c:195777 Apr-20 15:24:17.000[] info: Searching peers - peers: 0 - slot: 6265019 - head: 6264018 0xed93…7b0a - exec-block: syncing(17088476 0x9649…) - finalized: 0xbf30…7e7c:195777 ``` -``` +```txt Apr-20 15:13:41.298[] info: Syncing - 2.5 minutes left - 2.78 slots/s - slot: 6264966 - head: 6262966 0x5cec…f5b8 - exec-block: valid(17088105 0x6f74…) - finalized: 0x5cc0…3874:195764 - peers: 1 Apr-20 15:13:41.298[] info: Syncing - 2 minutes left - 2.78 slots/s - slot: 6264967 - head: 6263965 0x5cec…f5b8 - exec-block: valid(17088105 0x6f74…) - finalized: 0x5cc0…3874:195764 - peers: 1 ``` -``` +```txt Apr-20 15:13:53.151[] info: Syncing - 1.6 minutes left - 3.82 slots/s - slot: 6264967 - head: (slot -360) 0xe0cf…9f3c - exec-block: valid(17088167 0x2d6a…) - finalized: 0x8f3f…2f81:195766 - peers: 5 Apr-20 15:14:05.425[] info: Syncing - 1.1 minutes left - 4.33 slots/s - slot: 6264968 - head: (slot -297) 0x3655…1658 - exec-block: valid(17088231 0xdafd…) - finalized: 0x9475…425a:195769 - peers: 2 Apr-20 15:14:53.001[] info: Syncing - 9 seconds left - 5.00 slots/s - slot: 6264972 - head: (slot -45) 0x44e4…20a4 - exec-block: valid(17088475 0xca61…) - finalized: 0x9cbd…ba83:195776 - peers: 8 ``` -``` +```txt Apr-20 15:15:01.443[network] info: Subscribed gossip core topics Apr-20 15:15:01.446[sync] info: Subscribed gossip core topics Apr-20 15:15:05.000[] info: Synced - slot: 6264973 - head: 0x90ea…c655 - exec-block: valid(17088521 0xca9b…) - finalized: 0x6981…682f:195778 - peers: 6 Apr-20 15:15:17.003[] info: Synced - slot: 6264974 - head: 0x4f7e…0e3a - exec-block: valid(17088522 0x08b1…) - finalized: 0x6981…682f:195778 - peers: 6 ``` -``` +```txt Apr-20 15:15:41.001[] info: Synced - slot: 6264976 - head: (slot -1) 0x17c6…71a7 - exec-block: valid(17088524 0x5bc1…) - finalized: 0x6981…682f:195778 - peers: 8 Apr-20 15:15:53.001[] info: Synced - slot: 6264977 - head: (slot -2) 0x17c6…71a7 - exec-block: valid(17088524 0x5bc1…) - finalized: 0x6981…682f:195778 - peers: 8 ``` -``` +```txt Apr-20 15:16:05.000[] info: Synced - slot: 6264978 - head: 0xc9fd…28c5 - exec-block: valid(17088526 0xb5bf…) - finalized: 0x6981…682f:195778 - peers: 8 Apr-20 15:16:17.017[] info: Synced - slot: 6264979 - head: 0xde91…d4cb - exec-block: valid(17088527 0xa488…) - finalized: 0x6981…682f:195778 - peers: 7 ``` diff --git a/docs/pages/logging-and-metrics/prometheus-grafana.md b/docs/pages/logging-and-metrics/prometheus-grafana.md index 681e15d91ede..44f4fb6bd3c1 100644 --- a/docs/pages/logging-and-metrics/prometheus-grafana.md +++ b/docs/pages/logging-and-metrics/prometheus-grafana.md @@ -7,7 +7,7 @@ Prometheus is an open-source monitoring system with efficient time series databa To start, download Prometheus from https://prometheus.io/download/. Unzip the downloaded .zip file and run Prometheus from its installed location with the lodestar `prometheus.yml` passed in as the configuration file -``` +```sh ./prometheus --config.file=$dataDir/prometheus.yml ``` @@ -18,7 +18,7 @@ Unzip the downloaded .zip file and run Prometheus from its installed location wi Then run the Lodestar beacon node with -``` +```sh lodestar --metrics=true --metrics.port=8008 ``` diff --git a/docs/pages/reference/cli.md b/docs/pages/reference/cli.md index 1b57913b99fc..9bfd266aa51b 100644 --- a/docs/pages/reference/cli.md +++ b/docs/pages/reference/cli.md @@ -6,3 +6,4 @@ _**Welcome! This page has been moved. Please checkout our new docs layout from t - [Validator CLI](../validator-management/validator-cli.md) - [Bootnode CLI](../bootnode/bootnode-cli.md) - [Light Client CLI](../lightclient-prover/lightclient-cli.md) +- [Dev CLI](../contribution/dev-cli.md) diff --git a/docs/pages/validator-management/vc-configuration.md b/docs/pages/validator-management/vc-configuration.md index f1fa720c7ee1..4853bca5bfa6 100644 --- a/docs/pages/validator-management/vc-configuration.md +++ b/docs/pages/validator-management/vc-configuration.md @@ -132,7 +132,7 @@ To start a Lodestar validator run the command: You should see confirmation that modules have started. -``` +```txt Nov-29 10:47:13.647[] info: Lodestar network=sepolia, version=v1.2.2/f093b46, commit=f093b468ec3ab0dbbe8e2d2c8175f52ad88aa35f Nov-29 10:47:13.649[] info: Connecting to LevelDB database path=/home/user/.local/share/lodestar/sepolia/validator-db Nov-29 10:47:51.732[] info: 3 local keystores diff --git a/docs/requirements.txt b/docs/requirements.txt index 18befdfcbe5e..755759c0ace3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ -mkdocs>=1.2 -mkdocs-material>=7.0 -Pygments>=2.4 -markdown>=3.2 -pymdown-extensions>=7.0 -mkdocs-mermaid2-plugin>=0.4 \ No newline at end of file +mkdocs==1.5.3 +mkdocs-material==9.5.9 +Pygments==2.17.2 +markdown==3.5.2 +pymdown-extensions==10.7 +mkdocs-mermaid2-plugin==1.1.1 diff --git a/packages/cli/docsgen/markdown.ts b/packages/cli/docsgen/markdown.ts index c05c7ad8c90f..e7fbcab7ad4b 100644 --- a/packages/cli/docsgen/markdown.ts +++ b/packages/cli/docsgen/markdown.ts @@ -6,7 +6,7 @@ const LINE_BREAK = "\n\n
"; function renderExampleBody(example: CliExample, lodestarCommand?: string): string { const cliExample = [ - `\`\`\` + `\`\`\`sh ${lodestarCommand ? `${lodestarCommand} ` : ""}${example.command} \`\`\``, ]; @@ -113,7 +113,9 @@ function renderOption(optionName: string, option: CliOptionDefinition): string | if (!defaultValue.includes(`"`)) { defaultValue = `"${defaultValue}"`; } - defaultValue = `[ ${defaultValue} ]`; + if (!defaultValue.startsWith("[")) { + defaultValue = `[ ${defaultValue} ]`; + } } commandOption.push(`default: \`${defaultValue}\``); }