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

Refactor/fix state sync logs #515

Merged
merged 20 commits into from
Feb 17, 2023
Merged

Conversation

gokutheengineer
Copy link
Contributor

@gokutheengineer gokutheengineer commented Feb 15, 2023

Description

Improves logs for the state sync submodule.

Issue

Fixes #514

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

List of changes

  • Add constant state sync message types to the consensus module types
  • Update logs and error messages of the state sync
  • Delete unnecessary server mode enabling op in app/pocket/main.go

Testing

  • make develop_test
  • LocalNet w/ all of the steps outlined in the README

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have tested my changes using the available tooling
  • I have updated the corresponding CHANGELOG

If Applicable Checklist

  • I have updated the corresponding README(s); local and/or global
  • I have added tests that prove my fix is effective or that my feature works
  • I have added, or updated, mermaid.js diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

@gokutheengineer gokutheengineer self-assigned this Feb 15, 2023
@gokutheengineer gokutheengineer added the code health Nice to have code improvement label Feb 15, 2023
consensus/types/types.go Outdated Show resolved Hide resolved
app/pocket/doc/CHANGELOG.md Outdated Show resolved Hide resolved
consensus/debugging.go Outdated Show resolved Hide resolved
consensus/state_sync/module.go Show resolved Hide resolved
consensus/state_sync/module.go Outdated Show resolved Hide resolved
consensus/state_sync/module.go Outdated Show resolved Hide resolved
consensus/types/errors.go Show resolved Hide resolved
consensus/state_sync/helpers.go Outdated Show resolved Hide resolved
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

@gokutheengineer Small suggestion on code style and also trying to stay consistent with the log messages.

The way you're using the fields is 💯 . Curious if you got benefit out of printing the entire proto request/response?

consensus/debugging.go Outdated Show resolved Hide resolved
consensus/debugging.go Show resolved Hide resolved
consensus/state_sync/server.go Outdated Show resolved Hide resolved
consensus/state_sync/server.go Outdated Show resolved Hide resolved
consensus/state_sync/module.go Outdated Show resolved Hide resolved
consensus/state_sync/module.go Outdated Show resolved Hide resolved
@gokutheengineer
Copy link
Contributor Author

gokutheengineer commented Feb 17, 2023

Curious if you got benefit out of printing the entire proto request/response?

Definitely, it makes easier to read logs with the structure.

Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

Just one last minor comment but otherwise, LGTM!

consensus/state_sync/module.go Outdated Show resolved Hide resolved
@gokutheengineer gokutheengineer merged commit e4267c4 into main Feb 17, 2023
@Olshansk Olshansk deleted the refactor/fix-state-sync-logs branch February 17, 2023 19:54
bryanchriswhite added a commit that referenced this pull request Feb 20, 2023
* pokt/main:
  [Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) (#522)
  Refactor/fix state sync logs (#515)
  [P2P] KISS 2 - Peer discovery [Merge me after #520] - (Issues: #416, #429) (#521)
  [Core] KISS 1 - Finite State Machine [Merge me first] - (Issue: #499) (#520)
  [CLI] Stake command bugfix (#518)
  [CLI] Cannot run make localnet_client_debug: Cannot initialise the keybase with the validator keys: Unable to find YAML file (#517)
  Fix the link shown by `make go_doc`
  Fixed duplicate GITHUB_WIKI tag
  [Documentation] Update Devlog Formatting (#512)
  [Docs & Bugs] Minor fixes post keybase changes (#513)
  [Utility] Foundational bugs, tests, code cleanup and improvements (1 / 2) (#503)
  [Tooling] Integrate Keybase w/ CLI (Issue #484 ) (#501)
  update devlog2.md
  update devlog2.md
  Update devlog1.md
bryanchriswhite added a commit that referenced this pull request Feb 20, 2023
* pokt/main:
  [Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) (#522)
  Refactor/fix state sync logs (#515)
  [P2P] KISS 2 - Peer discovery [Merge me after #520] - (Issues: #416, #429) (#521)
  [Core] KISS 1 - Finite State Machine [Merge me first] - (Issue: #499) (#520)
  [CLI] Stake command bugfix (#518)
  [CLI] Cannot run make localnet_client_debug: Cannot initialise the keybase with the validator keys: Unable to find YAML file (#517)
  Fix the link shown by `make go_doc`
  Fixed duplicate GITHUB_WIKI tag
  [Documentation] Update Devlog Formatting (#512)
  [Docs & Bugs] Minor fixes post keybase changes (#513)
  [Utility] Foundational bugs, tests, code cleanup and improvements (1 / 2) (#503)
  [Tooling] Integrate Keybase w/ CLI (Issue #484 ) (#501)
  update devlog2.md
  update devlog2.md
  Update devlog1.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Nice to have code improvement
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Refactor] Fix state sync logs
2 participants