-
Notifications
You must be signed in to change notification settings - Fork 172
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
beacon: Fix a subtle error in renewal chain walker #2054
Merged
jamescowens
merged 1 commit into
gridcoin-community:development
from
jamescowens:fix_accrual_renewal_walker
Mar 18, 2021
Merged
beacon: Fix a subtle error in renewal chain walker #2054
jamescowens
merged 1 commit into
gridcoin-community:development
from
jamescowens:fix_accrual_renewal_walker
Mar 18, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In GetNewbieSuperblockAccrualCorrection the while loop that walks the beacon chain backwards to the original advertisement has a mistake and uses beacon instead of beacon_ptr in the find. As a result it will not work for more than one renewal cycle. This is not a consensus issue, because this function is not called for beacons that have more than one renewal cycle. In fact, now that the newbie bug is out of the way, it will not be called for beacons with any renewal at all. So this is merely for correctness.
jamescowens
changed the title
Fix another subtle error in renewal chain walker
beacon: Fix a subtle error in renewal chain walker
Mar 16, 2021
div72
approved these changes
Mar 17, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
cyrossignol
approved these changes
Mar 18, 2021
jamescowens
added a commit
to jamescowens/Gridcoin-Research
that referenced
this pull request
Apr 4, 2021
Added - doc: Invite users to donate to Gridcoin Foundation gridcoin-community#1997 (@smoe) - rpc: Add "getburnreport" RPC function gridcoin-community#2049 (@cyrossignol) - doc: Add undocumented "-showorphans" GUI option to help text gridcoin-community#2058 (@cyrossignol) - beacon: Cull beacon db memory (passivation) gridcoin-community#2069 (@jamescowens) - gui: Avoid refreshing GUI researcher status while out-of-sync gridcoin-community#2068 (@cyrossignol) - consensus: Reimplement checkpoint-based spam protection gridcoin-community#2084 (@cyrossignol) - consensus: Verify hardened checkpoints on start up gridcoin-community#2087 (@cyrossignol) Changed - gui: Clarify overview page "stake" field gridcoin-community#2056 (@cyrossignol) - doc: Update Copyright headers gridcoin-community#2059 (@barton2526) - gui: Update Qt Linguist localization files gridcoin-community#2063 (@cyrossignol) - build: update dependencies gridcoin-community#2064 (@barton2526) - net: Reduce default connection limit back to 125 gridcoin-community#2066 (@cyrossignol) - build: openssl patch gridcoin-community#2074 (@barton2526) - translation: Translate /src/qt/locale/bitcoin_en.ts in pt_PT gridcoin-community#2083 (@DjMVeiga) - log: Adjust logging gridcoin-community#2076 (@jamescowens) - gui: Change scraper tab to Inconsolata monospace font gridcoin-community#2085 (@jamescowens) - researcher: Change beacon deferment fix to reference nActiveBeforeSB gridcoin-community#2092 (@jamescowens) Removed - net: Clean up mandatory protocol version transition gridcoin-community#2080 (@cyrossignol) - refactor: Remove LessVerbose() function gridcoin-community#2089 (@cyrossignol) Fixed - beacon: Fix a subtle error in renewal chain walker gridcoin-community#2054 (@jamescowens) - researcher: Fix "malformed CPID" status for some pool projects gridcoin-community#2052 (@cyrossignol) - lint: Misc Typos gridcoin-community#2060 (@barton2526) - lint: remove identified duplicate includes gridcoin-community#2061 (@barton2526) - gui: Fix splash screen block height progress gridcoin-community#2057 (@cyrossignol) - gui: Fix garbage placeholders in some tx notification localizations gridcoin-community#2070 (@cyrossignol) - build: Patch libzip to fix mingw compile regression for mingw 9.2+ gridcoin-community#2082 (@jamescowens) - gui: Fix shutdown response for failed core init gridcoin-community#2088 (@cyrossignol) - researcher: Fix deferment of beacon renewal in superblock window gridcoin-community#2090 (@cyrossignol) - gui: Fix typo in beacon status refresh gridcoin-community#2091 (@div72)
jamescowens
added a commit
to jamescowens/Gridcoin-Research
that referenced
this pull request
Apr 4, 2021
Added - doc: Invite users to donate to Gridcoin Foundation gridcoin-community#1997 (@smoe) - rpc: Add "getburnreport" RPC function gridcoin-community#2049 (@cyrossignol) - gui: Add stats export reminder to beacon wizard auth page gridcoin-community#2050 (@cyrossignol) - doc: Add undocumented "-showorphans" GUI option to help text gridcoin-community#2058 (@cyrossignol) - beacon: Cull beacon db memory (passivation) gridcoin-community#2069 (@jamescowens) - gui: Avoid refreshing GUI researcher status while out-of-sync gridcoin-community#2068 (@cyrossignol) - consensus: Reimplement checkpoint-based spam protection gridcoin-community#2084 (@cyrossignol) - consensus: Verify hardened checkpoints on start up gridcoin-community#2087 (@cyrossignol) Changed - test: autogenerate data headers gridcoin-community#2030 (@div72) - doc: Change copyright years to 2021 gridcoin-community#2042 (@caraka) - gui: Clarify overview page "stake" field gridcoin-community#2056 (@cyrossignol) - doc: Update Copyright headers gridcoin-community#2059 (@barton2526) - gui: Update Qt Linguist localization files gridcoin-community#2063 (@cyrossignol) - build: update dependencies gridcoin-community#2064 (@barton2526) - net: Reduce default connection limit back to 125 gridcoin-community#2066 (@cyrossignol) - build: openssl patch gridcoin-community#2074 (@barton2526) - translation: Translate /src/qt/locale/bitcoin_en.ts in pt_PT gridcoin-community#2083 (@DjMVeiga) - log: Adjust logging gridcoin-community#2076 (@jamescowens) - gui: Change scraper tab to Inconsolata monospace font gridcoin-community#2085 (@jamescowens) - researcher: Change beacon deferment fix to reference nActiveBeforeSB gridcoin-community#2092 (@jamescowens) Removed - net: Clean up mandatory protocol version transition gridcoin-community#2080 (@cyrossignol) - refactor: Remove LessVerbose() function gridcoin-community#2089 (@cyrossignol) Fixed - build: Fix depends cross-compilation for macOS gridcoin-community#2038 (@cyrossignol) - build: Deal with Qt depends .qmake.stash file gridcoin-community#2048 (@cyrossignol) - beacon: Fix a subtle error in renewal chain walker gridcoin-community#2054 (@jamescowens) - researcher: Fix "malformed CPID" status for some pool projects gridcoin-community#2052 (@cyrossignol) - lint: Misc Typos gridcoin-community#2060 (@barton2526) - lint: remove identified duplicate includes gridcoin-community#2061 (@barton2526) - gui: Fix splash screen block height progress gridcoin-community#2057 (@cyrossignol) - gui: Fix garbage placeholders in some tx notification localizations gridcoin-community#2070 (@cyrossignol) - build: Patch libzip to fix mingw compile regression for mingw 9.2+ gridcoin-community#2082 (@jamescowens) - gui: Fix shutdown response for failed core init gridcoin-community#2088 (@cyrossignol) - researcher: Fix deferment of beacon renewal in superblock window gridcoin-community#2090 (@cyrossignol) - gui: Fix typo in beacon status refresh gridcoin-community#2091 (@div72)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In GetNewbieSuperblockAccrualCorrection the while loop that walks the beacon chain backwards to the original advertisement has a mistake and uses beacon instead of beacon_ptr in the find. As a result it will not work for more than one renewal cycle.
This is not a consensus issue, because this function is not called for beacons that have more than one renewal cycle. In fact, now that the newbie bug is out of the way, it will not be called for beacons with any renewal at all. So this is merely for correctness.
@tomasbrod deserves credit for pointing this out. Thanks!