-
Notifications
You must be signed in to change notification settings - Fork 19
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
make rr use nonce manager and increase concurrency #2142
Conversation
WalkthroughWalkthroughThe recent changes enhance the flexibility and clarity of the codebase across various components. Key modifications include introducing a configurable concurrency setting in the reporter, improving variable naming in worker functions, adding service-specific setup scripts in Dockerfiles, and refining environment variable configurations. These adjustments collectively aim to streamline processes, improve maintainability, and adapt the system for better performance in diverse use cases. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Reporter
participant Worker
participant Docker
User->>Docker: Build Docker image with ARG SERVICE
Docker->>Docker: Copy service-specific scripts
Docker->>Docker: Run setup.sh
Worker->>Reporter: Initialize reporter with CONCURRENCY
Reporter->>Worker: Return initialized reporter
Worker->>Worker: Execute nonceManagerQueue jobs
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
docker-compose.local-core.yaml
is excluded by!**/*.yaml
package.json
is excluded by!**/*.json
Files selected for processing (7)
- core/src/reporter/request-response.ts (2 hunks)
- core/src/worker/request-response.ts (3 hunks)
- dockerfiles/local-vrf-rr/core-cli-contracts.Dockerfile (3 hunks)
- dockerfiles/local-vrf-rr/envs/.api.env (1 hunks)
- dockerfiles/local-vrf-rr/json-rpc.Dockerfile (1 hunks)
- dockerfiles/local-vrf-rr/scripts/setup-rr.sh (1 hunks)
- dockerfiles/local-vrf-rr/scripts/update-hardhat-network.js (1 hunks)
Files skipped from review due to trivial changes (1)
- dockerfiles/local-vrf-rr/envs/.api.env
Additional comments not posted (7)
dockerfiles/local-vrf-rr/json-rpc.Dockerfile (1)
1-6
: Dockerfile setup looks good.The Dockerfile is correctly setting up a Node.js environment and installing dependencies using
yarn
. Ensure that thehardhat.config.cjs
andpackage.json
files are correctly configured for the intended use.dockerfiles/local-vrf-rr/scripts/update-hardhat-network.js (1)
7-11
: Improvements in regex pattern and URL formatting.The updated regex pattern is more robust, allowing for variations in whitespace and optional trailing commas. Enclosing the URL in double quotes ensures proper formatting.
core/src/reporter/request-response.ts (1)
Line range hint
4-19
: Use ofCONCURRENCY
constant enhances flexibility.Replacing the hardcoded concurrency value with the
CONCURRENCY
constant allows for more flexible and scalable configurations.dockerfiles/local-vrf-rr/scripts/setup-rr.sh (1)
31-31
: Verify the updated Oracle address for "baobab".The Oracle address for the "baobab" chain has been updated. Ensure this change is accurate and aligns with the intended deployment and blockchain interactions.
Verification successful
Oracle address update verified for "baobab".
The new Oracle address
0x5fe8a7445bFDB2Cd6d9f1DcfB3B33D8c365FFdB0
is consistently used across the relevant files, with no occurrences of the old address. This update aligns with the intended deployment and blockchain interactions.
inspector/hardhat.config.ts
: New address present.dockerfiles/local-vrf-rr/scripts/setup-rr.sh
: New address present.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the updated Oracle address for the "baobab" chain. # Test: Search for occurrences of the old and new Oracle addresses in the codebase. Expect: Only occurrences of the new address. rg --type shell --type js --type ts $'0x71F4d40dFe60349E67105E02AE5a1Db41fD5AF0e|0x5fe8a7445bFDB2Cd6d9f1DcfB3B33D8c365FFdB0'Length of output: 155
Script:
#!/bin/bash # Description: Verify the updated Oracle address for the "baobab" chain. # Test: Search for occurrences of the old and new Oracle addresses in the codebase. Expect: Only occurrences of the new address. rg --type sh --type js --type ts $'0x71F4d40dFe60349E67105E02AE5a1Db41fD5AF0e|0x5fe8a7445bFDB2Cd6d9f1DcfB3B33D8c365FFdB0'Length of output: 315
dockerfiles/local-vrf-rr/core-cli-contracts.Dockerfile (1)
Line range hint
4-82
: Enhancements in Dockerfile flexibility withARG SERVICE
.The introduction of the
ARG SERVICE
directive and the service-specific setup script improves the Dockerfile's adaptability for different services. Ensure that the setup scripts are correctly configured for each service.core/src/worker/request-response.ts (2)
31-34
: Improved clarity withnonceManagerQueue
.Renaming
queue
tononceManagerQueue
enhances the code's readability by clearly indicating its purpose related to nonce management. This is a positive change.
Line range hint
48-81
: Consistent renaming tononceManagerQueue
.The renaming of
reporterQueue
tononceManagerQueue
in thejob
function aligns with the changes in theworker
function, maintaining consistency and clarity.
Description
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Deployment