Add a flag to start processing statediff if we are caught up to the head of the chain #205
Merged
abdulrabbani00
merged 4 commits from 2022-03-18 13:44:13 +00:00
feature/155-waitForSync into v1.10.16-statediff-v3
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
bug
critical
duplicate
enhancement
epic
help wanted
in progress
invalid
low priority
question
rebase
v1
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
An issue or PR manually copied from GitHub.
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/go-ethereum#205
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Overview
This PR will allow users to add a flag when starting geth, indicating if we should wait for the statediff service to catch up to the head of the chain.
Data Structure Changes
This feature changes two major data structures used in the statediffing service.
statediff/config.go-Configa.
WaitforSync- This change allows us to indicate if the statediff service should wait for us to catch up to head.statediff/service.go-Servicea.
WaitforSync- This change allows us to indicate if the statediff service should wait for us to catch up to head.b.
Backend- This backend object is necessary to query the internal API, which indicates if we have caught up to the head of the chain.These changes have not failed any of the current unit tests under
/statediff.Testing
This PR includes two unit tests. These unit tests have a new mock called
Backend.The tests make sure that we catch up to head properly before indicating that we are all caught up.We should test this with production data to ensure the feature is working correctly and does not incur any performance issues.
Looks great! Just a few comments for some very minor non-functional changes.
LGTM! Thanks for making the updates.