* wip passing e2e * reverting temp comment * remove unneeded comments * fixing merge errors * fixing more bugs from merge * fixing test * WIP moving code around and fixing tests * unused linting * gaz * temp removing these tests as we need placeholder/wrapper APIs for them with the removal of the gateway * attempting to remove dependencies to gRPC gateway , 1 mroe left in deps.bzl * renaming flags and other gateway services to http * goimport * fixing deepsource * git mv * Update validator/package/validator.yaml Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update validator/package/validator.yaml Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/beacon-chain/flags/base.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/beacon-chain/flags/base.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/beacon-chain/flags/base.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * addressing feedback * missed lint * renaming import * reversal based on feedback * fixing web ui registration * don't require mux handler * gaz * removing gRPC service from validator completely, merged with http service, renames are a work in progress * updating go.sum * linting * trailing white space * realized there was more cleanup i could do with code reuse * adding wrapper for routes * reverting version * fixing dependencies from merging develop * gaz * fixing unit test * fixing dependencies * reverting unit test * fixing conflict * updating change log * Update log.go Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> * gaz * Update api/server/httprest/server.go Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> * addressing some feedback * forgot to remove deprecated flag in usage * gofmt * fixing test * fixing deepsource issue * moving deprecated flag and adding timeout handler * missed removal of a flag * fixing test: * Update CHANGELOG.md Co-authored-by: Radosław Kapka <rkapka@wp.pl> * addressing feedback * updating comments based on feedback * removing unused field for now, we can add it back in if we need to use the option * removing unused struct * changing api-timeout flag based on feedback --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
Third Party Package Patching
This directory includes local patches to third party dependencies we use in Prysm. Sometimes, we need to make a small change to some dependency for ease of use in Prysm without wanting to maintain our own fork of the dependency ourselves. Our build tool, Bazel allows us to include patches in a seamless manner based on simple diff rules.
This README outlines how patching works in Prysm and an explanation of previously created patches.
Given maintaining a patch can be difficult and tedious, patches are NOT the recommended way of modifying dependencies in Prysm unless really needed
Table of Contents
Prerequisites
Bazel Installation:
- The latest release of Bazel
- A modern UNIX operating system (MacOS included)
Creating a Patch
To create a patch, we need an original version of a dependency which we will refer to as a
and the patched version referred to as b.
cd /tmp
git clone https://github.com/someteam/somerepo a
git clone https://github.com/someteam/somerepo b && cd b
Then, make all your changes in b and finally create the diff of all your changes as follows:
cd ..
diff -ur --exclude=".git" a b > $GOPATH/src/github.com/prysmaticlabs/prysm/third_party/YOURPATCH.patch
Next, we need to tell the Bazel WORKSPACE to patch the specific dependency. Here's an example for a patch we use today for the Ethereum APIs dependency:
go_repository(
name = "com_github_prysmaticlabs_ethereumapis",
commit = "367ca574419a062ae26818f60bdeb5751a6f538",
patch_args = ["-p1"],
patches = [
"//third_party:com_github_prysmaticlabs_ethereumapis-tags.patch",
],
importpath = "github.com/prysmaticlabs/ethereumapis",
)
Now, when used in Prysm, the dependency you patched will have the patched modifications when you run your code.