Skip to content

proto: Rename packages from tendermint -> cometbft #94

Closed

Description

@thanethomson

The packages of all Protobuf definitions in the proto folder of on branch main must be renamed from tendermint to cometbft. We intend on making substantial changes to the architecture and interfaces in the coming year and, as such, the protos could diverge substantially from Tendermint Core over time (only across major releases, of course). We also have no intention of remaining compatible with Tendermint Core in future major releases (this is already actually the case with our v0.37 release). As such, it makes very little sense, from a product perspective, to continue producing interface/data structure changes for Tendermint Core.

Having our proto package as cometbft will make publishing these protos to registries, e.g. https://buf.build/cometbft/cometbft, easier for us and for integrators who consume them (especially once we version our protos, in #95).

e.g.

package tendermint.types;

must be renamed to:

package cometbft.types;

This includes regenerating all of the Go code and resolving any import errors.

Branches v0.37.x and v0.34.x will stay as they are:

  • in order to minimize disruption in the ecosystem
  • all protos in those branches are reused verbatim from the Tendermint Core repo

Further, we cannot do this for the v0.34.x branch because we would be breaking the message URLs associated with these messages, meaning CometBFT would potentially be incompatible with Tendermint Core, meaning that networks would need to perform a coordinated upgrade to CometBFT. Ideally we want our first v0.34-series release to be a drop-in replacement, so that a coordinated upgrade isn't necessary.

Activity

  1. changed the title [-]Rename Protobuf packages from `tendermint` -> `cometbft`[/-] [+]proto: Rename packages from `tendermint` -> `cometbft`[/+] on Jan 11, 2023
  2. added
    protobuf
    on Jan 11, 2023
  3. added
    rename
    on Jan 17, 2023
  4. cason commented on Jan 31, 2023

    @cason

    Some renaming, mostly on comments and documentation, was part of #224.

  5. added this to the 2023-Q1 milestone on Mar 1, 2023
  6. mzabaluev commented on Mar 6, 2023

    @mzabaluev
    Contributor

    There are gRPC services defined in these files:

    File Service name
    abci/types.proto ABCIApplication
    rpc/grpc/types.proto BroadcastAPI

    Changing the package name will result in changing the gRPC endpoints for these services as used by the generated code.
    Do we want to go forward with it as part of this renaming, or should I keep these packages in the tendermint namespace?

  7. thanethomson commented on Mar 7, 2023

    @thanethomson
    ContributorAuthor

    Changing the package name will result in changing the gRPC endpoints for these services as used by the generated code. Do we want to go forward with it as part of this renaming, or should I keep these packages in the tendermint namespace?

    We have no intention of keeping the tendermint namespace for anything Protobuf- or gRPC-related from our v0.38 release onwards. We also intend on implementing a full gRPC interface to the node ASAP, as per #81 (@mzabaluev, if you want, this is something you could take on once #94 and #95 are done).

  8. added
    P:integrator-experience
    on Mar 7, 2023
  9. tac0turtle commented on Mar 7, 2023

    @tac0turtle
    Contributor

    It would be good to talk to users and get a list of what this breaks. From my understanding this could break ibc tendermint clients and potentially apps in cosmos that use these types would need to migrate.

    We can only do so much from our end in the sdk.

  10. mzabaluev commented on Mar 7, 2023

    @mzabaluev
    Contributor

    Pet peeve time: while we are at breaking things, could we rename BroadcastAPI? I mean, it is an API, but no need to state the obvious in the naming that gets emitted in all kinds of code and resource names, and in the annoyingly caps-intensive way (in some hypothetical code generator that converts to snake_case with stupid rules, that might end up as broadcast_a_p_i).

  11. added
    breaking
    on Mar 7, 2023
  12. thanethomson commented on Mar 7, 2023

    @thanethomson
    ContributorAuthor

    It would be good to talk to users and get a list of what this breaks. From my understanding this could break ibc tendermint clients and potentially apps in cosmos that use these types would need to migrate.

    Yeah we're definitely going to try to solicit as much feedback as possible. My recommendation to @mzabaluev has been to do this work in a feature branch (feature/proto-upgrade, which is currently based on the vote extensions feature branch) so we can choose when exactly to incorporate this.

    My understanding at present is that this primarily breaks:

    1. Anyone relying on any kind of serialization (e.g. JSON or Protobuf Any fields) that embeds the full path to the Protobuf type.
    2. Anyone importing the generated Go code from github.com/cometbft/cometbft/proto/tendermint (where this would eventually change to github.com/cometbft/cometbft/api after proto: Implement versioning #95).

    What other kinds of breakage do folks expect?

    Wire-level encoding/decoding should be 100% compatible, except if you've somehow embedded type names in your encoded data.

    Pet peeve time: while we are at breaking things, could we rename BroadcastAPI?

    It seems to me as though while working on #81 would be the best time to do this, would it not?

  13. thanethomson commented on Mar 7, 2023

    @thanethomson
    ContributorAuthor

    It would also be interesting to investigate whether it's possible to offer both packages' protos simultaneously.

    For instance, could we internally switch to using cometbft package protos and their generated code, while still offering tendermint protos (no longer hooked into our code anywhere) for external consumers, with these tendermint types being wire-level compatible with their cometbft counterparts?

  14. tac0turtle commented on Mar 7, 2023

    @tac0turtle
    Contributor

    for sdk i thought of a way we can avoid the breakage but allow you to break, i still need to test.

    For go the main thing we care about is the option_go_package call because that defines how we import the generated files, but the proto url is what matters for state compatibility, we already have the idea to generate our own protos (this idea was around before the rename). We would keep the same proto urls and rename the option_go_package names to cosmos-sdk imports. That way things stay the same for us but allow you to break for future users

  15. removed
    rename
    on Mar 23, 2023
  16. modified the milestones: 2023-Q1, 2023-Q2 on Apr 13, 2023
  17. modified the milestones: 2023-Q2, 2023-Q3 on Jul 5, 2023
  18. sergio-mena commented on Jul 5, 2023

    @sergio-mena
    Collaborator

    Moved to Q3. It is part of v0.39.x release plan tracking issue

  19. sergio-mena commented on Sep 26, 2023

    @sergio-mena
    Collaborator

    After examination with @mzabaluev , we consider all these activities complete. The final feature branch merge into main is tracked in the parent issue. Reason: the feature branch is also being used for versioning.

  20. added a commit that references this issue on Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P:integrator-experiencebreakingprotobuf

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions