Skip to content

Commit

Permalink
alphabetize with new endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
meaghanfitzgerald committed Jan 14, 2025
1 parent 4b2b686 commit 8716b5d
Showing 1 changed file with 137 additions and 134 deletions.
271 changes: 137 additions & 134 deletions vms/platformvm/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -807,16 +807,16 @@ curl -X POST --data '{

```json
{
"jsonrpc": "2.0",
"result": {
"weights": [1,1000,1000,4],
"maxCapacity": 1000000,
"maxPerSecond": 100000,
"targetPerSecond": 50000,
"minPrice": 1,
"excessConversionConstant": 2164043
},
"id": 1
"jsonrpc": "2.0",
"result": {
"weights": [1, 1000, 1000, 4],
"maxCapacity": 1000000,
"maxPerSecond": 100000,
"targetPerSecond": 50000,
"minPrice": 1,
"excessConversionConstant": 2164043
},
"id": 1
}
```

Expand Down Expand Up @@ -850,75 +850,27 @@ curl -X POST --data '{

```json
{
"jsonrpc": "2.0",
"result": {
"capacity":973044,
"excess":26956,
"price":1,
"timestamp":"2024-12-16T17:19:07Z"
},
"id": 1
"jsonrpc": "2.0",
"result": {
"capacity": 973044,
"excess": 26956,
"price": 1,
"timestamp": "2024-12-16T17:19:07Z"
},
"id": 1
}
```

### `platform.getValidatorFeeConfig`
### `platform.getHeight`

Returns the validator fee configuration of the P-chain.
Returns the height of the last accepted block.

**Signature:**

```
platform.getValidatorFeeConfig() -> {
capacity: uint64,
target: uint64,
minPrice: uint64,
excessConversionConstant: uint64
}
```

- `capacity` is the maximum number of L1 validators the chain is allowed to have at any given time
- `target` is the target number of L1 validators the chain should have to keep fees stable
- `minPrice` is the minimum price per L1 validator
- `excessConversionConstant` is used to convert excess L1 validators to a gas price

**Example Call:**

```sh
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getValidatorFeeConfig",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
```

**Example Response:**

```json
platform.getHeight() ->
{
"jsonrpc": "2.0",
"result": {
"capacity": 20000,
"target": 10000,
"targetPerSecond": 50000,
"minPrice": 512,
"excessConversionConstant": 1246488515
},
"id": 1
}
```

### `platform.getValidatorFeeState`

Returns the current validator fee state of the P-chain.

**Signature:**

```
platform.getValidatorFeeState() -> {
excess: uint64,
price: uint64,
timestamp: string
height: int,
}
```

