Skip to content

fix: enforce btc network in address validation#319

Open
volcano303 wants to merge 1 commit into
entrius:testfrom
volcano303:fix/btc-network-address-validation
Open

fix: enforce btc network in address validation#319
volcano303 wants to merge 1 commit into
entrius:testfrom
volcano303:fix/btc-network-address-validation

Conversation

@volcano303
Copy link
Copy Markdown

Summary

  • enforce BTC_NETWORK in BitcoinProvider.is_valid_address
  • accept only matching bech32 HRP and base58 version bytes for the active network
  • add regression tests for mainnet/testnet cross-network rejection

Issue

Closes #318

Validation

  • uv run pytest tests/test_bitcoin_signing.py::TestBitcoinAddressValidationNetwork -q
  • uv run pytest tests/test_bitcoin_signing.py -q
  • uv run ruff check allways/ neurons/ tests/test_bitcoin_signing.py
  • uv run pre-commit run --all-files
  • uv run pytest tests/

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitcoin address validation does not enforce BTC_NETWORK

1 participant