mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-01 09:05:49 +00:00
Merge pull request #448 from mDuo13/rippled_v110
rippled v1.1.0 Changes [Waiting for official release]
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# 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#L97). 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 bytes. This algorithm, informally called **SHA-512Half**, provides an output that has comparable security to SHA-256, but runs faster on 64-bit processors.
|
||||
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 bytes. This algorithm, informally called **SHA-512Half**, provides an output that has comparable security to SHA-256, but runs faster on 64-bit processors.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Amendments
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/LedgerFormats.cpp#L110-L113 "Source")
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L110-L113 "Source")
|
||||
|
||||
The `Amendments` object type contains a list of [Amendments](amendments.html) that are currently active. Each ledger version contains **at most one** `Amendments` object.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Check
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/LedgerFormats.cpp#L158 "Source")
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L157-L170 "Source")
|
||||
|
||||
_Requires the [Checks Amendment](known-amendments.html#checks)._
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# DepositPreauth
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L172-L178 "Source")
|
||||
|
||||
A `DepositPreauth` object tracks a preauthorization from one account to another. [DepositPreauth transactions][] create these objects.
|
||||
|
||||
This has no effect on processing of transactions unless the account that provided the preauthorization requires [Deposit Authorization](depositauth.html). In that case, the account that was preauthorized can send payments and other transactions directly to the account that provided the preauthorization. Preauthorizations are one-directional, and have no effect on payments going the opposite direction.
|
||||
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"LedgerEntryType" : "DepositPreauth",
|
||||
"Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
|
||||
"Authorize" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
|
||||
"Flags" : 0,
|
||||
"OwnerNode" : "0000000000000000",
|
||||
"PreviousTxnID" : "3E8964D5A86B3CD6B9ECB33310D4E073D64C865A5B866200AD2B7E29F8326702",
|
||||
"PreviousTxnLgrSeq" : 7,
|
||||
"index" : "4A255038CC3ADCC1A9C91509279B59908251728D0DAADB248FFE297D0F7E068C"
|
||||
}
|
||||
```
|
||||
|
||||
## {{currentpage.name}} Fields
|
||||
|
||||
A `DepositPreauth` object has the following fields:
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:--------------------|:-----------------|:------------------|:----------------|
|
||||
| `LedgerEntryType` | String | UInt16 | The value `0x0070`, mapped to the string `DepositPreauth`, indicates that this is a DepositPreauth object. |
|
||||
| `Account` | String | Account | The account that granted the preauthorization. (The destination of the preauthorized payments.) |
|
||||
| `Authorize` | String | Account | The account that received the preauthorization. (The sender of the preauthorized payments.) |
|
||||
| `Flags` | Number | UInt32 | A bit-map of boolean flags. No flags are defined for DepositPreauth objects, so this value is always `0`. |
|
||||
| `OwnerNode` | String | UInt64 | A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. **Note:** The object does not contain a direct link to the owner directory containing it, since that value can be derived from the `Account`. |
|
||||
| `PreviousTxnID` | String | Hash256 | The identifying hash of the transaction that most recently modified this object. |
|
||||
| `PreviousTxnLgrSeq` | Number | UInt32 | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. |
|
||||
|
||||
|
||||
## DepositPreauth ID Format
|
||||
|
||||
The ID of a `DepositPreauth` object is the [SHA-512Half][] of the following values, concatenated in order:
|
||||
|
||||
* The DepositPreauth space key (`0x0070`)
|
||||
* The AccountID of the owner of this object (the sender of the [DepositPreauth transaction][] that created this object; in other words, the one that granted the preauthorization)
|
||||
* The AccountID of the preauthorized account (the `Authorized` field of the [DepositPreauth transaction][] that created this object; in other words, the one that received the preauthorization)
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -1,5 +1,5 @@
|
||||
# LedgerHashes
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L104-L107 "Source")
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L104-L108 "Source")
|
||||
|
||||
(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.)
|
||||
|
||||
@@ -57,7 +57,7 @@ The "previous history" `LedgerHashes` entries collectively contain the hash of e
|
||||
The "previous history" `LedgerHashes` objects act as a [skip list](https://en.wikipedia.org/wiki/Skip_list) so you can get the hash of any historical flag ledger from its index. From there, you can use that flag ledger's "recent history" object to get the hash of any other ledger.
|
||||
|
||||
## LedgerHashes ID Formats
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/Indexes.cpp#L28-L43)
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/Indexes.cpp#L26-L42)
|
||||
|
||||
There are two formats for `LedgerHashes` object IDs, depending on whether the object is a "recent history" sub-type or a "previous history" sub-type.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# PayChannel
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/LedgerFormats.cpp#L134 "Source")
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L141-L155 "Source")
|
||||
|
||||
_(Requires the [PayChan Amendment](known-amendments.html#paychan).)_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user