Skip to content

Fix Hedera false-positive seed verification and update dependencies for Python 3.9/3.14 CI#686

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/review-termux-builds-failure
Closed

Fix Hedera false-positive seed verification and update dependencies for Python 3.9/3.14 CI#686
Copilot wants to merge 3 commits intomasterfrom
copilot/review-termux-builds-failure

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 13, 2026

Multiple CI failures across workflows: intermittent Hedera test failure on Windows 3.10, click==8.2.1 incompatible with Python 3.9, pydantic-core==2.33.2 lacks Python 3.14 wheels, and Termux Full builds failing on maturin cross-compilation misdetection.

Hedera seed verification bug (btcrseed.py)

_hedera_require_key_bound_match was inverted — set to not key_bound_target_present instead of key_bound_target_present. When both account IDs and hex addresses are provided, deterministic matches (solidity bytes, account strings) always succeed for the correct account index regardless of seed. The inverted flag meant weak matches alone were accepted, causing ~0.4% false-positive rate per random mnemonic passing BIP39 checksum.

# Before (broken): key-bound targets present → don't require key-bound match → any seed matches
self._hedera_require_key_bound_match = not key_bound_target_present

# After (fixed): key-bound targets present → require key-bound match alongside weak match
self._hedera_require_key_bound_match = key_bound_target_present

Dependency updates (requirements-full.txt)

  • click 8.2.1 → 8.1.8 — 8.2.x requires Python ≥3.10
  • pydantic 2.11.7 → 2.12.5, pydantic-core 2.33.2 → 2.41.5 — adds pre-built Python 3.14 wheels
  • typing-inspection 0.4.1 → 0.4.2 — required by pydantic 2.12.5

Termux CI workflow (termux-tests.yml)

  • Set ANDROID_API_LEVEL=24 for both jobs (required by maturin's Android path)
  • Build maturin from source in Full job so it detects native aarch64-linux-android host triple instead of the manylinux-baked aarch64-unknown-linux-gnu
  • Pre-install py-sr25519-bindings and cryptography with --no-build-isolation to use the correctly-built maturin
  • Increase Full job timeout 20→40 min to accommodate source build

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Two issues were causing intermittent Termux Full build failures:

1. cryptography package failed with "Failed to determine Android API
   level" because maturin's cross-compilation detection needed the
   ANDROID_API_LEVEL environment variable.

2. py-sr25519-bindings failed with "Python interpreter should be a kind
   of interpreter when cross-compiling" because the manylinux maturin
   wheel has a baked-in host triple (aarch64-unknown-linux-gnu) that
   differs from the Termux target (aarch64-linux-android), causing false
   cross-compilation detection.

Fix:
- Set ANDROID_API_LEVEL=24 for both Termux jobs
- Build maturin from source so it detects the native host triple
  correctly, then use --no-build-isolation for maturin-based packages
- Increase timeout from 20 to 40 minutes for the Full job to
  accommodate building maturin from source

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Copilot AI changed the title [WIP] Review failures in termux builds Fix Termux Full CI failures caused by maturin cross-compilation misdetection Mar 13, 2026
Copilot AI requested a review from 3rdIteration March 13, 2026 03:48
Fix inverted require_key_bound_match flag in WalletHederaEd25519 that
caused intermittent false-positive seed verification when both account
IDs and hex addresses were provided. The flag incorrectly allowed any
seed passing BIP39 checksum to match via deterministic address data.

Update dependencies for broader Python version support:
- click 8.2.1 → 8.1.8 (restore Python 3.9 compatibility)
- pydantic 2.11.7 → 2.12.5 (Python 3.14 support)
- pydantic-core 2.33.2 → 2.41.5 (Python 3.14 pre-built wheels)
- typing-inspection 0.4.1 → 0.4.2 (required by pydantic 2.12.5)

Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Copilot AI changed the title Fix Termux Full CI failures caused by maturin cross-compilation misdetection Fix Hedera false-positive seed verification and update dependencies for Python 3.9/3.14 CI Mar 14, 2026
@3rdIteration 3rdIteration deleted the copilot/review-termux-builds-failure branch April 8, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants