Skip to content

Commit

Permalink
Merge branch 'ph/test-table' of https://github.com/cosmos/interchain-…
Browse files Browse the repository at this point in the history
…security into ph/test-table
  • Loading branch information
kirdatatjana committed Sep 18, 2024
2 parents 1cb3095 + 6025b56 commit 5fd305f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/testing-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
run: make build-testing-docs

- name: Check for changes
if: env.GIT_DIFF
id: check_changes
run: |
git show HEAD:scripts/test_doc/test_documentation.md > committed_file.md
Expand Down
8 changes: 4 additions & 4 deletions scripts/test_doc/test_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
[TestSlashPacketAcknowledgement](../../tests/integration/slashing.go#L186) | TestSlashPacketAcknowledgement tests the handling of a slash packet acknowledgement.<details><summary>Details</summary>* Set up a provider and consumer chain, with channel initialization between them performed.<br>* Send a slash packet with randomized fields from the consumer to the provider.<br>* The provider processes the packet</details> |
[TestHandleSlashPacketDowntime](../../tests/integration/slashing.go#L237) | TestHandleSlashPacketDowntime tests the handling of a downtime related slash packet, with integration tests.<details><summary>Details</summary>* Retrieve a validator from provider chain's validators and checks if it's bonded.<br>* Set tThe signing information for the validator.<br>* The provider processes the downtime slashing packet from the consumer.<br>* Check that the validator has been jailed as a result of the downtime slashing packet being processed.<br>* Verify that the validator’s signing information is updated and that the jailing duration is set correctly.<br><br>Note that only downtime slash packets are processed by HandleSlashPacket.</details> |
[TestOnRecvSlashPacketErrors](../../tests/integration/slashing.go#L283) | TestOnRecvSlashPacketErrors tests errors for the OnRecvSlashPacket method in an integration testing setting.<details><summary>Details</summary>* Set up all CCV channels and expect panic if the channel is not established via dest channel of packet.<br>* After the correct channelID is added to the packet, a panic shouldn't occur anymore.<br>* Create an instance of SlashPacketData and then verify correct processing and error handling<br>for slashing packets received by the provider chain.</details> |
[TestValidatorDowntime](../../tests/integration/slashing.go#L391) | TestValidatorDowntime tests if a slash packet is sent and if the outstanding slashing flag is switched when a validator has downtime on the slashing module.<details><summary>Details</summary>* Set up all CCV channel and send an empty VSC packet, then retrieve the address of a validator.<br>* Validator signs blocks for the duration of the signedBlocksWindow and a slash packet is constructed to be sent and committed.<br>* Simulate the validator missing blocks and then verify that the validator is jailed and the jailed time is correctly updated.<br>* Ensure that the missed block counters are reset.<br>* Check that there is a pending slash packet in the queue, and then send the pending packets.<br>* Check if slash record is created and verify that the consumer queue still contains the packet since no<br>acknowledgment has been received from the provider.<br>* Verify that the slash packet was sent and check that the outstanding slashing flag prevents the jailed validator to keep missing block.</details> |
[TestValidatorDoubleSigning](../../tests/integration/slashing.go#L511) | TestValidatorDoubleSigning tests if a slash packet is sent when a double-signing evidence is handled by the evidence module.<details><summary>Details</summary>* Set up all CCV channel and send an empty VSC packet.<br>* Create a validator public key and address.<br>* Set the infraction parameters and create evidence of double signing.<br>* Add validator signing-info are also to the store and construct the slash packet.<br>* Simulate double signing and sends the slash packet.<br>* Verify the handling of slash packet, and check if slash record was created and if it's waiting for reply.<br>* Confirm that the queue is not cleared and the slash packet is sent.</details> |
[TestQueueAndSendSlashPacket](../../tests/integration/slashing.go#L605) | TestQueueAndSendSlashPacket tests the integration of QueueSlashPacket with SendPackets. In normal operation slash packets are queued in BeginBlock and sent in EndBlock.<details><summary>Details</summary>* Set up all CCV channels and then queue slash packets for both downtime and double-signing infractions.<br>* Check that the correct number of slash requests are stored in the queue, including duplicates for downtime infractions.<br>* Prepare the CCV channel for sending actual slash packets.<br>* Send the slash packets and check that the outstanding downtime flags are correctly set for validators that were slashed<br>for downtime infractions.<br>* Ensure that the pending data packets queue is empty.</details> |
[TestCISBeforeCCVEstablished](../../tests/integration/slashing.go#L690) | TestCISBeforeCCVEstablished tests that the consumer chain doesn't panic or have any undesired behavior when a slash packet is queued before the CCV channel is established. Then once the CCV channel is established, the slash packet should be sent soon after.<details><summary>Details</summary>* Check that no pending packets exist and that there's no slash record found.<br>* Triggers a slashing event which queues a slash packet.<br>* The slash packet should be queued but not sent, and it should stay like that until the CCV channel is established and the packet is sent.<br>*Verify that a slashing record now exists, indicating that the slashing packet has been successfully sent.</details> |
[TestValidatorDowntime](../../tests/integration/slashing.go#L401) | TestValidatorDowntime tests if a slash packet is sent and if the outstanding slashing flag is switched when a validator has downtime on the slashing module.<details><summary>Details</summary>* Set up all CCV channel and send an empty VSC packet, then retrieve the address of a validator.<br>* Validator signs blocks for the duration of the signedBlocksWindow and a slash packet is constructed to be sent and committed.<br>* Simulate the validator missing blocks and then verify that the validator is jailed and the jailed time is correctly updated.<br>* Ensure that the missed block counters are reset.<br>* Check that there is a pending slash packet in the queue, and then send the pending packets.<br>* Check if slash record is created and verify that the consumer queue still contains the packet since no<br>acknowledgment has been received from the provider.<br>* Verify that the slash packet was sent and check that the outstanding slashing flag prevents the jailed validator to keep missing block.</details> |
[TestValidatorDoubleSigning](../../tests/integration/slashing.go#L521) | TestValidatorDoubleSigning tests if a slash packet is sent when a double-signing evidence is handled by the evidence module.<details><summary>Details</summary>* Set up all CCV channel and send an empty VSC packet.<br>* Create a validator public key and address.<br>* Set the infraction parameters and create evidence of double signing.<br>* Add validator signing-info are also to the store and construct the slash packet.<br>* Simulate double signing and sends the slash packet.<br>* Verify the handling of slash packet, and check if slash record was created and if it's waiting for reply.<br>* Confirm that the queue is not cleared and the slash packet is sent.</details> |
[TestQueueAndSendSlashPacket](../../tests/integration/slashing.go#L615) | TestQueueAndSendSlashPacket tests the integration of QueueSlashPacket with SendPackets. In normal operation slash packets are queued in BeginBlock and sent in EndBlock.<details><summary>Details</summary>* Set up all CCV channels and then queue slash packets for both downtime and double-signing infractions.<br>* Check that the correct number of slash requests are stored in the queue, including duplicates for downtime infractions.<br>* Prepare the CCV channel for sending actual slash packets.<br>* Send the slash packets and check that the outstanding downtime flags are correctly set for validators that were slashed<br>for downtime infractions.<br>* Ensure that the pending data packets queue is empty.</details> |
[TestCISBeforeCCVEstablished](../../tests/integration/slashing.go#L700) | TestCISBeforeCCVEstablished tests that the consumer chain doesn't panic or have any undesired behavior when a slash packet is queued before the CCV channel is established. Then once the CCV channel is established, the slash packet should be sent soon after.<details><summary>Details</summary>* Check that no pending packets exist and that there's no slash record found.<br>* Triggers a slashing event which queues a slash packet.<br>* The slash packet should be queued but not sent, and it should stay like that until the CCV channel is established and the packet is sent.<br>*Verify that a slashing record now exists, indicating that the slashing packet has been successfully sent.</details> |
</details>

# [stop_consumer.go](../../tests/integration/stop_consumer.go)
Expand Down

0 comments on commit 5fd305f

Please sign in to comment.