Last updated

Introducing XRP Ledger version 1.9.0

Version 1.9.0 of rippled, the reference server implementation of the XRP Ledger protocol, is now available. This release includes the XLS-20 amendment and fixes and updates for stability and security.

Action Required

This release introduces a new amendment to the XRP Ledger protocol to support Non-Fungible Tokens (NFTs) natively on the XRP Ledger (per the XLS-20 draft standard). This amendment is now open for voting according to the XRP Ledger's amendment process, which enables protocol changes following two weeks of >80% support from trusted validators.

If you operate an XRP Ledger server, then you should upgrade to version 1.9.0 within two weeks, to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.

For more information about NFTs on the XRP Ledger, see NFT Conceptual Overview.

Install / Upgrade

On supported platforms, please build from source.

The most recent commit in the git log should be the change setting the version:

commit 7c66747d27869f9f3c96617bd4227038f1fa92b8
Author: manojsdoshi <[email protected]>
Date:   Wed Apr 6 20:28:37 2022 -0700

    Set version to 1.9.0

Changelog

This release contains the following features and improvements.

New and Improved Features

  • Introduce NFT support (XLS-20): This release introduces support for non-fungible tokens, currently available to the developer community for broader review and testing. Developers can create applications that allow users to mint, transfer, and ultimately burn (if desired) NFTs on the XRP Ledger. You can try out the new NFT transactions using the nft-devnet. Note that some fields and error codes from earlier releases of the supporting code have been refactored for this release, shown in the Code Refactoring section, below. 70779f

  • Simplify the Job Queue: This is a refactor aimed at cleaning up and simplifying the existing job queue. Currently, all jobs are canceled at the same time and in the same way, so this commit removes the unnecessary per-job cancellation token. #3656

  • Optimize trust line caching: The existing trust line caching code was suboptimal in that it stored redundant information, pinned SLEs into memory, and required multiple memory allocations per cached object. This commit eliminates redundant data, reduces the size of cached objects and unpinning SLEs from memory, and uses value types to avoid the need for std::shared_ptr. As a result of these changes, the effective size of a cached object includes the overhead of the memory allocator, and the std::shared_ptr should be reduced by at least 64 bytes. This is significant, as there can easily be tens of millions of these objects. 4d5459

  • Incremental improvements to pathfinding memory usage: This commit aborts background pathfinding when closed or disconnected, exits the pathfinding job thread if there are no requests left, does not create the path find a job if there are no requests, and refactors to remove the circular dependency between InfoSub and PathRequest. #4111

  • Improve deterministic transaction sorting in TxQ: This commit ensures that transactions with the same fee level are sorted by TxID XORed with the parent ledger hash, the TxQ is re-sorted after every ledger, and attempts to future-proof the TxQ tie-breaking test. #4077

  • Improve stop signaling for Application: 34ca45

  • Eliminate SHAMapInnerNode lock contention: The SHAMapInnerNode class had a global mutex to protect the array of node children. Profiling suggested that around 4% of all attempts to lock the global would block. This commit removes that global mutex, and replaces it with a new per-node 16-way spinlock (implemented so as not to affect the size of an inner node object), effectively eliminating the lock contention. 1b9387

  • Improve ledger-fetching logic: When fetching ledgers, the existing code would isolate the peer that sent the most useful responses, and issue follow-up queries only to that peer. This commit increases the query aggressiveness, and changes the mechanism used to select which peers to issue follow-up queries to so as to more evenly spread the load among those peers that provided useful responses. 48803a

  • Simplify and improve order book tracking: The order book tracking code would use std::shared_ptr to track the lifetime of objects. This commit changes the logic to eliminate the overhead of std::shared_ptr by using value types, resulting in significant memory savings. b9903b

  • Negative cache support for node store: This commit allows the cache to service requests for nodes that were previously looked up but not found, reducing the need to perform I/O in several common scenarios. 3eb8aa

  • Improve asynchronous database handlers: This commit optimizes the way asynchronous node store operations are processed, both by reducing the number of times locks are held and by minimizing the number of memory allocations and data copying. 6faaa9

  • Cleanup AcceptedLedger and AcceptedLedgerTx: This commit modernizes the AcceptedLedger and AcceptedLedgerTx classes, reduces their memory footprint, and reduces unnecessary dynamic memory allocations. 8f5868

Code Refactoring

This release includes name changes in the NFToken API for SFields, RPC return labels, and error codes for clarity and consistency. To refactor your code, migrate the names of these items to the new names as listed below.

SField name changes

Old nameNew name
TokenTaxonNFTokenTaxon
MintedTokensMintedNFTokens
BurnedTokensBurnedNFTokens
TokenIDNFTokenID
TokenOffersNFTokenOffers
BrokerFeeNFTokenBrokerFee
MinterNFTokenMinter
NonFungibleTokenNFToken
NonFungibleTokensNFTokens
BuyOfferNFTokenBuyOffer
SellOfferNFTokenSellOffer
OfferNodeNFTokenOfferNode
asfAuthorizedMinterasfAuthorizedNFTokenMinter
tfSellTokentfSellNFToken
lsfSellTokenlsfSellNFToken

RPC return labels

Old nameNew name
tokenidnft_id
indexnft_offer_index (in responses to nft_buy_offers and nft_sell_offers requests)

Error codes

Old nameNew name
temBAD_TRANSFER_FEEtemBAD_NFTOKEN_TRANSFER_FEE
tefTOKEN_IS_NOT_TRANSFERABLEtefNFTOKEN_IS_NOT_TRANSFERABLE
tecNO_SUITABLE_PAGEtecNO_SUITABLE_NFTOKEN_PAGE
tecBUY_SELL_MISMATCHtecNFTOKEN_BUY_SELL_MISMATCH
tecOFFER_TYPE_MISMATCHtecNFTOKEN_OFFER_TYPE_MISMATCH
tecCANT_ACCEPT_OWN_OFFERtecCANT_ACCEPT_OWN_NFTOKEN_OFFER

Bug Fixes

  • Fix deletion of orphan node store directories: Orphaned node store directories should only be deleted if the proper node store directories are confirmed to exist. 06e87e