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

add band liveliness logic #23

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

add band liveliness logic #23

wants to merge 6 commits into from

Conversation

tanut32039
Copy link
Contributor

Fixed: #XXXX

Implementation details

Please ensure the following requirements are met before submitting a pull request:

  • The pull request is targeted against the correct target branch
  • The pull request is linked to an issue with appropriate discussion and an accepted design OR is linked to a spec that describes the work.
  • The pull request includes a description of the implementation/work done in detail.
  • The pull request includes any and all appropriate unit/integration tests
  • You have added a relevant changelog entry to CHANGELOG_UNRELEASED.md
  • You have re-reviewed the files affected by the pull request (e.g. using the Files changed tab in the Github PR explorer)

@tanut32039 tanut32039 requested a review from nkitlabs December 20, 2024 10:09
@RogerKSI RogerKSI self-requested a review January 2, 2025 08:48
@@ -8,5 +8,6 @@ penalty_exponential_factor = 1.0
[bandchain]
rpc_endpoints = ['http://localhost:26657']
timeout = 3000000000
liveliness_checking_interval = 900000000000
Copy link

Choose a reason for hiding this comment

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

I think the liveliness internal should be quite fast at most (<=5m / <=1m) for both the band side and the chain side because we don't have the logic to switch nodes if it fails. the program will stuck until the next interval.

@tanut32039 @nkitlabs what do you think?

anyway, please test on fast intervals as well. to make sure that we don't have an issue if the node switches in the middle of the process.

Copy link
Collaborator

Choose a reason for hiding this comment

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

the default interval can be reduced.

Comment on lines 134 to 135
if err := c.connect(timeout); err != nil {
c.Log.Error("Liveliness check: unable to reconnect to any endpoints", zap.Error(err))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Selected rpc from startLivenessCheck should be active.

  • suggest solution check status inside the connect function if required.

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