Negative UNL: expand on references, correct concept

This commit is contained in:
mDuo13
2020-10-09 19:29:33 -07:00
parent 1719dde391
commit 15b15b7ac0
11 changed files with 271 additions and 32 deletions

View File

@@ -3,7 +3,7 @@
(Not to be confused with the ["ledger hash" string data type][Hash], which uniquely identifies a ledger version. This section describes the `LedgerHashes` ledger object type.)
The `LedgerHashes` object type contains a history of prior ledgers that led up to this ledger version, in the form of their hashes. Objects of this ledger type are modified automatically in the process of closing a ledger. (This is the only time the ledger's "state" tree is modified without a transaction or pseudo-transaction.) The `LedgerHashes` objects exist to make it possible to look up a previous ledger's hash with only the current ledger version and at most one lookup of a previous ledger version.
The `LedgerHashes` object type contains a history of prior ledgers that led up to this ledger version, in the form of their hashes. Objects of this ledger type are modified automatically in the process of closing a ledger. (This is one of the only times a ledger's state data is modified without a [transaction](transaction-basics.html) or [pseudo-transaction](pseudo-transaction-types.html).) The `LedgerHashes` objects exist to make it possible to look up a previous ledger's hash with only the current ledger version and at most one lookup of a previous ledger version.
There are two kinds of `LedgerHashes` object. Both types have the same fields. Each ledger version contains:

View File

@@ -0,0 +1,61 @@
---
html: negativeunl.html
funnel: Build
doc_type: References
supercategory: rippled API
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: List of validators currently believed to be offline.
---
# NegativeUNL
The `NegativeUNL` object type contains the current status of the [Negative UNL](negative-unl.html), a list of trusted validators currently believed to be offline.
Each ledger version contains **at most one** `NegativeUNL` object. If no validators are currently disabled or scheduled to be disabled, there is no `NegativeUNL` object in the ledger.
## Example {{currentpage.name}} JSON
```json
{
"DisabledValidators": [
{
"DisabledValidator": {
"FirstLedgerSequence": 1609728,
"PublicKey": "ED6629D456285AE3613B285F65BBFF168D695BA3921F309949AFCD2CA7AFEC16FE"
}
}
],
"Flags": 0,
"LedgerEntryType": "NegativeUNL",
"index": "2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244"
}
```
A `NegativeUNL` object has the following fields:
| Name | JSON Type | [Internal Type][] | Description |
|:----------------------|:----------|:------------------|:---------------------|
| `LedgerEntryType` | String | UInt16 | The value `0x004E`, mapped to the string `NegativeUNL`, indicates that this object is the Negative UNL. |
| `DisabledValidators` | Array | Array | _(May be omitted)_ A list of `DisabledValidator` objects (see below), each representing a trusted validator that is currently disabled. |
| `ValidatorToDisable` | String | Blob | _(May be omitted)_ The public key of a trusted validator that is scheduled to be disabled in the next flag ledger. |
| `ValidatorToReEnable` | String | Blob | _(May be omitted)_ The public key of a trusted validator in the Negative UNL that is scheduled to be re-enabled in the next flag ledger. |
## DisabledValidator Objects
Each DisabledValidator Object represents one disabled validator. In JSON, a DisabledValidator object has one field, `DisabledValidator`, which in turn contains another object with the following fields:
| Name | JSON Type | [Internal Type][] | Description |
|:----------------------|:----------|:------------------|:---------------------|
| `FirstLedgerSequence` | Number | UInt32 | The [ledger index][] when the validator was added to the Negative UNL. |
| `PublicKey` | String | Blob | The master public key of the validator, in hexadecimal. |
## NegativeUNL ID Format
The `NegativeUNL` object ID is the hash of the `NegativeUNL` space key (`0x004E`) only. This means that the ID of the `NegativeUNL` object in a ledger is always:
```
2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244
```

View File

@@ -1,19 +1,42 @@
# EnableAmendment
Tracks the progress of the [amendment process](amendments.html#amendment-process) for changes in transaction processing. This can indicate that a proposed amendment gained or lost majority approval, or that an amendment has been enabled.
An `EnableAmendment` [pseudo-transaction](pseudo-transaction-types.html) marks a change in status of an [amendment](amendments.html) to the XRP Ledger protocol, including:
- A proposed amendment gained supermajority approval from validators.
- A proposed amendment lost supermajority approval.
- A proposed amendment has been enabled.
**Note:** You cannot send a pseudo-transaction, but you may find one when processing ledgers.
## Example {{currentpage.name}} JSON
```json
{
"Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
"Amendment": "42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE",
"Fee": "0",
"LedgerSequence": 21225473,
"Sequence": 0,
"SigningPubKey": "",
"TransactionType": "EnableAmendment"
}
```
{% include '_snippets/pseudo-tx-fields-intro.md' %}
<!--{# fix md highlighting_ #}-->
| Field | JSON Type | [Internal Type][] | Description |
|:-----------------|:----------|:------------------|:--------------------------|
| `Amendment` | String | Hash256 | A unique identifier for the amendment. This is not intended to be a human-readable name. See [Amendments](amendments.html) for a list of known amendments. |
| `LedgerSequence` | Number | UInt32 | The index of the ledger version where this amendment appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
| `LedgerSequence` | Number | UInt32 | The [ledger index][] where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
## EnableAmendment Flags
The `Flags` value of the EnableAmendment pseudo-transaction indicates the status of the amendment at the time of the ledger including the pseudo-transaction.
A `Flags` value of `0` (no flags) indicates that the amendment has been enabled, and applies to all ledgers afterward. Other `Flags` values are as follows:
A `Flags` value of `0` (no flags) or an omitted `Flags` field indicates that the amendment has been enabled, and applies to all ledgers afterward. Other `Flags` values are as follows:
| Flag Name | Hex Value | Decimal Value | Description |
|:-----------------|:-------------|:--------------|:---------------------------|

View File

@@ -1,13 +1,25 @@
# Pseudo-Transactions
Pseudo-Transactions are never submitted by users, nor propagated through the network. Instead, a server may choose to inject them in a proposed ledger directly. If enough servers inject an equivalent pseudo-transaction for it to pass consensus, then it becomes included in the ledger, and appears in ledger data thereafter.
Pseudo-transactions are never submitted by users, nor [propagated through the network](peer-protocol.html). Instead, a server may choose to inject pseudo-transactions in a proposed ledger directly according to specific protocol rules. If enough servers inject an identical pseudo-transaction for it to be approved by the [consensus process](consensus.html), then the pseudo-transaction becomes included in the ledger, and appears in ledger data thereafter.
Some of the fields that are mandatory for normal transactions do not make sense for pseudo-transactions. In those cases, the pseudo-transaction has the following default values:
## Special Values for Common Fields
| Field | Default Value |
|:----------------|:--------------------------------------------------|
| `Account` | [ACCOUNT_ZERO](accounts.html#special-addresses) |
| `Sequence` | `0` |
| `Fee` | `0` |
| `SigningPubKey` | `""` |
| `Signature` | `""` |
Some of the required [common fields][] for normal transactions do not make sense for pseudo-transactions. Pseudo-transactions use following special values for these common fields:
| Field | JSON Type | [Internal Type][] | Value |
|:----------------|:----------|:------------------|:---------------------------|
| `Account` | String | AccountID | [ACCOUNT_ZERO](accounts.html#special-addresses) |
| `Fee` | String | Amount | `0` |
| `Sequence` | Number | UInt32 | `0` |
| `SigningPubKey` | String | Blob | `""` (Empty string) |
| `SigningPubKey` | String | Blob | `""` (Empty string) |
Pseudo-transactions use the following common fields as normal:
- `TransactionType`
- `Flags`
| Field | JSON Type | [Internal Type][] | Description |
|:------------------|:----------|:------------------|:-------------------------|
| `TransactionType` | String | UInt16 | _(Required)_ The type of transaction. |
| `Flags` | Number | UInt32 | _(Optional)_ A set of bit-flags for this transaction. The meaning of specific flags varies based on the transaction type. |

View File

@@ -1,10 +1,12 @@
# SetFee
A change in [transaction cost](transaction-cost.html) or [account reserve](reserves.html) requirements as a result of [Fee Voting](fee-voting.html).
A `SetFee` [pseudo-transaction](pseudo-transaction-types.html) marks a change in [transaction cost](transaction-cost.html) or [reserve requirements](reserves.html) as a result of [Fee Voting](fee-voting.html).
**Note:** You cannot send a pseudo-transaction, but you may find one when processing ledgers.
```
## Example {{currentpage.name}} JSON
```json
{
"Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
"BaseFee": "000000000000000A",
@@ -18,9 +20,12 @@ A change in [transaction cost](transaction-cost.html) or [account reserve](reser
"date": 439578860,
"hash": "1C15FEA3E1D50F96B6598607FC773FF1F6E0125F30160144BE0C5CBC52F5151B",
"ledger_index": 3721729,
}
}
```
{% include '_snippets/pseudo-tx-fields-intro.md' %}
<!--{# fix md highlighting_ #}-->
| Field | JSON Type | [Internal Type][] | Description |
|:--------------------|:-----------------|:------------------|:----------------|
| `BaseFee` | String | UInt64 | The charge, in drops of XRP, for the reference transaction, as hex. (This is the [transaction cost](transaction-cost.html) before scaling for load.) |

View File

@@ -0,0 +1,38 @@
# UNLModify
A `UNLModify` [pseudo-transaction](pseudo-transaction-types.html) marks a change to the [Negative UNL](negative-unl.html), indicating that a trusted validator has gone offline or come back online.
**Note:** You cannot send a pseudo-transaction, but you may find one when processing ledgers.
## Example {{currentpage.name}} JSON
```json
{
"Account": "",
"Fee": "0",
"LedgerSequence": 1600000,
"Sequence": 0,
"SigningPubKey": "",
"TransactionType": "UNLModify",
"UNLModifyDisabling": 1,
"UNLModifyValidator": "ED6629D456285AE3613B285F65BBFF168D695BA3921F309949AFCD2CA7AFEC16FE",
}
```
## {{currentpage.name}} Fields
{% include '_snippets/pseudo-tx-fields-intro.md' %}
<!--{# fix md highlighting_ #}-->
| Name | JSON Type | [Internal Type][] | Description |
|:---------------------|:----------|:------------------|:----------------------|
| `TransactionType` | String | UInt16 | The value `0x0066`, mapped to the string `UNLModify`, indicates that this object is an `UNLModify` pseudo-transaction. |
| `LedgerSequence` | Number | UInt32 | The [ledger index][] where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
| `UNLModifyDisabling` | Number | UInt8 | If `1`, this change represents adding a validator to the Negative UNL. If `0`, this change represents removing a validator from the Negative UNL. (No other values are allowed.) |
| `UNLModifyValidator` | String | Blob | The validator to add or remove, as identified by its master public key. |
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}