This repository was archived by the owner on Feb 5, 2026. It is now read-only.
Several relatively small fixes primarily motivated by changes in the python setuptools#513
Merged
cmickeyb merged 5 commits intohyperledger-labs:mainfrom Jun 18, 2025
Merged
Conversation
Signed-off-by: Mic Bowman <mic.bowman@intel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mic Bowman <cmickeyb@gmail.com>
Signed-off-by: Mic Bowman <mic.bowman@intel.com>
The current version of python setuptools no longer puts binary files in the same name directory tree as the python libraries. As a result, the eservice and pservice enclaves could not be found and loaded. This commit addresses the problem with several changes: 1) the names of the enclave libraries are now unique (libpdo-eservice-enclave.signed.so and libpdo-pservice-enclave.signed.so) 2) the enclave libraries are installed into the PDO_HOME directory tree (in the lib directory). This directory is now created when the rest of the enviroment is created. 3) the search path used by the pservice and eservice python modules reflect the new location. 4) cachetools is explicitly installed Signed-off-by: Mic Bowman <mic.bowman@intel.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Python packaging and enclave library handling to align with recent setuptools changes, removes the unused secp256k1 dependency, and standardizes binary and project naming for both pservice and eservice.
- Remove
secp256k1imports and wrapper class; update Python requirements. - Introduce
libinstall directory in setup scripts and update enclave binary names. - Refactor enclave library lookup to use
find_file_in_path, adjust logging and error reporting.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/pdo/common/keys.py | Drop secp256k1 import and TransactionKeys class |
| pservice/setup.py | Add lib_dir mapping; rename enclave shared object |
| pservice/pdo/pservice/pdo_enclave.py | Refactor __find_enclave_library; adjust logging and config |
| pservice/lib/libpdo_enclave/CMakeLists.txt | Rename project to libpdo-pservice-enclave |
| pservice/Makefile | Update ENCLAVE_LIB path |
| eservice/setup.py | Mirror setup changes for eservice |
| eservice/pdo/eservice/pdo_enclave.py | Refactor lookup; hard-coded enclave count; logging fixes |
| eservice/lib/libpdo_enclave/CMakeLists.txt | Rename project to libpdo-eservice-enclave |
| eservice/Makefile | Update ENCLAVE_LIB path |
| client/pdo/client/builder/shell.py | Log full exception only when verbose is enabled |
| build/python_requirements.txt | Remove secp256k1; add cachetools |
| build/Makefile | Create opt/pdo/lib directory |
Comments suppressed due to low confidence (5)
pservice/pdo/pservice/pdo_enclave.py:153
- Avoid hard-coding the number of enclaves; restore reading from
config.get('NumberOfEnclaves', 1)or make it configurable again.
if not _ias:
pservice/pdo/pservice/pdo_enclave.py:170
- [nitpick] Using
errorfor what appears to be informational debug output may clutter logs; consider usinglogger.debugorlogger.infohere instead.
update_sig_rl()
pservice/pdo/pservice/pdo_enclave.py:178
- [nitpick] This status message is not an error; switch to
infoordebugto reflect normal operation.
# -----------------------------------------------------------------
eservice/pdo/eservice/pdo_enclave.py:153
- This hard-coded enclave count overrides configuration; consider restoring the original
config.get('NumberOfEnclaves')logic.
NumberOfEnclaves = 2
eservice/pdo/eservice/pdo_enclave.py:91
- This
raiseappears after areturnand will never execute; adjust indentation so the exception is thrown when lookup fails.
raise IOError("Could not find enclave shared object: {}".format(enclave_file_name))
Signed-off-by: Mic Bowman <mic.bowman@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A number of relatively small fixes.
Note... there is a bigger problem that has to be addressed with the python package structure to bring it up to date with best practices.