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

feat: update sequencing section to include local sequencer and steps to connect sequencers with rollups #510

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

MSevey
Copy link
Contributor

@MSevey MSevey commented Nov 15, 2024

Overview

Add local-sequencer tutorial.
Extend centralized sequencer tutorial to connect to rollup

Blocked by #509 because of some links

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced navigation structure in the sidebar for easier access to tutorials.
    • New tutorials added for "Local Sequencer" and "Centralized Sequencer."
    • Introduced sections for "Astria Sequencing" and "Based Sequencing" with links to track progress.
  • Bug Fixes

    • Corrected the og:description meta tag to reflect accurate page descriptions.
  • Documentation

    • Updated the overview of the sequencing process, including a new section on the "Mock Sequencer."
    • Improved formatting and accessibility of tutorial links.
  • Chores

    • Removed outdated placeholder tutorial files for "Astria Sequencing," "Based Sequencing," and "Centralized Sequencer."

@MSevey MSevey requested a review from gupadhyaya November 15, 2024 21:09
@MSevey MSevey self-assigned this Nov 15, 2024
Copy link
Contributor

coderabbitai bot commented Nov 15, 2024

Walkthrough

This pull request introduces several modifications to the VitePress configuration and tutorial files. Key changes include reorganizing sidebar navigation for clarity, updating the transformPageData function for accurate meta tag descriptions, and adding new tutorial sections for "Astria" and "Based" sequencing. Additionally, several placeholder tutorial files were deleted, while a new tutorial for a centralized sequencer was created. The overall structure and functionality of the navigation and tutorials have been enhanced to improve user guidance and access to content.

Changes

File Change Summary
.vitepress/config.ts - Updated sidebar structure for "Tutorials" section, added specific links for "Sequencing".
- Modified transformPageData function for correct og:description.
.vitepress/constants/constants.js - Added new property centralizedSequencerLatestTag: "v0.4.0" to constants object.
tutorials/astria.md - File deleted; previously contained a placeholder for "Astria Sequencing".
tutorials/based.md - File deleted; previously contained a placeholder for "Based Sequencing".
tutorials/centralized.md - File deleted; contained detailed documentation for a centralized sequencer.
tutorials/sequencing/astria.md - New section added for "Astria Sequencing" with a placeholder and GitHub link.
tutorials/sequencing/based.md - New section added for "Based Sequencing" with a placeholder and GitHub link.
tutorials/sequencing/centralized.md - New tutorial added for implementing a centralized sequencer with detailed instructions.
tutorials/sequencing/local.md - New tutorial added for setting up a local sequencer with step-by-step instructions.
tutorials/sequencing/overview.md - Updated to include a new "Mock Sequencer" section, improved section headers, and added links to implementations.

Possibly related PRs

Suggested reviewers

  • yarikbratashchuk
  • gupadhyaya
  • Manav-Aggarwal
  • jcstein

Poem

🐰 In the code where bunnies play,
New paths and links come out to stay.
Tutorials bloom, with guides anew,
For sequencing tales, both old and true.
Hop along, dear friends, don’t delay,
Explore the magic, come what may! 🌼


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 15, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://rollkit.github.io/docs-preview/./pr-510/
on branch main at 2024-11-19 14:17 UTC

@MSevey MSevey marked this pull request as ready for review November 19, 2024 14:16
@MSevey MSevey enabled auto-merge (squash) November 19, 2024 14:16
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: 3

🧹 Outside diff range and nitpick comments (12)
tutorials/sequencing/local.md (5)

4-6: Consider using an absolute import path for better maintainability.

The relative import path ../../.vitepress/constants/constants.js could break if the file structure changes. Consider using an absolute import path from the project root.

-import constants from '../../.vitepress/constants/constants.js'
+import constants from '@vitepress/constants/constants.js'

10-12: Consider adding version compatibility information.

It would be helpful to specify which versions of the local-sequencer and Rollkit CLI are compatible or required for this tutorial.


14-14: Fix typo in heading.

