Skip to content

Remove non-RPC logic from docs and tests#822

Merged
FabijanC merged 4 commits intomainfrom
remove-non-rpc-docs
Jul 25, 2025
Merged

Remove non-RPC logic from docs and tests#822
FabijanC merged 4 commits intomainfrom
remove-non-rpc-docs

Conversation

@FabijanC
Copy link
Copy Markdown
Contributor

@FabijanC FabijanC commented Jul 25, 2025

Usage related changes

Development related changes

  • Remove non-rpc logic from tests.

Checklist:

  • Checked out the contribution guidelines
  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • No spelling errors - ./scripts/check_spelling.sh
  • Performed code self-review
  • Rebased to the latest commit of the target branch (or merged it into my branch)
    • Once you make the PR reviewable, please avoid force-pushing
  • Updated the docs if needed - ./website/README.md
  • Linked the issues resolvable by this PR - linking info
  • Updated the tests if needed; all passing - execution info

Summary by CodeRabbit

  • Documentation
    • Updated all user and developer documentation to exclusively describe JSON-RPC methods, removing references and examples for legacy HTTP POST endpoints.
    • Improved formatting and consistency of JSON-RPC request and response examples across guides.
  • Chores
    • Modernized internal scripts to use JSON-RPC requests instead of REST-style HTTP endpoints.
  • Tests
    • Removed integration tests and utilities related to non-JSON-RPC (legacy HTTP POST) endpoints.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 25, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This 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

  • Complexity: Moderate. The changes affect multiple areas: shell scripts, integration tests, and extensive documentation, but are conceptually straightforward as they focus on the removal of legacy non-RPC interfaces and related test coverage.
  • Scope: Dozens of files are touched, but the changes are repetitive and mostly involve deletions or format updates rather than new logic or complex refactoring.
  • Estimated review time: Reviewing all deletions, documentation updates, and the new JSON-RPC usage patterns is expected to take approximately 18 minutes.
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-non-rpc-docs

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.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@FabijanC
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 25, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@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.

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 correctness

Change “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 that dry_run param is optional

Consider adding a short inline comment (like you did for the other optional fields) noting that dry_run is optional and defaults to false, so users immediately know it can be omitted.

contracts/l1-l2-messaging/README.md (1)

68-68: Tighten wording

Static-analysis hint is valid – “Deploy the L1L2.sol contract 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 fragile

The 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 using jq -n --arg to avoid the quote-juggling.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1a27fd and 31382d3.

📒 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 /mint endpoint while maintaining clear documentation for the JSON-RPC method devnet_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_block endpoint, making the documentation cleaner and focused exclusively on the JSON-RPC method devnet_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 PostReqwestSender import 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 PostReqwestSender import 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 – /rpc vs root

Earlier you use curl http://127.0.0.1:5050/rpc --json …, here it switches to the root path http://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).

@FabijanC FabijanC merged commit 555ee9a into main Jul 25, 2025
1 check passed
@FabijanC FabijanC deleted the remove-non-rpc-docs branch July 25, 2025 13:14
@coderabbitai coderabbitai bot mentioned this pull request Sep 9, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-RPC requests can be removed from docs

1 participant