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

Refactor dependencies, make Prysm "go gettable" #6053

merged 37 commits into from May 31, 2020

Refactor dependencies, make Prysm "go gettable" #6053

merged 37 commits into from May 31, 2020


Copy link

@prestonvanloon prestonvanloon commented May 29, 2020

What type of PR is this?


What does this PR do? Why is it needed?

At Prysmatic Labs, we use the Bazel build tool for many reasons including:

  • Reproducible builds
  • Polyglot language support
  • Reliable build configuration / customization
  • Powerful query language
  • Cross compilation support
  • Docker build support
  • And many more (full documentation page coming soon prysmaticlabs/documentation#138)

However, we recognize that Bazel build tooling adds friction to the average go developer. As such, we would like to provide first class support for go build/test. Additionally, for those users that wish to build upon Prysm with bazel, we're providing a prysm_deps() starlark rule that can be loaded in the downstream WORKSPACE.

# In your WORKSPACE file.

    name = "prysm",
    strip_prefix = "prysm-master",
    urls = [ # Ideally, choose a specific commit instead of using master.

load("@prysm//:deps.bzl", "prysm_deps") 

Which issues(s) does this PR fix?

Fixes #6035 (go build)
Fixes #6005 (deps refactor for downstream users)
Fixes #6011 (update deps to recent version)

Other notes for review

  • Refactor deps to be loadable by downstream users (See deps.bzl)
  • Add go build/test CI rule (using github actions)
  • Add documentation on dependency updates and policy (see
  • CI green checkmark

** Diff is large due to generated files. **

Please review:

  • deps.bzl
  • Changes in go files

Other notable changes:

  • This PR also cherry-picks 82f46cc (#5998) from v0.12.
  • This PR includes a patch for libp2p TLS to disable S390X, which was unused. See libp2p/go-libp2p-tls#66.
  • This PR skip two tests (see 718dd3e), which are fixed, refactored, or obsolete in v0.12 updates (#5614).
  • I included #5900 but reverted it since it was causing some other issues. We'll have to attempt updating rules_go and gazelle in a follow up PR.

prestonvanloon and others added 3 commits May 28, 2020
* update libs

* add new validators

* add new deps

* new set of deps

* tls

* further fix gossip update

* get everything to build

* clean up

* gaz

* fix build

* fix all tests

* add deps to images

* imports

Co-authored-by: rauljordan <>
@prestonvanloon prestonvanloon changed the title Deps Refactor dependencies, make Prysm "go gettable" May 29, 2020
@prestonvanloon prestonvanloon added the Ready For Review label May 30, 2020
@prestonvanloon prestonvanloon marked this pull request as ready for review May 30, 2020
@prestonvanloon prestonvanloon requested a review from as a code owner May 30, 2020
nisdas approved these changes May 31, 2020
Copy link

@nisdas nisdas left a comment

This looks great

@nisdas nisdas merged commit 49a0d3c into master May 31, 2020
15 checks passed
@delete-merged-branch delete-merged-branch bot deleted the deps branch May 31, 2020
Copy link

@alonmuroch alonmuroch commented Jun 4, 2020

@prestonvanloon this is awesome!
Will change our integration from bazel to go mod and will report back :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Ready For Review
None yet
5 participants