Expand All @@ -927,7 +879,7 @@ platform.getValidatorFeeState() -> {
```sh
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getValidatorFeeState",
"method": "platform.getHeight",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
Expand All @@ -937,13 +889,11 @@ curl -X POST --data '{

```json
{
"jsonrpc": "2.0",
"result": {
"excess":26956,
"price":512,
"timestamp":"2024-12-16T17:19:07Z"
},
"id": 1
"jsonrpc": "2.0",
"result": {
"height": "56"
},
"id": 1
}
```

Expand Down Expand Up @@ -1004,64 +954,28 @@ curl -X POST --data '{

**Example Response:**

```json
{
"jsonrpc": "2.0",
"result": {
"subnetID": "2DeHa7Qb6sufPkmQcFWG2uCd4pBPv9WB6dkzroiMQhd1NSRtof",
"nodeID": "NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg",
"publicKey": "0x900c9b119b5c82d781d4b49be78c3fc7ae65f2b435b7ed9e3a8b9a03e475edff86d8a64827fec8db23a6f236afbf127d",
"remainingBalanceOwner": {
"locktime": "0",
"threshold": "0",
"addresses": []
},
"deactivationOwner": {
"locktime": "0",
"threshold": "0",
"addresses": []
},
"startTime": "1731445206",
"weight": "49463",
"minNonce": "0",
"balance": "1000000000",
"height": "3"
},
"id": 1
}
```

### `platform.getHeight`

Returns the height of the last accepted block.

**Signature:**

```
platform.getHeight() ->
{
height: int,
}
```

**Example Call:**

```sh
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getHeight",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
```

**Example Response:**

```json
{
"jsonrpc": "2.0",
"result": {
"height": "56"
"subnetID": "2DeHa7Qb6sufPkmQcFWG2uCd4pBPv9WB6dkzroiMQhd1NSRtof",
"nodeID": "NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg",
"publicKey": "0x900c9b119b5c82d781d4b49be78c3fc7ae65f2b435b7ed9e3a8b9a03e475edff86d8a64827fec8db23a6f236afbf127d",
"remainingBalanceOwner": {
"locktime": "0",
"threshold": "0",
"addresses": []
},
"deactivationOwner": {
"locktime": "0",
"threshold": "0",
"addresses": []
},
"startTime": "1731445206",
"weight": "49463",
"minNonce": "0",
"balance": "1000000000",
"height": "3"
},
"id": 1
}
Expand Down Expand Up @@ -1535,7 +1449,10 @@ curl -X POST --data '{
"jsonrpc": "2.0",
"result": {
"isPermissioned": true,
"controlKeys": ["P-fuji1ztvstx6naeg6aarfd047fzppdt8v4gsah88e0c","P-fuji193kvt4grqewv6ce2x59wnhydr88xwdgfcedyr3"],
"controlKeys": [
"P-fuji1ztvstx6naeg6aarfd047fzppdt8v4gsah88e0c",
"P-fuji193kvt4grqewv6ce2x59wnhydr88xwdgfcedyr3"
],
"threshold": "1",
"locktime": "0",
"subnetTransformationTxID": "11111111111111111111111111111111LpoYY",
Expand Down Expand Up @@ -2061,7 +1978,7 @@ platform.getValidatorsAt(
```

- `height` is the P-Chain height to get the validator set at, or the string literal "proposed"
to return the validator set at this node's ProposerVM height.
to return the validator set at this node's ProposerVM height.
- `subnetID` is the Subnet ID to get the validator set of. If not given, gets validator set of the
Primary Network.

Expand Down Expand Up @@ -2096,6 +2013,92 @@ curl -X POST --data '{
}
```

### `platform.getValidatorFeeConfig`

Returns the validator fee configuration of the P-chain.

**Signature:**

```
platform.getValidatorFeeConfig() -> {
capacity: uint64,
target: uint64,
minPrice: uint64,
excessConversionConstant: uint64
}
```

- `capacity` is the maximum number of L1 validators the chain is allowed to have at any given time
- `target` is the target number of L1 validators the chain should have to keep fees stable
- `minPrice` is the minimum price per L1 validator
- `excessConversionConstant` is used to convert excess L1 validators to a gas price

**Example Call:**

```sh
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getValidatorFeeConfig",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
```

**Example Response:**

```json
{
"jsonrpc": "2.0",
"result": {
"capacity": 20000,
"target": 10000,
"targetPerSecond": 50000,
"minPrice": 512,
"excessConversionConstant": 1246488515
},
"id": 1
}
```

### `platform.getValidatorFeeState`

Returns the current validator fee state of the P-chain.

**Signature:**

```
platform.getValidatorFeeState() -> {
excess: uint64,
price: uint64,
timestamp: string
}
```

**Example Call:**

```sh
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getValidatorFeeState",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P
```

**Example Response:**

```json
{
"jsonrpc": "2.0",
"result": {
"excess": 26956,
"price": 512,
"timestamp": "2024-12-16T17:19:07Z"
},
"id": 1
}
```

### `platform.issueTx`

Issue a transaction to the Platform Chain.
Expand Down

0 comments on commit 8716b5d

Please sign in to comment.