mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
Ledger formats: improve landing page, etc.
This commit is contained in:
16
content/_snippets/macros/page-children.md
Normal file
16
content/_snippets/macros/page-children.md
Normal file
@@ -0,0 +1,16 @@
|
||||
{% macro page_children(pg, depth, max_depth, show_blurbs) %}
|
||||
{% if pg.children %}
|
||||
{% if depth == 1 %}<ul class="children-display">{% endif %}
|
||||
{% for child in pg.children %}
|
||||
<li class="level-{{depth}}"><a href="{{child.html}}">{{child.name}}</a>
|
||||
{% if child.status == "not_enabled" %}:not_enabled:{% endif %}
|
||||
<p class="blurb child-blurb">{{child.blurb}}</p>
|
||||
</li>
|
||||
{% if child.children and depth < max_depth %}
|
||||
{{ page_children(child, depth+1, max_depth, show_blurbs) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if depth == 1 %}</ul><!--/.children-display-->{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -21,7 +21,7 @@
|
||||
[Ledger Index]: basic-data-types.html#ledger-index
|
||||
[ledger index]: basic-data-types.html#ledger-index
|
||||
[レジャーインデックス]: basic-data-types.html#レジャーインデックス
|
||||
[ledger format]: ledger-data-formats.html
|
||||
[ledger format]: ledger-object-types.html
|
||||
[レジャーフォーマット]: ledger-data-formats.html
|
||||
[Marker]: markers-and-pagination.html
|
||||
[マーカー]: markers-and-pagination.html
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
html: ledger-data-formats.html
|
||||
funnel: Build
|
||||
doc_type: References
|
||||
supercategory: rippled API
|
||||
category: Ledger Data Formats
|
||||
blurb: Learn about individual data objects that comprise the XRP Ledger's shared state.
|
||||
---
|
||||
# Ledger Data Formats
|
||||
|
||||
Each [ledger version](ledgers.html) in the XRP Ledger is made up of three parts:
|
||||
|
||||
- **[Ledger Header](ledger-header.html)**: Metadata about this ledger version itself.
|
||||
- **[Transaction Set](transaction-formats.html)**: All the transactions that were executed to create this ledger version.
|
||||
- **[State Data](ledger-object-types.html)**: The complete record of objects representing accounts, settings, and balances as of this ledger version. (This is also called the "account state".)
|
||||
|
||||
## State Data
|
||||
|
||||
The ledger's state data consists of objects, or _ledger entries_, stored in a trie format. To store or retrieve an object in the state data, the protocol uses that object's unique **[Ledger Object ID](ledger-object-ids.html)**.
|
||||
|
||||
A ledger object's data fields depend on the type of object; the XRP Ledger supports the following types:
|
||||
|
||||
{% from '_snippets/macros/page-children.md' import page_children with context %}
|
||||
{{ page_children(pages|selectattr("html", "eq", "ledger-object-types.html")|first, 1, 1, True) }}
|
||||
@@ -1,7 +1,7 @@
|
||||
# Ledger Header
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/ledger/ReadView.h#L71 "Source")
|
||||
|
||||
Every ledger version has a unique header that describes the contents. You can look up a ledger's header information with the [ledger method][]. The contents of the ledger header are as follows:
|
||||
Every [ledger version](ledger-data-formats.html) has a unique header that describes the contents. You can look up a ledger's header information with the [ledger method][]. The contents of the ledger header are as follows:
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-----------------------------|:----------|:------------------|:--------------|
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
# Ledger Object IDs
|
||||
<a id="sha512half"></a>
|
||||
|
||||
All objects in a ledger's state tree have a unique ID. This field is returned as the `index` field in JSON, at the same level as the object's contents. The ID is derived by hashing important contents of the object, along with a [namespace identifier](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/LedgerFormats.h#L99). The [ledger object type](ledger-object-types.html) determines which namespace identifier to use and which contents to include in the hash. This ensures every ID is unique. To calculate the hash, `rippled` uses SHA-512 and then truncates the result to the first 256 bits. This algorithm, informally called **SHA-512Half**, provides an output that has comparable security to SHA-256, but runs faster on 64-bit processors.
|
||||
Each [object in a ledger's state data](ledger-object-types.html) has a unique ID. The ID is derived by hashing important contents of the object, along with a [namespace identifier](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/LedgerFormats.h#L99). The [ledger object type](ledger-object-types.html) determines which namespace identifier to use and which contents to include in the hash. This ensures every ID is unique. To calculate the hash, `rippled` uses SHA-512 and then truncates the result to the first 256 bits. This algorithm, informally called **SHA-512Half**, provides an output that has comparable security to SHA-256, but runs faster on 64-bit processors.
|
||||
|
||||
Generally, a ledger object's ID is returned as the `index` field in JSON, at the same level as the object's contents. In [transaction metadata](transaction-metadata.html), the ledger object's ID in JSON is `LedgerIndex`.
|
||||
|
||||
**Tip:** The `index` or `LedgerIndex` field of an object in the ledger is the ledger object ID. This is not the same as a [ledger index][].
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ supercategory: rippled API
|
||||
category: Ledger Data Formats
|
||||
subcategory: Ledger Object Types
|
||||
status: not_enabled
|
||||
parent: ledger-object-types.html
|
||||
blurb: List of validators currently believed to be offline.
|
||||
---
|
||||
# NegativeUNL
|
||||
|
||||
Reference in New Issue
Block a user