Skip to content

beacon: Change beacon renewal job interval #2806

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

Conversation

jamescowens
Copy link
Member

@jamescowens jamescowens commented May 18, 2025

This PR changes the renewal job interval to 1 hour from 4 hours and adds additional logging.

The original interval, 4 hours, is not often enough given the additional restriction with respect to the scraper activation window (beacon consensus window). This has no effect on wallet resource use as the call is effectively a no-op unless a renewal can be actually performed.

@jamescowens jamescowens added this to the Natasha milestone May 18, 2025
@jamescowens jamescowens self-assigned this May 18, 2025
@jamescowens jamescowens marked this pull request as ready for review May 18, 2025 21:41
@jamescowens jamescowens requested a review from Copilot May 18, 2025 21:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the beacon renewal job interval and enhances logging within the beacon renewal process. Key changes include:

  • Adding logging to track the execution of the beacon renewal job.
  • Logging a message when the beacon renewal is skipped due to being within the scraper beacon consensus window.
  • Changing the renewal interval from 4 hours to 1 hour to increase the frequency of renewal operations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/gridcoin/researcher.cpp Adds log messages to better indicate when beacon renewal runs or skipped.
src/gridcoin/gridcoin.cpp Updates the scheduling interval for the beacon renewal job.
Comments suppressed due to low confidence (2)

src/gridcoin/researcher.cpp:1143

  • [nitpick] Consider updating the log format by adding a colon after 'INFO' for consistency with other log statements.
LogPrint(BCLog::LogFlags::BEACON, "INFO %s: Skipping beacon renewal while within scraper beacon consensus window.", __func__);

src/gridcoin/gridcoin.cpp:550

  • Verify that reducing the beacon renewal interval from 4 hours to 1 hour will not negatively impact system performance under heavy load.
scheduler.scheduleEvery(Researcher::RunRenewBeaconJob, std::chrono::hours{1});

This commit changes the renewal job interval to 1 hour from
4 hours and adds additional logging.
@jamescowens jamescowens force-pushed the change_beacon_renewal_job_interval branch from c3b6d74 to c0cb0a8 Compare May 18, 2025 21:47
@jamescowens jamescowens merged commit 8700cc1 into gridcoin-community:development May 18, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant