[digital-carbon] Handle potential sync breakages#178
Open
psparacino wants to merge 3 commits into
Open
Conversation
1181946 to
7d43897
Compare
digital-carbon] Add UNSUPPORTED_REGISTRY as c3 fallbackdigital-carbon] Handle potential sync breakages
0xAurelius
reviewed
Sep 30, 2024
Contributor
0xAurelius
left a comment
There was a problem hiding this comment.
Isn't adding this entity to production subgraphs going to blow up our entity count?
Or is the logic only going to create one of these when there is an issue with a retirement?
Collaborator
Author
Right; it only creates the Debug entity when an underlying retire isn't found in the RA |
0xAurelius
approved these changes
Oct 2, 2024
b7d5c5e to
c2371d6
Compare
This file contains hidden or 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
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.
Potential sync issues addressed:
Unsupported registries:In the past, tokens from the c3 factory have occasionally had registry values not in the
Registryenum, which have broken the subgraph sync.This PR adds a fallback in case c3 issues credits for registries not in the registry enum so there is no break in production. A
Debugentity is created when an unsupported registry so the problem can be further assessed and a fix deployed.handle null values from
loadRetire:loadRetireshould never come back null either in practice or by design (therefore it does not follow the load/create pattern). However if a retire comes does back null from this function it will break the sync, as the subgraph will attempt to access a property on null.This issue has never come up afaik. In the rare event it does this will return before the subgraph attempts to access the property and create a
Debugentity.