-
Notifications
You must be signed in to change notification settings - Fork 2
feat: support mining transactions with shielded outputs #167
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,17 +8,28 @@ RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust cargo | |||||
| RUN pip --no-input --no-cache-dir install --upgrade pip wheel | ||||||
| RUN pip --no-input --no-cache-dir install 'poetry>=1.2.0b2' | ||||||
|
|
||||||
| COPY poetry.lock pyproject.toml /code/ | ||||||
| # Copy hathorlib source (local path dependency: ../hathor-core/hathorlib). | ||||||
| # Build from the parent directory: | ||||||
| # docker build -f tx-mining-service/Dockerfile -t tx-mining-service . | ||||||
| COPY hathor-core/hathorlib/ /code/hathor-core/hathorlib/ | ||||||
|
|
||||||
| # Install in a subdirectory so the relative path "../hathor-core/hathorlib" | ||||||
| # in pyproject.toml resolves correctly to /code/hathor-core/hathorlib/. | ||||||
| COPY tx-mining-service/poetry.lock tx-mining-service/pyproject.toml /code/tx-mining-service/ | ||||||
|
|
||||||
| WORKDIR /code/tx-mining-service | ||||||
|
|
||||||
| RUN poetry config virtualenvs.create false \ | ||||||
| && poetry install --only main --no-interaction --no-ansi | ||||||
|
|
||||||
| FROM python:3.11-alpine | ||||||
|
|
||||||
| COPY --from=build /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages | ||||||
| # hathorlib is installed in develop mode (.pth file points to this path) | ||||||
| COPY --from=build /code/hathor-core/hathorlib /code/hathor-core/hathorlib | ||||||
| RUN apk add libgcc | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -name "Dockerfile" -type fRepository: HathorNetwork/tx-mining-service Length of output: 87 🏁 Script executed: cat -n ./DockerfileRepository: HathorNetwork/tx-mining-service Length of output: 1685 Add The build stage (line 6) already uses Proposed fix-RUN apk add libgcc
+RUN apk add --no-cache libgcc📝 Committable suggestion
Suggested change
🧰 Tools🪛 Trivy (0.69.3)[error] 30-30: 'apk add' is missing '--no-cache' '--no-cache' is missed: apk add libgcc Rule: DS-0025 (IaC/Dockerfile) 🤖 Prompt for AI Agents |
||||||
|
|
||||||
| COPY txstratum/ ./txstratum | ||||||
| COPY main.py log.conf ./ | ||||||
| COPY tx-mining-service/txstratum/ ./txstratum | ||||||
| COPY tx-mining-service/main.py tx-mining-service/log.conf ./ | ||||||
|
|
||||||
| ENTRYPOINT ["python", "-m", "main"] | ||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ prometheus-client = "^0.9.0" | |
| idna_ssl = "^1.1.0" | ||
| # Cap required: setuptools >=82 removed pkg_resources, which is used by pycoin (a transitive dep via hathorlib) | ||
| setuptools = ">=68.0,<82" | ||
| hathorlib = {version = "^0.14.1", extras = ["client"]} | ||
| hathorlib = {path = "../hathor-core/hathorlib", develop = true, extras = ["client"]} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check if README mentions the hathor-core dependency requirement
rg -i "hathor-core|companion|sibling" README.md || echo "No mention of hathor-core dependency found in README"Repository: HathorNetwork/tx-mining-service Length of output: 127 🏁 Script executed: # Check for Dockerfile and CI configuration
find . -type f \( -name "Dockerfile*" -o -name "*.yml" -o -name "*.yaml" \) | grep -E "(Dockerfile|\.github|ci)" | head -20Repository: HathorNetwork/tx-mining-service Length of output: 147 🏁 Script executed: # Look for CI configuration files
git ls-files | grep -E "\.github/workflows|\.circleci|\.travis|jenkinsfile" | head -10Repository: HathorNetwork/tx-mining-service Length of output: 142 🏁 Script executed: # Search for hathor-core references in Docker/CI files
rg "hathor-core" -g "Dockerfile*" -g "*.yml" -g "*.yaml" 2>/dev/null || echo "No hathor-core references in config files"Repository: HathorNetwork/tx-mining-service Length of output: 537 🏁 Script executed: cat -n Dockerfile | head -50Repository: HathorNetwork/tx-mining-service Length of output: 1297 🏁 Script executed: cat -n .github/workflows/docker.ymlRepository: HathorNetwork/tx-mining-service Length of output: 2593 🏁 Script executed: cat -n .github/workflows/main.yml | head -80Repository: HathorNetwork/tx-mining-service Length of output: 1334 🏁 Script executed: git ls-files | grep -E "\.gitmodules|\.git/config"Repository: HathorNetwork/tx-mining-service Length of output: 57 🏁 Script executed: cat -n .gitmodules 2>/dev/null || echo "No .gitmodules file found"Repository: HathorNetwork/tx-mining-service Length of output: 100 🏁 Script executed: # Check git config for submodules
git config --file .git/config --name-only --get-regexp path 2>/dev/null || echo "No submodules in git config"Repository: HathorNetwork/tx-mining-service Length of output: 89 🏁 Script executed: # Check if docker.yml has checkout steps we haven't seen
rg -A 30 "uses: docker/build-push-action" .github/workflows/docker.ymlRepository: HathorNetwork/tx-mining-service Length of output: 324 🏁 Script executed: # Check poetry.lock to see how hathorlib is handled
head -100 poetry.lock | grep -A 5 -B 5 "hathorlib" || echo "Checking further in poetry.lock..."Repository: HathorNetwork/tx-mining-service Length of output: 109 🏁 Script executed: # Search for hathorlib anywhere in poetry.lock
rg "hathorlib" poetry.lock || echo "No hathorlib entry found"Repository: HathorNetwork/tx-mining-service Length of output: 126 🏁 Script executed: cat -n .github/workflows/docker.yml | grep -A 5 -B 5 "actions/checkout"Repository: HathorNetwork/tx-mining-service Length of output: 57 🏁 Script executed: # Check the full workflow structure to see if hathor-core is cloned
rg -B 20 "docker/build-push-action" .github/workflows/docker.yml | head -40Repository: HathorNetwork/tx-mining-service Length of output: 1029 Local path dependency and CI configuration needs attention. The Dockerfile correctly documents the local path dependency on hathor-core (lines 11-13), but this requirement is not documented in the README. More critically, the CI workflows require the hathor-core repository to be available:
Add documentation in the README for the required repository structure (directory layout with hathor-core as a sibling directory) and update CI workflows to clone both repositories appropriately before attempting to build or test. 🤖 Prompt for AI Agents |
||
| python-healthchecklib = "^0.1.0" | ||
|
|
||
| [tool.poetry.group.dev.dependencies] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: HathorNetwork/tx-mining-service
Length of output: 1005
Update documentation: build command now requires parent directory context.
The Dockerfile correctly documents the new build requirement (line 13:
docker build -f tx-mining-service/Dockerfile -t tx-mining-service .from parent), butREADME.md(line 23) anddocker-compose.dev-miner.yml(line 24) still document the old build command without the-fflag. Users following these instructions will encounterCOPY hathor-core/hathorlib/ failederrors because the build context lacks the required parent directories.Update
README.mdto show:docker build -f tx-mining-service/Dockerfile -t tx-mining-service .(run from parent) or document the parent context requirement explicitly. Verify.dockerignoreexists in the parent directory to avoid sending unnecessary files to the daemon on each build.🤖 Prompt for AI Agents