Skip to content

Optimize block production#820

Merged
michaelsproul merged 3 commits intosigp:masterfrom
pscott:optimize_block_processing
Jan 23, 2020
Merged

Optimize block production#820
michaelsproul merged 3 commits intosigp:masterfrom
pscott:optimize_block_processing

Conversation

@pscott
Copy link
Contributor

@pscott pscott commented Jan 22, 2020

Issue Addressed

None

Proposed Changes

  • Remove Signature Verification on block production

Additional Info

When I ran tests locally I found out that this should be something like 1000x improvement on block production (scaling with the number of attestations in the op_pool...). 💃

I would ask for the reviewer to make sure that disabling this verification will not cause any harm. I have checked twice for myself. The only place (that I'm aware of) where we call op_pool.insert_attestation is here:

self.op_pool
.insert_attestation(attestation, state, &self.spec)?;

where we just verified that attestations had valid signatures

verify_attestation_for_state(state, &attestation, VerifySignatures::True, &self.spec)

I am pretty sure this should be safe but having someone else double check won't hurt.

@pscott
Copy link
Contributor Author

pscott commented Jan 22, 2020

Props to @michaelsproul for guiding me (he did almost all the work...)!

@AgeManning
Copy link
Member

Nice work!! Fast block production. Woop!

@AgeManning AgeManning added the ready-for-review The code is ready for review label Jan 22, 2020
@pscott pscott requested review from michaelsproul and paulhauner and removed request for paulhauner January 22, 2020 15:44
@michaelsproul michaelsproul changed the title Optimize block processing Optimize block production Jan 23, 2020
@michaelsproul michaelsproul added this to the v0.1.2 milestone Jan 23, 2020
@michaelsproul michaelsproul added ready-to-squerge and removed ready-for-review The code is ready for review labels Jan 23, 2020
@michaelsproul michaelsproul merged commit f8cff3b into sigp:master Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants