Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ jobs:
os: [ubuntu-latest]
python-version: ["3.10"]
poetry-version: ["2.3.2"]
# Wallet v0 / deprecated mint API support was removed in https://github.com/cashubtc/nutshell/pull/814; deprecated-only CI runs are no longer valid.
# mint-only-deprecated: ["false", "true"]
mint-only-deprecated: ["false"]
mint-database: ["./test_data/test_mint", "postgres://cashu:cashu@localhost:5432/cashu"]
backend-wallet-class: ["FakeWallet"]
uses: ./.github/workflows/tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
poetry-version: ${{ matrix.poetry-version }}
mint-only-deprecated: ${{ matrix.mint-only-deprecated }}
mint-database: ${{ matrix.mint-database }}

tests_redis_cache:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/regtest-mint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ permissions:
jobs:
regtest-mint:
runs-on: ${{ inputs.os-version }}
timeout-minutes: 10
# Was 10m; job was cancelled mid-suite (e.g. postgres + CoreLightningRestWallet) while tests still ran.
# PR discussion / follow-ups:
# - Is this ceiling OK, or should we tune (measure worst matrix cell)?
# - Cheaper isolation than DROP SCHEMA per test in tests/conftest.py `ledger`?
# - Lighter regtest matrix on PR vs full matrix on main or nightly?
timeout-minutes: 120
steps:
- name: Start PostgreSQL service
if: contains(inputs.mint-database, 'postgres')
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ on:
os:
default: "ubuntu-latest"
type: string
mint-only-deprecated:
default: "false"
type: string

permissions:
contents: read

jobs:
poetry:
name: Run (db ${{ inputs.mint-database }}, deprecated api ${{ inputs.mint-only-deprecated }})
name: Run (db ${{ inputs.mint-database }})
runs-on: ${{ inputs.os }}
steps:
- name: Start PostgreSQL service
Expand All @@ -45,7 +42,6 @@ jobs:
MINT_HOST: localhost
MINT_PORT: 3337
MINT_TEST_DATABASE: ${{ inputs.mint-database }}
DEBUG_MINT_ONLY_DEPRECATED: ${{ inputs.mint-only-deprecated }}
TOR: false
run: |
make test
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/tests_redis_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ on:
os:
default: "ubuntu-latest"
type: string
mint-only-deprecated:
default: "false"
type: string

permissions:
contents: read

jobs:
poetry:
name: Run (db ${{ inputs.mint-database }}, deprecated api ${{ inputs.mint-only-deprecated }})
name: Run (db ${{ inputs.mint-database }})
runs-on: ${{ inputs.os }}
steps:
- name: Start PostgreSQL service
Expand Down
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,3 @@ MINT_CORELIGHTNING_REST_CERT=../cashu-regtest-enviroment/data/clightning-2-rest/
### Profiling

If you'd like to profile your code (measure how long steps take to execute), run the mint using `DEBUG_PROFILING=TRUE`. Make sure to turn this off again, as your application will be significantly slower with profiling enabled.

### V0 API only

To run the mint with only V0 API support (deprecated), use `DEBUG_MINT_ONLY_DEPRECATED=TRUE`
1 change: 0 additions & 1 deletion cashu/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class EnvSettings(CashuSettings):
log_level: str = Field(default="INFO")
cashu_dir: str = Field(default=os.path.join(str(Path.home()), ".cashu"))
debug_profiling: bool = Field(default=False)
debug_mint_only_deprecated: bool = Field(default=False)
db_backup_path: Optional[str] = Field(default=None)
db_connection_pool: bool = Field(default=True)

Expand Down
7 changes: 1 addition & 6 deletions cashu/mint/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ..core.settings import settings
from .auth.router import auth_router
from .router import redis, router
from .router_deprecated import router_deprecated
from .startup import (
shutdown_management_rpc,
shutdown_mint,
Expand Down Expand Up @@ -118,11 +117,7 @@ async def catch_exceptions(request: Request, call_next):
app.add_exception_handler(RequestValidationError, request_validation_exception_handler) # type: ignore

# Add routers
if settings.debug_mint_only_deprecated:
app.include_router(router=router_deprecated, tags=["Deprecated"], deprecated=True)
else:
app.include_router(router=router, tags=["Mint"])
app.include_router(router=router_deprecated, tags=["Deprecated"], deprecated=True)
app.include_router(router=router, tags=["Mint"])

if settings.mint_require_auth:
app.include_router(auth_router, tags=["Auth"])
Loading
Loading