-
Notifications
You must be signed in to change notification settings - Fork 33
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
[WIP][IBC] Implement ICS-02 Client Semantics #916
base: ibc/proto-exploration-ics23
Are you sure you want to change the base?
Conversation
@h5law This is a
|
One potential option I see is having a PR that only contains the:
That way we can discuss what the interface is (names, etc...) and then the implementation follows. This is a typical design pattern in larger projects but could be used here solely due to the size of the PR. I'm not saying this is "the right way" to do it. It's the way that makes it easier for the reviewer. If you think it causes you too much overhead to maintain multiple PRs and you'd just prefer a longer cycle on this one. Happy to do that too! |
I've validated the following commit with The issue was a matter of paths (i.e. ~~I've removed us as reviewers until you give the next 👍 ~~ Nvm, seems like its ready for review |
61977ec
to
db376f5
Compare
@Olshansk I don't mind a longer cycle here, not in a rush to get this one in as I need to write the WASM code and get familiar with that side of thing + other tickets. Personally I feel like once the review process begins it will become clearer why I dont think it should be split. It would require a lot of gutting the interface functions as they need the implementations to satisfy the interfaces. The logic for these implementations is largely missing bar some basic validation etc and using the already existing ICS-24 stores. Theres a lot of todo comments to actually carry out the implementation logic in another ticket already so this is mostly boilerplate (re the interface implementations) |
b75e43a
to
ee6e508
Compare
18781c1
to
464d84b
Compare
1153f11
to
35ea88d
Compare
084e6bd
to
7e61c5d
Compare
Note: This PR is still a WIP and will be rebased in the future to clean up the commits. Remaining for this PR: Tests?, ???
Description
Summary generated by Reviewpad on 24 Jul 23 09:11 UTC
This pull request introduces several changes across multiple files. Here is a summary of the changes:
The file "header.go" adds new types and functionality related to the Wasm client consensus algorithm. It introduces a new file that declares a package named "types" and imports packages from "github.com/pokt-network/pocket/shared". It defines a struct named "Header" and implements the "ClientMessage" interface. It also defines methods for returning the client type and performing basic validation.
The file "update.go" updates methods related to client message verification and state update in the IBC module. It adds functions for verifying client messages, updating state, and updating state on misbehavior. It includes some commented out code that requires further development.
The file "queries.go" adds functions for retrieving the ConsensusState and ClientState for a stored client in the IBC module. These functions make use of imported packages from "pokt-network/pocket" module.
The file "event_manager.go" includes changes such as renaming an imported package, modifying function signatures, and adding a new variable. These changes improve code consistency and correctness.
The file "pocket.proto" adds protocol buffer definitions for a Wasm light client in the Pocket network. It defines messages for the client state, consensus state, header, misbehavior, and height.
The file "ics-02.md" adds a new section titled "ICS-02 Client Semantics" to the IBC documentation. It provides an overview of ICS-02 and mentions creation, updates, upgrades of clients, and verifying proofs with the counterparty client's state. It also highlights the use of generic implementations and opaque serialized data for improved client upgradeability in Pocket.
The file "ics-02-client-semantics.md" introduces the implementation details of the ICS-02 client semantics. It includes definitions, an overview, and implementation details of the client manager. It also covers client queries and utilization of provable stores.
The file "ibc_events.proto" modifies the protocol buffer definitions for IBC events. It removes a field, renumbers another field, and adds a new message for attributes.
The file "bulk_store_cache.go" updates function names, error handling, and variable assignments in the "AddStore" function. These changes improve code consistency and correctness.
The file "validate_test.go" adds test functions for validating various types of client states, consensus states, headers, and misbehaviors in the IBC module.
The file "misbehaviour.go" adds a new type and methods related to misbehavior in the IBC client types package.
The file "persistence_module.go" adds and modifies methods related to persistence in the IBC module.
The file "consensus_state.go" adds a new type and methods related to the consensus state for a Wasm client. It includes functions for creating a new consensus state, getting the client type, and performing basic validation.
The file "wasm.proto" adds protocol buffer definitions for a Wasm light client in the ibc/client/types/proto directory.
The file "client/events.go" adds a new package and functions for emitting different types of events related to IBC clients.
The file "persistence_module.go" adds a new method to the "PostgresContext" struct and modifies two existing methods.
The file "height.go" adds a new package and types related to the height of an IBC client.
The file "bus.go" adds a new method to the "bus" struct for retrieving the client manager from the module registry.
The file "ibc_events.proto" adds a new message for attributes in IBC events.
These changes introduce new types, implement functionality related to the Wasm client consensus algorithm, update and add methods for client message verification and state update, enhance functionality related to IBC events, provide support for the Pocket Network blockchain project, and make various code improvements.
Let me know if you would like more information or specific details about any of the changes.
Issue
Fixes #894
Type of change
Please mark the relevant option(s):
List of changes
ClientManager
submodule to manage the client implementationsConsensusState
andClientState
protobufs for use in Pocket WASM clientsTesting
make develop_test
; if any code changes were mademake test_e2e
on k8s LocalNet; if any code changes were madee2e-devnet-test
passes tests on DevNet; if any code was changedRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)