go-algorand
go-algorand copied to clipboard
perf: batch verification for agreement votes
Summary
Agreement vote verify worker could use batch verification when enough votes are available. Estimated perf boost ~2.4x in agreement vote verification.
Speeding up vote verification would speed up block validation.
- Block validation takes ~X seconds
- Batch verifying votes would speed up block validation by Y%, freeing up Z seconds of round time
Research phase
- Obtain node.log from relays.
- Figure out number of step 1 and step 2 votes relay receive in a round, build a histogram to see if 10ms batching makes sense.
- Check a single vote verification time.
- Estimate current CPU usage vs proposed with batching.
Acceptance
- Add a new unit test
- Benchmark two scenarios: low load, high load
- Existing e2e tests pass
- Run a participation TestNet or BetaNet node and ensure it progresses
Phase 1: https://app.zenhub.com/workspaces/algorand-main-workspace-5ea71fda6d554d53dda36f16/issues/gh/algorand/go-algorand-internal/2777
Phase 2: https://app.zenhub.com/workspaces/algorand-main-workspace-5ea71fda6d554d53dda36f16/issues/gh/algorand/go-algorand-internal/2778
Phase 3: https://github.com/algorand/go-algorand/pull/5222