Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TACo Porter 🌮 #58

Merged
merged 135 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
41595cd
Relock dependencies to latest versions.
derekpierre May 5, 2023
3a3dfe2
Update tests to conform to changes in `nucypher` (API and testing), a…
derekpierre May 5, 2023
464d898
Rename existing Porter schemas to be PRE specific, to make way for ev…
derekpierre May 5, 2023
43cb22c
Limit version of backports.zoneinfo to < python 3.9.
derekpierre May 5, 2023
2f8be0d
Fix CI build.
derekpierre May 5, 2023
b58a0bf
Merge pull request #25 from derekpierre/up-to-speed-dkg-dev-2
derekpierre May 23, 2023
bd41374
More reshuffling and renaming for legacy PRE functionality.
derekpierre May 5, 2023
ae06318
Initial schema for CBD.
derekpierre May 5, 2023
75fef5b
Ensure that pre-commit scripts are run properly before commits.
derekpierre May 5, 2023
0e3a597
Initial Porter CBD plumbing.
derekpierre May 5, 2023
b73ff28
Rename PRE specific objects and relock dependencies to use parallel e…
derekpierre May 9, 2023
47d533b
Added REST cbd decrypt endpoint to Porter along with expected schema;…
derekpierre May 10, 2023
f3e69d3
Refine Porter CBD endpoint schema, and add tests.
derekpierre May 10, 2023
1270a52
Limit version of backports.zoneinfo to < python 3.9 - was overwritten…
derekpierre May 10, 2023
b7e87de
Add web interface tests for cbd_decrypt REST endpoint.
derekpierre May 10, 2023
3085b9c
Fix precommit hook to run the correct tests.
derekpierre May 10, 2023
7388ad2
Depend on the correct `nucypher` commit hash - old one changed due to…
derekpierre May 17, 2023
52035f7
Merge pull request #26 from derekpierre/unencrypted-dkg-support
derekpierre May 23, 2023
0066a8d
Update Porter to use E2EE based on proper EncryptedThresholdDecryptio…
derekpierre May 17, 2023
08bfa5a
Additional testing and cleanup for EncryptedThresholdDecryptionReques…
derekpierre May 17, 2023
0435136
Incorporate changes from latest `nucypher-core` changes.
derekpierre May 20, 2023
ad9b28b
Update dependencies now that required changes from other repos are me…
derekpierre May 23, 2023
e3efee1
Merge pull request #24 from derekpierre/e2e-dkg
derekpierre May 23, 2023
c19046f
Incorporate latest changes to use session key objects from `nucypher-…
derekpierre May 31, 2023
33866a6
Relock dependencies to use `nucypher-core` `v0.9.0` and latest commit…
derekpierre Jun 7, 2023
6763e56
Update Porter diagrams.
derekpierre Jun 7, 2023
a6b3440
Update Pipfile
derekpierre Jun 7, 2023
a97468a
Merge pull request #28 from derekpierre/25519
derekpierre Jun 7, 2023
d4ed93a
Update Porter to use latest `nucypher` changes for dkg-dev-6.
derekpierre Jun 16, 2023
b23bf27
Fix dependency for backports.zoneinfo.
derekpierre Jun 16, 2023
f4381ea
Merge pull request #29 from derekpierre/update-for-conditions
derekpierre Jun 16, 2023
30a2cd8
Provide provider_uri parameter in a few spots.
derekpierre Jun 16, 2023
717da68
No need to use JSONDict for encryption request field schema, a simple…
derekpierre Jun 23, 2023
3775bcf
Update tests/test_fields.py
derekpierre Jun 23, 2023
a7bf021
Update `nucypher` and `nucypher-core` dependencies to dkg-dev-7 and 0…
derekpierre Jun 23, 2023
525acc1
Fix failing tests based on removal of DkgPublicParameters from `nucyp…
derekpierre Jun 23, 2023
6473be8
Relock dependencies for updated `nucypher` `dkg-dev-7` tag.
derekpierre Jun 26, 2023
0ec1dda
Merge pull request #30 from derekpierre/out-with-json-dict
KPrasch Jun 26, 2023
54cdbd1
Update Porter to use `nucypher-core` 0.11.0.
derekpierre Aug 23, 2023
d61521b
Update tests to use nucypher_core.ferveo.FerveoVariant with Threshold…
derekpierre Aug 23, 2023
46ba8b3
Use dev installaton of `nucypher` to temporarily work around promethe…
derekpierre Aug 23, 2023
721183c
Merge pull request #32 from derekpierre/core-11
derekpierre Aug 23, 2023
fc02656
Add darker to github workflow; also update version of darker used in …
derekpierre Sep 18, 2023
bd49b71
Merge pull request #35 from derekpierre/linter-update
KPrasch Sep 18, 2023
1aff25e
Remove PRE from Porter description and banner.
derekpierre Sep 8, 2023
8e87b17
Relock dependencies based on latest changes to `nucypher` (alpha-13 c…
derekpierre Sep 16, 2023
fbf81a8
Manually adjust requirements for backports info.
derekpierre Sep 16, 2023
ccb2180
Use TACoApplicationAgent instead of PREApplicationAgent.
derekpierre Sep 16, 2023
eea628b
Add condition type to time condition for tests.
derekpierre Sep 16, 2023
4a3dd1f
Enrico now needs to sign encrypted data, and returns a ThresholdMessa…
derekpierre Sep 16, 2023
96c013c
Use ThresholdMessageKit instead of Ciphertext.
derekpierre Sep 16, 2023
84eda45
Mock that encryption is authorized for tests.
derekpierre Sep 18, 2023
800dc02
Fix linter error.
derekpierre Sep 18, 2023
b0e5edc
Relock dependencies to latest `nucypher/nucypher` changes and contrac…
derekpierre Sep 26, 2023
1a5741c
Remove use of Economics/EconomicsFactory.
derekpierre Sep 26, 2023
a4df7b4
Fix python version limitation for `backports.zoneinfo` for [dev]requi…
derekpierre Sep 26, 2023
011421b
Create PULL_REQUEST_TEMPLATE.md
piotr-roslaniec Sep 27, 2023
a04426d
Merge pull request #36 from nucypher/pr-template
piotr-roslaniec Sep 27, 2023
3d5bbb6
Merge pull request #34 from derekpierre/taco-porter-update
KPrasch Sep 27, 2023
70e24f8
Update Porter to use nucypher dkg-dev-14 tagged dependency.
derekpierre Sep 28, 2023
4059364
Merge pull request #37 from derekpierre/use-dkg-dev-14
KPrasch Sep 28, 2023
1a4ea61
Remove [dev] extra when building docker container for Porter. The dev…
derekpierre Sep 29, 2023
a09a447
Merge pull request #38 from derekpierre/remove-dev-extra
KPrasch Sep 30, 2023
d3929bd
Relock Porter dependencies to use nucypher dkg-dev-15.
derekpierre Oct 6, 2023
f7c4161
Update eth_provider_uri -> eth_endpoint, network -> domain, use Contr…
derekpierre Oct 6, 2023
b954791
Update backports.zoneinfo dependency python restriction.
derekpierre Oct 6, 2023
ed902ac
Merge pull request #39 from derekpierre/use-dkg-dev-15
KPrasch Oct 6, 2023
cad94c6
Relock dependencies for `nucypher` v7.0.0-rc.1.
derekpierre Oct 13, 2023
5ea4251
Fix test now that expired rituals are actually invalid.
derekpierre Oct 13, 2023
5bb58a3
Merge pull request #44 from derekpierre/rc-1
KPrasch Oct 13, 2023
b7c0678
Update Porter README and diagrams.
derekpierre Oct 10, 2023
fe1d210
Apply RFCs from #40.
derekpierre Oct 12, 2023
9be2ee8
Bump version: 1.0.0 → 2.0.0
derekpierre Oct 18, 2023
2916520
Update cbd_decrypt endpoint and associated classes/variables/tests to…
derekpierre Oct 12, 2023
c0a0a62
Use /decrypt instead of /taco_decrypt. Update associated schema/varia…
derekpierre Oct 16, 2023
b27d4f5
Rename PREGetUrsulas schema to GetUrsulas since it is not PRE-specifi…
derekpierre Oct 16, 2023
093a337
Update README regarding change of decryption endpoint name.
derekpierre Oct 16, 2023
665385e
Bump version: 2.0.0 → 3.0.0
derekpierre Oct 18, 2023
3136482
Trigger build, tag, and publication of porter docker image due to git…
derekpierre Oct 17, 2023
304ba71
Rename secrets for docker job.
derekpierre Oct 17, 2023
990811c
Update regex for tag version names to be glob.
derekpierre Oct 18, 2023
ede7a64
Update docker.yml
KPrasch Oct 18, 2023
1253ee2
Bump version: 3.0.0 → 3.0.1
derekpierre Oct 18, 2023
0dc298c
relock deps with prometheus-flask-exporter
KPrasch Oct 24, 2023
a0ca923
default prometheus flask exporter integration
KPrasch Oct 24, 2023
fa3136b
configure a metrics path counter
KPrasch Oct 24, 2023
7661ea9
Relock dependencies with nucypher==v7.0.0-rc.3 and nucypher-core==v0.…
KPrasch Oct 24, 2023
d959e10
update dependency relock script python 3.8 -> 3.11
KPrasch Oct 24, 2023
ab2e73d
reset the prometheus exporter registry between tests
KPrasch Oct 24, 2023
9ea3068
bump minimum and maximum python version 3.9 - 3.11.
KPrasch Oct 24, 2023
9080f8d
Update .github/workflows/tests.yml
KPrasch Oct 24, 2023
40a9592
Merge pull request #46 from KPrasch/development
KPrasch Oct 24, 2023
306d931
Bump version: 3.0.1 → 3.1.1
KPrasch Oct 24, 2023
fe59b04
Actually run coverage for python tests for python v3.9.
derekpierre Oct 30, 2023
9c7682b
Produce coverage xml file.
derekpierre Oct 30, 2023
38d69f6
Use caching for python dependencies.
derekpierre Oct 30, 2023
e2c55b1
Only run coverage tasks for python 3.9.
derekpierre Oct 30, 2023
e922643
Merge pull request #47 from derekpierre/fix-cov
KPrasch Nov 1, 2023
9529454
Relock Porter dependencies based on `nucypher` rc.8.
derekpierre Nov 1, 2023
73662c0
Update Porter CLI and Learner use of domain.
derekpierre Nov 1, 2023
394194f
Update Porter tests to reflect updated domain usage.
derekpierre Nov 1, 2023
799a08c
Merge pull request #48 from derekpierre/rc-8
KPrasch Nov 3, 2023
af51799
Fail fast when there are insufficient nodes to sample a quantity of n…
derekpierre Nov 7, 2023
66e7158
Set up ruff as pre-commit hook and gh action.
derekpierre Nov 7, 2023
0760811
Apply ruff fixes to repos.
derekpierre Nov 7, 2023
9cf66bc
Merge pull request #52 from derekpierre/ruff
KPrasch Nov 8, 2023
56e457f
Bump version: 3.1.1 → 3.2.0
KPrasch Nov 8, 2023
146a998
Relock dependency to derekpierre/child-sampling to work on latest cha…
derekpierre Nov 14, 2023
f9fe8b3
Allow polygon endpoint to be specified in CLI.
derekpierre Nov 14, 2023
59d12d9
Update tests to accomodate required cli options, polygon-endpoint, an…
derekpierre Nov 14, 2023
64c507d
Update help text for polygon endpoint cli option.
derekpierre Nov 17, 2023
7723d6e
Ensure required values are provided to Porter object initialization v…
derekpierre Nov 17, 2023
b23a3e9
Update Porter's nucypher depedency to be v7.0.0-rc.10 and relock all …
derekpierre Nov 17, 2023
028931c
Update RitualStatus to use ACTIVE instead of FINALIZED for tests.
derekpierre Nov 17, 2023
bdacdcc
Merge pull request #55 from derekpierre/child-sampling
derekpierre Nov 17, 2023
f82f30a
Bump version: 3.2.0 → 3.3.0
derekpierre Nov 17, 2023
856cc68
Allow a timeout to be specified as a parameter to Porter decrypt (web…
derekpierre Nov 10, 2023
b7e2624
Update TACo decrypt tests to include timeout.
derekpierre Nov 10, 2023
2d0c943
Add max timeout for decryption operation.
derekpierre Nov 16, 2023
7fc275b
Add timeout parameter for /get_ursulas endpoint - limited by a max va…
derekpierre Nov 17, 2023
ce5af4e
Log a warning whenever parameterized timeout exceeds maximum allowed …
derekpierre Nov 17, 2023
ae1720c
Relock dependencies based on change in `nucypher`.
derekpierre Nov 18, 2023
6335c3d
Used default timeout for ThresholdDecryptionClient.DEFAULT_DECRYPTION…
derekpierre Nov 18, 2023
b06e46c
Update `nucypher` dependency to be `v7.0.0`.
derekpierre Dec 1, 2023
acdd731
Update call to retrieve_cfrags to use context as dictionary instead o…
derekpierre Dec 1, 2023
f6086ad
Relock dependencies.
derekpierre Dec 12, 2023
8254bf3
Merge pull request #53 from derekpierre/node-timeout
derekpierre Dec 12, 2023
532643b
Remove nginx docker folders since this is not something we want to sp…
derekpierre Dec 12, 2023
7164d74
Update documentation and docker-compose.
derekpierre Dec 12, 2023
fab46b5
Refactor timeout code so that it can be unit tested.
derekpierre Dec 12, 2023
61710c3
Update README to provide information about configurable timeouts.
derekpierre Dec 12, 2023
f0998d4
Cleanup test to make it clearer.
derekpierre Dec 13, 2023
f0f8828
Merge pull request #57 from derekpierre/bears
derekpierre Dec 13, 2023
e2d6ad5
Fix linter errors.
derekpierre Dec 13, 2023
391fb36
Fix linter errors for tests.
derekpierre Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 3.3.0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<stage>[^.]*)\.(?P<devnum>\d+))?
Expand Down
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**Type of PR:**
- [ ] Bugfix
- [ ] Feature
- [ ] Documentation
- [ ] Other

