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: log upgraded to app version 2 #3634

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jun 27, 2024

Addreses #3628 (review)

Testing

12:15PM INF received complete proposal block hash=A207BD135CB14E3A8CB25CE771C53C7187362805FA1D2E2C42263414CFF96458 height=2 module=consensus
12:15PM INF finalizing commit of block hash={} height=2 module=consensus num_txs=0 root=BEF4F77ABB424877031B5BB1C8BE249CA83FB2FF23BD24D80BFFF3D31E3CB788
12:15PM INF minted coins from module account amount=35512129utia from=mint module=x/bank
12:15PM INF upgrading from app version 1 to 2
12:15PM INF executed block height=2 module=state num_invalid_txs=0 num_valid_txs=0
12:15PM INF adding a new module: interchainaccounts
12:15PM INF created new capability module=ibc name=ports/icahost
12:15PM INF port binded module=x/ibc/port port=icahost
12:15PM INF claimed capability capability=2 module=icahost name=ports/icahost
12:15PM INF adding a new module: minfee
12:15PM INF adding a new module: packetfowardmiddleware
12:15PM INF adding a new module: signal
12:15PM INF commit synced commit=436F6D6D697449447B5B3234382031303120393920393420373820383520333220323339203630203234362032313020313030203320323430203132302032333520313133203938203232322032323520313436203233312031363120323535203234362032203133332038332031323420323030203137302037385D3A327D
12:15PM INF committed state app_hash=F865635E4E5520EF3CF6D26403F078EB7162DEE192E7A1FFF60285537CC8AA4E height=2 module=state num_txs=0
12:15PM INF indexed block exents height=2 module=txindex
12:15PM INF Ensure peers module=pex numDialing=0 numInPeers=0 numOutPeers=0 numToDial=10
12:15PM INF No addresses to dial. Falling back to seeds module=pex
12:15PM INF Timed out dur=10973.938 height=3 module=consensus round=0 step=1
12:15PM INF received proposal module=consensus proposal={"Type":32,"block_id":{"hash":"5B94C0C4658CE0317DF361C5808BC0FAA25648B131991AFE0413E031617CD2B5","parts":{"hash":"E4199311093BAD06007F637CEC09D4DFC8085902371045332E706E442069AC96","total":1}},"height":3,"pol_round":-1,"round":0,"signature":"YgZa7HyVrWojrHfBxvEk/cikBAIu5vvf/sQMOGRLitH5l9nRO97Ku24GeXttoxrnqGkYQKdTfYsubFXV/70+Cg==","timestamp":"2024-06-27T16:15:14.498246Z"} proposer=20BC0E5B4B2CB55ADDC0E31ACF1BFE0DB3883985
12:15PM INF received complete proposal block hash=5B94C0C4658CE0317DF361C5808BC0FAA25648B131991AFE0413E031617CD2B5 height=3 module=consensus
12:15PM INF finalizing commit of block hash={} height=3 module=consensus num_txs=0 root=F865635E4E5520EF3CF6D26403F078EB7162DEE192E7A1FFF60285537CC8AA4E
12:15PM INF upgraded from app version 1 to 2
12:15PM INF minted coins from module account amount=27961724utia from=mint module=x/bank
12:15PM INF executed block height=3 module=state num_invalid_txs=0 num_valid_txs=0
12:15PM INF commit synced commit=436F6D6D697449447B5B31323020373720313032203130302032353520363720313131203136352031313820323234203232203330203833203139302031303820323439203230382031323120313139203536203833203135342038372034302034312032353120313933203139332031362033203232203139395D3A337D
12:15PM INF committed state app_hash=784D6664FF436FA576E0161E53BE6CF9D0797738539A572829FBC1C1100316C7 height=3 module=state num_txs=0
12:15PM INF indexed block exents height=3 module=txindex

@rootulp rootulp requested a review from cmwaters June 27, 2024 16:17
@rootulp rootulp self-assigned this Jun 27, 2024
@rootulp rootulp marked this pull request as ready for review June 27, 2024 16:27
@rootulp rootulp requested a review from a team as a code owner June 27, 2024 16:27
@rootulp rootulp requested review from staheri14 and evan-forbes and removed request for a team June 27, 2024 16:27
Copy link
Contributor

coderabbitai bot commented Jun 27, 2024

Walkthrough

Walkthrough

This change adds a conditional check in the BeginBlocker method of the App struct to log an explicit message when the system reaches a specific block height, which signals a version upgrade. This makes it clear to node operators that the upgrade from version 1 to version 2 has occurred successfully.

Changes

File Change Summary
.../app.go Added a conditional check within the BeginBlocker function to log an upgrade message at a specific height.

Sequence Diagram(s)

sequenceDiagram
    participant NodeOperator
    participant App
    participant Logger
    participant Manager
  
    NodeOperator->>App: Start Block, height = upgradeHeightV2
    App-->>Logger: Log "Upgrade to version 2"
    App->>Manager: BeginBlock
    Manager-->>App: Block processing continues
Loading

Possibly related issues


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 941538c and 24a89e8.

Files selected for processing (1)
  • app/app.go (1 hunks)
Additional comments not posted (1)
app/app.go (1)

447-449: Ensure robustness in upgrade logging.

The added logging for the upgrade process is crucial for monitoring and verifying the upgrade's success. However, it's important to ensure that the logging does not introduce additional overhead that could affect the block processing performance. Consider adding performance metrics if logging significantly increases the processing time.

Also, verify that upgradeHeightV2 is properly initialized and not susceptible to race conditions or incorrect settings which could lead to false logs.


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

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

@rootulp rootulp merged commit 4ebe100 into celestiaorg:main Jun 28, 2024
32 of 33 checks passed
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