Skip to content
/ SPDL Public

SPDL: A Blockchain-enabled Secure and Privacy-preserving Decentralized Learning System

License

Notifications You must be signed in to change notification settings

isPeterXu/SPDL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

  • Python 3.8 (Error with Python 3.9)

  • pip version 9.0.1 or higher

If necessary, upgrade your version of pip:

$ python -m pip install --upgrade pip

gRPC

Install gRPC:

$ python -m pip install grpcio

gRPC tools

Python’s gRPC tools include the protocol buffer compiler protoc and the special plugin for generating server and client code from .proto service definitions. For the first part of our quick-start example, we’ve already generated the server and client stubs from helloworld.proto, but you’ll need the tools for the rest of our quick start, as well as later tutorials and your own projects.

To install gRPC tools, run:

$ python -m pip install grpcio-tools

Generate gRPC code

python3 -m grpc_tools.protoc -I . --python_out=. --grpc_python_out=. grpc.proto  

You can skip this step if "grpc_pb2.py" and "grpc_pb2_grpc.py" exist.

PyCryptodome

PyCryptodome is a self-contained Python package of low-level cryptographic primitives.

It supports Python 2.7, Python 3.5 and newer, and PyPy.

You can install it with:

pip install pycryptodome

Run!

A simple run with two nodes:

open terminal_1, run
$ python3 main.py 127.0.0.1:50051 50051
open terminal_2
python3 main.py 127.0.0.1:50053 50053

Generate figure

$ pip install scipy
$ cd log
$ python3 figure.py 

MNIST

install mnist

$ pip install mnist

parse mnist data set uniformly

cd mnist_data
python3 mnist_parser

About

SPDL: A Blockchain-enabled Secure and Privacy-preserving Decentralized Learning System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published