Skip to content

Commit

Permalink
docs: Documentation Enhancements and Code Command Correction in ADR F…
Browse files Browse the repository at this point in the history
…iles (#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 <marius.poke@posteo.de>
  • Loading branch information
joaolago1113 and mpoke authored Jan 4, 2024
1 parent e470555 commit cc9a98a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -77,7 +77,7 @@ go test -fuzz=<regex-to-match-test-name>
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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/adrs/adr-001-key-assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
// ...
}
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/adrs/adr-008-throttle-retries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
* [#594](https://github.com/cosmos/interchain-security/issues/594)
2 changes: 1 addition & 1 deletion docs/docs/adrs/adr-010-standalone-changeover.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
and e.g. try running the commands from the action yourself to see what happens.

0 comments on commit cc9a98a

Please sign in to comment.