-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add rate limiter for RPC requests #6264
Conversation
WalkthroughWalkthroughThe recent updates introduce a new configuration parameter, Changes
Warning Review ran into problemsProblems (1)
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 Configration 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: 3
Review Details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Files ignored due to path filters (202)
Cargo.lock
is excluded by!**/*.lock
vendor/cargo/crc32fast-1.3.2/Cargo.toml
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/LICENSE-APACHE
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/LICENSE-MIT
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/README.md
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/benches/bench.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/build.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/baseline.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/combine.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/lib.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/specialized/aarch64.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/specialized/mod.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/specialized/pclmulqdq.rs
is excluded by!vendor/**
vendor/cargo/crc32fast-1.3.2/src/table.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/Cargo.toml
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/LICENSE
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/README.md
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/rust-toolchain.toml
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/arbitrary.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/iter.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/iter_set.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/lib.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/lock.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/mapref/entry.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/mapref/mod.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/mapref/multiple.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/mapref/one.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/rayon/map.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/rayon/read_only.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/rayon/set.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/read_only.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/serde.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/set.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/setref/mod.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/setref/multiple.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/setref/one.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/t.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/try_result.rs
is excluded by!vendor/**
vendor/cargo/dashmap-5.5.3/src/util.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/CHANGELOG.md
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/Cargo.toml
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/README.md
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/benches/governor_criterion_benches.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/benches/multi_threaded.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/benches/realtime_clock.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/benches/single_threaded.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/doc/centrifugal-governor.png
is excluded by!**/*.png
,!vendor/**
vendor/cargo/governor-0.6.3/release.toml
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/_guide.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/clock.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/clock/default.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/clock/quanta.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/clock/with_std.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/errors.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/gcra.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/jitter.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/lib.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/middleware.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/nanos.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/quota.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/direct.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/direct/future.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/direct/sinks.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/direct/streams.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/in_memory.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/keyed.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/keyed/dashmap.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/keyed/future.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/src/state/keyed/hashmap.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/direct.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/future.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/keyed.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/keyed_dashmap.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/keyed_hashmap.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/memory_leaks.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/middleware.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/proptests.regressions
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/proptests.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/sinks.rs
is excluded by!vendor/**
vendor/cargo/governor-0.6.3/tests/streams.rs
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/Cargo.toml
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/LICENSE
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/README.md
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/check.py
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/generate.py
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/src/generated.rs
is excluded by!vendor/**
vendor/cargo/no-std-compat-0.4.1/src/lib.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/CHANGELOG.md
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/CONTRIBUTING.md
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/Cargo.toml
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/CoC.md
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/LICENSE.txt
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/README.md
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/bors.toml
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/deny.toml
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/release.toml
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/src/lib.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/src/literals.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.45/immoral_math.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.45/immoral_math.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.45/zero_u8.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.45/zero_u8.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.45/zero_usize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.45/zero_usize.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.46/immoral_math.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.46/immoral_math.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.46/zero_u8.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.46/zero_u8.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.46/zero_usize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.46/zero_usize.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.48/immoral_math.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.48/immoral_math.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.48/zero_u8.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.48/zero_u8.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.48/zero_usize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.48/zero_usize.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/immoral_math.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/immoral_math.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/issue-17--adverse-conditions.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/issue-17--adverse-conditions.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/zero_u8.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/zero_u8.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/zero_usize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_1.54/zero_usize.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_nightly/immoral_math.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_nightly/immoral_math.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_nightly/zero_u8.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_nightly/zero_u8.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_nightly/zero_usize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compile-fail_nightly/zero_usize.stderr
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/compiletest.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/macro.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/run-pass/const_expression.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/run-pass/negative_i32.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/run-pass/nonzero_isize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/run-pass/nonzero_usize.rs
is excluded by!vendor/**
vendor/cargo/nonzero_ext-0.3.0/tests/run-pass/virtuous_math.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/CHANGELOG.md
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/Cargo.toml
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/LICENSE-APACHE
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/LICENSE-MIT
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/README.md
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/build.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/no_atomic.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/cfgs.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/gen/utils.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/arm_linux.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/README.md
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/aarch64.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/aarch64_aa64reg.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/aarch64_fuchsia.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/aarch64_macos.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/aarch64_windows.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/auxv.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/common.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/detect/x86_64.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/intrinsics.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/macros.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/powerpc64.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/s390x.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/atomic128/x86_64.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/core_atomic.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/fallback/mod.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/fallback/outline_atomics.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/fallback/seq_lock.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/fallback/seq_lock_wide.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/fallback/utils.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/float.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/README.md
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/armv4t.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/armv6m.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/avr.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/mod.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/msp430.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/riscv.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/interrupt/xtensa.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/mod.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/msp430.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/riscv.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/imp/x86.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/lib.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/tests/helper.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/tests/mod.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/src/utils.rs
is excluded by!vendor/**
vendor/cargo/portable-atomic-1.6.0/version.rs
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/Cargo.toml
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/Changelog.md
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/LICENSE-APACHE
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/LICENSE-MIT
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/README.md
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/img/top.png
is excluded by!**/*.png
,!vendor/**
vendor/cargo/spinning_top-0.3.0/src/lib.rs
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/src/relax.rs
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/src/rw_spinlock.rs
is excluded by!vendor/**
vendor/cargo/spinning_top-0.3.0/src/spinlock.rs
is excluded by!vendor/**
vendor/cargo/surf-governor-0.2.0/CHANGELOG.md
is excluded by!vendor/**
vendor/cargo/surf-governor-0.2.0/Cargo.toml
is excluded by!vendor/**
vendor/cargo/surf-governor-0.2.0/LICENSE-APACHE
is excluded by!vendor/**
vendor/cargo/surf-governor-0.2.0/LICENSE-MIT
is excluded by!vendor/**
vendor/cargo/surf-governor-0.2.0/README.md
is excluded by!vendor/**
vendor/cargo/surf-governor-0.2.0/src/lib.rs
is excluded by!vendor/**
Files selected for processing (14)
- chain/api/src/config.rs (3 hunks)
- chain/api/src/lib.rs (1 hunks)
- chain/rpc/Cargo.toml (1 hunks)
- chain/rpc/src/client.rs (4 hunks)
- hopr/hopr-lib/src/config.rs (1 hunks)
- hopr/hopr-lib/src/lib.rs (1 hunks)
- hoprd/hoprd/src/cli.rs (1 hunks)
- hoprd/hoprd/src/config.rs (2 hunks)
- vendor/cargo/crc32fast-1.3.2/.cargo-checksum.json (1 hunks)
- vendor/cargo/dashmap-5.5.3/.cargo-checksum.json (1 hunks)
- vendor/cargo/governor-0.6.3/.cargo-checksum.json (1 hunks)
- vendor/cargo/no-std-compat-0.4.1/.cargo-checksum.json (1 hunks)
- vendor/cargo/nonzero_ext-0.3.0/.cargo-checksum.json (1 hunks)
- vendor/cargo/portable-atomic-1.6.0/.cargo-checksum.json (1 hunks)
Files skipped from review due to trivial changes (6)
- vendor/cargo/crc32fast-1.3.2/.cargo-checksum.json
- vendor/cargo/dashmap-5.5.3/.cargo-checksum.json
- vendor/cargo/governor-0.6.3/.cargo-checksum.json
- vendor/cargo/no-std-compat-0.4.1/.cargo-checksum.json
- vendor/cargo/nonzero_ext-0.3.0/.cargo-checksum.json
- vendor/cargo/portable-atomic-1.6.0/.cargo-checksum.json
Additional comments not posted (7)
chain/rpc/Cargo.toml (1)
39-39
: Dependency added correctly.hopr/hopr-lib/src/config.rs (1)
49-50
: Field added correctly to theChain
struct.hoprd/hoprd/src/cli.rs (1)
164-172
: Argument added correctly to theCliArgs
struct.chain/api/src/config.rs (2)
149-150
: Field added correctly to theChainNetworkConfig
struct.
171-172
: Method updated correctly to accept the new parameter.Also applies to: 206-206
chain/api/src/lib.rs (1)
158-161
: Method updated correctly to setmax_requests_per_sec
in therpc_http_config
.hopr/hopr-lib/src/lib.rs (1)
443-443
: Ensure themax_rpc_requests_per_sec
parameter is correctly passed and utilized in theChainNetworkConfig::new
function.Verification successful
max_rpc_requests_per_sec
parameter is correctly passed and utilizedThe
max_rpc_requests_per_sec
parameter is correctly passed and utilized in theChainNetworkConfig::new
function.
- The parameter is passed to the
ChainNetworkConfig::new
function inhopr/hopr-lib/src/lib.rs
.- The
ChainNetworkConfig::new
function inchain/api/src/config.rs
acceptsmax_rpc_requests_per_sec
as an argument.- The parameter is used within the function to set
max_requests_per_sec
in theChainNetworkConfig
struct.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `max_rpc_requests_per_sec` parameter in the `ChainNetworkConfig::new` function. # Test: Search for the function definition and usage. Expect: Correct handling of the new parameter. rg --type rust 'fn new' | rg 'max_rpc_requests_per_sec'Length of output: 55
Script:
#!/bin/bash # Description: Locate the `ChainNetworkConfig::new` function and check for the usage of `max_rpc_requests_per_sec`. # Step 1: Locate the `ChainNetworkConfig::new` function definition. ast-grep --lang rust --pattern 'impl ChainNetworkConfig { $$$ fn new($_) { $$$ } $$$ }' # Step 2: Check for the usage of `max_rpc_requests_per_sec` within the function. rg 'max_rpc_requests_per_sec' -A 10 -B 10Length of output: 8050
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.yaml
Review profile: ASSERTIVE
Files selected for processing (1)
- chain/api/src/lib.rs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- chain/api/src/lib.rs
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: 7
Review Details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Files selected for processing (7)
- chain/api/src/config.rs (4 hunks)
- chain/api/src/lib.rs (1 hunks)
- chain/rpc/src/client.rs (9 hunks)
- hopli/src/environment_config.rs (1 hunks)
- hoprd/hoprd/example_cfg.yaml (1 hunks)
- hoprd/hoprd/src/config.rs (3 hunks)
- scripts/protocol-config-anvil.json (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- chain/api/src/lib.rs
- chain/rpc/src/client.rs
- hoprd/hoprd/src/config.rs
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.yaml
Review profile: ASSERTIVE
Files selected for processing (1)
- chain/rpc/src/client.rs (10 hunks)
Files skipped from review as they are similar to previous changes (1)
- chain/rpc/src/client.rs
This PR adds a rate limiter to all RPC requests.
The limit can be configured via
max_rpc_requests_per_sec
CLI argument orHOPRD_MAX_RPC_REQUESTS_PER_SEC
env variableAlso the
protocol_config.json
updated so that this value can be set in thechain
section per-chain. The CLI/env argument takes precedence (if specified).The default value for Anvil is set to 100, as it can handle almost arbitrary amount of RPC requests locallly.
Default is 10.