Skip to content

inconsitency(solana): fill truncated log messages#1847

Open
sistemd wants to merge 5 commits intomainfrom
sistemd/fill-truncated-log-messages
Open

inconsitency(solana): fill truncated log messages#1847
sistemd wants to merge 5 commits intomainfrom
sistemd/fill-truncated-log-messages

Conversation

@sistemd
Copy link
Contributor

@sistemd sistemd commented Feb 23, 2026

  • Add a fallback RPC client that fetches full transaction logs when the primary source (OF1 or main JSON-RPC) returns truncated log messages. This client is optional. If it is missing, truncated log messages will be kept.
  • Make necessary changes to the Solana provider config to allow the use of the fallback RPC client.

This was the last known inconsistency for Solana.

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Reviewed the addition of a fallback RPC client for filling truncated Solana log messages. The overall approach is sound — introducing an optional fallback that fetches full transaction logs when the primary source returns truncated data. The config refactoring into RpcProviderConnectionConfig is clean.

Key findings (by priority)

Potential bugs / reliability concerns:

  • fill_truncated_logs uses anyhow::ensure! and ? propagation on per-transaction RPC failures, which bubble up as .recoverable() errors. This could cause infinite retries of the block stream if the fallback persistently returns fewer log entries or a single transaction fetch fails. Consider graceful degradation (warn + skip) instead of hard errors for these cases.

Documentation mismatch (will cause user-facing breakage):

  • The README uses main_rpc_provider_info in the TOML example and config table, but the actual struct field is rpc_provider_info. The sample TOML and test config use the correct name. Users following the README will get deserialization errors.
  • Missing $ in test config env var {FALLBACK_SOLANA_MAINNET_RPC_URL}.
  • Sample TOML has confusing structure for auth fields (commented section header # [rpc_provider_info] after the real section) and a minor grammar issue.

Pattern violations:

  • Logging: tracing::warn! at line 579 uses non-descriptive field names (id, slot), missing % display prefix, verbose present-tense message. See inline comment for suggested fix per docs/code/logging.md.
  • Documentation: RpcProviderConnectionInfo public fields lack doc comments per docs/code/rust-documentation.md.

Minor / non-blocking:

  • solana_compare.rs duplicates the truncated log marker string instead of using the TRUNCATED_LOG_MESSAGES_MARKER constant from client.rs.
  • Sequential RPC calls in fill_truncated_logs could be parallelized if truncated logs are common.
  • Pre-existing: test functions modified in this PR lack Given-When-Then comment structure and naming conventions per docs/code/test-functions.md. Not introduced by this PR, but worth noting for future cleanup.

- Add a fallback RPC client that fetches full transaction logs when the
primary source (OF1 or main JSON-RPC) returns truncated log messages.
This client is optional. If it is missing, truncated log messages will
be kept.
- Make necessary changes to the Solana provider config to allow the use
of the fallback RPC client.
@sistemd sistemd force-pushed the sistemd/fill-truncated-log-messages branch from 7473dfc to f2a04d5 Compare February 23, 2026 21:44
@sistemd sistemd requested review from LNSD and leoyvens February 23, 2026 21:45
@LNSD
Copy link
Contributor

LNSD commented Feb 26, 2026

@sistemd can you check the conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants