From cc9a98a51522776b7c07e75b58c3b86a8dd0bc9a Mon Sep 17 00:00:00 2001 From: joao <22820692+joaolago1113@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:29:08 +0000 Subject: [PATCH] docs: Documentation Enhancements and Code Command Correction in ADR Files (#1513) * fix typo in 'Testing with Gaia as the provider' section * correct typo in 'Running Tests' section: change 'mate test-dev' to 'make test-dev' * Fix typo: change 'tyoically' to 'typically' * Fix incorrect assignment in SlashPacket handling * Fix typo in documentation: Change 'an uint64 index' to 'a uint64 index' * Fix repetition typo: Change 'As as solution' to 'As a solution' * fix typo: change 'disc' to 'disk' in adr-010-standalone-changeover.md --------- Co-authored-by: Marius Poke --- TESTING.md | 6 +++--- docs/docs/adrs/adr-001-key-assignment.md | 2 +- docs/docs/adrs/adr-008-throttle-retries.md | 6 +++--- docs/docs/adrs/adr-010-standalone-changeover.md | 2 +- tests/e2e/README.md | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TESTING.md b/TESTING.md index 76ae119d88..c1c33037fe 100644 --- a/TESTING.md +++ b/TESTING.md @@ -38,8 +38,8 @@ make test-integration # run mbt tests make test-mbt -# run unit and integration, and mbt tests - shortcut for local development -mate test-dev +# run unit, integration, and mbt tests - shortcut for local development +make test-dev # run E2E tests make test-e2e @@ -77,7 +77,7 @@ go test -fuzz= go run ./tests/e2e/... --local-sdk-path "/Users/bob/Documents/cosmos-sdk/" --verbose ``` -### Tesing with Gaia as the provider +### Testing with Gaia as the provider Integration tests can be run with Gaia as the provider. By default, the latest tagged release of Gaia is used - this includes release candidates and stabile releases. diff --git a/docs/docs/adrs/adr-001-key-assignment.md b/docs/docs/adrs/adr-001-key-assignment.md index f800219fcc..874321db0c 100644 --- a/docs/docs/adrs/adr-001-key-assignment.md +++ b/docs/docs/adrs/adr-001-key-assignment.md @@ -223,7 +223,7 @@ func HandleSlashPacket(chainID string, data ccv.SlashPacketData) (success bool, providerAddr, found := GetValidatorByConsumerAddr(chainID, consumerAddr) if !found { // the validator has the same key on the consumer as on the provider - providerAddr = consumer + providerAddr = consumerAddr } // ... } diff --git a/docs/docs/adrs/adr-008-throttle-retries.md b/docs/docs/adrs/adr-008-throttle-retries.md index 7c5015d512..710443bb65 100644 --- a/docs/docs/adrs/adr-008-throttle-retries.md +++ b/docs/docs/adrs/adr-008-throttle-retries.md @@ -32,7 +32,7 @@ Throttled `SlashPackets` are persisted on the provider, leading to multiple poss Right after being jailed, validators would have to unjail themselves promptly to ensure safety. The coordination required to maintain safety in such a scenario is not ideal. -As as solution, we can improve the throttling mechanism to instead queue/persist relevant data on each consumer, and have consumers retry slash requests as needed. +As a solution, we can improve the throttling mechanism to instead queue/persist relevant data on each consumer, and have consumers retry slash requests as needed. ## Decision @@ -77,7 +77,7 @@ This poor append performance isn't a problem when the pending packets list is sm But with this ADR being implemented, the pending packets list could potentially grow to the order of thousands of entries when `SlashPackets` need to be resent. We can improve the append time for this queue by converting it from a protobuf-esq list, to a queue implemented with sdk-esq code. -The idea is to persist an uint64 index that will be incremented each time you queue up a packet. +The idea is to persist a uint64 index that will be incremented each time you queue up a packet. You can think of this as storing the tail of the queue. Then, packet data will be keyed by that index, making the data naturally ordered byte-wise for sdk's iterator. The index will also be stored in the packet data value bytes, so that the index can later be used to delete certain packets from the queue. @@ -157,4 +157,4 @@ Once all consumers have deployed the changes in #1024, the provider changes from * [EPIC](https://github.com/cosmos/interchain-security/issues/713) tracking the changes proposed by this ADR * [ADR 002: Jail Throttling](./adr-002-throttle.md) -* [#594](https://github.com/cosmos/interchain-security/issues/594) \ No newline at end of file +* [#594](https://github.com/cosmos/interchain-security/issues/594) diff --git a/docs/docs/adrs/adr-010-standalone-changeover.md b/docs/docs/adrs/adr-010-standalone-changeover.md index 17c192d1fe..e181b4c1f1 100644 --- a/docs/docs/adrs/adr-010-standalone-changeover.md +++ b/docs/docs/adrs/adr-010-standalone-changeover.md @@ -26,7 +26,7 @@ The first step in the changeover process is to submit a ConsumerAdditionProposal Next, the standalone consumer chain runs an upgrade which adds the CCV module, and is properly setup to execute changeover logic. -The consumer upgrade height must be reached after the provider has created the new IBC client. Any replicated security validators who will run the consumer, but are not a part of the sovereign validator set, must sync up a full node before the consumer upgrade height is reached. The disc state of said full node will be used to run the consumer chain after the changeover has completed. +The consumer upgrade height must be reached after the provider has created the new IBC client. Any replicated security validators who will run the consumer, but are not a part of the sovereign validator set, must sync up a full node before the consumer upgrade height is reached. The disk state of said full node will be used to run the consumer chain after the changeover has completed. The meat of the changeover logic is that the consumer chain validator set is updated to that which was specified by the provider via the queried consumer genesis. Validators which were a part of the old set, but not the new set, are given zero voting power. Once these validator updates are given to Comet, the set is committed, and in effect 2 blocks later (see [FirstConsumerHeight](https://github.com/cosmos/interchain-security/blob/f10e780df182158d95a30f7cf94588b2d0479309/x/ccv/consumer/keeper/changeover.go#L19)). diff --git a/tests/e2e/README.md b/tests/e2e/README.md index dad8fb95cb..963494a2ee 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -6,7 +6,7 @@ End-to-end in this context means tests where the whole app (including command line interfaces, interfaces to external components like relayers, CometBFT, etc) is in scope for testing. -End-to-end tests should tyoically be used only to perform basic sanity checks that the provided +End-to-end tests should typically be used only to perform basic sanity checks that the provided APIs and protocols work as expected. For more detailed tests, like exhaustively testing edge cases, utilize in-memory tests. @@ -234,4 +234,4 @@ Useful pointers are: To debug an action, you can temporarily add a very long `time.Sleep` inside the action you are interested in, then sh into the docker container -and e.g. try running the commands from the action yourself to see what happens. \ No newline at end of file +and e.g. try running the commands from the action yourself to see what happens.