Skip to content

Conversation

@zhangchiqing
Copy link
Member

@zhangchiqing zhangchiqing commented Jan 17, 2026

Works on top of #8309

This PR includes improvements:

Improvement 1: Use unix domain socket to improve the performance of sending data inter process.

Improvement 2: Added retry, so that we can restart the ledger service, without restarting the execution service. The retry will allow the block execution to resume automatically after ledger finish restarting.

Improvement 3: Added admin tool for triggering checkpoints on ledger service

Improvement 4: Added metrics for ledger service.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch leo/poc-ledger-service-optimize

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

// gRPC client accepts "unix:///absolute/path" or "unix://relative/path" format
// If address starts with unix://, use it as-is (gRPC handles the format)
normalizedAddr := grpcAddr
isUnixSocket := strings.HasPrefix(grpcAddr, "unix://")
Copy link
Member Author

Choose a reason for hiding this comment

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

Improvement 1: Use unix domain socket to improve the performance of sending data inter process.

if err != nil {
return nil, fmt.Errorf("failed to connect to ledger service: %w", err)
// Retry connection with exponential backoff until the service becomes available.
var conn *grpc.ClientConn
Copy link
Member Author

Choose a reason for hiding this comment

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

Improvement 2: Added retry, so that we can restart the ledger service, without restarting the execution service. The retry will allow the block execution to resume automatically after ledger finish restarting.

It also allows both service to restart at the same time.

triedir = flag.String("triedir", "", "Directory for trie files (required)")
ledgerServiceTCP = flag.String("ledger-service-tcp", "", "Ledger service TCP listen address (e.g., 0.0.0.0:9000). If provided, server accepts TCP connections.")
ledgerServiceSocket = flag.String("ledger-service-socket", "", "Ledger service Unix socket path (e.g., /sockets/ledger.sock). If provided, server accepts Unix socket connections. Can specify multiple sockets separated by comma.")
adminAddr = flag.String("admin-addr", "", "Address to bind on for admin HTTP server (e.g., 0.0.0.0:9002). If provided, enables admin commands.")
Copy link
Member Author

Choose a reason for hiding this comment

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

Improvement 3: Added admin tool for triggering checkpoints on ledger service

@zhangchiqing zhangchiqing changed the base branch from leo/poc-ledger-service to master January 21, 2026 01:09
@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2026

@zhangchiqing zhangchiqing changed the base branch from master to leo/poc-ledger-service January 21, 2026 17:53
@zhangchiqing zhangchiqing marked this pull request as ready for review January 21, 2026 17:53
@zhangchiqing zhangchiqing requested a review from a team as a code owner January 21, 2026 17:53
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

Successfully merging this pull request may close these issues.

3 participants