This repository serves as a central hub for shared protobuf definitions used across various services. Currently, it includes protobuf definitions and generated Go SDKs for the job-distributor and orchestrator services. Contributions and additional proto files for other services are welcome.
- No More Copy-Pasting Code: Centralized proto definitions eliminate the need to copy-paste code across different repositories.
- Publicly Accessible Repository: No need for tokens, credentials, or GOPRIVATE settings.
- Proto Breaking Changes Validation with Buf: Ensures backward compatibility and consistent formatting.
- Automated Golang SDK Generation: GitHub workflows keep the generated code up-to-date.
- Independent Versioning in a Monorepo: Each package is versioned separately for better control and integration.
Go applications can import only the necessary SDKs.
$ go get github.com/smartcontractkit/chainlink-protos/job-distributor@v<LATEST_VERSION>
$ go get github.com/smartcontractkit/chainlink-protos/orchestrator@v<LATEST_VERSION>
The import varies depending on the go_package
option defined in the protos.
Below is an example when go_package
is set to github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node
import "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node"
asdf is a tool version manager. All dependencies used for local development of this repo are
managed through asdf
. To install asdf
:
- Install asdf
- Follow the instructions to ensure
asdf
is shimmed into your terminal or development environment
Install the required tools using asdf:
./scripts/setup-asdf-plugin.sh
asdf install
Communication between core node and job distributor requires the library wsRPC. To generate protos that are compatible with wsRPC, we will need to install the CLI.
Follow the instructions here to install it.
Ensure buf is installed following the dependencies above.
task fmt
task lint
Note
Commiting the generated code resulting from the proto changes is optional. The CI will automatically update the pull request with the generated files through the GitHub workflow.
Generate the GO SDKs to implement gRPC services or clients via task
$ task proto:all
$ task proto:gen:job-distributor # only run for job-distributor
$ task proto:gen:orchestrator: # only run for orchestrator
For instructions on how to contribute to chainlink-protos
and the release process,
see CONTRIBUTING.md
For instructions on how to release chainlink-protos
,
see RELEASE.md