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

Make ShareProof types available in go-square #55

Open
damiannolan opened this issue Apr 16, 2024 · 3 comments
Open

Make ShareProof types available in go-square #55

damiannolan opened this issue Apr 16, 2024 · 3 comments
Labels
enhancement New feature or request external

Comments

@damiannolan
Copy link

damiannolan commented Apr 16, 2024

Summary

From discussions with @nashqueue - the ShareProof types currently maintained in both celestia-app and celestia-core should be made available in go-square. This is to assist in the ibc story for rollups using celestia as a data availability provider.

Referring specifically to the types maintained in the links listed below:

We have been working on a light client for celestia data availability in ibc-go which would ideally consume go-square as a dependency. The implementation in progress currently has copied the both ShareProof and RowProof code in order to unmarshal the proof bytes into these types.

Perhaps celestia could benefit from adding the code in this repo and removing the duplication at both the app and core layers, however this may not be possible due to import cycles etc, I'm unaware if this would be a concern or not.

@damiannolan damiannolan added the enhancement New feature or request label Apr 16, 2024
@rootulp
Copy link
Collaborator

rootulp commented Apr 16, 2024

Related: celestiaorg/celestia-core#1182

@rach-id
Copy link
Member

rach-id commented Jun 7, 2024

We can move these definitions to go-square, however, core will also need to depend on it

@rach-id
Copy link
Member

rach-id commented Jun 7, 2024

Proposal:

Since many types are defined twice or three times between different repos, and type conversion gymnastics are always required.
Why not create a separate project, which can reside with a separate go.mod in go-square, to contain all the exported types and types required to be used across multiple repos.
I am not inclined towards having all the types in go-square because we have some types in repos that shouldn't depend on it. For example, nmt.Proof: https://github.com/celestiaorg/nmt/blob/3539dc8fbaf43d80a32d07c71d8f165b25b5531c/pb/proof.proto#L7-L22.

If we create that, we can move ShareProof, CommitmentProof, nmt.Proof, RowProof... and that package would be safe to import since it will only depend on protobuf/json (in case some types require specific marshallers). It can be imported from: core, app, node, nmt, celestia-openrpc, etc.

One more thing we could do is move also the tendermint specific types there: header for example, since it's needed in multiple repos like celestia-openrpc. Pros are we will have a single place for types. Cons are diverging more from upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external
Projects
None yet
Development

No branches or pull requests

3 participants