This project uses Protocol Buffers for consensus and node communication (except consensus-critical serialization). Proto definitions are located in crates/types/proto and crates/remote-signer/proto. We use buf to lint, format, and check for breaking changes in our proto files.
Prerequisite:
bufmust be installed before using these targets. See Prerequisites for installation instructions.
make buf-lint- Lint protobuf files to ensure they follow best practicesmake buf-format- Format protobuf files (this is included inmake lint)make buf-breaking- Check for breaking changes against the main branch
If you modify any .proto files, always run make buf-lint and make buf-breaking to ensure your changes don't introduce linting issues or breaking changes. The buf-breaking command compares your changes against the main branch to detect any backwards-incompatible modifications. Breaking changes should be carefully reviewed and documented as they can impact existing deployments.
CI action runs the breaking change detection step on every pull request. To skip this step for a specific pull request, you can add the buf skip breaking label to the PR. See Skip breaking change detection using labels.
Note: make lint automatically runs buf-format.
Developers may install pre-commit hooks, which will handle all the formatting and linting automatically.
pre-commit install