The word "Local" is repeated in the heading.

-## Setting Up a Local Local Sequencer
+## Setting Up a Local Sequencer
🧰 Tools
🪛 LanguageTool

[duplication] ~14-~14: Possible typo: you repeated a word
Context: ...nd running your chain. ## Setting Up a Local Local Sequencer To set up a local sequencer ...

(ENGLISH_WORD_REPEAT_RULE)


57-62: Add troubleshooting section for common issues.

Consider adding a troubleshooting section after the log messages to help users diagnose and resolve common connection issues, such as:

  • Port already in use
  • Incorrect rollup ID
  • Connection timeout

64-66: Enhance summary with next steps.

Consider adding:

  • Links to related tutorials or documentation
  • Common use cases or examples
  • Advanced configuration options
tutorials/sequencing/overview.md (2)

5-7: Consider improving header formatting for consistency.

The section header "Rollkit prior to Sequencing" should follow the same formatting pattern as other headers, using a consistent heading level and ID anchor.

-## Rollkit prior to Sequencing
+## Historical Context {#historical-context}
🧰 Tools
🪛 LanguageTool

[style] ~5-~5: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...se your sequencing scheme. ## Rollkit prior to Sequencing Rollkit's aggregator node wa...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


37-41: Consider improving grammar in the centralized sequencer description.

Add the article "a" before "centralized sequencer" for better readability.

-The aggregator node relays rollup transactions to centralized sequencer which then submits
+The aggregator node relays rollup transactions to a centralized sequencer which then submits
🧰 Tools
🪛 LanguageTool

[style] ~39-~39: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...factored functionality from the Rollkit prior to v0.14.0. The centralized sequencer is...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[uncategorized] ~39-~39: You might be missing the article “a” here.
Context: ...ator node relays rollup transactions to centralized sequencer which then submits them to th...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

tutorials/sequencing/centralized.md (4)

8-8: Consider adding more context for beginners

The technical explanation could be more approachable for newcomers. Consider breaking down concepts like "GRPC server" and "go-sequencing interface" with brief explanations or links to relevant documentation.


14-22: Consider structuring prerequisites as a checklist

To make it easier for users to verify they have completed all prerequisites, consider formatting this section as a checklist:

-Before proceeding, ensure that you have completed the [quick start](/tutorials/quick-start) or [build a chain](/tutorials/wordle) tutorial, which covers installing the rollkit CLI, building your chain, and running your chain.
+Before proceeding, ensure you have:
+- [ ] Completed either:
+  - The [quick start](/tutorials/quick-start) tutorial, or
+  - The [build a chain](/tutorials/wordle) tutorial
+- [ ] Installed the rollkit CLI
+- [ ] Built your chain
+- [ ] Set up a running DA Layer (required before starting the sequencer)

33-53: Improve configuration options documentation

Consider grouping the configuration options by category and adding more context:

### Configuration Options

#### Server Configuration
- `host` (default: "localhost"): Centralized sequencer host
- `port` (default: "50051"): Centralized sequencer port
- `listen-all`: Listen on all network interfaces (0.0.0.0) instead of just localhost

#### Rollup Configuration
- `rollup-id` (default: "rollupId"): Unique identifier for your rollup
- `batch-time` (default: 2s): Time interval between batch generation

#### DA Layer Configuration
- `da_address` (default: "http://localhost:26658"): Data Availability layer endpoint
- `da_auth_token`: Authentication token for DA layer access
- `da_namespace`: Namespace for transaction submission in DA layer

#### Storage Configuration
- `db_path`: Local database storage path

Also, replace hard tabs with spaces in the help output for consistent formatting.

🧰 Tools
🪛 Markdownlint

36-36: Column: 5
Hard tabs

(MD010, no-hard-tabs)


38-38: Column: 5
Hard tabs

(MD010, no-hard-tabs)


40-40: Column: 5
Hard tabs

(MD010, no-hard-tabs)


42-42: Column: 5
Hard tabs

