Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

grandpa: reduce allocations when verifying multiple messages #4693

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

andresilva
Copy link
Contributor

GRANDPA messages are localized when encoded, to include the round and set id they refer to. This means that given a message and a signature there's an extra step of intermediary encoding needed to do the verification. This PR re-uses the buffer used for encoding when verifying multiple messages at once (i.e. commits, catch-up requests and justifications).

@arkpar reported that checking of compact commits was showing up on the profiler as performing a lot of allocations.

@andresilva andresilva added A0-please_review Pull request needs code review. M4-core labels Jan 20, 2020
@andresilva andresilva merged commit f52ea97 into master Jan 21, 2020
@andresilva andresilva deleted the andre/grandpa-reduce-verification-allocation branch January 21, 2020 11:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants