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(tools): more examples for blocketa and blockheight #3842

Merged

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Sep 4, 2024

Description

  1. Add more examples for both tools blockheight and blocketa
  2. Use the times + heights for the v2 activation height on each network

@rootulp rootulp self-assigned this Sep 4, 2024
@rootulp rootulp marked this pull request as ready for review September 4, 2024 17:34
@rootulp rootulp requested a review from a team as a code owner September 4, 2024 17:35
@rootulp rootulp requested review from staheri14 and evan-forbes and removed request for a team September 4, 2024 17:35
Copy link
Contributor

coderabbitai bot commented Sep 4, 2024

Walkthrough

Walkthrough

The changes involve updates to constants related to block times and RPC endpoints in the tools/blocketa and tools/blockheight directories. The blockTime constant was adjusted to reflect new average block times for the Mainnet Beta, and new RPC endpoints were introduced for both the Mainnet Beta and Mocha testnet. Additionally, example target times for block height predictions were added, enhancing clarity and providing updated information.

Changes

Files Change Summary
tools/blocketa/main.go Updated blockTime to 11.75 seconds, added exampleMainnetRPC and exampleMainnetHeight.
tools/blockheight/main.go Updated blockTime to 11.75 seconds, renamed exampleNodeRPC to exampleArabicaRPC, added new RPC endpoints and target time constants for Mocha and Mainnet Beta.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Blocketa
    participant Blockheight

    User->>Blocketa: Run program
    Blocketa->>User: Provide exampleMainnetRPC and exampleMainnetHeight

    User->>Blockheight: Run program
    Blockheight->>User: Provide exampleArabicaRPC, exampleMochaRPC, exampleMainnetRPC, and target times
Loading

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 588ea98 and 5d32d86.

Files selected for processing (2)
  • tools/blocketa/main.go (3 hunks)
  • tools/blockheight/main.go (2 hunks)
Additional comments not posted (12)
tools/blocketa/main.go (5)

17-17: LGTM!

The code change is approved.


25-26: LGTM!

The code change is approved.


34-35: LGTM!

The code change is approved.


49-49: LGTM!

The code change is approved.


75-75: LGTM!

The code change is approved.

tools/blockheight/main.go (7)

17-17: Verify the accuracy of the updated blockTime value.

Please ensure that the updated blockTime value of 11.75 seconds accurately reflects the current average block time on the Mainnet Beta. You can verify this by checking the block times on https://www.mintscan.io/celestia/block/ or using the blocktime tool.


19-20: LGTM!

The renaming of exampleNodeRPC to exampleArabicaRPC improves clarity by specifying the testnet associated with the example RPC endpoint.


22-23: LGTM!

The addition of the exampleMochaRPC constant provides a relevant example RPC endpoint for the Mocha testnet, which aligns with the PR objective of enhancing the documentation and usability of the tool.


25-26: LGTM!

The addition of the exampleMainnetRPC constant provides a relevant example RPC endpoint for the Mainnet Beta, which aligns with the PR objective of enhancing the documentation and usability of the tool.


28-35: LGTM!

The addition of the exampleArabicaTime, exampleMochaTime, and exampleMainnetTime constants provides relevant examples for block height predictions, which aligns with the PR objective of enhancing the documentation and usability of the tool.


50-52: LGTM!

The updated example usage in the Run function demonstrates how to use the tool with the new example RPC endpoints and target times, which aligns with the PR objective of enhancing the documentation and usability of the tool.


Line range hint 1-97: LGTM!

The changes in the tools/blockheight/main.go file are reasonable and contribute to the overall goal of the PR, which is to enhance the documentation and usability of the blockheight tool. The updated constants and example usage provide relevant examples for different testnets and the Mainnet Beta, making it easier for users to understand and utilize the tool effectively.


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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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.

@rootulp rootulp enabled auto-merge (squash) September 4, 2024 18:33
@rootulp rootulp merged commit 4b34f8b into celestiaorg:main Sep 5, 2024
33 checks passed
@rootulp rootulp deleted the rp/tools-mainnet-beta-upgrade-height branch September 5, 2024 13:13
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.

3 participants