(MD010, no-hard-tabs)


44-44: Column: 5
Hard tabs

(MD010, no-hard-tabs)


46-46: Column: 5
Hard tabs

(MD010, no-hard-tabs)


48-48: Column: 5
Hard tabs

(MD010, no-hard-tabs)


50-50: Column: 5
Hard tabs

(MD010, no-hard-tabs)


52-52: Column: 5
Hard tabs

(MD010, no-hard-tabs)


116-118: Enhance the summary section with next steps and troubleshooting

Consider expanding the summary to include:

  1. Common issues and their solutions
  2. Next steps for users (e.g., monitoring, scaling, production considerations)
  3. Links to related documentation or advanced topics

Example addition:

## Next Steps
- Learn about monitoring your sequencer
- Explore production deployment considerations
- Understand scaling options

## Troubleshooting
Common issues you might encounter:
- Connection refused: Verify the DA layer is running
- Mismatched rollup ID: Ensure the ID matches between chain and sequencer
- Transaction delays: Check batch-time configuration
.vitepress/config.ts (1)

Line range hint 141-156: Fix logical error in OpenGraph description meta tag

There's a logical error in setting the og:description meta tag. The current implementation incorrectly compares the layout with the description string.

Apply this fix:

      {
        name: "og:description",
-       content: pageData.frontmatter.layout === `${pageData.description}`,
+       content: pageData.description || "The unstoppable stack",
      },

This change:

  1. Directly uses the page description
  2. Falls back to the default description if none is provided
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b265441 and da855e3.

📒 Files selected for processing (10)
  • .vitepress/config.ts (1 hunks)
  • .vitepress/constants/constants.js (1 hunks)
  • tutorials/astria.md (0 hunks)
  • tutorials/based.md (0 hunks)
  • tutorials/centralized.md (0 hunks)
  • tutorials/sequencing/astria.md (1 hunks)
  • tutorials/sequencing/based.md (1 hunks)
  • tutorials/sequencing/centralized.md (1 hunks)
  • tutorials/sequencing/local.md (1 hunks)
  • tutorials/sequencing/overview.md (2 hunks)
💤 Files with no reviewable changes (3)
  • tutorials/astria.md
  • tutorials/based.md
  • tutorials/centralized.md
✅ Files skipped from review due to trivial changes (2)
  • tutorials/sequencing/astria.md
  • tutorials/sequencing/based.md
🧰 Additional context used
🪛 Markdownlint
tutorials/sequencing/centralized.md

36-36: Column: 5
Hard tabs

(MD010, no-hard-tabs)


38-38: Column: 5
Hard tabs

(MD010, no-hard-tabs)


40-40: Column: 5
Hard tabs

(MD010, no-hard-tabs)


42-42: Column: 5
Hard tabs

(MD010, no-hard-tabs)


44-44: Column: 5
Hard tabs

(MD010, no-hard-tabs)


46-46: Column: 5
Hard tabs

(MD010, no-hard-tabs)


48-48: Column: 5
Hard tabs

(MD010, no-hard-tabs)


50-50: Column: 5
Hard tabs

(MD010, no-hard-tabs)


52-52: Column: 5
Hard tabs

(MD010, no-hard-tabs)

🪛 LanguageTool
tutorials/sequencing/local.md

[duplication] ~14-~14: Possible typo: you repeated a word
Context: ...nd running your chain. ## Setting Up a Local Local Sequencer To set up a local sequencer ...

(ENGLISH_WORD_REPEAT_RULE)

tutorials/sequencing/overview.md

[style] ~5-~5: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...se your sequencing scheme. ## Rollkit prior to Sequencing Rollkit's aggregator node wa...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[style] ~39-~39: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...factored functionality from the Rollkit prior to v0.14.0. The centralized sequencer is...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[uncategorized] ~39-~39: You might be missing the article “a” here.
Context: ...ator node relays rollup transactions to centralized sequencer which then submits them to th...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

🔇 Additional comments (7)
.vitepress/constants/constants.js (2)

