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

Federiconardelli7/issue2068 remote content loading #2119

Merged
Merged
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
5 changes: 0 additions & 5 deletions content/docs/api-reference/x-chain/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

:::
Expand Down Expand Up @@ -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).

:::
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).

:::
Expand Down Expand Up @@ -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).

:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion content/docs/cross-chain/teleporter/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ The `ITeleporterReceiver` interface provides a single method. All contracts that

## Data Flow

![image showing teleporter data flow diagram from L1A to L1B](/images/teleporter-data-flow-diagram.png)
<div align="center">
<img src="https://github.com/ava-labs/icm-contracts/blob/main/resources/TeleporterDataFlowDiagram.png?raw=true"/>
</div>

## Properties

Expand Down
2 changes: 1 addition & 1 deletion content/docs/cross-chain/teleporter/upgradeability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Using specific version:
ITeleporterMessenger teleporter = teleporterRegistry
.getTeleporterFromVersion($VERSION);
require(
!pausedTeleporterAddresses[address(teleporter)],
pausedTeleporterAddresses[address(teleporter)],
"TeleporterRegistryApp: Teleporter sending version paused"
);

Expand Down
225 changes: 225 additions & 0 deletions content/docs/nodes/configure/chain-configs/p-chain.mdx
Original file line number Diff line number Diff line change
@@ -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).
60 changes: 60 additions & 0 deletions content/docs/nodes/configure/chain-configs/x-chain.mdx
Original file line number Diff line number Diff line change
@@ -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`.
Loading
Loading