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

docs: add removal of ClientState interface functions to migration docs #5943

Merged
merged 6 commits into from
Mar 7, 2024

Conversation

crodriguezvega
Copy link
Contributor

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Copy link
Contributor

coderabbitai bot commented Mar 6, 2024

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you ❤️ this is excellent

docs/docs/05-migrations/13-v8-to-v9.md Outdated Show resolved Hide resolved
docs/docs/05-migrations/13-v8-to-v9.md Outdated Show resolved Hide resolved
Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

docs/docs/05-migrations/13-v8-to-v9.md Outdated Show resolved Hide resolved
@crodriguezvega crodriguezvega merged commit 68bb9f2 into feat/02-client-router Mar 7, 2024
22 checks passed
@crodriguezvega crodriguezvega deleted the carlos/update-migrations-docs branch March 7, 2024 20:26
damiannolan added a commit that referenced this pull request Mar 14, 2024
* refactor: add initial light client module interface

* wip: add boiler plate light client module for tendermint client

* feat: adding initial light client module impl for 06-solomachine

* chore: adding LightClientModule interface assertion for 06-solomachine

* chore: adding initial boiilerplate for 08-wasm mod

* refactor: add boilerplate tendermint light client module

* refactor: add localhost boilerplate code

* imp: add basic 02-client router

* refactor: use light client module for client status

* chore: move solomachine keeper to internal

* chore: adding GetTimestampAtHeight to clientkeeper using 02-client router

* refactor: rm GetTimestampAtHeight from 03-connection and adapt api calls in 04-channel

* chore: wire up solomachine module with clientRouter in app.go

* chore: move commented out test to client keeper - still has todo to uncomment and fix

* chore: add solomachine client module to AppModule constructor and wire up in app.go

* fix: use correct route for client status lookup

* chore: add clientRouter to 08-wasm simapp and wire up

* fix: solo machine unmarshal bug and 02-client keeper tests

* test: fix GetTimestampAtHeight test in clientkeeper

* refactor(solomachine): add getClientState helper and unmarhsal interface

* refactor: align 08-wasm, add GetClientState helper and unmarshal interface

* fix(temp): temporarily add WithStoreKey opt to wasmkeeper to fix failing tests

* fix: wire up callbacks simapp to fix failing tests

* refactor: modify UpdateClient handler to use light client module api

