Ledger formats: improve landing page, etc.

This commit is contained in:
mDuo13
2020-10-29 01:32:57 -07:00
parent d2ac82b5ea
commit 67e13dec7c
7 changed files with 73 additions and 11 deletions

View 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 %}

View File

@@ -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

View File

@@ -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) }}

View File

@@ -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 |
|:-----------------------------|:----------|:------------------|:--------------|

View File

@@ -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][].
![Diagram: rippled uses SHA-512Half to generate IDs for ledger objects. The space key prevents IDs for different object types from colliding.](img/ledger-indexes.png)

View File

@@ -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

View File

@@ -5038,14 +5038,7 @@ pages:
targets:
- ja
- name: Ledger Data Formats
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.
template: template-landing-children.html
- md: references/rippled-api/ledger-data-formats/ledger-data-formats.md
targets:
- en
@@ -5132,6 +5125,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: The settings, XRP balance, and other metadata for one account.
parent: ledger-object-types.html
targets:
- en
@@ -5143,6 +5137,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: あるアカウントの設定、XRP残高、その他のメタデータです。
parent: ledger-object-types.html
targets:
- ja
@@ -5154,6 +5149,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: Singleton object with status of enabled and pending amendments.
parent: ledger-object-types.html
targets:
- en
@@ -5165,6 +5161,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 有効化されているAmendmentと保留中のAmendmentのステータスを持つシングルトンオブジェクトです。
parent: ledger-object-types.html
targets:
- ja
@@ -5176,6 +5173,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: A check that can be redeemed for money by its destination.
parent: ledger-object-types.html
targets:
- en
@@ -5187,6 +5185,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 送信先が清算して資金にできるCheckです。
parent: ledger-object-types.html
targets:
- ja
@@ -5198,6 +5197,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: A record of preauthorization for sending payments to an account that requires authorization.
parent: ledger-object-types.html
targets:
- en
@@ -5209,6 +5209,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 承認を必要とするアカウントへの送金ペイメントの事前承認の記録です。
parent: ledger-object-types.html
targets:
- ja
@@ -5220,6 +5221,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: Contains links to other objects.
parent: ledger-object-types.html
targets:
- en
@@ -5231,6 +5233,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 他のオブジェクトへのリンクを含みます。
parent: ledger-object-types.html
targets:
- ja
@@ -5242,6 +5245,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: Contains XRP held for a conditional payment.
parent: ledger-object-types.html
targets:
- en
@@ -5253,6 +5257,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 条件付き決済のために保有されているXRPを含みます。
parent: ledger-object-types.html
targets:
- ja
@@ -5264,6 +5269,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: Singleton object with consensus-approved base transaction cost and reserve requirements.
parent: ledger-object-types.html
targets:
- en
@@ -5275,6 +5281,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: コンセンサスで承認された基本トランザクションコストと必要準備金があるシングルトンオブジェクトです。
parent: ledger-object-types.html
targets:
- ja
@@ -5286,6 +5293,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: Lists of prior ledger versions' hashes for history lookup.
parent: ledger-object-types.html
targets:
- en
@@ -5297,6 +5305,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 履歴検索用に以前のレジャーバージョンのハッシュをリスト表示します。
parent: ledger-object-types.html
targets:
- ja
@@ -5313,6 +5322,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: An order to make a currency trade.
parent: ledger-object-types.html
targets:
- en
@@ -5324,6 +5334,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 通貨取引を行うためのオーダーです。
parent: ledger-object-types.html
targets:
- ja
@@ -5335,6 +5346,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: A channel for asynchronous XRP payments.
parent: ledger-object-types.html
targets:
- en
@@ -5346,6 +5358,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 非同期XRP支払い用のチャネルです。
parent: ledger-object-types.html
targets:
- ja
@@ -5357,6 +5370,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: Links two accounts, tracking the balance of one currency between them. The concept of a trust line is an abstraction of this object type.
parent: ledger-object-types.html
targets:
- en
@@ -5368,6 +5382,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: 2つのアカウントをリンクし、それらのアカウント間の特定の通貨の残高を追跡します。トラストラインのコンセプトは、このオブジェクトタイプを抽象化することです。
parent: ledger-object-types.html
targets:
- ja
@@ -5379,6 +5394,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: A list of addresses for multi-signing transactions.
parent: ledger-object-types.html
targets:
- en
@@ -5390,6 +5406,7 @@ pages:
category: Ledger Data Formats
subcategory: Ledger Object Types
blurb: マルチ署名トランザクションのアドレスのリストです。
parent: ledger-object-types.html
targets:
- ja