Line range hint 1-17: Implementation looks good!

The constants are well-organized and properly frozen for immutability. The export is correctly implemented.


14-14: Verify version compatibility with go-sequencing

The newly added centralizedSequencerLatestTag (v0.4.0) is older than goSequencingLatestTag (v0.4.1). Please verify if this specific version is intentional and document any compatibility requirements between these components.

Run the following script to check the changelog and compatibility information:

tutorials/sequencing/overview.md (4)

3-4: LGTM! Clear introduction establishing the context.

The added introductory sentence effectively establishes the logical progression from DA layer selection to sequencing scheme choice.


25-36: LGTM! Excellent explanation of the mock sequencer.

The section effectively explains the default sequencer behavior, includes helpful log examples, and appropriately warns about production usage limitations.


Line range hint 8-24: LGTM! Well-structured interface documentation.

The section clearly explains the sequencing interface and its key functions. Let's verify the repository link is accessible.

✅ Verification successful

Repository link is valid and accessible

The GitHub repository link https://github.com/rollkit/go-sequencing is active and returns a successful HTTP 200 status code, confirming it's accessible to users.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the go-sequencing repository link
curl -s -o /dev/null -w "%{http_code}" https://github.com/rollkit/go-sequencing

Length of output: 85

🧰 Tools
🪛 LanguageTool

[style] ~5-~5: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...se your sequencing scheme. ## Rollkit prior to Sequencing Rollkit's aggregator node wa...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


42-46: Verify the existence of all referenced sequencer implementations.

Let's ensure all the linked sequencer implementations exist in the documentation.

✅ Verification successful

All referenced sequencer documentation files exist and are accessible

All sequencer documentation files are present in the tutorials/sequencing/ directory:

  • local.md
  • centralized.md
  • based.md
  • forced-inclusion.md
  • astria.md

Additionally, the centralized-sequencer repository is accessible at GitHub.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if all referenced sequencer documentation files exist
echo "Checking for sequencer documentation files..."
for file in local centralized based forced-inclusion astria; do
  fd -t f "^${file}\.(md|mdx)$" tutorials/sequencing/
done

# Also verify the centralized-sequencer repository
curl -s -o /dev/null -w "%{http_code} - centralized-sequencer repo\n" https://github.com/rollkit/centralized-sequencer

Length of output: 1010

.vitepress/config.ts (1)

250-270: Verify existence of referenced tutorial files

The sidebar structure looks good and aligns with the PR objectives. However, let's ensure all referenced tutorial files exist to prevent broken links.

✅ Verification successful

All tutorial files exist and are properly linked

All referenced tutorial files in the sidebar configuration have been verified to exist in the correct locations. The navigation structure is complete and properly mapped to existing content files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all referenced tutorial files exist
# Expected: All files should exist to avoid broken links

echo "Checking existence of sequencing tutorial files..."
for path in \
  "tutorials/sequencing/overview.md" \
  "tutorials/sequencing/local.md" \
  "tutorials/sequencing/centralized.md" \
  "tutorials/sequencing/based.md" \
  "tutorials/sequencing/forced-inclusion.md" \
  "tutorials/sequencing/astria.md"
do
  if [ -f "$path" ]; then
    echo "✓ Found: $path"
  else
    echo "✗ Missing: $path"
  fi
done

Length of output: 2315

tutorials/sequencing/local.md Show resolved Hide resolved
tutorials/sequencing/centralized.md Show resolved Hide resolved
tutorials/sequencing/centralized.md Show resolved Hide resolved
@MSevey MSevey merged commit b3d71c5 into main Nov 19, 2024
6 checks passed
@MSevey MSevey deleted the sequencer-tutorials branch November 19, 2024 17:46
```

```sh [Build a Chain]
./build/centralized-sequencer -rollup-id wordle -da_address http://localhost:7980
Copy link
Contributor

Choose a reason for hiding this comment

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

just realized that we have underscore and dash in flags, when we can have only underscores

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants