From 4db15a6b0e608ebaa0295f17141641fbf5b4f189 Mon Sep 17 00:00:00 2001 From: austinabell Date: Tue, 20 Oct 2020 10:26:38 -0400 Subject: [PATCH 1/3] Remove protoc dependency --- Cargo.lock | 103 +---------------------------------- README.md | 2 +- blockchain/beacon/Cargo.toml | 3 - 3 files changed, 4 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 002ad66676e1..f324d537a432 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -543,7 +543,6 @@ dependencies = [ "forest_encoding", "forest_json_utils", "hex", - "protoc-rust-grpc", "serde", "serde_json", "sha2 0.9.1", @@ -608,7 +607,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "which 3.1.1", + "which", ] [[package]] @@ -2120,7 +2119,7 @@ dependencies = [ "forest_car", "forest_cid", "forest_libp2p", - "futures 0.3.5", + "futures 0.3.6", "genesis", "hex", "ipld_blockstore", @@ -2673,32 +2672,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "graphsync" -version = "0.1.0" -dependencies = [ - "async-std", - "async-trait", - "bytes", - "fnv", - "forest_cid", - "forest_encoding", - "forest_ipld", - "futures 0.3.5", - "futures-util", - "futures_codec", - "ipld_blockstore", - "libp2p", - "log", - "multihash 0.10.1", - "protobuf", - "protoc-rust", - "rand 0.7.3", - "serde", - "smallvec", - "unsigned-varint 0.5.1", -] - [[package]] name = "groupy" version = "0.3.1" @@ -2711,16 +2684,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "grpc-compiler" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2861b7dc0787cf7804c986da795827e7f73f72353677525bb83c2b5332b1ee" -dependencies = [ - "protobuf", - "protobuf-codegen", -] - [[package]] name = "h2" version = "0.2.6" @@ -4691,7 +4654,7 @@ dependencies = [ "prost", "prost-types", "tempfile", - "which 3.1.1", + "which", ] [[package]] @@ -4717,56 +4680,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protobuf" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d147edb77bcccbfc81fabffdc7bd50c13e103b15ca1e27515fe40de69a5776b" - -[[package]] -name = "protobuf-codegen" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e81f70c25aab9506f87253c55f7cdcd8917635d5597382958d20025c211bbbd" -dependencies = [ - "protobuf", -] - -[[package]] -name = "protoc" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57408af2c106a7f08cc61e15be6a31e3ace8ea26f90dd1be1ad19abf1073d36a" -dependencies = [ - "log", - "which 4.0.2", -] - -[[package]] -name = "protoc-rust" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21c1582ff3efeccef1385b1c2dfaf4a9b5bc7794865624fc2a3ca9dff1145fa1" -dependencies = [ - "protobuf", - "protobuf-codegen", - "protoc", - "tempfile", -] - -[[package]] -name = "protoc-rust-grpc" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77ca3fdfd93c9d20aa208aee8bbdea7a5559b24ec8cb3a057a484faa2f963ff" -dependencies = [ - "grpc-compiler", - "protobuf", - "protoc", - "protoc-rust", - "tempdir", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -6741,16 +6654,6 @@ dependencies = [ "libc", ] -[[package]] -name = "which" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c14ef7e1b8b8ecfc75d5eca37949410046e66f15d185c01d70824f1f8111ef" -dependencies = [ - "libc", - "thiserror", -] - [[package]] name = "winapi" version = "0.2.8" diff --git a/README.md b/README.md index 3a9379a23dfd..44dce63b6c7b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ make install forest ``` -> `protoc` and `OpenCL` are also required to build. Installation for protoc can be found [here](http://google.github.io/proto-lens/installing-protoc.html). +> `OpenCL`, `hwloc` and a compatible assembly linker (ex. `clang`) are also required to build Filecoin proofs. ### Config diff --git a/blockchain/beacon/Cargo.toml b/blockchain/beacon/Cargo.toml index 3d998efaa967..14b39ea40abd 100644 --- a/blockchain/beacon/Cargo.toml +++ b/blockchain/beacon/Cargo.toml @@ -27,8 +27,5 @@ base64 = "0.12.1" async-std = { version = "1.6.3", features = ["unstable", "attributes"] } serde_json = "1.0" -[build-dependencies] -protoc-rust-grpc = "0.8" - [features] json = ["base64", "forest_json_utils"] From e33ab83e43217a65475047949e6c072f59164637 Mon Sep 17 00:00:00 2001 From: austinabell Date: Tue, 20 Oct 2020 10:47:13 -0400 Subject: [PATCH 2/3] Update badges --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 44dce63b6c7b..ccd725db5bf6 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@

-![](https://github.com/ChainSafe/forest/workflows/Rust%20CI/badge.svg?event=push&branch=main) -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/Q6A3YA2) -[![](https://img.shields.io/twitter/follow/espadrine.svg?label=Follow&style=social)](https://twitter.com/chainsafeth) +[build status](https://github.com/dtolnay/serde-repr/actions?query=branch%3Amaster) +[Apache License](https://opensource.org/licenses/Apache-2.0) +[MIT License](https://opensource.org/licenses/MIT) +[Discord](https://discord.gg/Q6A3YA2) +[Twitter](https://twitter.com/chainsafeth) Forest is an implementation of [Filecoin](https://filecoin.io/) written in Rust. The implementation will take a modular approach to building a full Filecoin node in two parts — (i) building Filecoin’s security critical systems in Rust from the [Filecoin Protocol Specification](https://filecoin-project.github.io/specs/), specifically the virtual machine, blockchain, and node system, and (ii) integrating functional components for storage mining and storage & retrieval markets to compose a fully functional Filecoin node implementation. @@ -23,7 +23,7 @@ Our crates: | `encoding` | Forest encoding and decoding | | `ipld` | IPLD data model for content-addressable data | | `node` | Networking synchronization and storage | -| `vm` | State transition and actor, message and address definitions | +| `vm` | State transition and actors, message and address definitions | ## Dependencies rustc >= 1.40.0 From e9a8eaa5f1ac158b5dec78b8b86f850eae2b2ca1 Mon Sep 17 00:00:00 2001 From: austinabell Date: Tue, 20 Oct 2020 10:54:13 -0400 Subject: [PATCH 3/3] Remove protoc from CI --- .circleci/config.yml | 15 ++++++++------- .github/workflows/ci-rust.yml | 25 +++++++++++++------------ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2d905895a7c7..2f1d2bea5322 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,15 +56,16 @@ commands: curl file gcc g++ git make openssh-client \ autoconf automake cmake libtool libcurl4-openssl-dev libssl-dev \ libelf-dev libdw-dev binutils-dev zlib1g-dev libiberty-dev wget \ - xz-utils pkg-config python clang ocl-icd-opencl-dev libgflags-dev + xz-utils pkg-config python clang ocl-icd-opencl-dev libgflags-dev libhwloc-dev rustup component add clippy rustfmt git submodule update --init - PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip - curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/$PROTOC_ZIP - sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc - sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' - rm -f $PROTOC_ZIP - sudo apt-get install -y libhwloc-dev + + # TODO enable when protoc used again + # PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip + # curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/$PROTOC_ZIP + # sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc + # sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' + # rm -f $PROTOC_ZIP save_cargo_package_cache: description: Save cargo package cache for subsequent jobs steps: diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index d7e8b26a98d4..86bb8face340 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -23,10 +23,11 @@ jobs: sudo apt install ocl-icd-opencl-dev sudo apt-get install -y libhwloc-dev - - name: Install Protoc - uses: arduino/setup-protoc@master - with: - version: "3.9.1" + # TODO enable when protoc needed again + # - name: Install Protoc + # uses: arduino/setup-protoc@master + # with: + # version: "3.9.1" - name: Toolchain setup uses: actions-rs/toolchain@v1 @@ -81,10 +82,10 @@ jobs: - name: Install OpenCL run: sudo apt install ocl-icd-opencl-dev - - name: Install Protoc - uses: arduino/setup-protoc@master - with: - version: "3.9.1" + # - name: Install Protoc + # uses: arduino/setup-protoc@master + # with: + # version: "3.9.1" - uses: actions-rs/toolchain@v1 with: @@ -124,10 +125,10 @@ jobs: - name: Install OpenCL run: sudo apt install ocl-icd-opencl-dev - - name: Install Protoc - uses: arduino/setup-protoc@master - with: - version: "3.9.1" + # - name: Install Protoc + # uses: arduino/setup-protoc@master + # with: + # version: "3.9.1" - name: Build documentation run: cargo doc --no-deps --all-features