prysm-pulse/third_party
Nishant Das b61d17731e
Downgrade Level DB to Stable Version (#13671)
* downgrade level db

* fix current issues

* update geth

* Fix zstd build. The patch is now longer needed now that https://github.com/bazelbuild/rules_go/issues/3411 is fixed.

* Revert "update geth"

This reverts commit 2a7c51a952676a36ed62f837e91bebce2413e731.

* change to hex

---------

Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
2024-02-29 04:49:02 +00:00
..
blst Default to the portable version of blst (#12720) 2023-09-29 15:35:15 -05:00
herumi
usb Fix numerous spelling error and typos in the log messages, comments, and documentation. (#12385) 2023-05-11 20:45:43 +00:00
BUILD.bazel
com_github_ethereum_c_kzg_4844.patch Fix build @com_github_ethereum_c_kzg_4844//... (#12890) 2023-09-12 16:59:42 +00:00
com_github_ethereum_go_ethereum_secp256k1.patch
com_github_gogo_protobuf-equal.patch
com_github_grpc_ecosystem_grpc_gateway_v2_fix_emptypb.patch Update rules_go and gazelle to 0.42 & 0.33 (latest releases) (#13021) 2023-10-10 12:50:29 +08:00
com_github_grpc_ecosystem_grpc_gateway_v2_prysm_v5.patch Update to V5 (#13622) 2024-02-15 05:46:47 +00:00
com_github_grpc_ecosystem_grpc_gateway_v2.patch Update rules_go and gazelle to 0.42 & 0.33 (latest releases) (#13021) 2023-10-10 12:50:29 +08:00
com_github_prysmaticlabs_ethereumapis-tags.patch
io_bazel_rules_go_test.patch
README.md

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.