Skip to content

rippled (XRP Ledger server) Version 1.9.0

Compare
Choose a tag to compare
@manojsdoshi manojsdoshi released this 07 Apr 17:32
· 449 commits to master since this release
7c66747

Version 1.9.0

This is the 1.9.0 release of rippled, the reference implementation of the XRP Ledger protocol. This release brings several 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:

  • TokenTaxon -> NFTokenTaxon
  • MintedTokens -> MintedNFTokens
  • BurnedTokens -> BurnedNFTokens
  • TokenID -> NFTokenID
  • TokenOffers -> NFTokenOffers
  • BrokerFee -> NFTokenBrokerFee
  • Minter -> NFTokenMinter
  • NonFungibleToken -> NFToken
  • NonFungibleTokens -> NFTokens
  • BuyOffer -> NFTokenBuyOffer
  • SellOffer -> NFTokenSellOffer
  • OfferNode -> NFTokenOfferNode

RPC return labels

  • tokenid -> nft_id
  • index -> nft_offer_index

Error codes

  • temBAD_TRANSFER_FEE -> temBAD_NFTOKEN_TRANSFER_FEE
  • tefTOKEN_IS_NOT_TRANSFERABLE -> tefNFTOKEN_IS_NOT_TRANSFERABLE
  • tecNO_SUITABLE_PAGE -> tecNO_SUITABLE_NFTOKEN_PAGE
  • tecBUY_SELL_MISMATCH -> tecNFTOKEN_BUY_SELL_MISMATCH
  • tecOFFER_TYPE_MISMATCH -> tecNFTOKEN_OFFER_TYPE_MISMATCH
  • tecCANT_ACCEPT_OWN_OFFER -> tecCANT_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