Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0]Add integration tests for production-pause-vote-timeout #662

Merged
merged 21 commits into from
Aug 29, 2024

Conversation

linh2931
Copy link
Member

Setup:

Use five nodes in an hourglass topology. The center node is a relay node that initially has vote-threads enabled. The other 4 peripheral nodes are:

  • node0: Enables block production for producera and has the finalizer key with description of producera. Has vote-threads enabled. Connect to the center node.
  • node1: Enables block production for producerb and has the finalizer key with description of producerb. Has vote-threads enabled. Connect to the center node and Node1.
  • producercNode: Enables block production for producerc.
  • finalizercNode: Has the finalizer key with description of producerc. Has vote-threads enabled. Connect to the center node and producercNode.

Test cases:

  1. Bring down finalizercNode. producercNode should eventually automatically pause production due to not receiving votes from finalizercNode. that are associated to its producerc. However, Node0 and Node1 should not pause. Then bring finalizercNode. back up. producercNode should automatically resume production.
  2. Bring down the center node. producercNode should eventually automatically pause production due to not receiving votes from Node0 and Node1 that are associated with the other producers. However, Node0 and Node1 should not pause. Then bring the center node back up. producercNode should automatically resume production.
  3. Restart producercNode with "--production-pause-vote-timeout-ms 0" to disable production-pause-vote-timeout. Bring down finalizercNode. producercNode should keep producing.

The PR also fixes an issue that the TestHarness's setFinalizers did not use the same threshold formula as the core contract.

Resolves #542

@linh2931 linh2931 requested review from heifner and greg7mdp August 28, 2024 14:23
tests/production_pause_vote_timeout.py Outdated Show resolved Hide resolved
tests/production_pause_vote_timeout.py Outdated Show resolved Hide resolved
tests/production_pause_vote_timeout.py Outdated Show resolved Hide resolved
tests/production_pause_vote_timeout.py Outdated Show resolved Hide resolved
tests/production_pause_vote_timeout.py Outdated Show resolved Hide resolved
tests/production_pause_vote_timeout.py Show resolved Hide resolved
@arhag arhag linked an issue Aug 28, 2024 that may be closed by this pull request
tests/production_pause_vote_timeout.py Show resolved Hide resolved
tests/production_pause_vote_timeout.py Show resolved Hide resolved
tests/production_pause_vote_timeout.py Outdated Show resolved Hide resolved
@linh2931 linh2931 merged commit 5365c29 into release/1.0 Aug 29, 2024
36 of 37 checks passed
@linh2931 linh2931 deleted the production_pause_vote_tests branch August 29, 2024 04:45
@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: TEST
summary: Adds sophisticated test for production pause scenario.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration tests for production-pause-vote-timeout
5 participants