-
Notifications
You must be signed in to change notification settings - Fork 1
Add sync settings for remote repository #69
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughReplaced a global Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-04-30T06:32:43.860ZApplied to files:
🔇 Additional comments (4)
Comment |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
settings.yaml(4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-04-30T06:32:43.860Z
Learnt from: findolor
Repo: rainlanguage/rain.strategies PR: 29
File: settings.yaml:2-6
Timestamp: 2025-04-30T06:32:43.860Z
Learning: The `network-id` field is intentionally omitted for the flare network in the `settings.yaml` configuration file, unlike other networks which include both `chain-id` and `network-id` fields.
Applied to files:
settings.yaml
🔇 Additional comments (5)
settings.yaml (5)
14-25: Network configurations are correct and consistent.Polygon and arbitrum entries properly include chain IDs, network IDs (matching chain IDs), currencies, and RPC URLs from trusted providers. Structure matches existing networks and preserves flare's intentional omission of
network-id.
45-61: Subgraph and metaboard entries are properly configured.Goldsky API URLs follow consistent patterns and versioning. All four networks (flare, base, polygon, arbitrum) now have corresponding subgraph and metaboard entries.
76-87: Orderbook addresses have inconsistent checksumming format.The arbitrum orderbook address (line 83) is all lowercase (
0x8df8075e4077dabf1e95f49059e4c1eea33094ab), while all other orderbook addresses use mixed-case checksummed format. Although Ethereum addresses are case-insensitive at the protocol level, using consistent checksummed addresses is the industry standard. Verify this is intentional or apply checksummed format.
101-122: Deployer entries are properly configured for all networks.Polygon and arbitrum deployer entries follow the same structure as existing networks with correct checksummed addresses and network references.
124-125: Verify the CDN manifest URL is reachable and correctly configured.The
local-db-remotes.raindexURL has been updated to a DigitalOcean CDN manifest. Ensure this endpoint is operational and serves the expected manifest format for bootstrap database initialization.
| local-db-sync: | ||
| raindex: | ||
| batch-size: 1 | ||
| max-concurrent-batches: 1 | ||
| retry-attempts: 1 | ||
| retry-delay-ms: 1 | ||
| rate-limit-delay-ms: 1 | ||
| finality-depth: 1 | ||
| bootstrap-block-threshold: 1 | ||
| flare: | ||
| batch-size: 10000 | ||
| max-concurrent-batches: 15 | ||
| retry-attempts: 3 | ||
| retry-delay-ms: 1000 | ||
| rate-limit-delay-ms: 5000 | ||
| finality-depth: 50 | ||
| base: | ||
| batch-size: 10000 | ||
| max-concurrent-batches: 15 | ||
| retry-attempts: 3 | ||
| retry-delay-ms: 1000 | ||
| rate-limit-delay-ms: 5000 | ||
| finality-depth: 50 | ||
| polygon: | ||
| batch-size: 10000 | ||
| max-concurrent-batches: 15 | ||
| retry-attempts: 3 | ||
| retry-delay-ms: 1000 | ||
| rate-limit-delay-ms: 5000 | ||
| finality-depth: 50 | ||
| arbitrum: | ||
| batch-size: 10000 | ||
| max-concurrent-batches: 15 | ||
| retry-attempts: 3 | ||
| retry-delay-ms: 1000 | ||
| rate-limit-delay-ms: 5000 | ||
| finality-depth: 50 |
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.
🧹 Nitpick | 🔵 Trivial
Consolidate duplicate sync settings to reduce code duplication.
All four subgraphs (flare, base, polygon, arbitrum) have identical sync configurations (batch-size, max-concurrent-batches, retry logic, rate limits, finality-depth). This violates the DRY principle. Consider:
- Moving identical settings to a shared default if the architecture supports it, or
- Documenting why per-subgraph configurations are necessary despite being identical
If per-subgraph settings are required for flexibility but currently identical, consider adding a comment explaining the rationale.
🤖 Prompt for AI Agents
In settings.yaml around lines 127 to 155, the per-subgraph sync blocks (flare,
base, polygon, arbitrum) duplicate identical configuration values; consolidate
by extracting a shared default section (e.g., local-db-sync.default) and have
each subgraph reference or inherit from it, or add a short comment above the
blocks explaining why per-subgraph overrides are required; update the file to
remove repetition by moving shared keys to the default and only keeping
per-subgraph overrides when they differ, ensuring any config loader supports the
new default/inheritance or document the rationale if leaving duplicates.
Motivation
Solution
Checks
By submitting this for review, I'm confirming I've done the following:
Summary by CodeRabbit
New Features
Performance & Reliability
Chores