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

Removing unnecessary dependencies #73

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
cargo-test:
name: cargo test
Expand All @@ -13,27 +12,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y protobuf-compiler build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev postgresql libpqxx-dev libpqxx-doc nasm libsecp256k1-dev libprotoc-dev libsodium-dev libprotobuf-dev libssl-dev cmake libgrpc++-dev uuid-dev

- name: Check out pil2-stark
uses: actions/checkout@v4
with:
repository: 0xPolygonHermez/pil2-stark
token: ${{ secrets.GITHUB_TOKEN }}
ref: develop
path: pil2-stark
sudo apt-get install -y protobuf-compiler
sudo apt install -y build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev nasm libsodium-dev cmake

- name: Install pil2-stark
working-directory: pil2-stark
run: |
git submodule init
git submodule update --init --recursive
git submodule update
make clean
make starks_lib -j
Expand Down Expand Up @@ -102,6 +92,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: install cargo-audit
Expand Down Expand Up @@ -169,7 +161,8 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y protobuf-compiler build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev postgresql libpqxx-dev libpqxx-doc nasm libsecp256k1-dev libprotoc-dev libsodium-dev libprotobuf-dev libssl-dev cmake libgrpc++-dev uuid-dev
sudo apt-get install -y protobuf-compiler
sudo apt install -y build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev nasm libsodium-dev cmake

- name: Install pil2-stark
working-directory: pil2-stark
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pil_helpers
build*/
*.pilout
run.sh
MyLogFile.log
6 changes: 1 addition & 5 deletions examples/fibonacci-square/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ git checkout develop_rust_lib

# Update package lists and install required system packages
sudo apt update
sudo apt install build-essential libbenchmark-dev libomp-dev libgmp-dev \
nlohmann-json3-dev postgresql libpqxx-dev libpqxx-doc nasm \
libsecp256k1-dev grpc-proto libsodium-dev libprotobuf-dev \
libssl-dev cmake libgrpc++-dev protobuf-compiler \
protobuf-compiler-grpc uuid-dev
sudo apt install -y build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev nasm libsodium-dev cmake

# Initialize and update git submodules
git submodule init
Expand Down
2 changes: 1 addition & 1 deletion pil2-stark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WITNESS_LIB := ./witness_lib
CXX := g++
AS := nasm
CXXFLAGS := -std=c++17 -Wall -pthread -flarge-source-files -Wno-unused-label -rdynamic #-Wfatal-errors
LDFLAGS := -lprotobuf -lsodium -lgpr -lpthread -lpqxx -lpq -lgmp -lstdc++ -lgmpxx -lsecp256k1 -lcrypto -luuid -fopenmp -liomp5
LDFLAGS := -lsodium -lpthread -lgmp -lstdc++ -fopenmp
CFLAGS := -fopenmp
ASFLAGS := -felf64

Expand Down
8 changes: 3 additions & 5 deletions pil2-stark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,26 @@ cd pil2-stark

The following packages must be installed.

**Important dependency note**: you must install [`libpqxx` version 6.4.5](https://github.com/jtv/libpqxx/releases/tag/6.4.5). If your distribution installs a newer version, please [compile `libpqxx` 6.4.5](https://github.com/jtv/libpqxx/releases/tag/6.4.5) and install it manually instead.

#### Ubuntu/Debian

```sh
apt update
apt install build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev postgresql libpqxx-dev libpqxx-doc nasm libsecp256k1-dev grpc-proto libsodium-dev libprotobuf-dev libssl-dev cmake libgrpc++-dev protobuf-compiler protobuf-compiler-grpc uuid-dev
apt install build-essential libbenchmark-dev libomp-dev libgmp-dev nlohmann-json3-dev nasm libsodium-dev cmake
```

#### openSUSE
```sh
zypper addrepo https://download.opensuse.org/repositories/network:cryptocurrencies/openSUSE_Tumbleweed/network:cryptocurrencies.repo
zypper refresh
zypper install -t pattern devel_basis
zypper install libbenchmark1 libomp16-devel libgmp10 nlohmann_json-devel postgresql libpqxx-devel ghc-postgresql-libpq-devel nasm libsecp256k1-devel grpc-devel libsodium-devel libprotobuf-c-devel libssl53 cmake libgrpc++1_57 protobuf-devel uuid-devel llvm llvm-devel libopenssl-devel
zypper install libbenchmark1 libomp16-devel libgmp10 nlohmann_json-devel nasm libsodium-devel cmake
```

#### Fedora
```
dnf group install "C Development Tools and Libraries" "Development Tools"
dnf config-manager --add-repo https://terra.fyralabs.com/terra.repo
dnf install google-benchmark-devel libomp-devel gmp gmp-devel gmp-c++ nlohmann-json-devel postgresql libpqxx-devel nasm libsecp256k1-devel grpc-devel libsodium-devel cmake grpc grpc-devel grpc-cpp protobuf-devel protobuf-c-devel uuid-devel libuuid-devel uuid-c++ llvm llvm-devel openssl-devel
dnf install google-benchmark-devel libomp-devel gmp gmp-devel gmp-c++ nlohmann-json-devel nasm libsodium-devel cmake
```

### Compilation
Expand Down
5 changes: 0 additions & 5 deletions pil2-stark/src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
#include <iostream>
#include <iomanip>
#include <filesystem>
#include <uuid/uuid.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <openssl/md5.h>
#include <execinfo.h>
#include <openssl/evp.h>
#include <openssl/sha.h>
#include <openssl/crypto.h>
#include <ifaddrs.h>
#include <net/if.h>
#include <arpa/inet.h>
Expand Down
19 changes: 1 addition & 18 deletions provers/starks-lib-c/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,7 @@ fn main() {
println!("cargo:rustc-link-lib=static={}", library_short_name);

// Link other required libraries
for lib in &[
"protobuf",
"sodium",
"grpc++",
"grpc",
"gpr",
"grpc++_reflection",
"pthread",
"pqxx",
"pq",
"gmp",
"stdc++",
"gmpxx",
"secp256k1",
"crypto",
"uuid",
"iomp5",
] {
for lib in &["sodium", "pthread", "gmp", "stdc++", "gmpxx", "crypto", "iomp5"] {
println!("cargo:rustc-link-lib={}", lib);
}
}
Expand Down
Loading