mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-13 16:25:49 +00:00
Add source link for ledger object IDs (#1304)
This commit is contained in:
@@ -6,6 +6,7 @@ labels:
|
||||
- Data Retention
|
||||
---
|
||||
# Ledger Object IDs
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/Indexes.cpp)
|
||||
<a id="sha512half"></a>
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user