README 测试校验层的样本应用程序 用我们的Demo视频快速启动! 点击上面的图像来观看我们的脚步..
README 测试校验层的样本应用程序 用我们的Demo视频快速启动! 点击上面的图像来观看我们的脚步..
** Quick Start with Our Demo Video!** Click on the image above to watch our step-by-step demo video.
This repository contains a Go program that sends data over a ZeroMQ socket to test a verification layer. The program (sample.go) is designed to send Zero-Knowledge (ZK) proofs or any data you specify to a specified endpoint. Shell scripts are included to streamline the building and running processes.
For a quick and comprehensive walkthrough, watch our YouTube demo video: Click on the image above or this link to view the demo.
The purpose of this project is to:
Before you begin, ensure you have met the following requirements:
Go Programming Language: Install Go (version 1.16 or later recommended). Download Go.
ZeroMQ and CZMQ Libraries: Install ZeroMQ, CZMQ, and pkg-config on your system.
Homebrew is a package manager for macOS that simplifies the installation of software. If you don't have Homebrew installed, follow these steps:
Open Terminal: You can find Terminal in Applications > Utilities.
Install Homebrew: Run the following command in Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Verify Installation:
brew --versionThis should display the version of Homebrew installed.
With Homebrew installed, proceed to install pkg-config, ZeroMQ, and CZMQ:
brew update
brew install pkg-config
brew install zeromq
brew install czmqUpdate your package list and install the required packages:
sudo apt-get update
sudo apt-get install -y libzmq3-dev libczmq-dev pkg-configFirst, enable the EPEL repository:
sudo yum install -y epel-releaseThen, install the required packages:
sudo yum install -y zeromq-devel czmq-devel pkgconfigOn Windows, you can use MSYS2 to install the necessary packages.
Steps:
Install MSYS2: Download and install it from https://www.msys2.org/.
Update Package Database:
Open the MSYS2 MSYS terminal and run:
pacman -SyuuClose and reopen the terminal if prompted.
Install Packages:
In the MSYS2 MinGW 64-bit terminal, run:
pacman -S mingw-w64-x86_64-pkg-config
pacman -S mingw-w64-x86_64-zeromq
pacman -S mingw-w64-x86_64-czmqAdd to PATH:
Ensure that the MinGW binaries are in your system's PATH. You can add the following to your environment variables:
C:\msys64\mingw64\binAdjust the path if you installed MSYS2 in a different location.
Git: Ensure Git is installed to clone the repository.
Clone this repository to your local machine:
git clone https://github.com/layer-edge/verification-layer-tester.git
cd verification-layer-testerInstall the Go package for ZeroMQ:
go get gopkg.in/zeromq/goczmq.v4Note: If you encounter errors related to pkg-config, ensure it's installed and properly configured in your system's PATH (see Troubleshooting).
Use the provided build.sh script to build the sample executable:
./build.shThis script compiles sample.go and produces an executable named sample.
Use the run.sh script to run the program.
If you have a proof file (e.g., proof.json), you can provide it as an argument:
./run.sh proof.jsonIf you want to input the proof data manually:
./run.shWhen prompted, paste your proof data and press Enter.
If you run ./run.sh and press Enter without typing anything when prompted, the program will use a default proof value defined in sample.go.
pkg-config: executable file not found in $PATHCause: pkg-config is not installed or not in your system's PATH.
Solution:
macOS:
brew install pkg-configUbuntu/Debian:
sudo apt-get install -y pkg-configCentOS/RHEL:
sudo yum install -y pkgconfigWindows:
Install MSYS2 and use pacman to install pkg-config.
pacman -S mingw-w64-x86_64-pkg-configEnsure C:\msys64\mingw64\bin is added to your system's PATH.
Solution:
sample.go is correct and accessible.tcp://34.71.52.251:40000 with your own endpoint if necessary.Solution:
Ensure all Go packages and system libraries are installed.
go get gopkg.in/zeromq/goczmq.v4Solution:
Ensure the scripts are executable:
chmod +x build.sh run.shSolution:
Ensure that ZeroMQ and CZMQ are properly installed on your system.
Verify installation:
pkg-config --modversion libzmq
pkg-config --modversion libczmqIf you're still experiencing issues, please provide:
Feel free to open an issue on the repository or contact the maintainers.
Contributions are welcome! Please follow these steps:
Fork the Repository: Click on the 'Fork' button on GitHub.
Clone Your Fork:
git clone https://github.com/layer-edge/verification-layer-tester.gitCreate a Feature Branch:
git checkout -b feature/your-feature-nameCommit Your Changes:
git commit -am 'Add some feature'Push to the Branch:
git push origin feature/your-feature-nameCreate a Pull Request: Open a pull request on GitHub.
This project is licensed under the MIT License.
暂无开放 Issues,或尚未同步最近议题。