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

chore: add execution API disclaimer to docs #521

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Conversation

MSevey
Copy link
Contributor

@MSevey MSevey commented Nov 21, 2024

Overview

To help us bridge the gap between updating the execution tutorials and the execution API updates, I thought it would be a good idea to add a disclaimer.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced the ExecutionCallout component to inform users about updates to the Rollkit execution system and encourage feedback.
    • Enhanced tutorials with visual callouts for tips and warnings, improving user guidance.
  • Documentation Improvements

    • Updated tutorial links for better organization under the "Execution" category.
    • Reorganized content in multiple tutorials for clarity, including detailed instructions for setup and configuration.
    • Added new sections in tutorials to provide contextual tips and warnings, enhancing user experience.

These changes enhance user experience by providing clearer instructions and improving the overall structure of the documentation.

Copy link
Contributor

coderabbitai bot commented Nov 21, 2024

Walkthrough

A new Vue component named ExecutionCallout has been added to the project, which provides users with updates regarding the Rollkit execution system and encourages them to report issues. The sidebar structure in the configuration file has been reorganized to standardize tutorial links under an "Execution" category. Several tutorial markdown files have been updated to incorporate the new ExecutionCallout component and improve content clarity, including the addition of contextual tips and warnings.

Changes

File Path Change Summary
.vitepress/components/execution_callout.vue New component ExecutionCallout added.
.vitepress/config.ts Sidebar structure updated; tutorial links standardized under the "Execution" category.
tutorials/execution/artela-evm-plus-plus.md Components Callout and ExecutionCallout added; content reorganized for clarity.
tutorials/execution/beaconkit.md Components Callout and ExecutionCallout added; content enhanced with tips and warnings.
tutorials/execution/cosmwasm.md Component ExecutionCallout added; import paths updated; content reorganized.
tutorials/execution/evm-contract-interaction.md Components Callout and ExecutionCallout added; new sections for tips and warnings included.
tutorials/execution/octane-evm.md Components Callout and ExecutionCallout added; formatting improved with new sections.
tutorials/execution/polaris-evm.md Components Callout and ExecutionCallout added; new sections for tips and warnings included.

Possibly related PRs

Suggested reviewers

  • jcstein
  • gupadhyaya
  • yarikbratashchuk

🐇 In the meadow, where bunnies play,
A new callout hops in to brighten the day!
With tips and warnings, it guides the way,
For Rollkit's updates, come join the fray!
So hop on over, don’t delay! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e3e20b6 and 5dd105e.

📒 Files selected for processing (1)
  • .vitepress/config.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .vitepress/config.ts

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>, please review it.
    • 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 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 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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

CodeRabbit Configuration 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.

Copy link
Contributor

github-actions bot commented Nov 21, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://rollkit.github.io/docs-preview/./pr-521/
on branch main at 2024-12-02 17:46 UTC

Copy link
Contributor

@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: 2

🧹 Outside diff range and nitpick comments (8)
.vitepress/components/execution_callout.vue (2)

15-19: Consider adopting TypeScript

The component could benefit from TypeScript for better maintainability and type safety.

Example TypeScript conversion:

-<script>
+<script lang="ts">
+import { defineComponent } from 'vue'
+
-export default {
+export default defineComponent({
     name: 'ExecutionCallout',
-}
+})
 </script>

21-23: Add styles to enhance visual prominence

The disclaimer would be more effective with some visual styling to draw attention.

Consider adding these styles:

 <style scoped>
-/* Add any custom styles for the component here */
+.div {
+    margin: 1rem 0;
+    padding: 1rem;
+    border-left: 4px solid #f97316;
+    background-color: #fff7ed;
+    border-radius: 0.375rem;
+}
+
+p {
+    margin: 0;
+    color: #9a3412;
+    font-size: 0.875rem;
+    line-height: 1.5;
+}
+
+a {
+    color: #ea580c;
+    text-decoration: underline;
+    text-underline-offset: 2px;
+}
+
+a:hover {
+    color: #9a3412;
+}
 </style>
tutorials/execution/octane-evm.md (1)

3-9: Remove unused import constants

