Closed Longarithm closed 6 days ago
Added another scenario to check that if BP has low endorsement stats, it's not kicked out.
Attention: Patch coverage is 92.68293%
with 9 lines
in your changes missing coverage. Please review.
Project coverage is 71.78%. Comparing base (
80f08d7
) to head (0713312
).
Files | Patch % | Lines |
---|---|---|
core/chain-configs/src/test_genesis.rs | 41.66% | 7 Missing :warning: |
integration-tests/src/test_loop/builder.rs | 97.64% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Express the power of TestLoop by implementing scenario where chunk validator-only node is kicked out due to low endorsement stats.
The logic is to simply prevent all chunks validated by selected accounts from appearing on chain. But implementing this without adding extra logic to
Client
,ShardsManagerActor
andNetwork
is a challenge. TestLoop, however, can add overrides to itself, which are generic enough to use for testing other scenarios, like ones inchunks_management
tests. New components are:TestLoopChunksStorage
- global storage for all chunks ever observed by monitoring client messages. Other options would be to extend network messages content or understand how to queryShardsManagerActor
on network message override. However, global test loop storage makes sense to me as it can serve for measuring health of the whole chain, if we test other disruption scenarios.partial_encoded_chunks_dropper
- overrides processing of network messages related to chunks; if chunk is validated by the given account, the message is dropped. The logic is generic enough to be extended to kickout specific block/chunk producers, drop chunks for specific heights/shards, etc.