sgx.py 0.9.dev3__tar.gz → 0.9.dev5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sgx.py-0.9.dev3/sgx.py.egg-info → sgx.py-0.9.dev5}/PKG-INFO +1 -1
- sgx.py-0.9.dev5/README.md +71 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/setup.py +1 -1
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/constants.py +1 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/sgx_zmq.py +3 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5/sgx.py.egg-info}/PKG-INFO +1 -1
- sgx.py-0.9.dev3/README.md +0 -14
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/LICENSE +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/setup.cfg +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/__init__.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/generate.sh +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/http.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/sgx.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/sgx_rpc_handler.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx/utils.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx.py.egg-info/SOURCES.txt +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx.py.egg-info/dependency_links.txt +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx.py.egg-info/requires.txt +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/sgx.py.egg-info/top_level.txt +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/tests/test_core.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/tests/test_dkg.py +0 -0
- {sgx.py-0.9.dev3 → sgx.py-0.9.dev5}/tests/test_http.py +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# sgx.py
|
|
2
|
+
[](https://discord.gg/vvUtWJB)
|
|
3
|
+
|
|
4
|
+
## Requirements
|
|
5
|
+
|
|
6
|
+
|**Tool**|**Minimum Supported Version**|
|
|
7
|
+
|--------|-----------|
|
|
8
|
+
| Python | 3.11 |
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### Install Python 3.11
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# confirm prerequisites are isntalled
|
|
18
|
+
sudo apt update
|
|
19
|
+
sudo apt install software-properties-common
|
|
20
|
+
# Add deadsnakes PPA - widely used for Python versions
|
|
21
|
+
sudo add-apt-repository ppa:deadsnakes/ppa
|
|
22
|
+
# update again & install python 3.11
|
|
23
|
+
sudo apt update
|
|
24
|
+
sudo apt install python3.11
|
|
25
|
+
# Check if it was installed
|
|
26
|
+
python3.11 --version
|
|
27
|
+
|
|
28
|
+
pip install sgx.py
|
|
29
|
+
```
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Developers
|
|
33
|
+
### Install all python libraries
|
|
34
|
+
```bash
|
|
35
|
+
sudo apt-get update --fix-missing
|
|
36
|
+
sudo apt-get install libudev-dev
|
|
37
|
+
sudo apt-get install swig
|
|
38
|
+
|
|
39
|
+
# create virtual environment - install dependencies locally
|
|
40
|
+
python3.11 -m venv venv
|
|
41
|
+
source venv/bin/activate
|
|
42
|
+
pip install -e .
|
|
43
|
+
pip install -e .[dev]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Running Tests
|
|
47
|
+
|
|
48
|
+
Create a `.env` file in source directory, like the following:
|
|
49
|
+
```bash
|
|
50
|
+
SERVER=https://127.0.0.1:1026
|
|
51
|
+
CERT_PATH=.
|
|
52
|
+
ETH_PRIVATE_KEY=
|
|
53
|
+
GETH=
|
|
54
|
+
```
|
|
55
|
+
You may alter the fields as needed.
|
|
56
|
+
|
|
57
|
+
Run the tests:
|
|
58
|
+
```bash
|
|
59
|
+
# Run all tests
|
|
60
|
+
pytest
|
|
61
|
+
|
|
62
|
+
# Run specific test file
|
|
63
|
+
pytest ./tests/<test-file-name>.py
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
[](LICENSE)
|
|
70
|
+
|
|
71
|
+
Copyright (C) 2019-present SKALE Labs
|
|
@@ -35,6 +35,7 @@ from urllib.parse import urlparse
|
|
|
35
35
|
|
|
36
36
|
from sgx.constants import (
|
|
37
37
|
DEFAULT_TIMEOUT,
|
|
38
|
+
SGX_ZMQ_RESPONSE_TIMEOUT_MS,
|
|
38
39
|
CRT_FILENAME,
|
|
39
40
|
KEY_FILENAME
|
|
40
41
|
)
|
|
@@ -270,6 +271,8 @@ class SgxZmq:
|
|
|
270
271
|
socket_p_id = self.ctx.socket(zmq.DEALER)
|
|
271
272
|
socket_p_id.setsockopt_string(zmq.IDENTITY, "135:14603077656239261618")
|
|
272
273
|
socket_p_id.setsockopt(zmq.LINGER, 0)
|
|
274
|
+
socket_p_id.setsockopt(zmq.SNDTIMEO, SGX_ZMQ_RESPONSE_TIMEOUT_MS)
|
|
275
|
+
socket_p_id.setsockopt(zmq.RCVTIMEO, SGX_ZMQ_RESPONSE_TIMEOUT_MS)
|
|
273
276
|
socket_p_id.connect(self.sgx_endpoint)
|
|
274
277
|
self.sockets[p_id] = socket_p_id
|
|
275
278
|
socket = self.sockets[p_id]
|
sgx.py-0.9.dev3/README.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# sgx.py
|
|
2
|
-
[](https://discord.gg/vvUtWJB)
|
|
3
|
-
|
|
4
|
-
## Installation
|
|
5
|
-
|
|
6
|
-
```commandline
|
|
7
|
-
pip install sgx.py
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## License
|
|
11
|
-
|
|
12
|
-
[](LICENSE)
|
|
13
|
-
|
|
14
|
-
Copyright (C) 2019-present SKALE Labs
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|