**Required reviews:**
- [ ] 1
- [ ] 2
- [X] 3

**What this does:**
> High-level idea of the changes introduced in this PR.
> List relevant API changes (if any), as well as related PRs and issues.

**Issues fixed/closed:**
> - Fixes #...

**Why it's needed:**
> Explain how this PR fits in the greater context of the NuCypher Network.
> E.g., if this PR addresses a `nucypher/productdev` issue, let reviewers know!

**Notes for reviewers:**
> What should reviewers focus on?
> Is there a particular commit/function/section of your PR that requires more attention from reviewers?
17 changes: 17 additions & 0 deletions .github/workflows/darker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🧹 Darker

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: akaihola/[email protected]
with:
version: "1.7.2" # defaults to same version, but can be modified
33 changes: 33 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Push Docker Image (version tags)

on:
push:
tags: [ 'v*.*.*' ]

jobs:
docker:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Echo Tag Name
run: echo "Tag - ${{github.ref_name}}"

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}
file: ./deploy/docker/Dockerfile
push: true
tags: nucypher/porter:${{github.ref_name}}
25 changes: 25 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 🧹 Lint with Ruff

on: [push, pull_request]

jobs:
ruff-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
pip install .

- name: Lint with Ruff
run: ruff --output-format=github porter
33 changes: 24 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,46 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
python -m pip install -r dev-requirements.txt
python scripts/install_solc.py
- id: python_cache
name: Retrieve Cached Python Dependencies
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('dev-requirements.txt', 'requirements.txt') }}

