diff --git a/content/docs/api-reference/x-chain/api.mdx b/content/docs/api-reference/x-chain/api.mdx
index ae6150f74af..9b142e8c3e0 100644
--- a/content/docs/api-reference/x-chain/api.mdx
+++ b/content/docs/api-reference/x-chain/api.mdx
@@ -183,7 +183,6 @@ curl -X POST --data '{
### `avm.getAddressTxs`
:::caution
-
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
:::
@@ -255,7 +254,6 @@ curl -X POST --data '{
### `avm.getAllBalances`
:::caution
-
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
:::
@@ -331,7 +329,6 @@ avm.getAssetDescription({assetID: string}) -> {
.100, etc.
:::note
-
The AssetID for AVAX differs depending on the network you are on.
Mainnet: FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z
@@ -374,7 +371,6 @@ curl -X POST --data '{
### `avm.getBalance`
:::caution
-
Deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
:::
@@ -1007,7 +1003,6 @@ This call is made to the wallet API endpoint:
`/ext/bc/X/wallet`
:::caution
-
Endpoint deprecated as of [**v1.9.12**](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
:::
diff --git a/content/docs/cross-chain/avalanche-warp-messaging/run-relayer.mdx b/content/docs/cross-chain/avalanche-warp-messaging/run-relayer.mdx
index 32b73ce598c..123a2157215 100644
--- a/content/docs/cross-chain/avalanche-warp-messaging/run-relayer.mdx
+++ b/content/docs/cross-chain/avalanche-warp-messaging/run-relayer.mdx
@@ -21,14 +21,14 @@ Applications in this repository depend on the following upstream repositories, b
2. [coreth](https://github.com/ava-labs/coreth) (indirectly)
3. [subnet-evm](https://github.com/ava-labs/subnet-evm)
-> [!NOTE]
+> [NOTE]
> We require any commits referenced in our `main` branch to be present in the default branches of the repositories above, but during active development it might be useful to work against changes in progress that are still on feature branches.
When developing such features that require updates to one or more of the above, care must be taken to understand where the relevant code comes from. The binaries of applications built in this repo are built against versions referenced in the `go.mod` file. The E2E tests run against a simulated network running locally that is started by calling a separately compiled `avalanchego` binary as well as its plugins. These are compiled based on the values of `AVALANCHEGO_VERSION` in this repository's `./scripts/versions.sh`.
`avalanchego` and `coreth` have a direct circular dependency and this repository is only indirectly dependent on `coreth` but directly dependent on `avalanchego`. Therefore if any updates are required from the `coreth` side, a corresponding `avalanchego` commit referencing those changes is required. On the other hand `subnet-evm` just depends directly on `avalanchego`.
-> [!NOTE]
+> [NOTE]
> It's possible that a `subnet-evm` version is compatible with multiple different `avalanchego` versions and not limited to the one listed in `subnet-evm`'s `/scripts/versions.sh`
### Example dependency update flow
@@ -41,7 +41,7 @@ The most complicated example case that can arise above is that a feature depends
Publishing all of the commits mentioned above to GitHub branches will enable running E2E tests through the CI.
-> [!TIP]
+> [TIP]
> Running the tests locally doesn't require publishing the `subnet-evm` commit since `./scripts/e2e_test.sh` takes a flag specifying a local checkout of the `subnet-evm` repository.
## Releases
diff --git a/content/docs/cross-chain/teleporter/overview.mdx b/content/docs/cross-chain/teleporter/overview.mdx
index 19744267e01..b86a8517aea 100644
--- a/content/docs/cross-chain/teleporter/overview.mdx
+++ b/content/docs/cross-chain/teleporter/overview.mdx
@@ -41,7 +41,9 @@ The `ITeleporterReceiver` interface provides a single method. All contracts that
## Data Flow
-
+
+

+
## Properties
diff --git a/content/docs/cross-chain/teleporter/upgradeability.mdx b/content/docs/cross-chain/teleporter/upgradeability.mdx
index 1895ad175ae..e1550aebb67 100644
--- a/content/docs/cross-chain/teleporter/upgradeability.mdx
+++ b/content/docs/cross-chain/teleporter/upgradeability.mdx
@@ -122,7 +122,7 @@ Using specific version:
ITeleporterMessenger teleporter = teleporterRegistry
.getTeleporterFromVersion($VERSION);
require(
- !pausedTeleporterAddresses[address(teleporter)],
+ pausedTeleporterAddresses[address(teleporter)],
"TeleporterRegistryApp: Teleporter sending version paused"
);
diff --git a/content/docs/nodes/configure/chain-configs/p-chain.mdx b/content/docs/nodes/configure/chain-configs/p-chain.mdx
new file mode 100644
index 00000000000..67ea025d57b
--- /dev/null
+++ b/content/docs/nodes/configure/chain-configs/p-chain.mdx
@@ -0,0 +1,225 @@
+---
+title: P-Chain Configurations
+description: This page describes the configuration options available for the P-Chain.
+---
+
+
+# P-Chain
+
+This document provides details about the configuration options available for the PlatformVM.
+
+In order to specify a configuration for the PlatformVM, you need to define a `Config` struct and its parameters. The default values for these parameters are:
+
+```json
+{
+ "Chains": null,
+ "Validators": null,
+ "UptimeLockedCalculator": null,
+ "SybilProtectionEnabled": false,
+ "PartialSyncPrimaryNetwork": false,
+ "TrackedSubnets": [],
+ "TxFee": 0,
+ "CreateAssetTxFee": 0,
+ "CreateSubnetTxFee": 0,
+ "TransformSubnetTxFee": 0,
+ "CreateBlockchainTxFee": 0,
+ "AddPrimaryNetworkValidatorFee": 0,
+ "AddPrimaryNetworkDelegatorFee": 0,
+ "AddSubnetValidatorFee": 0,
+ "AddSubnetDelegatorFee": 0,
+ "MinValidatorStake": 0,
+ "MaxValidatorStake": 0,
+ "MinDelegatorStake": 0,
+ "MinDelegationFee": 0,
+ "UptimePercentage": 0,
+ "MinStakeDuration": "0s",
+ "MaxStakeDuration": "0s",
+ "RewardConfig": {},
+ "ApricotPhase3Time": "0001-01-01T00:00:00Z",
+ "ApricotPhase5Time": "0001-01-01T00:00:00Z",
+ "BanffTime": "0001-01-01T00:00:00Z",
+ "CortinaTime": "0001-01-01T00:00:00Z",
+ "DurangoTime": "0001-01-01T00:00:00Z",
+ "EUpgradeTime": "0001-01-01T00:00:00Z",
+ "UseCurrentHeight": false
+}
+```
+
+Default values are overridden only if explicitly specified in the config.
+
+## Parameters
+
+The parameters are as follows:
+
+### `Chains`
+
+The node's chain manager
+
+### `Validators`
+
+Node's validator set maps SubnetID to validators of the Subnet
+
+- The primary network's validator set should have been added to the manager before calling VM.Initialize.
+- The primary network's validator set should be empty before calling VM.Initialize.
+
+### `UptimeLockedCalculator`
+
+Provides access to the uptime manager as a thread-safe data structure
+
+### `SybilProtectionEnabled`
+
+_Boolean_
+
+True if the node is being run with staking enabled
+
+### `PartialSyncPrimaryNetwork`
+
+_Boolean_
+
+If true, only the P-chain will be instantiated on the primary network.
+
+### `TrackedSubnets`
+
+Set of Subnets that this node is validating
+
+### `TxFee`
+
+_Uint64_
+
+Fee that is burned by every non-state creating transaction
+
+### `CreateAssetTxFee`
+
+_Uint64_
+
+Fee that must be burned by every state creating transaction before AP3
+
+### `CreateSubnetTxFee`
+
+_Uint64_
+
+Fee that must be burned by every Subnet creating transaction after AP3
+
+### `TransformSubnetTxFee`
+
+_Uint64_
+
+Fee that must be burned by every transform Subnet transaction
+
+### `CreateBlockchainTxFee`
+
+_Uint64_
+
+Fee that must be burned by every blockchain creating transaction after AP3
+
+### `AddPrimaryNetworkValidatorFee`
+
+_Uint64_
+
+Transaction fee for adding a primary network validator
+
+### `AddPrimaryNetworkDelegatorFee`
+
+_Uint64_
+
+Transaction fee for adding a primary network delegator
+
+### `AddSubnetValidatorFee`
+
+_Uint64_
+
+Transaction fee for adding a Subnet validator
+
+### `AddSubnetDelegatorFee`
+
+_Uint64_
+
+Transaction fee for adding a Subnet delegator
+
+### `MinValidatorStake`
+
+_Uint64_
+
+The minimum amount of tokens one must bond to be a validator
+
+### `MaxValidatorStake`
+
+_Uint64_
+
+The maximum amount of tokens that can be bonded on a validator
+
+### `MinDelegatorStake`
+
+_Uint64_
+
+Minimum stake, in nAVAX, that can be delegated on the primary network
+
+### `MinDelegationFee`
+
+_Uint32_
+
+Minimum fee that can be charged for delegation
+
+### `UptimePercentage`
+
+_Float64_
+
+UptimePercentage is the minimum uptime required to be rewarded for staking
+
+### `MinStakeDuration`
+
+_Duration_
+
+Minimum amount of time to allow a staker to stake
+
+### `MaxStakeDuration`
+
+_Duration_
+
+Maximum amount of time to allow a staker to stake
+
+### `RewardConfig`
+
+Config for the minting function
+
+### `ApricotPhase3Time`
+
+_Time_
+
+Time of the AP3 network upgrade
+
+### `ApricotPhase5Time`
+
+_Time_
+
+Time of the AP5 network upgrade
+
+### `BanffTime`
+
+_Time_
+
+Time of the Banff network upgrade
+
+### `CortinaTime`
+
+_Time_
+
+Time of the Cortina network upgrade
+
+### `DurangoTime`
+
+_Time_
+
+Time of the Durango network upgrade
+
+### `EUpgradeTime`
+
+_Time_
+
+Time of the E network upgrade
+
+### `UseCurrentHeight`
+
+_Boolean_
+
+UseCurrentHeight forces `GetMinimumHeight` to return the current height of the P-Chain instead of the oldest block in the `recentlyAccepted` window. This config is particularly useful for triggering proposervm activation on recently created Subnets (without this, users need to wait for `recentlyAcceptedWindowTTL` to pass for activation to occur).
diff --git a/content/docs/nodes/configure/chain-configs/x-chain.mdx b/content/docs/nodes/configure/chain-configs/x-chain.mdx
new file mode 100644
index 00000000000..8f00ec95025
--- /dev/null
+++ b/content/docs/nodes/configure/chain-configs/x-chain.mdx
@@ -0,0 +1,60 @@
+---
+title: X-Chain Configurations
+description: This page describes the configuration options available for the X-Chain.
+---
+
+
+# X-Chain
+
+In order to specify a config for the X-Chain, a JSON config file should be
+placed at `{chain-config-dir}/X/config.json`.
+
+For example if `chain-config-dir` has the default value which is
+`$HOME/.avalanchego/configs/chains`, then `config.json` can be placed at
+`$HOME/.avalanchego/configs/chains/X/config.json`.
+
+This allows you to specify a config to be passed into the X-Chain. The default
+values for this config are:
+
+```json
+{
+ "index-transactions": false,
+ "index-allow-incomplete": false,
+ "checksums-enabled": false
+}
+```
+
+Default values are overridden only if explicitly specified in the config.
+
+The parameters are as follows:
+
+## Transaction Indexing
+
+### `index-transactions`
+
+_Boolean_
+
+Enables AVM transaction indexing if set to `true`.
+When set to `true`, AVM transactions are indexed against the `address` and
+`assetID` involved. This data is available via `avm.getAddressTxs`
+[API](https://github.com/reference/avalanchego/x-chain/api.md#avmgetaddresstxs).
+
+:::note
+If `index-transactions` is set to true, it must always be set to true
+for the node's lifetime. If set to `false` after having been set to `true`, the
+node will refuse to start unless `index-allow-incomplete` is also set to `true`
+(see below).
+:::
+
+### `index-allow-incomplete`
+
+_Boolean_
+
+Allows incomplete indices. This config value is ignored if there is no X-Chain indexed data in the DB and
+`index-transactions` is set to `false`.
+
+### `checksums-enabled`
+
+_Boolean_
+
+Enables checksums if set to `true`.
diff --git a/content/docs/nodes/configure/configs-flags.mdx b/content/docs/nodes/configure/configs-flags.mdx
index 208a436e697..3219286d86b 100644
--- a/content/docs/nodes/configure/configs-flags.mdx
+++ b/content/docs/nodes/configure/configs-flags.mdx
@@ -1,112 +1,65 @@
---
-title: AvalancheGo Configs
+title: AvalancheGo Config Flags
+description: This page lists all available configuration options for AvalancheGo nodes.
---
-} >
-This page was generated by a plugin that directly references this [file](https://github.com/ava-labs/avalanchego/tree/master/config/config.md) in the AvalancheGo GitHub repository.
-
-You can specify the configuration of a node with the arguments below.
-
-## Data Directory
-
-#### `--data-dir` (string)
-
-Sets the base data directory where default sub-directories will be placed unless otherwise specified.
-Defaults to `$HOME/.avalanchego`.
-
-## Config File
-
-#### `--config-file` (string)
-
-Path to a JSON file that specifies this node's configuration. Command line
-arguments will override arguments set in the config file. This flag is ignored
-if `--config-file-content` is specified.
-
-Example JSON config file:
-
-```json
-{
- "log-level": "debug"
-}
-```
-
-} >
-[Install Script](/docs/nodes/using-install-script/installing-avalanche-go) creates the
-node config file at `~/.avalanchego/configs/node.json`. No default file is
-created if [AvalancheGo is built from source](/docs/nodes/run-a-node/manually), you
-would need to create it manually if needed.
-
-
-#### `--config-file-content` (string)
-
-As an alternative to `--config-file`, it allows specifying base64 encoded config
-content.
-
-#### `--config-file-content-type` (string)
-
-Specifies the format of the base64 encoded config content. JSON, TOML, YAML are
-among currently supported file format (see
-[here](https://github.com/spf13/viper#reading-config-files) for full list). Defaults to `JSON`.
-
-## Avalanche Community Proposals
-
-#### `--acp-support` (array of integers)
-
-The `--acp-support` flag allows an AvalancheGo node to indicate support for a
-set of [Avalanche Community Proposals](https://github.com/avalanche-foundation/ACPs).
+# AvalancheGo Configs and Flags
-#### `--acp-object` (array of integers)
+{/* markdownlint-disable MD001 */}
-The `--acp-object` flag allows an AvalancheGo node to indicate objection for a
-set of [Avalanche Community Proposals](https://github.com/avalanche-foundation/ACPs).
+You can specify the configuration of a node with the arguments below.
## APIs
#### `--api-admin-enabled` (boolean)
If set to `true`, this node will expose the Admin API. Defaults to `false`.
-See [here](/docs/api-reference/admin-api) for more information.
+See [here](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/reference/avalanchego/admin-api) for more information.
#### `--api-health-enabled` (boolean)
If set to `false`, this node will not expose the Health API. Defaults to `true`. See
-[here](/docs/api-reference/health-api) for more information.
+[here](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/reference/avalanchego/health-api) for more information.
#### `--index-enabled` (boolean)
If set to `true`, this node will enable the indexer and the Index API will be
available. Defaults to `false`. See
-[here](/docs/api-reference/index-api) for more information.
+[here](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/reference/avalanchego/index-api) for more information.
#### `--api-info-enabled` (boolean)
If set to `false`, this node will not expose the Info API. Defaults to `true`. See
-[here](/docs/api-reference/info-api) for more information.
-
-#### `--api-keystore-enabled` (boolean)
-
-If set to `true`, this node will expose the Keystore API. Defaults to `false`.
-See [here](/docs/api-reference/keystore-api) for more information.
+[here](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/reference/avalanchego/info-api) for more information.
#### `--api-metrics-enabled` (boolean)
If set to `false`, this node will not expose the Metrics API. Defaults to
-`true`. See [here](/docs/api-reference/metrics-api) for more information.
+`true`. See [here](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/reference/avalanchego/metrics-api) for more information.
-#### `--http-shutdown-wait` (duration)
+## Avalanche Community Proposals
-Duration to wait after receiving SIGTERM or SIGINT before initiating shutdown.
-The `/health` endpoint will return unhealthy during this duration (if the Health
-API is enabled.) Defaults to `0s`.
+#### `--acp-support` (array of integers)
-#### `--http-shutdown-timeout` (duration)
+The `--acp-support` flag allows an AvalancheGo node to indicate support for a
+set of [Avalanche Community Proposals](https://github.com/avalanche-foundation/ACPs).
-Maximum duration to wait for existing connections to complete during node
-shutdown. Defaults to `10s`.
+#### `--acp-object` (array of integers)
+
+The `--acp-object` flag allows an AvalancheGo node to indicate objection for a
+set of [Avalanche Community Proposals](https://github.com/avalanche-foundation/ACPs).
## Bootstrapping
+#### `--bootstrap-ancestors-max-containers-sent` (uint)
+
+Max number of containers in an `Ancestors` message sent by this node. Defaults to `2000`.
+
+#### `--bootstrap-ancestors-max-containers-received` (unit)
+
+This node reads at most this many containers from an incoming `Ancestors` message. Defaults to `2000`.
+
#### `--bootstrap-beacon-connection-timeout` (duration)
Timeout when attempting to connect to bootstrapping beacons. Defaults to `1m`.
@@ -127,52 +80,18 @@ this field would be `--bootstrap-ips="127.0.0.1:12345,1.2.3.4:5678"`. The number
of given IPs here must be same with number of given `--bootstrap-ids`. The
default value depends on the network ID.
-#### `--bootstrap-retry-enabled` (boolean)
-
-If set to `false`, will not retry bootstrapping if it fails. Defaults to `true`.
-
-#### `--bootstrap-retry-warn-frequency` (uint)
-
-Specifies how many times bootstrap should be retried before warning the operator. Defaults to `50`.
-
-#### `--bootstrap-ancestors-max-containers-sent` (uint)
-
-Max number of containers in an `Ancestors` message sent by this node. Defaults to `2000`.
-
-#### `--bootstrap-ancestors-max-containers-received` (unit)
-
-This node reads at most this many containers from an incoming `Ancestors` message. Defaults to `2000`.
-
#### `--bootstrap-max-time-get-ancestors` (duration)
Max Time to spend fetching a container and its ancestors when responding to a GetAncestors message.
Defaults to `50ms`.
-## State Syncing
-
-#### `--state-sync-ids` (string)
-
-State sync IDs is a comma-separated list of validator IDs. The specified
-validators will be contacted to get and authenticate the starting point (state
-summary) for state sync. An example setting of this field would be
-`--state-sync-ids="NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ"`.
-The number of given IDs here must be same with number of given
-`--state-sync-ips`. The default value is empty, which results in all validators
-being sampled.
-
-#### `--state-sync-ips` (string)
-
-State sync IPs is a comma-separated list of IP:port pairs. These IP Addresses
-will be contacted to get and authenticate the starting point (state summary) for
-state sync. An example setting of this field would be
-`--state-sync-ips="127.0.0.1:12345,1.2.3.4:5678"`. The number of given IPs here
-must be the same with the number of given `--state-sync-ids`.
+#### `--bootstrap-retry-enabled` (boolean)
-## Partial Sync Primary Network
+If set to `false`, will not retry bootstrapping if it fails. Defaults to `true`.
-#### `--partial-sync-primary-network` (string)
+#### `--bootstrap-retry-warn-frequency` (uint)
-Partial sync enables non-validators to optionally sync only the P-chain on the primary network.
+Specifies how many times bootstrap should be retried before warning the operator. Defaults to `50`.
## Chain Configs
@@ -185,15 +104,15 @@ them into the VM on initialization.
#### `--chain-config-dir` (string)
Specifies the directory that contains chain configs, as described
-[here](/docs/nodes/configure/configs-flags). Defaults to `$HOME/.avalanchego/configs/chains`.
+[here](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/nodes/configure/chain-configs/chain-config-flags). Defaults to `$HOME/.avalanchego/configs/chains`.
If this flag is not provided and the default directory does not exist,
AvalancheGo will not exit since custom configs are optional. However, if the
flag is set, the specified folder must exist, or AvalancheGo will exit with an
error. This flag is ignored if `--chain-config-content` is specified.
-
+:::note
Please replace `chain-config-dir` and `blockchainID` with their actual values.
-
+:::
Network upgrades are passed in from the location:
`chain-config-dir`/`blockchainID`/`upgrade.*`.
@@ -213,10 +132,10 @@ The chain configuration is intended to provide optional configuration parameters
and the VM will use default values if nothing is passed in.
Full reference for all configuration options for some standard chains can be
-found in a separate [chain config flags](/docs/nodes/configure/configs-flags) document.
+found in a separate [chain config flags](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/nodes/configure/chain-configs/chain-config-flags) document.
Full reference for `subnet-evm` upgrade configuration can be found in a separate
-[Customize an Avalanche L1](/docs/avalanche-l1s/upgrade/customize-avalanche-l1) document.
+[Customize a Subnet](https://github.com/ava-labs/avalanchego/blob/master/config/docs.avax.network/build/subnet/upgrade/customize-a-subnet) document.
#### `--chain-config-content` (string)
@@ -248,7 +167,7 @@ The above example aliases the Blockchain whose ID is
`"q2aTwKuyzgs8pynF7UXBZCU7DejbZbZ6EUyHr3JQzYgwNPUPi"` to `"DFK"`. Chain
aliases are added after adding primary network aliases and before any changes to
the aliases via the admin API. This means that the first alias included for a
-Blockchain on an Avalanche L1 will be treated as the `"Primary Alias"` instead of the
+Blockchain on a Subnet will be treated as the `"Primary Alias"` instead of the
full blockchainID. The Primary Alias is used in all metrics and logs.
#### `--chain-aliases-file-content` (string)
@@ -260,6 +179,47 @@ aliases for Blockchains.
Chain specific data directory. Defaults to `$HOME/.avalanchego/chainData`.
+## Config File
+
+#### `--config-file` (string)
+
+Path to a JSON file that specifies this node's configuration. Command line
+arguments will override arguments set in the config file. This flag is ignored
+if `--config-file-content` is specified.
+
+Example JSON config file:
+
+```json
+{
+ "log-level": "debug"
+}
+```
+
+:::tip
+[Install Script](https://docs.avax.network/tooling/avalanche-go-installer) creates the
+node config file at `~/.avalanchego/configs/node.json`. No default file is
+created if [AvalancheGo is built from source](https://docs.avax.network/nodes/run-a-node/manually), you
+would need to create it manually if needed.
+:::
+
+#### `--config-file-content` (string)
+
+As an alternative to `--config-file`, it allows specifying base64 encoded config
+content.
+
+#### `--config-file-content-type` (string)
+
+Specifies the format of the base64 encoded config content. JSON, TOML, YAML are
+among currently supported file format (see
+[here](https://github.com/spf13/viper#reading-config-files) for full list). Defaults to `JSON`.
+
+## Data Directory
+
+#### `--data-dir` (string)
+
+Sets the base data directory where default sub-directories will be placed unless otherwise specified.
+Defaults to `$HOME/.avalanchego`.
+
## Database
##### `--db-dir` (string, file path)
@@ -271,14 +231,14 @@ Specifies the directory to which the database is persisted. Defaults to `"$HOME/
Specifies the type of database to use. Must be one of `leveldb`, `memdb`, or `pebbledb`.
`memdb` is an in-memory, non-persisted database.
-
+:::note
`memdb` stores everything in memory. So if you have a 900 GiB LevelDB instance, then using `memdb`
-you'd need 900 GiB of RAM.
-
+you’d need 900 GiB of RAM.
`memdb` is useful for fast one-off testing, not for running an actual node (on Fuji or Mainnet).
-Also note that `memdb` doesn't persist after restart. So any time you restart the node it would
+Also note that `memdb` doesn’t persist after restart. So any time you restart the node it would
start syncing from scratch.
-
+
+:::
### Database Config
@@ -301,39 +261,39 @@ Any keys not given will receive the default value.
// Use -1 for zero.
//
// The default value is 12MiB.
- "blockCacheCapacity": int
+ "blockCacheCapacity": int,
// BlockSize is the minimum uncompressed size in bytes of each 'sorted table'
// block.
//
// The default value is 4KiB.
- "blockSize": int
+ "blockSize": int,
// CompactionExpandLimitFactor limits compaction size after expanded.
// This will be multiplied by table size limit at compaction target level.
//
// The default value is 25.
- "compactionExpandLimitFactor": int
+ "compactionExpandLimitFactor": int,
// CompactionGPOverlapsFactor limits overlaps in grandparent (Level + 2)
// that a single 'sorted table' generates. This will be multiplied by
// table size limit at grandparent level.
//
// The default value is 10.
- "compactionGPOverlapsFactor": int
+ "compactionGPOverlapsFactor": int,
// CompactionL0Trigger defines number of 'sorted table' at level-0 that will
// trigger compaction.
//
// The default value is 4.
- "compactionL0Trigger": int
+ "compactionL0Trigger": int,
// CompactionSourceLimitFactor limits compaction source size. This doesn't apply to
// level-0.
// This will be multiplied by table size limit at compaction target level.
//
// The default value is 1.
- "compactionSourceLimitFactor": int
+ "compactionSourceLimitFactor": int,
// CompactionTableSize limits size of 'sorted table' that compaction generates.
// The limits for each level will be calculated as:
@@ -341,19 +301,19 @@ Any keys not given will receive the default value.
// The multiplier for each level can also fine-tuned using CompactionTableSizeMultiplierPerLevel.
//
// The default value is 2MiB.
- "compactionTableSize": int
+ "compactionTableSize": int,
// CompactionTableSizeMultiplier defines multiplier for CompactionTableSize.
//
// The default value is 1.
- "compactionTableSizeMultiplier": float
+ "compactionTableSizeMultiplier": float,
// CompactionTableSizeMultiplierPerLevel defines per-level multiplier for
// CompactionTableSize.
// Use zero to skip a level.
//
// The default value is nil.
- "compactionTableSizeMultiplierPerLevel": []float
+ "compactionTableSizeMultiplierPerLevel": []float,
// CompactionTotalSize limits total size of 'sorted table' for each level.
// The limits for each level will be calculated as:
@@ -362,12 +322,12 @@ Any keys not given will receive the default value.
// CompactionTotalSizeMultiplierPerLevel.
//
// The default value is 10MiB.
- "compactionTotalSize": int
+ "compactionTotalSize": int,
// CompactionTotalSizeMultiplier defines multiplier for CompactionTotalSize.
//
// The default value is 10.
- "compactionTotalSizeMultiplier": float
+ "compactionTotalSizeMultiplier": float,
// DisableSeeksCompaction allows disabling 'seeks triggered compaction'.
// The purpose of 'seeks triggered compaction' is to optimize database so
@@ -375,13 +335,13 @@ Any keys not given will receive the default value.
// small compaction which may not preferable.
//
// The default is true.
- "disableSeeksCompaction": bool
+ "disableSeeksCompaction": bool,
// OpenFilesCacheCapacity defines the capacity of the open files caching.
// Use -1 for zero, this has same effect as specifying NoCacher to OpenFilesCacher.
//
// The default value is 1024.
- "openFilesCacheCapacity": int
+ "openFilesCacheCapacity": int,
// WriteBuffer defines maximum size of a 'memdb' before flushed to
// 'sorted table'. 'memdb' is an in-memory DB backed by an on-disk
@@ -390,30 +350,37 @@ Any keys not given will receive the default value.
// LevelDB may held up to two 'memdb' at the same time.
//
// The default value is 6MiB.
- "writeBuffer": int
+ "writeBuffer": int,
// FilterBitsPerKey is the number of bits to add to the bloom filter per
// key.
//
// The default value is 10.
- "filterBitsPerKey": int
+ "filterBitsPerKey": int,
// MaxManifestFileSize is the maximum size limit of the MANIFEST-****** file.
// When the MANIFEST-****** file grows beyond this size, LevelDB will create
// a new MANIFEST file.
//
// The default value is infinity.
- "maxManifestFileSize": int
+ "maxManifestFileSize": int,
// MetricUpdateFrequency is the frequency to poll LevelDB metrics in
// nanoseconds.
// If <= 0, LevelDB metrics aren't polled.
//
// The default value is 10s.
- "metricUpdateFrequency": int
+ "metricUpdateFrequency": int,
}
```
+## File Descriptor Limit
+
+#### `--fd-limit` (int)
+
+Attempts to raise the process file descriptor limit to at least this value and
+error if the value is above the system max. Linux default `32768`.
+
## Genesis
#### `--genesis-file` (string)
@@ -422,23 +389,8 @@ Path to a JSON file containing the genesis data to use. Ignored when running
standard networks (Mainnet, Fuji Testnet), or when `--genesis-content` is
specified. If not given, uses default genesis data.
-These are the main properties in the JSON file:
-
-- `networkID`: A unique identifier for the blockchain, must be a number in the range [0, 2^32).
-- `allocations`: The list of initial addresses, their initial balances and the unlock schedule for each.
-- `startTime`: The time of the beginning of the blockchain, it must be a Unix
- timestamp and it can't be a time in the future.
-- `initialStakeDuration`: The stake duration, in seconds, of the validators that exist at network genesis.
-- `initialStakeDurationOffset`: The offset, in seconds, between the start times
- of the validators that exist at genesis.
-- `initialStakedFunds`: A list of addresses that own the funds staked at genesis
- (each address must be present in `allocations` as well)
-- `initialStakers`: The validators that exist at genesis. Each element contains
- the `rewardAddress`, NodeID and the `delegationFee` of the validator.
-- `cChainGenesis`: The genesis info to be passed to the C-Chain.
-- `message`: A message to include in the genesis. Not required.
+See the documentation for the genesis JSON format [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/README.md) and an example used for the local network genesis [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/).
-For an example of a JSON representation of genesis data, see [genesis_local.json](https://github.com/ava-labs/avalanchego/blob/master/genesis/genesis_local.json).
#### `--genesis-file-content` (string)
@@ -446,6 +398,18 @@ As an alternative to `--genesis-file`, it allows specifying base64 encoded genes
## HTTP Server
+#### `--http-allowed-hosts` (string)
+
+List of acceptable host names in API requests. Provide the wildcard (`'*'`) to accept
+requests from all hosts. API requests where the `Host` field is empty or an IP address
+will always be accepted. An API call whose HTTP `Host` field isn't acceptable will
+receive a 403 error code. Defaults to `localhost`.
+
+#### `--http-allowed-origins` (string)
+
+Origins to allow on the HTTP port. Defaults to `*` which allows all origins. Example:
+`"https://*.avax.network https://*.avax-test.network"`
+
#### `--http-host` (string)
The address that HTTP APIs listen on. Defaults to `127.0.0.1`. This means that
@@ -453,12 +417,40 @@ by default, your node can only handle API calls made from the same machine. To
allow API calls from other machines, use `--http-host=`. You can also enter
domain names as parameter.
+#### `--http-idle-timeout` (string)
+
+Maximum duration to wait for the next request when keep-alives are enabled. If
+`--http-idle-timeout` is zero, the value of `--http-read-timeout` is used. If both are zero,
+there is no timeout.
+
#### `--http-port` (int)
Each node runs an HTTP server that provides the APIs for interacting with the
node and the Avalanche network. This argument specifies the port that the HTTP
server will listen on. The default value is `9650`.
+#### `--http-read-timeout` (string)
+
+Maximum duration for reading the entire request, including the body. A zero or
+negative value means there will be no timeout.
+
+#### `--http-read-header-timeout` (string)
+
+Maximum duration to read request headers. The connection’s read deadline is
+reset after reading the headers. If `--http-read-header-timeout` is zero, the
+value of `--http-read-timeout` is used. If both are zero, there is no timeout.
+
+#### `--http-shutdown-timeout` (duration)
+
+Maximum duration to wait for existing connections to complete during node
+shutdown. Defaults to `10s`.
+
+#### `--http-shutdown-wait` (duration)
+
+Duration to wait after receiving SIGTERM or SIGINT before initiating shutdown.
+The `/health` endpoint will return unhealthy during this duration (if the Health
+API is enabled.) Defaults to `0s`.
+
#### `--http-tls-cert-file` (string, file path)
This argument specifies the location of the TLS certificate used by the node for
@@ -491,48 +483,12 @@ content of the TLS private key used by the node for the HTTPS server. Note that
full private key content, with the leading and trailing header, must be base64
encoded. This must be specified when `--http-tls-enabled=true`.
-#### `--http-read-timeout` (string)
-
-Maximum duration for reading the entire request, including the body. A zero or
-negative value means there will be no timeout.
-
-#### `--http-read-header-timeout` (string)
-
-Maximum duration to read request headers. The connection's read deadline is
-reset after reading the headers. If `--http-read-header-timeout` is zero, the
-value of `--http-read-timeout` is used. If both are zero, there is no timeout.
-
#### `--http-write-timeout` (string)
Maximum duration before timing out writes of the response. It is reset whenever
-a new request's header is read. A zero or negative value means there will be no
+a new request’s header is read. A zero or negative value means there will be no
timeout.
-#### `--http-idle-timeout` (string)
-
-Maximum duration to wait for the next request when keep-alives are enabled. If
-`--http-idle-timeout` is zero, the value of `--http-read-timeout` is used. If both are zero,
-there is no timeout.
-
-#### `--http-allowed-origins` (string)
-
-Origins to allow on the HTTP port. Defaults to `*` which allows all origins. Example:
-`"https://*.avax.network https://*.avax-test.network"`
-
-#### `--http-allowed-hosts` (string)
-
-List of acceptable host names in API requests. Provide the wildcard (`'*'`) to accept
-requests from all hosts. API requests where the `Host` field is empty or an IP address
-will always be accepted. An API call whose HTTP `Host` field isn't acceptable will
-receive a 403 error code. Defaults to `localhost`.
-
-## File Descriptor Limit
-
-#### `--fd-limit` (int)
-
-Attempts to raise the process file descriptor limit to at least this value and
-error if the value is above the system max. Linux default `32768`.
-
## Logging
#### `--log-level` (string, `{verbo, debug, trace, info, warn, error, fatal, off}`)
@@ -633,6 +589,15 @@ Defaults to `0.1`.
Type of exporter to use for tracing. Options are [`grpc`,`http`]. Defaults to `grpc`.
+## Partial Sync Primary Network
+
+#### `--partial-sync-primary-network` (string)
+
+Partial sync enables nodes that are not primary network validators to optionally sync
+only the P-chain on the primary network. Nodes that use this option can still track
+Subnets. After the Etna upgrade, nodes that use this option can also validate L1s.
+This config defaults to `false`.
+
## Public IP
Validators must know one of their public facing IP addresses so they can enable
@@ -645,9 +610,9 @@ according to its router.
If this argument is provided, the node assumes this is its public IP.
-} >
+:::tip
When running a local network it may be easiest to set this value to `127.0.0.1`.
-
+:::
#### `--public-ip-resolution-frequency` (duration)
@@ -659,6 +624,26 @@ mappings, if applicable. Default to 5 minutes.
When provided, the node will use that service to periodically resolve/update its
public IP. Only acceptable values are `ifconfigCo`, `opendns` or `ifconfigMe`.
+## State Syncing
+
+#### `--state-sync-ids` (string)
+
+State sync IDs is a comma-separated list of validator IDs. The specified
+validators will be contacted to get and authenticate the starting point (state
+summary) for state sync. An example setting of this field would be
+`--state-sync-ids="NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ"`.
+The number of given IDs here must be same with number of given
+`--state-sync-ips`. The default value is empty, which results in all validators
+being sampled.
+
+#### `--state-sync-ips` (string)
+
+State sync IPs is a comma-separated list of IP:port pairs. These IP Addresses
+will be contacted to get and authenticate the starting point (state summary) for
+state sync. An example setting of this field would be
+`--state-sync-ips="127.0.0.1:12345,1.2.3.4:5678"`. The number of given IPs here
+must be the same with the number of given `--state-sync-ids`.
+
## Staking
#### `--staking-port` (int)
@@ -711,34 +696,34 @@ As an alternative to `--staking-tls-key-file`, it allows specifying base64
encoded content of the TLS private key used by the node. Note that full private
key content, with the leading and trailing header, must be base64 encoded.
-## Avalanche L1s
+## Subnets
-### Avalanche L1 Tracking
+### Subnet Tracking
#### `--track-subnets` (string)
-Comma separated list of Avalanche L1 IDs (SubnetID) that this node would track if added to.
+Comma separated list of Subnet IDs that this node would track if added to.
Defaults to empty (will only validate the Primary Network).
-### Avalanche L1 Configs
+### Subnet Configs
-It is possible to provide parameters for Avalanche L1s. Parameters here apply to all
-chains in the specified Avalanche L1s. Parameters must be specified with a
+It is possible to provide parameters for Subnets. Parameters here apply to all
+chains in the specified Subnets. Parameters must be specified with a
`{subnetID}.json` config file under `--subnet-config-dir`. AvalancheGo loads
-configs for Avalanche L1s specified in
+configs for Subnets specified in
`--track-subnets` parameter.
-Full reference for all configuration options for an Avalanche L1 can be found in a
-separate [Avalanche L1 Configs](/docs/nodes/configure/avalanche-l1-configs) document.
+Full reference for all configuration options for a Subnet can be found in a
+separate [Subnet Configs](https://docs.avax.network/nodes/configure/avalanche-l1-configs) document.
#### `--subnet-config-dir` (`string`)
-Specifies the directory that contains Avalanche L1 configs, as described above.
+Specifies the directory that contains Subnet configs, as described above.
Defaults to `$HOME/.avalanchego/configs/subnets`. If the flag is set explicitly,
the specified folder must exist, or AvalancheGo will exit with an error. This
flag is ignored if `--subnet-config-content` is specified.
-Example: Let's say we have an Avalanche L1 with ID
+Example: Let's say we have a Subnet with ID
`p4jUwqZsA2LuSftroCd3zb4ytH8W99oXKuKVZdsty7eQ3rXD6`. We can create a config file
under the default `subnet-config-dir` at
`$HOME/.avalanchego/configs/subnets/p4jUwqZsA2LuSftroCd3zb4ytH8W99oXKuKVZdsty7eQ3rXD6.json`.
@@ -754,13 +739,13 @@ An example config file is:
}
```
-} >
+:::tip
By default, none of these directories and/or files exist. You would need to create them manually if needed.
-
+:::
#### `--subnet-config-content` (string)
-As an alternative to `--subnet-config-dir`, it allows specifying base64 encoded parameters for an Avalanche L1.
+As an alternative to `--subnet-config-dir`, it allows specifying base64 encoded parameters for a Subnet.
## Version
@@ -820,9 +805,9 @@ Minimum amount of time queries to a peer must be failing before the peer is benc
### Consensus Parameters
-
+:::note
Some of these parameters can only be set on a local or private network, not on Fuji Testnet or Mainnet
-
+:::
#### `--consensus-shutdown-timeout` (duration)
@@ -834,43 +819,6 @@ Transaction fee, in nAVAX, for transactions that create new assets. Defaults to
`10000000` nAVAX (.01 AVAX) per transaction. This can only be changed on a local
network.
-#### `--create-subnet-tx-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that create new Avalanche L1s. Defaults to
-`1000000000` nAVAX (1 AVAX) per transaction. This can only be changed on a local
-network.
-
-#### `--create-blockchain-tx-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that create new blockchains.
-Defaults to `1000000000` nAVAX (1 AVAX) per transaction. This can only be
-changed on a local network.
-
-#### `--transform-subnet-tx-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that transform Avalanche L1s. Defaults to
-`1000000000` nAVAX (1 AVAX) per transaction. This can only be changed on a local network.
-
-#### `--add-primary-network-validator-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that add new primary network validators. Defaults to 0.
-This can only be changed on a local network.
-
-#### `--add-primary-network-delegator-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that add new primary network delegators. Defaults to 0.
-This can only be changed on a local network.
-
-#### `--add-subnet-validator-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that add new Avalanche L1 validators.
-Defaults to `10000000` nAVAX (.01 AVAX).
-
-#### `--add-subnet-delegator-fee` (int)
-
-Transaction fee, in nAVAX, for transactions that add new Avalanche L1 delegators.
-Defaults to `10000000` nAVAX (.01 AVAX).
-
#### `--min-delegator-stake` (int)
The minimum stake, in nAVAX, that can be delegated to a validator of the Primary Network.
@@ -1305,7 +1253,7 @@ Defaults to `0`.
Frequency to gossip peers to other nodes. Defaults to `1m`.
-#### ` --network-peer-read-buffer-size` (int)
+#### `--network-peer-read-buffer-size` (int)
Size of the buffer that peer messages are read into (there is one buffer per
peer), defaults to `8` KiB (8192 Bytes).
@@ -1358,7 +1306,7 @@ GiB).
#### `--plugin-dir` (string)
-Sets the directory for [VM plugins](/docs/virtual-machines). The default value is `$HOME/.avalanchego/plugins`.
+Sets the directory for [VM plugins](https://docs.avax.network/virtual-machines). The default value is `$HOME/.avalanchego/plugins`.
### Virtual Machine (VM) Configs
@@ -1403,4 +1351,3 @@ Node reports unhealthy if the router drops more than this portion of messages. D
Node reports unhealthy if there are more than this many outstanding consensus requests
(Get, PullQuery, etc.) over all chains. Defaults to `1024`.
-
diff --git a/content/docs/nodes/configure/subnet-configs.mdx b/content/docs/nodes/configure/subnet-configs.mdx
new file mode 100644
index 00000000000..42268caa3b4
--- /dev/null
+++ b/content/docs/nodes/configure/subnet-configs.mdx
@@ -0,0 +1,106 @@
+---
+title: Subnet Configurations
+description: This page describes the configuration options available for Subnets.
+---
+
+
+# Subnet Configs
+
+It is possible to provide parameters for a Subnet. Parameters here apply to all
+chains in the specified Subnet.
+
+AvalancheGo looks for files specified with `{subnetID}.json` under
+`--subnet-config-dir` as documented
+[here](https://github.com/nodes/configure/avalanchego-config-flags.md#subnet-configs).
+
+Here is an example of Subnet config file:
+
+```json
+{
+ "validatorOnly": false,
+ "consensusParameters": {
+ "k": 25,
+ "alpha": 18
+ }
+}
+```
+
+## Parameters
+
+### Private Subnet
+
+#### `validatorOnly` (bool)
+
+If `true` this node does not expose Subnet blockchain contents to non-validators
+via P2P messages. Defaults to `false`.
+
+Avalanche Subnets are public by default. It means that every node can sync and
+listen ongoing transactions/blocks in Subnets, even they're not validating the
+listened Subnet.
+
+Subnet validators can choose not to publish contents of blockchains via this
+configuration. If a node sets `validatorOnly` to true, the node exchanges
+messages only with this Subnet's validators. Other peers will not be able to
+learn contents of this Subnet from this node.
+
+:::tip
+This is a node-specific configuration. Every validator of this Subnet has to use
+this configuration in order to create a full private Subnet.
+
+:::
+
+#### `allowedNodes` (string list)
+
+If `validatorOnly=true` this allows explicitly specified NodeIDs to be allowed
+to sync the Subnet regardless of validator status. Defaults to be empty.
+
+:::tip
+This is a node-specific configuration. Every validator of this Subnet has to use
+this configuration in order to properly allow a node in the private Subnet.
+
+:::
+
+#### `proposerMinBlockDelay` (duration)
+
+The minimum delay performed when building snowman++ blocks. Default is set to 1 second.
+
+As one of the ways to control network congestion, Snowman++ will only build a
+block `proposerMinBlockDelay` after the parent block's timestamp. Some
+high-performance custom VM may find this too strict. This flag allows tuning the
+frequency at which blocks are built.
+
+### Consensus Parameters
+
+Subnet configs supports loading new consensus parameters. JSON keys are
+different from their matching `CLI` keys. These parameters must be grouped under
+`consensusParameters` key. The consensus parameters of a Subnet default to the
+same values used for the Primary Network, which are given [CLI Snow Parameters](https://github.com/nodes/configure/avalanchego-config-flags.md#snow-parameters).
+
+| CLI Key | JSON Key |
+| :------------------------------- | :-------------------- |
+| --snow-sample-size | k |
+| --snow-quorum-size | alpha |
+| --snow-commit-threshold | `beta` |
+| --snow-concurrent-repolls | concurrentRepolls |
+| --snow-optimal-processing | `optimalProcessing` |
+| --snow-max-processing | maxOutstandingItems |
+| --snow-max-time-processing | maxItemProcessingTime |
+| --snow-avalanche-batch-size | `batchSize` |
+| --snow-avalanche-num-parents | `parentSize` |
+
+### Gossip Configs
+
+It's possible to define different Gossip configurations for each Subnet without
+changing values for Primary Network. JSON keys of these
+parameters are different from their matching `CLI` keys. These parameters
+default to the same values used for the Primary Network. For more information
+see [CLI Gossip Configs](https://github.com/nodes/configure/avalanchego-config-flags.md#gossiping).
+
+| CLI Key | JSON Key |
+| :------------------------------------------------------ | :------------------------------------- |
+| --consensus-accepted-frontier-gossip-validator-size | gossipAcceptedFrontierValidatorSize |
+| --consensus-accepted-frontier-gossip-non-validator-size | gossipAcceptedFrontierNonValidatorSize |
+| --consensus-accepted-frontier-gossip-peer-size | gossipAcceptedFrontierPeerSize |
+| --consensus-on-accept-gossip-validator-size | gossipOnAcceptValidatorSize |
+| --consensus-on-accept-gossip-non-validator-size | gossipOnAcceptNonValidatorSize |
+| --consensus-on-accept-gossip-peer-size | gossipOnAcceptPeerSize |
diff --git a/content/docs/tooling/cli-commands.mdx b/content/docs/tooling/cli-commands.mdx
index 3284ff769b7..e5306e1cb53 100644
--- a/content/docs/tooling/cli-commands.mdx
+++ b/content/docs/tooling/cli-commands.mdx
@@ -2072,7 +2072,7 @@ avalanche network start [subcommand] [flags]
--num-nodes uint32 number of nodes to be created on local network (default 2)
--relayer-path string use this relayer binary path
--relayer-version string use this relayer version (default "latest-prerelease")
---snapshot-name string name of snapshot to use to start the network from (default "default-1654102509")
+--snapshot-name string name of snapshot to use to start the network from (default "default")
--config string config file (default is $HOME/.avalanche-cli/config.json)
--log-level string log level for the application (default "ERROR")
--skip-update-check skip check for new versions
@@ -2119,7 +2119,7 @@ avalanche network stop [subcommand] [flags]
```bash
--dont-save do not save snapshot, just stop the network
-h, --help help for stop
---snapshot-name string name of snapshot to use to save network state into (default "default-1654102509")
+--snapshot-name string name of snapshot to use to save network state into (default "default")
--config string config file (default is $HOME/.avalanche-cli/config.json)
--log-level string log level for the application (default "ERROR")
--skip-update-check skip check for new versions
diff --git a/package.json b/package.json
index 9d229115de3..40a795ae070 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"boring-name-generator": "^1.0.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
- "framer-motion": "^12.4.2",
+ "framer-motion": "^12.4.7",
"fumadocs-core": "14.6.0",
"fumadocs-mdx": "11.1.2",
"fumadocs-twoslash": "^2.0.2",
diff --git a/utils/content-loader/remote-content.mts b/utils/content-loader/remote-content.mts
index c2a28d6d87b..b4f6e2557ef 100644
--- a/utils/content-loader/remote-content.mts
+++ b/utils/content-loader/remote-content.mts
@@ -52,7 +52,31 @@ function replaceRelativeLinks(content: string, sourceBaseUrl: string): string {
}
function transformContent(content: string, customTitle: string, customDescription: string, sourceBaseUrl: string): string {
+ // Remove any existing frontmatter
+ content = content.replace(/^---\n[\s\S]*?\n---\n/, '');
+
+ // Remove the first heading as we'll use the frontmatter title
content = content.replace(/^#\s+.+\n/, '');
+
+ // Convert GitHub-flavored markdown to MDX-compatible syntax
+ content = content
+ // Convert note blocks to proper MDX format
+ .replace(/>\s*\[NOTE\]\s*(.*?)$/gm, ':::note\n$1\n:::')
+ .replace(/>\s*\[TIP\]\s*(.*?)$/gm, ':::tip\n$1\n:::')
+ // Handle note/warning/info blocks
+ .replace(/^:::(\s*note|tip|warning|info|caution)\s*$/gm, ':::$1')
+ // Convert image syntax to MDX-compatible format BEFORE handling other ! characters
+ .replace(/!\[(.*?)\]\((.*?)\)/g, '
')
+ // Convert admonitions to MDX callouts
+ .replace(/^!!!\s+(\w+)\s*\n/gm, ':::$1\n')
+ .replace(/^!!\s+(\w+)\s*\n/gm, '::$1\n')
+ // Convert any remaining ! at start of lines to text
+ .replace(/^!([^[{].*?)$/gm, '$1')
+ // Ensure proper spacing around HTML comments
+ .replace(//g, '{/* $1 */}')
+ // Handle any inline ! that might be causing issues
+ .replace(/([^`]|^)!([^[{])/g, '$1$2');
+
const title = customTitle || 'Untitled';
const description = customDescription || '';
@@ -189,6 +213,34 @@ async function main(): Promise {
description: "Complete list of Avalanche CLI commands and their usage.",
contentUrl: "https://github.com/ava-labs/avalanche-cli/blob/main/cmd/",
},
+ {
+ sourceUrl: "https://raw.githubusercontent.com/ava-labs/avalanchego/master/subnets/config.md",
+ outputPath: "content/docs/nodes/configure/subnet-configs.mdx",
+ title: "Subnet Configurations",
+ description: "This page describes the configuration options available for Subnets.",
+ contentUrl: "https://github.com/ava-labs/avalanchego/blob/master/subnets/",
+ },
+ {
+ sourceUrl: "https://raw.githubusercontent.com/ava-labs/avalanchego/master/vms/platformvm/config/config.md",
+ outputPath: "content/docs/nodes/configure/chain-configs/p-chain.mdx",
+ title: "P-Chain Configurations",
+ description: "This page describes the configuration options available for the P-Chain.",
+ contentUrl: "https://github.com/ava-labs/avalanchego/blob/master/vms/platformvm/config/",
+ },
+ {
+ sourceUrl: "https://raw.githubusercontent.com/ava-labs/avalanchego/master/vms/avm/config.md",
+ outputPath: "content/docs/nodes/configure/chain-configs/x-chain.mdx",
+ title: "X-Chain Configurations",
+ description: "This page describes the configuration options available for the X-Chain.",
+ contentUrl: "https://github.com/ava-labs/avalanchego/blob/master/vms/avm/",
+ },
+ {
+ sourceUrl: "https://raw.githubusercontent.com/ava-labs/avalanchego/master/config/config.md",
+ outputPath: "content/docs/nodes/configure/configs-flags.mdx",
+ title: "AvalancheGo Config Flags",
+ description: "This page lists all available configuration options for AvalancheGo nodes.",
+ contentUrl: "https://github.com/ava-labs/avalanchego/blob/master/config/",
+ },
];
for (const fileConfig of fileConfigs) {