The constants import from ../../.vitepress/constants/constants.js appears to be unused in this file.

<script setup>
import Callout from '../../.vitepress/components/callout.vue'
import ExecutionCallout from '../../.vitepress/components/execution_callout.vue'
-import constants from '../../.vitepress/constants/constants.js'
</script>
tutorials/execution/artela-evm-plus-plus.md (1)

Repository and URL references need updates in the tutorial

The verification revealed several discrepancies that need to be addressed:

  • The gm-portal repository is referenced incorrectly. While the tutorial mentions artela-network/gm-portal, the actual repository is under the rollkit organization.
  • All example repository links (reentrancy guard, black list aspect, throttler aspect, etc.) point to the correct artela-network organization and include the rollkit branch.
  • The contract address 0x9fcEbD70654D360b41ccD123dADAAad6ce13C788 is correctly referenced in the tutorial.
  • The npm package @artela-next/aspect-tool exists and is actively maintained.
  • The documentation links to artela.network are valid and accessible.
🔗 Analysis chain

Line range hint 96-106: Verify the accuracy of replacement values and URLs

The tutorial contains specific replacement instructions with URLs, contract addresses, and package names. Let's verify their accuracy:

Also applies to: 108-114


Let me analyze the verification results:

  1. The gm-portal repository exists and is accessible, but it's under rollkit/gm-portal instead of artela-network/gm-portal as shown in the output.

  2. The contract address verification attempt failed because it was trying to connect to a local node (localhost:8545) which isn't available in the sandbox environment.

  3. The @artela-next/aspect-tool package exists on npm and is actively maintained, with the latest version being 0.0.61.

Let me verify the content further by checking for any contract addresses or URLs mentioned in the tutorial:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and accessibility of referenced repositories and packages

# Check if the gm-portal repository exists and is accessible
gh repo view artela-network/gm-portal

# Verify if the specified contract address has any transactions
curl -s http://localhost:8545 -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x9fcEbD70654D360b41ccD123dADAAad6ce13C788", "latest"],"id":1}'

# Check if the aspect-tool package exists on npm
curl -s https://registry.npmjs.org/@artela-next/aspect-tool

Length of output: 6927


Script:

#!/bin/bash
# Search for contract addresses and URLs in the tutorial
rg -i "0x[a-fA-F0-9]{40}" tutorials/execution/artela-evm-plus-plus.md
rg -i "http[s]?://[^\s)>]+" tutorials/execution/artela-evm-plus-plus.md

Length of output: 2352

🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/beaconkit.md (1)

Line range hint 18-300: LGTM with enhancement suggestions.

The tutorial content is well-structured and comprehensive. Consider these optional improvements:

  1. Add expected output or success criteria after each major step
  2. Include version information for prerequisites
  3. Add links to related tutorials or documentation where mentioned
🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/cosmwasm.md (3)

Line range hint 171-174: Add error handling guidance for Docker commands

Consider adding error handling guidance for common Docker issues, such as permission errors or network connectivity problems.

Add a troubleshooting section like:

+ ### Troubleshooting Docker Commands
+ 
+ If you encounter permission errors:
+ - Ensure Docker daemon is running: `systemctl status docker`
+ - Add your user to the docker group: `sudo usermod -aG docker $USER`
+ 
+ If you face network issues:
+ - Check Docker network connectivity: `docker network ls`
+ - Verify the container can reach the network: `docker exec $CW ping 8.8.8.8`
🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)


Line range hint 186-193: Explain sudo usage and provide alternative

The sudo command is used without explanation. Consider explaining why it's needed and provide a non-sudo alternative.

+ # If you're part of the docker group, you can run without sudo:
docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/rust-optimizer:0.12.6

+ # Otherwise, use sudo:
sudo docker run ...
🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)


Line range hint 219-222: Add verification steps after contract deployment

Consider adding steps to verify the contract deployment was successful before proceeding.

