Skip to content

Conversation

@jamescowens
Copy link
Member

@jamescowens jamescowens commented Jul 7, 2025

This commit removes the reporting of zcd, was, and meets autogreylist criteria from the autogreylist history of each project. These are confusing because the historical records are reconstructed from the present SB backwards in time, and therefore the zcd, was and meets are NOT the same as what they would have been if one were standing on a particular historical superblock and computing the present status. Essentially the final value at the last history record (going backwards) IS correct and represents the current status.

The superblocks_from_baseline and total_credit remain as these are not misleading, and allows someone to script an audit based on the historical information.

…story

This commit removes the reporting of zcd, was, and meets autogreylist
criteria from the autogreylist history of each project. These are
confusing because the historical records are reconstructed from the
present SB backwards in time, and therefore the zcd, was and meets are
NOT the same as what they would have been if one were standing on a
particular historical superblock and computing the present status.
Essentially the final value at the last history record (going backwards)
IS correct and represents the current status.

The superblocks_from_baseline and total_credit remain as these are
not misleading, and allows someone to script an audit based on the historical
information.
@jamescowens jamescowens self-assigned this Jul 7, 2025
@jamescowens jamescowens added this to the Natasha milestone Jul 7, 2025
@jamescowens jamescowens changed the title Removes zcd, was, and meets greylist criteria from getautogreylist hi… Removes zcd, was, and meets greylist criteria from getautogreylist history Jul 7, 2025
@jamescowens jamescowens changed the title Removes zcd, was, and meets greylist criteria from getautogreylist history autogreylist: Removes zcd, was, and meets greylist criteria from getautogreylist history Jul 7, 2025
@jamescowens jamescowens requested a review from Copilot July 7, 2025 15:27
Copy link

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 removes the reporting of zcd, was, and meets_greylisting_criteria from each project’s autogreylist history, preserving only superblocks_from_baseline and total_credit.

  • Strips obsolete fields from the JSON response in getautogreylist RPC
  • Simplifies UpdateHistoryEntry to include only baseline index and total credit
  • Removes related members, parameters, and constructor overloads in AutoGreylist

Reviewed Changes

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

File Description
src/rpc/blockchain.cpp Deleted JSON pushKV calls for zcd, was, and meets_greylisting_criteria
src/gridcoin/project.h Updated UpdateHistoryEntry struct and constructor to drop those fields
Comments suppressed due to low confidence (2)

src/rpc/blockchain.cpp:2824

  • Update the RPC help documentation for getautogreylist to remove references to the now-removed zcd, was, and meets_greylisting_criteria fields so the help text matches the actual output.
                    historical_entry.pushKV("total_credit", "NA");

src/rpc/blockchain.cpp:2827

  • Add or update unit/integration tests to verify that getautogreylist no longer includes zcd, was, or meets_greylisting_criteria in its history entries.
                entry_history.push_back(historical_entry);

@jamescowens jamescowens marked this pull request as ready for review July 7, 2025 15:46
@jamescowens jamescowens merged commit bde3f75 into gridcoin-community:development Jul 7, 2025
25 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