Replies: 1 comment
-
Setting up the libp2p librariesHow to setup py-libp2p: -
python3 -m venv .venv
. .venv/bin/activate
git clone https://github.com/libp2p/py-libp2p.git
cd py-libp2p
python3 -m pip install -e ".[dev]"
pre-commit installNow, using this virtual environment, any python file using py-libp2p can be run. How to setup leanp2p: -
git clone https://github.com/microsoft/vcpkg.git "$HOME/vcpkg"
"$HOME/vcpkg"/bootstrap-vcpkg.sh
# If using bash, replace .zshrc with .bashrc
echo 'export VCPKG_ROOT="$HOME/vcpkg"' >> ~/.zshrc
export VCPKG_ROOT="$HOME/vcpkg" # Run this to prevent reloading the shellThis provides you with the initial tools to use leanp2p, however a few more files will be needed.
Don't forget to edit Running the QUIC ping examplesClone the interop examples repository git clone https://github.com/bismuth01/libp2p-interopThe ping interval has been set to 1 and timeout interval to 5 seconds to show the client in action. Running py-libp2p QUIC ping client
cd libp2p-interop/py-libp2p/ping
python ping.pyOR, if you have a connection string python ping.py -d <your-connection-string>You will be able to see the message received and sent events. Running leanp2p QUIC ping client
cd libp2p-interop/leanp2p
cmake --preset default
cmake --build build -jThis will create the executable at ./build/ping/pingOR, if you have a connection string ./build/ping/ping <your-connection-string>You will not see any logs further than the client has connected due to no direct logging provided in the library (to the best of my knowledge). But if any error occurs, the client will log it or exit with the error. Screenshots of running clientpy-libp2p connects to py-libp2p
leanp2p connects to leanp2p
py-libp2p connects to leanp2p
leanp2p connects to py-libp2p
|
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
Siddharth: great accomplishment. Please add your detailed instructions, notes and screencast link below.
Beta Was this translation helpful? Give feedback.
All reactions