Closed hbandura closed 1 year ago
Patch coverage: 40.74%
and project coverage change: -0.02%
:warning:
Comparison is base (
2d25832
) 55.14% compared to head (278bf9a
) 55.13%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Coverage from tests in ./e2e_test/...
for ./consensus/istanbul/...
at commit d2a8d929f195c8e217c827c5db5d0d20f77a0757
coverage: 63.0% of statements in consensus/istanbul coverage: 40.1% of statements in consensus/istanbul/announce coverage: 54.6% of statements in consensus/istanbul/backend coverage: 0.0% of statements in consensus/istanbul/backend/backendtest coverage: 24.3% of statements in consensus/istanbul/backend/internal/replica coverage: 64.6% of statements in consensus/istanbul/core coverage: 45.0% of statements in consensus/istanbul/db coverage: 0.0% of statements in consensus/istanbul/proxy coverage: 64.4% of statements in consensus/istanbul/uptime coverage: 51.8% of statements in consensus/istanbul/validator coverage: 79.2% of statements in consensus/istanbul/validator/random
Istanbul consensus is currently rlp encoding messages twice, and decoding them twice upon receiving one. The second encoding is done per peer, so if the same message is multicasted to 110 peers, it is encoded once, then 110 times more. This commit ensures the double encoding is done just once, reducing from 111 to 2 the calls to rlp.EncodeToBytes. A better way to handle this (but more disruptive) is completely drop the double encoding and double decoding, but would imply a protocol change.