Skip to content
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
2 changes: 1 addition & 1 deletion docs/infrastructure/installation/capacity-planning.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ advisory_delete=0

Adjust the `path` to the directory where you want to keep the ledger store on disk. Adjust the `online_delete` and `advisory_delete` settings as desired for your configuration. For more details about these settings, see [Configure Online Deletion](../configuration/data-retention/configure-online-deletion.md) and [Configure Advisory Deletion](../configuration/data-retention/configure-advisory-deletion.md).

NuDB uses a 4096-byte (4K) block size by default. You can change the block size with the optional `nudb_block_size` field, using any power of 2 between `4096` and `32768` bytes. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %}
NuDB uses a 4096-byte (4K) block size by default. You can change the block size with the optional `nudb_block_size` field, using any power of 2 between `4096` and `32768` bytes. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %}

Test non-default block sizes to find what works best for your hardware before using them in production.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Retrieve the [Amendments entry][], which contains a list of all enabled amendmen

| Field | Type | Required? | Description |
|:-------------|:------------------|:----------|:------------|
| `amendments` | Boolean or String | Yes | Specify `true` to retrieve the `Amendments` entry, or provide its [ledger entry ID][] as a string, which is always `7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `amendments` | Boolean or String | Yes | Specify `true` to retrieve the `Amendments` entry, or provide its [ledger entry ID][] as a string, which is always `7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |

