firedancer-io / firedancer

Firedancer is Jump Crypto's Solana validator software.
https://firedancer.io
Other
857 stars 151 forks source link

Frankendancer RPC improvements #2714

Closed 0x0ece closed 2 weeks ago

0x0ece commented 4 weeks ago

Problems:

  1. The current RPC (frankendancer) doesn't return logMessages, even when configured accordingly.
  2. fddev by default runs without rpc, unlike solana-test-validator.

Context:

  1. Log collection is disabled here: https://github.com/firedancer-io/solana/blob/4b31032e68f85848b02fcc4c9e580d57f32ec04b/runtime/src/bank.rs#L264-L265 The 3 false should be 3 true, so logs are collected and then available to rpc.

    • However, we may prefer to selectively enable/disable log collection.
    • However, we don't have access to the validator config in that fn.
  2. To enable RPC equivalent to solana-test-validator we need the following config:

    port = 8899
    full_api = true
    transaction_history = true
    extended_tx_metadata_storage = true

    When extended_tx_metadata_storage = false, the TransactionStatusService receives the logs and removes them before storing data, that's then used by the rpc.

Proposed solutions:

  1. Enable log collection: 1a. Quick. Always enable log collection. 1b. Or, accurate. Add a config param to fd_ext_bank_load_and_execute_txns, pass in the value of extended_tx_metadata_storage. If true, enable logs (in future we may need additional config params).
  2. Set those 4 defaults in fddev, so that by default the behavior is consistent with solana-test-validator.
0x0ece commented 4 weeks ago

Impl 1b) https://github.com/firedancer-io/firedancer/pull/2720