Skip to content
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 Sync Service to Query State Of Network #787

Merged
merged 23 commits into from
Nov 19, 2018

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Nov 16, 2018

Resolves #555, #661, #743

This allows the sync service to query peers in the network to find out their current head and determine if they are synced or not.

  • Implement IsSynced method, which will allow the node to know whether to begin initial sync or normal sync.
  • Allow the node to access the current db instead of requiring a new one, so that they know where to sync from.
  • Add tests .

@nisdas nisdas added In Progress Priority: High High priority item labels Nov 16, 2018
@nisdas nisdas added this to the Ruby - v0.1 milestone Nov 16, 2018
@nisdas nisdas self-assigned this Nov 16, 2018
@codecov
Copy link

codecov bot commented Nov 16, 2018

Codecov Report

Merging #787 into master will decrease coverage by 0.23%.
The diff coverage is 58.67%.

@@            Coverage Diff             @@
##           master     #787      +/-   ##
==========================================
- Coverage   73.65%   73.41%   -0.24%     
==========================================
  Files          66       67       +1     
  Lines        4217     4322     +105     
==========================================
+ Hits         3106     3173      +67     
- Misses        807      841      +34     
- Partials      304      308       +4

@prestonvanloon
Copy link
Member

prestonvanloon commented Nov 18, 2018

I'm experiencing some issues when running the command three times.

Run the following command for about 15 seconds then kill the process with ^C.

bazel run //beacon-chain -- --datadir=/tmp/data1 --rpc-port 4000 --genesis-json=$(pwd)/genesis.json --simulator --demo-config

Do this twice, on the third attempt, you will see the follow errors:

[2018-11-18 12:36:56] ERROR types: invalid attestation slot 13
[2018-11-18 12:36:56] ERROR types: Attestation invalid: slot:13 shard:4 justified_block_hash:"\323\003[v\005X\267\242jp`\326V\205\r\025\256\361\241\270\005r\360\236\262*5\257J\223-\306" attester_bitfield:"\300"
[2018-11-18 12:36:56] ERROR types: Invalid attestation
[2018-11-18 12:36:56] ERROR blockchain: block failed validity conditions
[2018-11-18 12:36:58] ERROR blockchain: block points to nil parent: 0x9d8b46a5257cf03279f2263587aa53542c65b50d8e00647a48c68a3ec97b135e
[2018-11-18 12:37:00] ERROR blockchain: block points to nil parent: 0xc3c1e41a63fcd7649861969745f96ee58bffeb840b8e2189783e3008ff719d3c

On the 4th attempt, I see

[2018-11-18 12:43:38] ERROR simulator: Failed to get shard committee: slot 214 out of bounds: 5 <= slot < 20
[2018-11-18 12:43:40] ERROR simulator: Failed to get shard committee: slot 215 out of bounds: 5 <= slot < 20
[2018-11-18 12:43:42] ERROR simulator: Failed to get shard committee: slot 216 out of bounds: 5 <= slot < 20
[2018-11-18 12:43:44] ERROR simulator: Failed to get shard committee: slot 217 out of bounds: 5 <= slot < 20
[2018-11-18 12:43:46] ERROR simulator: Failed to get shard committee: slot 218 out of bounds: 5 <= slot < 20

These might be out of scope, but we should identify issues for these if we haven't already.

Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIscussed offline that the issues I outlined are addressed in the other pull request #669.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High High priority item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants