Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building ServerDefinitions.cpp takes a very long time. #420

Open
tequdev opened this issue Jan 10, 2025 · 2 comments
Open

Building ServerDefinitions.cpp takes a very long time. #420

tequdev opened this issue Jan 10, 2025 · 2 comments

Comments

@tequdev
Copy link
Collaborator

tequdev commented Jan 10, 2025

Issue Description

As the title says

A diff build where only ServerDefinitions.cpp was changed.

(The build uses Conan, a non-standard build of this repository.)

Currently

cmake --build . --target rippled --parallel -j$(sysctl -n hw.logicalcpu) 1458.46s user 122.93s system 81% cpu 32:19.25 total

Comment out the code that uses magic_enum:

cmake --build . --target rippled --parallel -j$(sysctl -n hw.logicalcpu) 15.72s user 3.86s system 127% cpu 15.325 total

@mvadari
Copy link

mvadari commented Jan 10, 2025

The rippled implementation of server_definitions doesn't use magic_enum, so the xahaud implementation could borrow that modification.

@tequdev
Copy link
Collaborator Author

tequdev commented Jan 11, 2025

Differences in the output of server_definitions for rippled and xahaud

LEDGER_ENTRY_TYPES

  • xahaud
    • from LedgerFormats.h LedgerEntryType
    • including deprecated ones (eg. ltCONTRACT, ltGENERATOR_MAP
  • rippled
    • from LedgerFormats.cpp LedgerFormats()
    • not including deprecated ones

TRANSACTION_FLAGS, TRANSACTION_FLAGS_INDICES

  • xahaud: exists
  • rippled: not exists

TRANSACTION_RESULTS

  • xahaud

    • from TER.h TELcodes, TEMcodes, TEFcodes, TERcodes, TEScodes, TECcodes
    • including reserved ones(eg. AMM, XCHAINS)
  • rippled

    • from TER.cpp transResults()
    • only including ones defined by MAKE_ERROR macro

TRANSACTION_TYPES

TRANSACTION_TYPES can have different keys even if they are the same transaction type.

  • xahaud
    • from TxFormats.h TxType
    • including deprecated ones)
    • tt-based transaction type name
      • ttAmendment -> "Amendment"
      • ttFee -> "Fee"
  • rippled
    • from TxFormats.cpp TxFormats()
    • only including ones defined by add())
    • jss-based transaction type name
      • jss::EnableAmendment -> "EnableAmendment"
      • jss::Fee -> "Fee"

native_currency_code

  • xahaud: exists
  • rippled: not exists (but XRPL Cluster has)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants