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/uml_sequence_diagrams #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

aarmoa
Copy link

@aarmoa aarmoa commented Mar 20, 2024

  • With the idea of understanding the logic behind Peggo, I created some UML sequence diagrams to describe the general logic. If you think they might be useful, we could add them to the project.
  • The diagrams are specified using PlantUML syntax. To generate the diagrams from the definition you can:

Summary by CodeRabbit

  • Documentation
    • Added sequence diagrams to illustrate system functionalities and interactions:
      • BatchRequesterLoop.
      • Ethereum Oracle main loop.
      • EthSigner main loop.
      • RelayerMainLoop.
      • Orchestrator start-up sequence.

@aarmoa aarmoa requested review from albertchon and dbrajovic March 20, 2024 20:11
Copy link

coderabbitai bot commented Mar 20, 2024

Walkthrough

These updates introduce and detail the functionalities and interactions within a blockchain network system, focusing on the orchestration of Ethereum Oracle, Eth Signer, Batch Requester, and Relayer processes. They illustrate the communication flow between various components such as the Peggy Orchestrator, Injective Network, Ethereum Network, and Peggy Chain Module, enhancing understanding of the system's operation for batch processing, event handling, and data retrieval.

Changes

Files Change Summary
.../BatchRequesterLoop.puml, .../EthOracleMainLoop.puml, .../EthSignerMainLoop.puml, .../RelayerMainLoop.puml Introduce sequence diagrams illustrating various system functionalities and interactions.
.../orchestratorStart.puml Introduces a sequence diagram depicting the Orchestrator's startup process and operational modes.

🐇💻

In a world of code and loop,
Where Orchestrators and Networks swoop,
A rabbit hopped, with eyes so bright,
Watching as the chains unite.

Through Ethereum's vast, open sea,
It leaped with glee, so full of spree,
For in each line, and in each dot,
A tale of blocks, finely wrought.

🌌🚀🐰


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>.
    • Generate unit-tests 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 tests 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 tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 83358cc and 0e78bb1.
Files selected for processing (5)
  • uml/BatchRequesterLoop.puml (1 hunks)
  • uml/EthOracleMainLoop.puml (1 hunks)
  • uml/EthSignerMainLoop.puml (1 hunks)
  • uml/RelayerMainLoop.puml (1 hunks)
  • uml/orchestratorStart.puml (1 hunks)
Additional comments: 5
uml/orchestratorStart.puml (1)
  • 1-31: The UML diagram correctly depicts the initial orchestration process based on the presence of a registered ETH address. The use of alt/else for branching logic is clear and effectively communicates the different operational modes.

Consider adding a brief description at the top of the file, explaining the purpose and scope of this diagram for future reference and for those new to the project.

uml/BatchRequesterLoop.puml (1)
  • 1-32: The UML diagram accurately represents the BatchRequesterLoop process, including interactions with the InjectiveNetwork and PeggyChainModule. The logical flow and use of PlantUML syntax are appropriate.

Adding a brief description at the beginning of the file to explain the diagram's purpose and scope would be beneficial for clarity and future reference.

uml/EthSignerMainLoop.puml (1)
  • 1-36: The UML diagram accurately represents the EthSignerMainLoop process, including interactions with the InjectiveNetwork, PeggyChainModule, and InjectiveNode. The logical flow and use of PlantUML syntax are appropriate.

Consider adding a brief description at the beginning of the file to explain the diagram's purpose and scope. This would enhance clarity and serve as a quick reference for new contributors or readers.

uml/EthOracleMainLoop.puml (1)
  • 1-62: The UML diagram accurately represents the EthOracleMainLoop process, including interactions with the InjectiveNetwork and EthereumNetwork. The logical flow and use of PlantUML syntax are appropriate.

Adding a brief description at the beginning of the file to explain the diagram's purpose and scope would be beneficial for clarity and future reference.

uml/RelayerMainLoop.puml (1)
  • 1-52: The UML diagram accurately represents the RelayerMainLoop process, including interactions with the InjectiveNetwork, EthereumNetwork, PeggyChainModule, and InjectiveNode. The logical flow and use of PlantUML syntax are appropriate.

Consider adding a brief description at the beginning of the file to explain the diagram's purpose and scope. This would enhance clarity and serve as a quick reference for new contributors or readers.

Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 0e78bb1 and 041d66f.
Files selected for processing (1)
  • uml/EthOracleMainLoop.puml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • uml/EthOracleMainLoop.puml

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.

1 participant