{% admonition type="info" name="Note" %}
As an alternative, you can specify `"index": "amendments"` to look up this entry. This shortcut requires [API version](../../index.md#api-versioning) 3 or higher.
Expand Down Expand Up @@ -642,7 +642,7 @@ Retrieve the [FeeSettings entry][], which contains the current base [transaction

| Field | Type | Required? | Description |
|:------|:------------------|:----------|:------------|
| `fee` | Boolean or String | Yes | Specify `true` to retrieve the `FeeSettings` entry, or provide its [ledger entry ID][] as a string, which is always `4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `fee` | Boolean or String | Yes | Specify `true` to retrieve the `FeeSettings` entry, or provide its [ledger entry ID][] as a string, which is always `4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |

{% admonition type="info" name="Note" %}
As an alternative, you can specify `"index": "fee"` to look up this entry. This shortcut requires [API version](../../index.md#api-versioning) 3 or higher.
Expand Down Expand Up @@ -690,7 +690,7 @@ Retrieve a [LedgerHashes entry][], which contains a history of prior ledgers tha

| Field | Type | Required? | Description |
|:---------|:---------------------------|:----------|:------------|
| `hashes` | Boolean, Number, or String | Yes | Specify `true` to retrieve the recent-history `LedgerHashes` entry, whose [ledger entry ID][] is always `B4979A36CDC7F3D3D5C31A4EAE2AC7D7209DDA877588B9AFC66799692AB0D66B`. To retrieve an older entry, specify a [ledger index][] (Number) to look up the `LedgerHashes` entry that records that ledger's hash. You can also provide a [ledger entry ID][] directly as a string. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `hashes` | Boolean, Number, or String | Yes | Specify `true` to retrieve the recent-history `LedgerHashes` entry, whose [ledger entry ID][] is always `B4979A36CDC7F3D3D5C31A4EAE2AC7D7209DDA877588B9AFC66799692AB0D66B`. To retrieve an older entry, specify a [ledger index][] (Number) to look up the `LedgerHashes` entry that records that ledger's hash. You can also provide a [ledger entry ID][] directly as a string. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |

{% admonition type="info" name="Note" %}
As an alternative, you can specify `"index": "hashes"` to look up the recent-history entry. This shortcut requires [API version](../../index.md#api-versioning) 3 or higher.
Expand Down Expand Up @@ -979,7 +979,7 @@ Retrieve the [NegativeUNL entry][], which contains the current status of the [Ne

| Field | Type | Required? | Description |
|:-------|:------------------|:----------|:------------|
| `nunl` | Boolean or String | Yes | Specify `true` to retrieve the `NegativeUNL` entry, or provide its [ledger entry ID][] as a string, which is always `2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `nunl` | Boolean or String | Yes | Specify `true` to retrieve the `NegativeUNL` entry, or provide its [ledger entry ID][] as a string, which is always `2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |

{% admonition type="info" name="Note" %}
As an alternative, you can specify `"index": "nunl"` to look up this entry. This shortcut requires [API version](../../index.md#api-versioning) 3 or higher.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ labels:

The `server_definitions` command returns an SDK-compatible `definitions.json`, generated from the `rippled` instance currently running. You can use this to query a node in a network, quickly receiving the definitions necessary to serialize/deserialize its binary data.

The response also includes the `TRANSACTION_FORMATS`, `LEDGER_ENTRY_FORMATS`, `TRANSACTION_FLAGS`, `LEDGER_ENTRY_FLAGS`, and `ACCOUNT_SET_FLAGS` sections, which describe the fields and flags of each transaction and ledger object type. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %}
The response also includes the `TRANSACTION_FORMATS`, `LEDGER_ENTRY_FORMATS`, `TRANSACTION_FLAGS`, `LEDGER_ENTRY_FLAGS`, and `ACCOUNT_SET_FLAGS` sections, which describe the fields and flags of each transaction and ledger entry type. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %}

You can also generate the same definitions without a running server using the [`--definitions`](../../../../infrastructure/commandline-usage.md) command-line flag.

Expand Down
22 changes: 11 additions & 11 deletions docs/references/protocol/binary-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The process of serializing a transaction from JSON or any other representation i

The result is a single binary blob that can be signed using well-known signature algorithms such as ECDSA (with the secp256k1 elliptic curve) and Ed25519. For purposes of the XRP Ledger, you must also [hash][Hash] the data with the appropriate prefix (`0x53545800` if single-signing, or `0x534D5400` if multi-signing). After signing, you must re-serialize the transaction with the `TxnSignature` field included. <!--{# TODO: link docs on how to compute a transaction signature. #}-->

{% admonition type="info" name="Note" %}The XRP Ledger uses the same serialization format to represent other types of data, such as [ledger objects](ledger-data/ledger-entry-types/index.md) and processed transactions. However, only certain fields are appropriate for including in a transaction that gets signed. (For example, the `TxnSignature` field, containing the signature itself, should not be present in the binary blob that you sign.) Thus, some fields are designated as "Signing" fields, which are included in objects when those objects are signed, and "non-signing" fields, which are not.{% /admonition %}
{% admonition type="info" name="Note" %}The XRP Ledger uses the same serialization format to represent other types of data, such as [ledger entries](ledger-data/ledger-entry-types/index.md) and processed transactions. However, only certain fields are appropriate for including in a transaction that gets signed. (For example, the `TxnSignature` field, containing the signature itself, should not be present in the binary blob that you sign.) Thus, some fields are designated as "Signing" fields, which are included in objects when those objects are signed, and "non-signing" fields, which are not.{% /admonition %}

### Examples

Expand Down Expand Up @@ -73,15 +73,15 @@ The following table defines the top-level fields from the definitions file:
| Field | Contents |
|:-----------------------|:------------------------------------------------------|
| `TYPES` | Map of data types to their ["type code"](#type-codes) for constructing field IDs and sorting fields in canonical order. Codes below 1 should not appear in actual data; codes above 10000 represent special "high-level" object types such as "Transaction" that cannot be serialized inside other objects. See the [Type List](#type-list) for details of how to serialize each type. |
| `LEDGER_ENTRY_TYPES` | Map of [ledger objects](ledger-data/ledger-entry-types/index.md) to their data type. These appear in ledger state data, and in the "affected nodes" section of processed transactions' [metadata](transactions/metadata.md). |
| `FIELDS` | A sorted array of tuples representing all fields that may appear in transactions, ledger objects, or other data. The first member of each tuple is the string name of the field and the second member is an object with that field's properties. (See [Field properties](#field-properties) for definitions of those fields.) |
| `LEDGER_ENTRY_TYPES` | Map of [ledger entries](ledger-data/ledger-entry-types/index.md) to their data type. These appear in ledger state data, and in the "affected nodes" section of processed transactions' [metadata](transactions/metadata.md). |
| `FIELDS` | A sorted array of tuples representing all fields that may appear in transactions, ledger entries, or other data. The first member of each tuple is the string name of the field and the second member is an object with that field's properties. (See [Field properties](#field-properties) for definitions of those fields.) |
| `TRANSACTION_RESULTS` | Map of [transaction result codes](transactions/transaction-results/index.md) to their numeric values. Result types not included in ledgers have negative values; `tesSUCCESS` has numeric value 0; [`tec`-class codes](transactions/transaction-results/tec-codes.md) represent failures that are included in ledgers. |
| `TRANSACTION_TYPES` | Map of all [transaction types](transactions/types/index.md) to their numeric values. |
| `TRANSACTION_FORMATS` | Map of each [transaction type](transactions/types/index.md) to an array of objects describing that type's fields and whether each is required. (See [Format field objects](#format-field-objects) for the properties of each object.) {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `LEDGER_ENTRY_FORMATS` | Map of each [ledger object type](ledger-data/ledger-entry-types/index.md) to an array of objects describing that type's fields and whether each is required. (See [Format field objects](#format-field-objects) for the properties of each object.) {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `TRANSACTION_FLAGS` | Map of each [transaction type](transactions/types/index.md) to an object mapping the names of its supported [transaction flags](transactions/common-fields.md#flags-field) to their numeric values. The `universal` entry lists the flags that apply to all transaction types. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `LEDGER_ENTRY_FLAGS` | Map of each [ledger object type](ledger-data/ledger-entry-types/index.md) to an object mapping the names of that type's flags to their numeric values. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `ACCOUNT_SET_FLAGS` | Map of [AccountSet flag](transactions/types/accountset.md#accountset-flags) (`asf`) names to their numeric values, for use in the `SetFlag` and `ClearFlag` fields of an [AccountSet transaction](transactions/types/accountset.md). {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: rippled 3.2.0{% /badge %} |
| `TRANSACTION_FORMATS` | Map of each [transaction type](transactions/types/index.md) to an array of objects describing that type's fields and whether each is required. (See [Format field objects](#format-field-objects) for the properties of each object.) {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |
| `LEDGER_ENTRY_FORMATS` | Map of each [ledger entry type](ledger-data/ledger-entry-types/index.md) to an array of objects describing that type's fields and whether each is required. (See [Format field objects](#format-field-objects) for the properties of each object.) {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |
| `TRANSACTION_FLAGS` | Map of each [transaction type](transactions/types/index.md) to an object mapping the names of its supported [transaction flags](transactions/common-fields.md#flags-field) to their numeric values. The `universal` entry lists the flags that apply to all transaction types. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |
| `LEDGER_ENTRY_FLAGS` | Map of each [ledger entry type](ledger-data/ledger-entry-types/index.md) to an object mapping the names of that type's flags to their numeric values. {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |
| `ACCOUNT_SET_FLAGS` | Map of [AccountSet flag](transactions/types/accountset.md#accountset-flags) (`asf`) names to their numeric values, for use in the `SetFlag` and `ClearFlag` fields of an [AccountSet transaction](transactions/types/accountset.md). {% badge href="https://github.com/XRPLF/rippled/releases/tag/3.2.0" %}New in: xrpld 3.2.0{% /badge %} |

For purposes of serializing transactions for signing and submitting, the `FIELDS`, `TYPES`, and `TRANSACTION_TYPES` fields are necessary.

Expand All @@ -99,12 +99,12 @@ The field definition objects in the `FIELDS` array have the following fields:

#### Format field objects

Each `TRANSACTION_FORMATS` and `LEDGER_ENTRY_FORMATS` array contains one entry per field specific to that transaction or ledger object type. Each entry has these properties:
Each `TRANSACTION_FORMATS` and `LEDGER_ENTRY_FORMATS` array contains one entry per field specific to that transaction or ledger entry type. Each entry has these properties:

| Field | Type | Contents |
|:--------------|:-------|:--------------------------------------------------|
| `name` | String | The name of the field. This matches the field name in the `FIELDS` array. |
| `optionality` | Number | A code indicating whether the field is required when creating this transaction or ledger object type. (See [Optionality values](#optionality-values) for the meaning of each value.) |
| `optionality` | Number | A code indicating whether the field is required when creating this transaction or ledger entry type. (See [Optionality values](#optionality-values) for the meaning of each value.) |

#### Optionality values

Expand Down Expand Up @@ -224,7 +224,7 @@ Transactions and ledger entries may contain fields of any of the following types

In the `rippled` source code, some types have an "ST" prefix, which stands for "serialized type". This separates the type definition in the XRP Ledger protocol from data types that may be defined at the programming language level such as arrays or objects.

In addition to all of the above field types, the following types may appear in other contexts, such as [ledger objects](ledger-data/ledger-entry-types/index.md) and [transaction metadata](transactions/metadata.md):
In addition to all of the above field types, the following types may appear in other contexts, such as [ledger entries](ledger-data/ledger-entry-types/index.md) and [transaction metadata](transactions/metadata.md):

| Type Name | Type Code | [Length-prefixed]? | Description |
|:------------|:----------|:-------------------|:------------------------------|
Expand Down