From d8bf311c6000724ae183569541b85cdacbd03e78 Mon Sep 17 00:00:00 2001
From: github-merge-queue
<118344674+github-merge-queue@users.noreply.github.com>
Date: Tue, 10 Dec 2024 12:05:28 +0000
Subject: [PATCH 1/2] chore: spelling errors fixes
---
contrib/local-testnet.sh | 4 ++--
docs/docs/adrs/adr-022-fault-resolutions.md | 2 +-
.../hypha-consumer-start-process.excalidraw | 18 +++++++++---------
scripts/test_doc/test_documentation.md | 2 +-
tests/integration/slashing.go | 2 +-
tests/interchain/provider_single_val_test.go | 8 ++++----
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/contrib/local-testnet.sh b/contrib/local-testnet.sh
index a321bfe7f1..8d12664a5d 100755
--- a/contrib/local-testnet.sh
+++ b/contrib/local-testnet.sh
@@ -69,7 +69,7 @@ do
sleep 1
- # Create account keypair
+ # Create account key pair
interchain-security-pd keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1
sleep 1
@@ -394,7 +394,7 @@ do
sleep 1
- # Create account keypair
+ # Create account key pair
interchain-security-cd keys add $PROV_KEY --home ${CONS_NODE_DIR} --keyring-backend test --output json > ${CONS_NODE_DIR}/${PROV_KEY}.json 2>&1
sleep 1
diff --git a/docs/docs/adrs/adr-022-fault-resolutions.md b/docs/docs/adrs/adr-022-fault-resolutions.md
index 3501ecbd07..da2c7deed0 100644
--- a/docs/docs/adrs/adr-022-fault-resolutions.md
+++ b/docs/docs/adrs/adr-022-fault-resolutions.md
@@ -82,7 +82,7 @@ Additional states are added to the `provider` modules:
```
```protobuf
- messsage {
+ message {
// timestamp recording the last time a validator opted in to the consumer chain
google.protobuf.Timestamp join_time = 1;
// timestamp recording the last time a validator opted out of the consumer chain
diff --git a/docs/figures/hypha-consumer-start-process.excalidraw b/docs/figures/hypha-consumer-start-process.excalidraw
index 72a1b05445..387ad9b059 100644
--- a/docs/figures/hypha-consumer-start-process.excalidraw
+++ b/docs/figures/hypha-consumer-start-process.excalidraw
@@ -6117,11 +6117,11 @@
"locked": false,
"fontSize": 20,
"fontFamily": 1,
- "text": "Hz\nwe get the \nevidence and \nslash",
+ "text": "Hz\new get the \nevidence and \nslash",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "V2uHp_TDQ8ihrS_8j9zZZ",
- "originalText": "Hz\nwe get the evidence and slash",
+ "originalText": "Hz\new get the evidence and slash",
"autoResize": true,
"lineHeight": 1.25
},
@@ -7482,7 +7482,7 @@
"locked": false,
"fontSize": 16,
"fontFamily": 1,
- "text": "height at which \nwe receive\nthe evidence",
+ "text": "height at which \new receive\nthe evidence",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "s48-4wXmB4eSn25hza5zD",
@@ -17350,11 +17350,11 @@
"locked": false,
"fontSize": 16,
"fontFamily": 1,
- "text": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\nWe can keep getting\nupdates but not use \ntheir Merkle root. ",
+ "text": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\new can keep getting\nupdates but not use \ntheir Merkle root. ",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
- "originalText": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\nWe can keep getting\nupdates but not use \ntheir Merkle root. ",
+ "originalText": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\new can keep getting\nupdates but not use \ntheir Merkle root. ",
"autoResize": true,
"lineHeight": 1.25
},
@@ -33824,11 +33824,11 @@
"locked": false,
"fontSize": 16,
"fontFamily": 1,
- "text": "bogus header\n4. Febuary 2023\nsigned by Vm",
+ "text": "bogus header\n4. February 2023\nsigned by Vm",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "dr-C5qJTTjNBk139hzYmq",
- "originalText": "bogus header\n4. Febuary 2023\nsigned by Vm",
+ "originalText": "bogus header\n4. February 2023\nsigned by Vm",
"autoResize": true,
"lineHeight": 1.25
},
@@ -39079,11 +39079,11 @@
"locked": false,
"fontSize": 36,
"fontFamily": 1,
- "text": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\nWE STORE THOSE for\neach validator",
+ "text": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\new STORE THOSE for\neach validator",
"textAlign": "center",
"verticalAlign": "top",
"containerId": null,
- "originalText": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\nWE STORE THOSE for\neach validator",
+ "originalText": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\new STORE THOSE for\neach validator",
"autoResize": true,
"lineHeight": 1.25
},
diff --git a/scripts/test_doc/test_documentation.md b/scripts/test_doc/test_documentation.md
index d8cf18e62e..538def0778 100644
--- a/scripts/test_doc/test_documentation.md
+++ b/scripts/test_doc/test_documentation.md
@@ -84,7 +84,7 @@
|----------|-------------------|
[TestRelayAndApplyDowntimePacket](../../tests/integration/slashing.go#L50) | TestRelayAndApplyDowntimePacket tests that downtime slash packets can be properly relayed from consumer to provider, handled by provider, with a VSC and jailing eventually effective on consumer and provider.Details
* Set up CCV channels and retrieve consumer validators.
* Select a validator and create its consensus address.
* Retrieve the provider consensus address that corresponds to the consumer consensus address of the validator.
* The validator's current state is also retrieved, including its token balance,
* Set validator's signing information is to ensure it will be jailed for downtime.
* Create the slashing packet and send it from the consumer chain to the provider chain with a specified timeout.
* Receive the packet and verify that the validator was removed from the provider validator set.
* Relay VSC packets from the provider chain to each consumer chain and verify that the consumer chains correctly process these packets.
* Check the validator's balance and status on the provider chain to ensure it was jailed correctly but not slashed,
and its unjailing time is updated.
* Reset the outstanding downtime flag on the consumer chain, and ensure that the consumer
chain acknowledges receipt of the packet from the provider chain.
Note: This method does not test the actual slash packet sending logic for downtime
and double-signing, see TestValidatorDowntime and TestValidatorDoubleSigning for
those types of tests. |
[TestSlashPacketAcknowledgement](../../tests/integration/slashing.go#L185) | TestSlashPacketAcknowledgement tests the handling of a slash packet acknowledgement.Details
* Set up a provider and consumer chain, with channel initialization between them performed.
* Send a slash packet with randomized fields from the consumer to the provider.
* The provider processes the packet |
- [TestHandleSlashPacketDowntime](../../tests/integration/slashing.go#L236) | TestHandleSlashPacketDowntime tests the handling of a downtime related slash packet, with integration tests.Details
* Retrieve a validator from provider chain's validators and checks if it's bonded.
* Set tThe signing information for the validator.
* The provider processes the downtime slashing packet from the consumer.
* Check that the validator has been jailed as a result of the downtime slashing packet being processed.
* Verify that the validator’s signing information is updated and that the jailing duration is set correctly.
Note that only downtime slash packets are processed by HandleSlashPacket. |
+ [TestHandleSlashPacketDowntime](../../tests/integration/slashing.go#L236) | TestHandleSlashPacketDowntime tests the handling of a downtime related slash packet, with integration tests.Details
* Retrieve a validator from provider chain's validators and checks if it's bonded.
* Set the signing information for the validator.
* The provider processes the downtime slashing packet from the consumer.
* Check that the validator has been jailed as a result of the downtime slashing packet being processed.
* Verify that the validator’s signing information is updated and that the jailing duration is set correctly.
Note that only downtime slash packets are processed by HandleSlashPacket. |
[TestOnRecvSlashPacketErrors](../../tests/integration/slashing.go#L283) | TestOnRecvSlashPacketErrors tests errors for the OnRecvSlashPacket method in an integration testing setting.Details
* Set up all CCV channels and expect panic if the channel is not established via dest channel of packet.
* After the correct channelID is added to the packet, a panic shouldn't occur anymore.
* Create an instance of SlashPacketData and then verify correct processing and error handling
for slashing packets received by the provider chain.
TODO: Move to unit tests. |
[TestValidatorDowntime](../../tests/integration/slashing.go#L412) | 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
* Set up all CCV channel and send an empty VSC packet, then retrieve the address of a validator.
* Validator signs blocks for the duration of the signedBlocksWindow and a slash packet is constructed to be sent and committed.
* Simulate the validator missing blocks and then verify that the validator is jailed and the jailed time is correctly updated.
* Ensure that the missed block counters are reset.
* Check that there is a pending slash packet in the queue, and then send the pending packets.
* Check if slash record is created and verify that the consumer queue still contains the packet since no
acknowledgment has been received from the provider.
* Verify that the slash packet was sent and check that the outstanding slashing flag prevents the jailed validator to keep missing block. |
[TestQueueAndSendSlashPacket](../../tests/integration/slashing.go#L533) | TestQueueAndSendSlashPacket tests the integration of QueueSlashPacket with SendPackets. In normal operation slash packets are queued in BeginBlock and sent in EndBlock.Details
* Set up all CCV channels and then queue slash packets for both downtime and double-signing infractions.
* Check that the correct number of slash requests are stored in the queue, including duplicates for downtime infractions.
* Prepare the CCV channel for sending actual slash packets.
* Send the slash packets and check that the outstanding downtime flags are correctly set for validators that were slashed
for downtime infractions.
* Ensure that the pending data packets queue is empty.
TODO: Move to unit tests. |
diff --git a/tests/integration/slashing.go b/tests/integration/slashing.go
index 840821b12c..7c51ad9e96 100644
--- a/tests/integration/slashing.go
+++ b/tests/integration/slashing.go
@@ -227,7 +227,7 @@ func (s *CCVTestSuite) TestSlashPacketAcknowledgement() {
// TestHandleSlashPacketDowntime tests the handling of a downtime related slash packet, with integration tests.
// @Long Description@
// * Retrieve a validator from provider chain's validators and checks if it's bonded.
-// * Set tThe signing information for the validator.
+// * Set the signing information for the validator.
// * The provider processes the downtime slashing packet from the consumer.
// * Check that the validator has been jailed as a result of the downtime slashing packet being processed.
// * Verify that the validator’s signing information is updated and that the jailing duration is set correctly.
diff --git a/tests/interchain/provider_single_val_test.go b/tests/interchain/provider_single_val_test.go
index 9efe053ffa..2996005efc 100644
--- a/tests/interchain/provider_single_val_test.go
+++ b/tests/interchain/provider_single_val_test.go
@@ -189,7 +189,7 @@ func (s *SingleValidatorProviderSuite) TestProviderValidatorOptInWithKeyAssignme
s.Require().Equal(1, len(optInVals.ValidatorsProviderAddresses))
s.Require().Equal(valProviderAddress, optInVals.ValidatorsProviderAddresses[0])
- // assgin custom consumer consensus key
+ // assign custom consumer consensus key
s.Require().NoError(s.Provider.AssignKey(s.GetContext(), consumerChain.ConsumerID, 0, valConsumerKey))
consumerKeyAddr, err := s.Provider.ValidatorConsumerAddress(s.GetContext(), consumerChain.ConsumerID, valProviderAddress)
s.Require().NoError(err)
@@ -249,7 +249,7 @@ func (s *SingleValidatorProviderSuite) TestProviderUpdateConsumer() {
s.Require().NoError(s.Provider.OptIn(s.GetContext(), consumerChain.ConsumerID, 0))
s.Require().Equal(providertypes.CONSUMER_PHASE_REGISTERED.String(), consumerChain.Phase)
- // updated consumer with the minimum params (metadata) - regeistered phase
+ // updated consumer with the minimum params (metadata) - registered phase
upgradeMsg := &providertypes.MsgUpdateConsumer{
Owner: testAcc,
ConsumerId: consumerChain.ConsumerID,
@@ -601,7 +601,7 @@ func (s *SingleValidatorProviderSuite) TestProviderOwnerChecks() {
s.Require().Error(err)
s.Require().Contains(err.Error(), "expected gov account")
- // update owner using msg submited by the current owner
+ // update owner using msg submitted by the current owner
s.Require().NoError(s.Provider.UpdateConsumer(s.GetContext(), upgradeMsg, testAccKey2))
// update to top N using proposal
@@ -652,7 +652,7 @@ func (s *SingleValidatorProviderSuite) TestInfractionParameters() {
s.Require().NoError(testutil.WaitForBlocks(s.GetContext(), 1, s.Provider))
consumerChain, err = s.Provider.GetConsumerChain(s.GetContext(), consumerId)
s.Require().NoError(err)
- // chain is in pre-launched phase, params are updated immediatelly
+ // chain is in pre-launched phase, params are updated immediately
s.Require().Equal(infractionParamsTemplate(), convertJsonToInfractionParameters(consumerChain.InfractionParams))
// Confirm that a chain can be created with custom infraction parameters set only for double sign
From e4599d5a6f9c56514f36d27e75b1187422469342 Mon Sep 17 00:00:00 2001
From: mpoke
Date: Wed, 11 Dec 2024 11:44:46 +0100
Subject: [PATCH 2/2] revert some changes
---
contrib/local-testnet.sh | 4 ++--
.../hypha-consumer-start-process.excalidraw | 18 +++++++++---------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/contrib/local-testnet.sh b/contrib/local-testnet.sh
index 8d12664a5d..a321bfe7f1 100755
--- a/contrib/local-testnet.sh
+++ b/contrib/local-testnet.sh
@@ -69,7 +69,7 @@ do
sleep 1
- # Create account key pair
+ # Create account keypair
interchain-security-pd keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1
sleep 1
@@ -394,7 +394,7 @@ do
sleep 1
- # Create account key pair
+ # Create account keypair
interchain-security-cd keys add $PROV_KEY --home ${CONS_NODE_DIR} --keyring-backend test --output json > ${CONS_NODE_DIR}/${PROV_KEY}.json 2>&1
sleep 1
diff --git a/docs/figures/hypha-consumer-start-process.excalidraw b/docs/figures/hypha-consumer-start-process.excalidraw
index 387ad9b059..72a1b05445 100644
--- a/docs/figures/hypha-consumer-start-process.excalidraw
+++ b/docs/figures/hypha-consumer-start-process.excalidraw
@@ -6117,11 +6117,11 @@
"locked": false,
"fontSize": 20,
"fontFamily": 1,
- "text": "Hz\new get the \nevidence and \nslash",
+ "text": "Hz\nwe get the \nevidence and \nslash",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "V2uHp_TDQ8ihrS_8j9zZZ",
- "originalText": "Hz\new get the evidence and slash",
+ "originalText": "Hz\nwe get the evidence and slash",
"autoResize": true,
"lineHeight": 1.25
},
@@ -7482,7 +7482,7 @@
"locked": false,
"fontSize": 16,
"fontFamily": 1,
- "text": "height at which \new receive\nthe evidence",
+ "text": "height at which \nwe receive\nthe evidence",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "s48-4wXmB4eSn25hza5zD",
@@ -17350,11 +17350,11 @@
"locked": false,
"fontSize": 16,
"fontFamily": 1,
- "text": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\new can keep getting\nupdates but not use \ntheir Merkle root. ",
+ "text": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\nWe can keep getting\nupdates but not use \ntheir Merkle root. ",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
- "originalText": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\new can keep getting\nupdates but not use \ntheir Merkle root. ",
+ "originalText": "LC figures\nout that\nconsumer chain\nbecame\nunsecore on\ntimestamp T\n\nThen, LC would need to\n\"deactivate\"\nof all headers that\nhave timestamp >= T.\n\nWe can keep getting\nupdates but not use \ntheir Merkle root. ",
"autoResize": true,
"lineHeight": 1.25
},
@@ -33824,11 +33824,11 @@
"locked": false,
"fontSize": 16,
"fontFamily": 1,
- "text": "bogus header\n4. February 2023\nsigned by Vm",
+ "text": "bogus header\n4. Febuary 2023\nsigned by Vm",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "dr-C5qJTTjNBk139hzYmq",
- "originalText": "bogus header\n4. February 2023\nsigned by Vm",
+ "originalText": "bogus header\n4. Febuary 2023\nsigned by Vm",
"autoResize": true,
"lineHeight": 1.25
},
@@ -39079,11 +39079,11 @@
"locked": false,
"fontSize": 36,
"fontFamily": 1,
- "text": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\new STORE THOSE for\neach validator",
+ "text": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\nWE STORE THOSE for\neach validator",
"textAlign": "center",
"verticalAlign": "top",
"containerId": null,
- "originalText": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\new STORE THOSE for\neach validator",
+ "originalText": "powers and consumer\npublic keys the validators\nhad when they actually\nopted in to a\nconsumer chain at the\nbeginning of an epoch\nCurrently used by consumer\nchain.\nWE STORE THOSE for\neach validator",
"autoResize": true,
"lineHeight": 1.25
},