Skip to content
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

fix: remove numberOfBlockPerCall to use blocksPerCall in crawl block, tx #708

Merged
merged 1 commit into from
May 30, 2024

Conversation

fibonacci998
Copy link
Contributor

@fibonacci998 fibonacci998 commented Mar 20, 2024

Summary by CodeRabbit

  • Refactor
    • Improved configuration naming for clarity in block and transaction crawling services.
    • Enhanced efficiency in transaction processing with updated configuration parameters.

@fibonacci998 fibonacci998 requested a review from peara March 20, 2024 03:36
Copy link

coderabbitai bot commented Mar 20, 2024

Walkthrough

The recent updates involve configuration and service modifications in a codebase, primarily focusing on renaming a key for clarity, introducing a new key, and adjusting service logic to align with these configuration changes. The essence of these updates is to streamline the process of crawling blocks and transactions by enhancing parameter naming, adding necessary configurations, and ensuring service components use these updated configurations correctly.

Changes

File Path Change Summary
ci/config.json.ci Renamed key "numberOfBlockPerCall" to "blocksPerCall", added new key "key" under "crawlTransaction" with value "crawlTransaction", and introduced "chunkSize" parameter set to 1000 in "crawlTransaction".
src/services/crawl-block/.../crawl_block.service.ts
src/services/crawl-tx/.../crawl_tx.service.ts
Updated variable calculations and key references to align with configuration changes.

🐇✨
In the land of code and byte,
Where changes dance both day and night,
A rabbit hopped, with joy did call,
"To better names and configs, we adjust our crawl!"
With every hop, a fix, a tweak,
For smoother runs, is what we seek.
🌟🐾


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 4028118 and 8c12929.
Files selected for processing (4)
  • ci/config.json.ci (1 hunks)
  • config.json (1 hunks)
  • src/services/crawl-block/crawl_block.service.ts (1 hunks)
  • src/services/crawl-tx/crawl_tx.service.ts (1 hunks)
Additional comments not posted (6)
ci/config.json.ci (2)

29-29: Change to blocksPerCall aligns with the PR's objective to standardize configuration terms.


34-36: Addition of key and chunkSize parameters aligns with the PR's objective to refine transaction processing.

config.json (2)

29-29: Change to blocksPerCall aligns with the PR's objective to standardize configuration terms.


34-36: Addition of key and chunkSize parameters aligns with the PR's objective to refine transaction processing. Note the different millisecondCrawl value compared to ci/config.json.ci.

src/services/crawl-block/crawl_block.service.ts (1)

97-97: Update to endBlock calculation using blocksPerCall aligns with the PR's objective to standardize configuration terms.

src/services/crawl-tx/crawl_tx.service.ts (1)

57-57: Update of key reference from config.handleTransaction.key to config.crawlTransaction.key aligns with the PR's objective to ensure consistency in configuration usage.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@fibonacci998 fibonacci998 force-pushed the fix/refactor-blocksPerCall-crawl-block-tx-merge-main branch from 666073c to 6c9c79f Compare March 20, 2024 03:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 868faad and 666073c.
Files ignored due to path filters (1)
  • config.json is excluded by: !**/*.json
Files selected for processing (3)
  • ci/config.json.ci (1 hunks)
  • src/services/crawl-block/crawl_block.service.ts (1 hunks)
  • src/services/crawl-tx/crawl_tx.service.ts (1 hunks)
Additional comments: 5
ci/config.json.ci (3)
  • 29-29: The renaming of numberOfBlockPerCall to blocksPerCall is clear and aligns with the goal of standardizing terminology.
  • 34-34: The addition of the key with the value crawlTransaction under the crawlTransaction section enhances configuration clarity.
  • 36-36: The introduction of the chunkSize parameter set to 1000 under crawlTransaction is a positive change for processing efficiency.
src/services/crawl-block/crawl_block.service.ts (1)
  • 97-97: The update to calculate endBlock using config.crawlBlock.blocksPerCall aligns with the configuration changes and ensures consistency.
src/services/crawl-tx/crawl_tx.service.ts (1)
  • 57-57: The update from config.handleTransaction.key to config.crawlTransaction.key aligns with the configuration changes and enhances clarity.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 868faad and 6c9c79f.
Files ignored due to path filters (1)
  • config.json is excluded by: !**/*.json
Files selected for processing (3)
  • ci/config.json.ci (1 hunks)
  • src/services/crawl-block/crawl_block.service.ts (1 hunks)
  • src/services/crawl-tx/crawl_tx.service.ts (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • ci/config.json.ci
  • src/services/crawl-block/crawl_block.service.ts
  • src/services/crawl-tx/crawl_tx.service.ts

@peara peara force-pushed the fix/refactor-blocksPerCall-crawl-block-tx-merge-main branch from 6c9c79f to 8c12929 Compare May 2, 2024 07:03
@peara peara merged commit 12fd4dc into main May 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants