-
Notifications
You must be signed in to change notification settings - Fork 39
Backfill size per chain #850
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
Backfill size per chain #850
Conversation
WalkthroughThis change moves the Changes
Sequence Diagram(s)sequenceDiagram
participant Indexer
participant AppChainConfig
participant AppChain
participant SettlementChainConfig
participant SettlementChain
Indexer->>AppChainConfig: Read BackfillBlockSize
Indexer->>AppChain: NewAppChain(cfg)
AppChain->>AppChainConfig: Use BackfillBlockSize
Indexer->>SettlementChainConfig: Read BackfillBlockSize
Indexer->>SettlementChain: NewSettlementChain(cfg)
SettlementChain->>SettlementChainConfig: Use BackfillBlockSize
Possibly related PRs
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (5)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Move BackfillBlockSize configuration from ContractsOptions to chain-specific AppChainOptions and SettlementChainOptions structs with default value of 500Moves the 📍Where to StartStart with the configuration changes in options.go to understand how the Changes since #850 opened
Macroscope summarized e987349. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/testutils/config.go (1)
45-45: Consistent implementation for SettlementChainOptions.The addition of
BackfillBlockSize: 500toSettlementChainOptionsmaintains consistency withAppChainOptions. This completes the migration to per-chain configuration as intended.For future flexibility, consider extracting the backfill size (500) as a constant at the package level, which would make it easier to adjust if different values are needed for testing different chain behaviors.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
pkg/config/options.go(1 hunks)pkg/indexer/app_chain/app_chain.go(1 hunks)pkg/indexer/indexer.go(0 hunks)pkg/indexer/settlement_chain/settlement_chain.go(1 hunks)pkg/testutils/config.go(2 hunks)
💤 Files with no reviewable changes (1)
- pkg/indexer/indexer.go
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Push Docker Images to GitHub Packages (xmtpd-cli)
- GitHub Check: Code Review
- GitHub Check: Test (Node)
- GitHub Check: Push Docker Images to GitHub Packages (xmtpd)
- GitHub Check: Upgrade Tests
🔇 Additional comments (4)
pkg/indexer/app_chain/app_chain.go (1)
116-116: LGTM! Correctly uses per-chain backfill configuration.The change appropriately sources
BackfillBlockSizedirectly from theAppChainOptionsconfiguration, aligning with the PR's objective to support per-chain backfill sizes.pkg/indexer/settlement_chain/settlement_chain.go (1)
86-86: LGTM! Consistent with app chain implementation.The change correctly sources
BackfillBlockSizefrom theSettlementChainOptionsconfiguration, maintaining consistency with the app chain implementation.pkg/config/options.go (1)
38-38: Well-structured per-chain configuration.The addition of
BackfillBlockSizeto bothAppChainOptionsandSettlementChainOptionsenables independent configuration for each chain type, which is essential given that different RPCs may have different block page size limits. The consistent default value of 500 and unique environment variables for each chain are appropriate design choices.Also applies to: 47-47
pkg/testutils/config.go (1)
33-33: LGTM!The addition of
BackfillBlockSize: 500toAppChainOptionscorrectly implements the migration of this configuration from global to per-chain settings. The value matches the documented default.
Different RPC might have different block page sizes.
Summary by CodeRabbit
New Features
Chores