* feat: add ClientStoreProvider interface for isolated prefix stores (#5781)

* refactor: rm internal/keeper from solomachine

* refactor: begin removing stale client state interfaces

* feat: wire up localhost

* fix: tests in 06-solomachine and 07-tendermint

* fix: rest of tests

* refactor: use light client module APIs in 03-connection state verify

* chore: adapt remaining handlers to use light client module api in 03-connection

* fix: locahost verify membership and non membership in light client module

* refactor: remove VerifyMembership and VerifyNonMembership from client state interface

* fix: rm getters for clientID from connection (conflict)

* 02-client routing: fix linter warnings (#5818)

* 02-client routing: fix linter warnings

* fix variable name

* return error

* 02-client routing: pass client ID to get route instead of client type (#5817)

* pass client ID to get route instead of client type

* rename variable

* Update modules/core/02-client/keeper/keeper.go

---------

Co-authored-by: Damian Nolan <[email protected]>

* use localhost client ID

* 02-client routing: function in store provider to return client store (#5824)

* add function to return 02-client module store

* review comment

* 02-client routing: implement `RecoverClient` in light client modules (#5822)

* implement recover client in light client modules

* add tests for wasm light client module recover client function

* missing file

* add tests for tendermint light client module recover client

* add tests for solomachine light client module recover client

* clean up 02-client recover client test cases

* fix test

* fix linter warning

* format client IDs

* fixes from merge of main

* 02-client routing: remove client ID validation (#5897)

* chore: remove client ID validation in light client module functions

* add contract documentation

* Update light_client_module.go

* 02-client routing: add godoc to `LightClientModule` functions (#5900)

* add godoc for light client module functions

* linter

* fix localhost client ID in godoc

* docs: add removal of `ClientState` interface functions to migration docs (#5943)

* docs: add removal of client state functions to migration docs

* test formating

* add comment about tendermint light client module implementation

* Apply suggestions from code review

Co-authored-by: colin axnér <[email protected]>

* mention removal of ZeroCustomFields

* Update docs/docs/05-migrations/13-v8-to-v9.md

Co-authored-by: DimitrisJim <[email protected]>

---------

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: DimitrisJim <[email protected]>

* 02-client routing: remove `GetLatestHeight` from `ClientState` interface and add it to `LightClientModule` (#5866)

* wip: remove GetLatestHeight from ClientState interface and add it to light client module

* chore: add godoc for GetLatestHeight in 02-client keeper

* chore: add args to event emission funcs in 02-client

* chore: add args to usage in 02-client event emissions

* chore: put back logging in upgrade client

* chore: deprecate and refactor 04-channel client utils QueryLatestConsensusState func

* chore: rename lightClientModule to clientModule in core

* chore: undo faulty renames

* fix: godoc for LatestHeight

* chore: add godocs

* chore: readding sequence checking in solomachine RecoverClient

* fix: testing chain helper to use keeper getter for latest height

* chore: fix compilation errors in tests

* fix: import ordering waaah

* imp: adding GetClientLatestHeight to testing endpoint/chain

* test: cleanup test funcs with path.Endpoint.GetClientLatestHeight

* test: cleanup tests in 04-channel to use path.Endpoint.GetClientLatestHeight

* test: cleanup ante_test

* chore: add godocs for light client modules LatestHeight method

* chore: update endpoint.go to use the new GetClientLatestHeight helper fn

* test: usage of path.Endpoint.GetClientLatestHeight in core/keeper and 07-tendermint tests

* test: another one

* chore: rm GetLatestHeight from solomachine ClientState

* test: update QueryConsensusStateProof in testing lib to use test helper

* Update testing/chain.go

* fix typo in variable name

* chore: consolidate two calls to LatestHeight to initialHeight var on createClient

* chore: extract to latestHeight var in VerifyUpgradeAndUpdateState to reduce disk reads

* chore: rm greater than or equal height check in solomachine as already done in 02-client

* chore: address todo on GetLatestHeight in 02-client keeper

---------

Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: chatton <[email protected]>

* docs: refactor light client developer guide

* imp: cleanup godoc on router type

* 02-client routing: implement `VerifyUpgradeAndUpdateState` in light client modules (#5827)

* wip: implementation and tests for verify upgrade and update state function in light client modules

* add test case

* fix un-marshaling in tendermint light client module

* add tests for verify upgrade and update state of 08-wasm light client module

* fix linter warnings

* check client state post upgrade

* fix: encoding issue: unmarshal to concrete types and not interfaces in 07-tendermint

* fix import

* cast type before calling zero custom fields

* test: marshal concrete types using chain codec for upgrade tests which bypass msg server entrypoint

* chore: remove basic validation of lc types in tm VerifyUpgradeAndUpdateState

* marshal to concrete type in tests

* keep client/consensus state as interface marshalled

* Apply suggestions from code review

Co-authored-by: colin axnér <[email protected]>

* chore: make lint-fix

* chore: rm redundant test, tested in lightclient module

* fix: remove marshalling of anys to bytes for verify upgrade (#5967)

* fix: remove marshalling of anys to bytes for verify upgrade

* test: refactor 02-client tests for verify upgrade

* test: fix tests in 07-tenderint client module

* chore: rm backwards compatability notice and marshalling of anys in core msg server

* test: cleanup happy path assertions in 07-tendermint verify upgrade test

* nit: update inline code commentin test

* doc: update godoc of UpgradeClient handler in core ibc

* lint: make lint-fix

* nit: inline comments in tests last Height -> upgrade height

* fix: address 08-wasm upgrade client and tests

---------

Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* nit: lcm -> l for all light client modules

* remove unnecessary comment

* chore: remove unnecessary todo's

* chore: lint fix docs

* Apply suggestions from code review

* chore: 02-client handler godoc

* Update modules/core/02-client/keeper/client.go

* Update modules/light-clients/06-solomachine/light_client_module_test.go

* remove commented out code in msg server

* chore: update godoc, remove todo's

* chore: remove unnecessary func from localhost + cleanup

* Apply suggestions from code review

* Update docs/docs/03-light-clients/01-developer-guide/01-overview.md

Co-authored-by: DimitrisJim <[email protected]>

* chore: remove todo + deprecation notice

* chore: fix broken link

* chore: godoc for exported client.go file

* chore: test update

* chore: godoc

* chore: update godoc in 06-solomachine light client module

* chore: update 07-tendermint light client module godoc

* chore: update localhost client module godocs

* chore: update 08-wasm light client module godoc

* fix: broken link

* fix(e2e): correctly assign trusted height and latest height vars to be scoped correctly for later usage in misbehaviour test

* address my self-review comments and some of rabbit's comments

* Update e2e/tests/transfer/localhost_test.go

* chore: godocs, rm ClientStore from expected keeper, rename events arg to initialHeight

---------

Co-authored-by: Colin Axnér <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: DimitrisJim <[email protected]>
Co-authored-by: chatton <[email protected]>
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.

4 participants