TX_HASH=$(wasmd tx wasm store cw_nameservice.wasm --from localwasm-key --keyring-backend test --chain-id localwasm --gas-prices 0.025uwasm --gas auto --gas-adjustment 1.3 --node http://127.0.0.1:36657 --output json -y | jq -r '.txhash') && echo $TX_HASH

+ # Verify the transaction was successful
+ wasmd query tx $TX_HASH --node http://127.0.0.1:36657 --output json | jq '.code'
+ # Expected output: 0 (indicates success)
🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8c1d255 and 5fa2005.

📒 Files selected for processing (8)
  • .vitepress/components/execution_callout.vue (1 hunks)
  • .vitepress/config.ts (1 hunks)
  • tutorials/execution/artela-evm-plus-plus.md (1 hunks)
  • tutorials/execution/beaconkit.md (1 hunks)
  • tutorials/execution/cosmwasm.md (1 hunks)
  • tutorials/execution/evm-contract-interaction.md (1 hunks)
  • tutorials/execution/octane-evm.md (1 hunks)
  • tutorials/execution/polaris-evm.md (1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.35.0)
tutorials/execution/artela-evm-plus-plus.md

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/beaconkit.md

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/cosmwasm.md

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/evm-contract-interaction.md

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/octane-evm.md

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/polaris-evm.md

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

🔇 Additional comments (14)
tutorials/execution/octane-evm.md (2)

11-16: LGTM! Well-structured implementation of the execution API disclaimer

The implementation effectively achieves the PR objective by:

  • Using appropriate warning/tip containers for visual distinction
  • Placing the disclaimer prominently at the top of the document
  • Utilizing Vue components for consistent styling across docs
🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)


15-15: Verify the ExecutionCallout component content

Let's ensure the ExecutionCallout component contains the appropriate disclaimer message about execution API updates.

✅ Verification successful

ExecutionCallout component contains appropriate disclaimer message

The component correctly implements a disclaimer message that:

  • Informs about the ongoing execution overhaul with go-execution interface
  • Warns about outdated execution tutorials pending updates
  • Provides proper guidance for questions via GitHub issues or Telegram
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the content of the ExecutionCallout component

# Look for the ExecutionCallout component implementation
cat $(fd -t f "execution_callout.vue" .vitepress/components) || echo "Component file not found"

Length of output: 887

🧰 Tools
🪛 Markdownlint (0.35.0)

15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/evm-contract-interaction.md (2)

3-9: LGTM: Well-structured Vue.js setup

The script setup follows Vue.js best practices with proper component imports and markdownlint configuration.


11-16: LGTM: Strategic placement of execution API disclaimer

The ExecutionCallout component is appropriately placed at the beginning of the tutorial for maximum visibility, ensuring users are aware of important execution API updates before proceeding.

Let's verify the ExecutionCallout component implementation:

✅ Verification successful

Verified: ExecutionCallout component contains appropriate disclaimer

The ExecutionCallout component is properly implemented with the execution API disclaimer, containing:

  • Clear notice about the ongoing execution overhaul
  • Link to the new go-execution interface
  • Warning about outdated execution tutorials
  • Links for support via GitHub issues and Telegram
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the ExecutionCallout component exists and contains the disclaimer

# Check if the ExecutionCallout component exists
fd -e vue "execution_callout.vue" .vitepress/components/

# View the component content
cat $(fd -e vue "execution_callout.vue" .vitepress/components/)

Length of output: 991

🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/artela-evm-plus-plus.md (2)

3-9: LGTM: Well-structured Vue component setup

The component imports and markdownlint configurations are properly organized.


11-16: LGTM: Effective placement of callouts

The warning block with ExecutionCallout effectively implements the execution API disclaimer requirement, while the tip block provides additional context. Their placement at the start ensures high visibility.

🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/beaconkit.md (2)

4-9: LGTM: Component imports and script setup are correct.

The Vue component imports and markdownlint configuration are properly structured.


11-16: Verify the existence of the referenced components.

The placement and structure of the callouts look good, enhancing visibility of important information.

✅ Verification successful

Components verified and correctly placed

Both Callout and ExecutionCallout components exist in the expected location at .vitepress/components/, confirming their availability for use in the documentation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the referenced Vue components
fd -e vue "callout.vue|execution_callout.vue" .vitepress/components/

Length of output: 148

🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tutorials/execution/polaris-evm.md (3)

