Repository navigation
test(p2p): handler-level check of HF16 slot_scale thresholds - #196
Merged
Merged
Conversation
check_forward_behind, check_sync_catchup and track_fork_state run on a real dlt_p2p_node at 3 s and 1 s slots and must keep the 6 s / 126 s wall-clock thresholds. No sockets. Production change: one friend declaration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #183 (deferred item from the HF16 audit).
tests/p2p/test_slot_interval.pypins the slot_scale arithmetic; this drives the real handlers.tests/consensus_sim/scenarios/test_p2p_slot_scale.cppruns adlt_p2p_nodewith a mock delegate at block_interval 3 and 1:check_forward_behindcheck_sync_catchuptrack_fork_stateNo sockets:
send_messageis a no-op without a connection,exchange_enabled=falsekeeps block requests out. Not BUILD_TESTNET-gated, so the default consensus_sim ctest in CI runs it.Production change: one
friend struct dlt_p2p_node_test_access;in dlt_p2p_node.hpp.Verified locally (amd64 Docker, testnet build): passes; removing
* slot_scale()fromcheck_forward_behindortrack_fork_statefails the matching case.Not covered:
on_dlt_hello_replyandrequest_blocks_from_peersites (need a connected peer).