Skip to content

Commit

Permalink
Fix/del rot smid rmid tests (#254)
Browse files Browse the repository at this point in the history
* improved design and logic per review comments, still need to track the dip process by the delegator

Signed-off-by: 2byrds <[email protected]>

* delegator endpoint processes dip as a long running processes. tests pass

Signed-off-by: 2byrds <[email protected]>

* small fixes to op checks

Signed-off-by: 2byrds <[email protected]>

* small fixes on checking dip success

Signed-off-by: 2byrds <[email protected]>

* remove unnecessary loop for interact operation

Signed-off-by: 2byrds <[email protected]>

* point to keri main for now, will use 1.2.0-dev5 when it's available

Signed-off-by: 2byrds <[email protected]>

* refactored degator end to delegating.py and corresponding tests and used credentialing design for IdentifierResource end usage

Signed-off-by: 2byrds <[email protected]>

* consolidate to optype of 'delegation' and clean up tests

Signed-off-by: 2byrds <[email protected]>

* improve naming to be consistent with credentialing, and tested with signify-ts delegation updates

Signed-off-by: 2byrds <[email protected]>

* fixes and tests rotation. also tested with signify-ts integration tests that do rotation

Signed-off-by: 2byrds <[email protected]>

* fixed group end smids/rmids

Signed-off-by: 2byrds <[email protected]>

* fix smid list in multisig request on_post

Signed-off-by: 2byrds <[email protected]>

* fix for intermittent smid/rmid dict or str

Signed-off-by: 2byrds <[email protected]>

* moving approval into longrunning operation, need to make approveDelegation idempotent

Signed-off-by: 2byrds <[email protected]>

* successful delegated multisig integration testing with Signify-ts

Signed-off-by: 2byrds <[email protected]>

* set to tagged keripy 1.2.0.dev6

Signed-off-by: 2byrds <[email protected]>

* removed duplicate comment and simplified keria.dockerfile to leverage keripy image

Signed-off-by: 2byrds <[email protected]>

* Remove any smids/rmids state dict test problems

Signed-off-by: 2byrds <[email protected]>

* Removed unnecessary annotation

Signed-off-by: 2byrds <[email protected]>

* fix multisig join after original creation see WebOfTrust/signify-ts#227

Signed-off-by: 2byrds <[email protected]>

* cleanup docker image entrypoint and instructions

Signed-off-by: 2byrds <[email protected]>

---------

Signed-off-by: 2byrds <[email protected]>
  • Loading branch information
2byrds authored Jun 22, 2024
1 parent abf66f2 commit 2acb618
Show file tree
Hide file tree
Showing 12 changed files with 781 additions and 500 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ All Agent db access is through the associated Agent.
make build-keria
```

#### Run with docker
* Specify an entrypoint with proper configuration, for instance if you want to use the demo-witness-oobis that is under the scripts/keri/cf dir:
```
ENTRYPOINT ["keria", "start", "--config-file", "demo-witness-oobis", "--config-dir", "./scripts"]
```
You can see a [working example here](https://github.com/WebOfTrust/signify-ts/blob/main/docker-compose.yaml).

### Running Tests

Expand Down
57 changes: 6 additions & 51 deletions images/keria.dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,10 @@
# Builder stage
FROM python:3.12-alpine3.19 as builder
FROM weboftrust/keri:1.2.0-dev6

# Install compilation dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libffi-dev \
libsodium \
libsodium-dev
WORKDIR /usr/local/var

SHELL ["/bin/bash", "-c"]
RUN mkdir keria
COPY . /usr/local/var/keria

# Install Rust for blake3 dependency build
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
WORKDIR /usr/local/var/keria

WORKDIR /keria

RUN python -m venv venv
ENV PATH=/keria/venv/bin:${PATH}
RUN pip install --upgrade pip

# Copy in Python dependency files
COPY requirements.txt setup.py ./
# "src/" dir required for installation of dependencies with setup.py
RUN mkdir /keria/src
# Install Python dependencies
RUN . "$HOME/.cargo/env" && \
pip install -r requirements.txt

# Runtime stage
FROM python:3.12-alpine3.19

# Install runtime dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libsodium-dev

WORKDIR /keria

# Copy over compiled dependencies
COPY --from=builder /keria /keria
# Copy in KERIA source files - enables near instantaneous builds for source only changes
RUN mkdir -p /usr/local/var/keri
ENV KERI_AGENT_CORS=${KERI_AGENT_CORS:-false}
ENV PATH=/keria/venv/bin:${PATH}

EXPOSE 3901
EXPOSE 3902
EXPOSE 3903

COPY src/ src/

ENTRYPOINT ["keria", "start", "--config-file", "demo-witness-oobis", "--config-dir", "./scripts"]
RUN pip install -r requirements.txt
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
python_requires='>=3.12.2',
install_requires=[
'hio>=0.6.12',
'keri @ git+https://github.com/WebOfTrust/keripy.git@main',
'keri>=1.2.0.dev6',
'mnemonic>=0.20',
'multicommand>=1.0.0',
'falcon>=3.1.3',
Expand Down
Loading

0 comments on commit 2acb618

Please sign in to comment.