Remove non-RPC logic from docs and tests#822
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis set of changes removes all references, code, and documentation related to non-JSON-RPC (REST-style) HTTP endpoints throughout the codebase and documentation. All shell scripts and documentation now use JSON-RPC 2.0 formatted requests exclusively for Devnet operations such as minting, block creation, aborting blocks, time manipulation, dumping/loading state, and L1-L2 messaging. Multiple integration tests that previously verified non-RPC HTTP endpoints have been deleted, and related utility code and imports have been removed. The documentation has been updated to only describe JSON-RPC methods, eliminating all examples and instructions for direct HTTP POST endpoint usage. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes
✨ Finishing Touches🧪 Generate unit tests
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
Documentation and Community
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (5)
website/docs/dump-load-restart.md (1)
89-89: Minor style improvement suggested.Consider the static analysis suggestion to make the text more concise by removing "of":
-Devnet can be restarted by making a `JSON-RPC` request with method name `devnet_restart`. All of the deployed contracts (including predeployed), blocks and storage updates will be restarted to the original state, without the transactions and requests that may have been loaded from a dump file on startup. +Devnet can be restarted by making a `JSON-RPC` request with method name `devnet_restart`. All deployed contracts (including predeployed), blocks and storage updates will be restarted to the original state, without the transactions and requests that may have been loaded from a dump file on startup.website/docs/starknet-time.md (1)
3-3: Pluralize “timestamp” for grammatical correctnessChange “Block and state timestamp can be manipulated …” to “Block and state timestamps can be manipulated …” – plural noun agrees with plural verb.
website/docs/postman.md (1)
88-90: Call-out thatdry_runparam is optionalConsider adding a short inline comment (like you did for the other optional fields) noting that
dry_runis optional and defaults tofalse, so users immediately know it can be omitted.contracts/l1-l2-messaging/README.md (1)
68-68: Tighten wordingStatic-analysis hint is valid – “Deploy the
L1L2.solcontract to receive/send messages …” is more concise than “in order to receive/send”.contracts/l1-l2-messaging/run_e2e.sh (1)
70-82: Variable interpolation inside single-quoted JSON is fragileThe current pattern (
"l2_contract_address": "'$CONTRACT_L2'",) works but becomes hard to read and easy to break. Consider constructing the payload in a HEREDOC or usingjq -n --argto avoid the quote-juggling.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
contracts/l1-l2-messaging/README.md(5 hunks)contracts/l1-l2-messaging/run_e2e.sh(3 hunks)tests/integration/common/reqwest_client.rs(0 hunks)tests/integration/test_abort_blocks.rs(0 hunks)tests/integration/test_blocks_generation.rs(0 hunks)tests/integration/test_dump_and_load.rs(0 hunks)tests/integration/test_minting.rs(1 hunks)tests/integration/test_restart.rs(0 hunks)tests/integration/test_restrictive_mode.rs(2 hunks)website/docs/balance.md(1 hunks)website/docs/blocks.md(2 hunks)website/docs/dump-load-restart.md(3 hunks)website/docs/postman.md(1 hunks)website/docs/starknet-time.md(1 hunks)
💤 Files with no reviewable changes (5)
- tests/integration/test_restart.rs
- tests/integration/test_blocks_generation.rs
- tests/integration/common/reqwest_client.rs
- tests/integration/test_dump_and_load.rs
- tests/integration/test_abort_blocks.rs
🧰 Additional context used
🧬 Code Graph Analysis (3)
tests/integration/test_minting.rs (1)
tests/integration/common/background_devnet.rs (1)
reqwest_client(85-87)
tests/integration/test_restrictive_mode.rs (1)
tests/integration/common/background_devnet.rs (1)
reqwest_client(85-87)
contracts/l1-l2-messaging/run_e2e.sh (1)
tests/integration/test_messaging.rs (1)
withdraw(51-65)
🪛 LanguageTool
website/docs/dump-load-restart.md
[style] ~89-~89: Consider removing “of” to be more concise
Context: ...uest with method name devnet_restart. All of the deployed contracts (including predeploy...
(ALL_OF_THE)
contracts/l1-l2-messaging/README.md
[style] ~68-~68: Consider a more concise word here.
Context: ... 2. Deploy the `L1L2.sol` contract in order to receive/send messages from/to L2. b...
(IN_ORDER_TO_PREMIUM)
🔇 Additional comments (9)
website/docs/balance.md (1)
12-12: LGTM! Documentation properly updated to JSON-RPC only.The change successfully removes the reference to the deprecated
POST /mintendpoint while maintaining clear documentation for the JSON-RPC methoddevnet_mint. This aligns perfectly with the PR objective of standardizing to JSON-RPC 2.0 exclusively.website/docs/blocks.md (2)
61-61: LGTM! Simplified documentation to focus on JSON-RPC only.The change removes the reference to the deprecated
POST /create_blockendpoint, making the documentation cleaner and focused exclusively on the JSON-RPC methoddevnet_createBlock.
118-118: LGTM! Consistent removal of HTTP POST endpoint references.The change removes the reference to HTTP POST endpoints for block abortion, maintaining consistency with the JSON-RPC-only approach throughout the documentation.
website/docs/dump-load-restart.md (2)
23-23: LGTM! Documentation properly updated to JSON-RPC terminology.The change clarifies that dumping is done via JSON-RPC request, maintaining consistency with the overall standardization to JSON-RPC 2.0.
65-65: LGTM! Consistent removal of HTTP POST endpoint references.The change removes the HTTP POST reference and focuses on JSON-RPC request terminology, aligning with the PR objective.
tests/integration/test_minting.rs (1)
7-8: LGTM! Import cleanup aligns with non-RPC removal.The removal of
PostReqwestSenderimport and the cleanup of other imports correctly reflects the elimination of non-RPC HTTP POST endpoint tests. The remaining imports support the JSON-RPC testing functionality appropriately.tests/integration/test_restrictive_mode.rs (2)
5-5: LGTM! Import cleanup reflects non-RPC removal.The removal of
PostReqwestSenderimport is consistent with the elimination of non-RPC HTTP POST endpoint tests, focusing the restrictive mode tests on JSON-RPC method restrictions only.
42-42: LGTM! Parameter correctly updated to JSON-RPC method name.The change from
"/load"to"devnet_load"properly reflects that restrictive mode now operates on JSON-RPC method names rather than HTTP endpoint paths. This aligns with the overall standardization to JSON-RPC 2.0.contracts/l1-l2-messaging/README.md (1)
52-60: Inconsistent RPC endpoint path –/rpcvs rootEarlier you use
curl http://127.0.0.1:5050/rpc --json …, here it switches to the root pathhttp://127.0.0.1:5050/ --json …. Unless both are officially supported, pick one form across the doc to avoid confusion (prefer/rpc, which matches devnet defaults).
Usage related changes
Development related changes
Checklist:
./scripts/format.sh./scripts/clippy_check.sh./scripts/check_unused_deps.sh./scripts/check_spelling.sh./website/README.mdSummary by CodeRabbit