- name: Upgrade pip
if: steps.python_cache.outputs.cache-hit != 'true'
run: python -m pip install --upgrade pip

- name: Install dependencies (incl. updated code)
run: pip install .[dev]

- name: Run tests
if: matrix.python-version != '3.9'
run: |
python -m pytest tests

- name: Run tests (Coverage)
if: matrix.python-version == '3.9'
run: |
coverage run --data-file=test_data -m pytest tests
coverage xml -i --data-file=test_data -o coverage.xml

- name: Upload test coverage to Codecov
if: matrix.python-version == '3.8'
if: matrix.python-version == '3.9'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
files: coverage.xml
13 changes: 8 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:

- id: tests
name: Run Unit Tests
entry: scripts/run_unit_tests.sh
entry: scripts/run_tests.sh
language: system
types: [python]
stages: [push] # required additional setup: pre-commit install && pre-commit install -t pre-push
Expand Down Expand Up @@ -39,9 +39,12 @@ repos:


- repo: https://github.com/akaihola/darker
rev: 1.4.2
rev: 1.7.2
hooks:
- id: darker
args: [--isort]
additional_dependencies:
- isort~=5.9


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.4'
hooks:
- id: ruff
13 changes: 6 additions & 7 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ name = "pypi"
python_version = "3"

[packages]
nucypher = {git = "https://github.com/nucypher/nucypher.git", ref = "development"}
nucypher = {git = "https://github.com/nucypher/nucypher.git", ref = "v7.0.3"}
nucypher-core = "==0.13.0" # must be the same as nucypher
flask-cors = "*"
prometheus-flask-exporter = "*"

[dev-packages]
nucypher = {git = "https://github.com/nucypher/nucypher.git", editable = true, ref = "development", extras = ["dev"]} # needed for testerchain, and must be editable
pytest = "*"
nucypher = {git = "https://github.com/nucypher/nucypher.git", editable = true, ref = "v7.0.3", extras = ["dev"]} # needed for testerchain, and must be editable
pytest = "<7" # match with nucypher/nucypher
pytest-cov = "*"
pytest-mock = "*"
# Tools
pre-commit = "2.12.1"
pyflakes = "*"
mypy = "*"
coverage = "<=6.5.0"
py-solc-x = "==0.10.1"

maya = "*"

[pipenv]
allow_prereleases = true
Expand Down
Loading