3-9: LGTM: Component setup follows Vue.js best practices

The script setup correctly imports the necessary components and constants. The markdownlint warnings about inline HTML are expected and can be safely ignored as they are necessary for Vue.js components.


11-17: LGTM: Well-placed disclaimer components

The placement of the Callout and ExecutionCallout components at the beginning of the document ensures high visibility. The semantic wrapping (tip/warning) appropriately conveys the importance levels of the messages.

🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)


Line range hint 382-383: Verify the reliability of the Mocha testnet RPC endpoint

While the change from local devnet to Mocha testnet RPC is correct, we should verify the reliability and stability of the public RPC endpoint.

✅ Verification successful

RPC endpoint verification successful with good response time

The Mocha testnet RPC endpoint (https://rpc-mocha.pops.one) demonstrates:

  • Fast response time of ~0.73 seconds
  • Correct JSON structure with expected block height format
  • Stable and accessible endpoint
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the availability and response time of the Mocha testnet RPC endpoint

# Test RPC endpoint availability and response time
curl -w "\nTime: %{time_total}s\n" -o /dev/null -s https://rpc-mocha.pops.one/block

# Verify if the endpoint returns the expected block height format
curl -s https://rpc-mocha.pops.one/block | jq -e '.result.block.header.height' > /dev/null
if [ $? -eq 0 ]; then
    echo "Response format verification: OK"
else
    echo "Response format verification: Failed"
fi

Length of output: 274

🧰 Tools
🪛 Markdownlint (0.35.0)

12-12: Element: Callout
Inline HTML

(MD033, no-inline-html)


15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)


19-19: null
Bare URL used

(MD034, no-bare-urls)

.vitepress/config.ts (1)

278-291: LGTM! Consistent organization of execution tutorials.

The reorganization of execution tutorials under a standardized path structure improves navigation and maintainability.

Let's verify that all referenced tutorial files exist:

✅ Verification successful

Let me try a different approach to verify the files using fd as recommended in the instructions.


✅ All referenced tutorial files exist and are properly organized

All the tutorial files referenced in the sidebar configuration are present in the tutorials/execution/ directory:

  • tutorials/execution/cosmwasm.md
  • tutorials/execution/octane-evm.md
  • tutorials/execution/beaconkit.md
  • tutorials/execution/artela-evm-plus-plus.md
  • tutorials/execution/evm-contract-interaction.md

The sidebar structure correctly maps to the actual file organization.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify existence of execution tutorial files

# Check for each referenced tutorial file
for file in cosmwasm octane-evm beaconkit artela-evm-plus-plus evm-contract-interaction; do
  echo "Checking for /tutorials/execution/$file.md"
  if ! [ -f "tutorials/execution/$file.md" ]; then
    echo "Warning: Missing file tutorials/execution/$file.md"
  fi
done

Length of output: 1272


Script:

#!/bin/bash
# Search for markdown files in tutorials/execution directory
fd -e md . tutorials/execution/

# Also check if the tutorials/execution directory exists
if [ -d "tutorials/execution" ]; then
  echo "tutorials/execution directory exists"
else
  echo "tutorials/execution directory does not exist"
fi

Length of output: 375

tutorials/execution/cosmwasm.md (2)

5-7: LGTM: Import statements are properly configured

The import statements correctly reference the components and constants from the .vitepress directory.


14-16: LGTM: Execution disclaimer properly implemented

The ExecutionCallout component is appropriately wrapped in a warning block for visibility, aligning with the PR's objective to add the execution API disclaimer.

🧰 Tools
🪛 Markdownlint (0.35.0)

15-15: Element: ExecutionCallout
Inline HTML

(MD033, no-inline-html)

tuxcanfly
tuxcanfly previously approved these changes Nov 22, 2024
Copy link
Contributor

@tuxcanfly tuxcanfly left a comment

Choose a reason for hiding this comment

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

OK.

Copy link
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

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

utACK

@MSevey MSevey merged commit 0ea3d02 into main Dec 2, 2024
6 checks passed
@MSevey MSevey deleted the execution-api-disclaimer branch December 2, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants