-
Notifications
You must be signed in to change notification settings - Fork 65
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
Block processing time estimates at scale #103
Comments
For the record, lighthouse is making this a priority. Thanks for the details on what to test :) We'll come back here with any questions/comments. |
Current python benchmarks (on standard consumer laptop with tons of tabs open and music playing)
raw csv here https://gist.github.com/djrtwo/663a031c984ef4796a9aff2ba68d03e5 Notes:
|
Here are some timings from Lighthouse (I'll add @djrtwo's first scenario once I complete it): Computer: Lenovo X1 Carbon 5th Gen with an Intel i5-7300U @ 2.60GHz running Arch Linux with each core idling around 2-8% before tests.
Note: this is using an in-memory database. Note: we're using concurrency for attestation validation. |
Curious about if you see a closer 10x different when you remove the concurrency @paulhauner |
Without concurrency:
That ~4x difference still holds. In these benches I'm starting with a SSZ serialized block and then de-serializing it (and all the |
That's it. I'm not clocking the deserialization. Both are interesting numbers. I was looking specifically for block validity and primarily at the signatures because this was our estimated bottleneck when designing the protocol. Let's see what it is without the deserialize. |
Presently lighthouse is structured to do "just-in-time" deserialization, where each I mention this for two reasons; (a) cause it's a fun fact and (b) to indicate that it'll take some amount of hacky refactoring to make them "no deserialize" tests and therefore I can get these done later today or tomorrow morning :) On a side note; at some point it would be useful to get "bad block" benchmarks from clients. I.e., how quickly can you reject a bad block? I'm well on a tangent now, but it would also be worth considering introducing some form of entropy into the order in which |
Looks great! Would performance increase when a |
Issue
In the last eth2.0 implementers call, we decided it would be worthwhile to run some timing analysis on processing blocks with real-world amounts of attestations.
It would be great to get results from at least one other client. I know not everyone has a working BLS aggregate implementation yet, but anyone that does should give this a try and report results.
Proposed Implementation
Assuming 10M eth deposited puts us at ~300k validators. With 64 slots, that is ~5000 validators per slot. With 1000 shards divided across the 64 slots, that is ~16 shards per slot.
If all of the validators coordinate and vote on the same crosslink and their attestations are aggregated and include in the next slot, then there will be 16 attestations of ~300 validators each per block. This is a good place to start.
We can then make this estimate a worse case by assuming the validators split their votes across 2, 3, 4, or even 5 different crosslink candidates. If all committees split their votes across 2 candidates, then there would be 32 attestations per block each with ~150 validators each.
EDIT
My estimates on number of committees and size of committees were a bit off in practice. When using
BenchmarkParams { total_validators: 312500, cycle_length: 64, shard_count: 1024, shards_per_slot: 16, validators_per_shard: 305, min_committee_size: 128 }
, each slot has approximately 20 committees of size 244 (rather than 16 of ~300). This shouldn't drastically change the output, but is a better target because it reflects the actual shuffling alg(cc: @paulhauner)
EDIT2
My original assumption was correct and the spec was incorrect! Go with the original estimates
The text was updated successfully, but these errors were encountered: