The following is mentioned in the example config but I am wondering what a LedgerEntry object and Asset pair actually are, in this context.

# Data layer cache configuration
# - ENTRY_CACHE_SIZE controls the maximum number of LedgerEntry objects
#   that will be stored in the cache (default 4096)
# - BEST_OFFERS_CACHE_SIZE controls the maximum number of Asset pairs that
#   will be stored in the cache, although many LedgerEntry objects may be
#   associated with a single Asset pair (default 64)

Thanks for any help.

1 Answer 1


From https://www.stellar.org/developers/guides/concepts/ledger.html:

The ledger is a collection of entries. Currently there are 4 types of ledger entries. They’re specified in src/xdr/Stellar-ledger-entries.x.

  • Account entry
    This entry represents an account. In Stellar, everything is built around accounts: transactions are performed by accounts, and accounts control the access rights to balances.
  • Trustline entry
    Trustlines are lines of credit the account has given a particular issuer in a specific currency.
  • Offer entry
    Offers are entries that an account creates in the orderbook.
  • Data entry
    Data entries are key value pairs attached to an account. They allow account controllers to attach arbitrary data to their account.

BEST_OFFERS_CACHE_SIZE in theory should control an in-memory cache size for trading pairs, like XLM <> BTC-GAHK..0P2N. As far as I can tell from the source code, best offers cache is used by "in-memory transaction-in-progress" internally to cache offers consumed by current transaction.

  • Do you know what determines the values I should use for those configs? If we are running a stellar node(on AWS EC2) that is archiving ledgers and has a horizon api, what advantages/problems are there with changing these cache values from the default? Thanks for your help. Jan 23, 2019 at 10:45
  • 1
    I have never changed the default settings. From my experience, the disks I/O is usually a bottleneck, as PostgreSQL performs a lot read/write operations, especially during the initial catchup.
    – Orbit Lens
    Jan 23, 2019 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.