hiero-ledger / hiero-ledger/hiero-consensus-node
Use PBJ-generated protobufs instead of google-protobuf-generated protobufs in all production code
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
- Adjust all production code that still uses the `com.hederahashgraph.api.proto.java.*` classes to use the classes generated by PBJ. Remove all `requires com.google.protobuf;` from all modules.
- Remove google-protobuf codegen from `hapi/hapi`. The project only generates code with PBJ after the change (by removing [this Gradle configuration](https://github.com/hiero-ledger/hiero-consensus-node/blob/bb014388a72daf292c708f2ffe5052b06f22d90d/hapi/hapi/build.gradle.kts#L24-L29)).
- `hapi/hapi` **testFixtures** and **test** use `hapi/hedera-protobuf-java-api` for the tests that validate the PBJ and google-protobuf are compatible.
Contributor guide
Research direction
Start with hapi/hapi/build.gradle.kts and map production references to com.hederahashgraph.api.proto.java.* across the modules. Read the hapi/hapi testFixtures and test compatibility checks using hapi/hedera-protobuf-java-api; the work is done when production code uses PBJ-generated classes, google-protobuf requirements and codegen are removed, and those tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100