-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow Initial Sync to Work with Simulator #669
Conversation
Codecov Report
@@ Coverage Diff @@
## master #669 +/- ##
==========================================
- Coverage 73.59% 73.22% -0.38%
==========================================
Files 67 69 +2
Lines 4367 4575 +208
==========================================
+ Hits 3214 3350 +136
- Misses 835 895 +60
- Partials 318 330 +12 |
@nisdas sorry there are a few more issues. Looking at the run log from your last commit, BlockChain service never ran. After slot 5, it's only p2p service and simulator. Here is the normal log: |
Blocked by #787 |
Lint issues:
|
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.
Lgtm
@@ -44,8 +46,9 @@ type Config struct { | |||
// CrystallizedStateBufferSize determines the buffer size of thhe `crystallizedStateBuf` channel. | |||
func DefaultConfig() Config { | |||
return Config{ | |||
SyncPollingInterval: 1 * time.Second, | |||
SyncPollingInterval: time.Duration(int64(params.BeaconConfig().SlotDuration)) * time.Second * 4, |
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.
What is this constant 4? Can we predefined this constant?
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.
Fixed into a config var
This would allow initial sync to function with a simulator. By allowing the simulator to respond to requests by block slot number instead of block hash it will allow a node to be able to sync up to the latest chain head. This should also help to close out #661.