Skip to content

test(swift-sdk): update address vectors to DIP-0018 after #4021#4024

Merged
QuantumExplorer merged 1 commit into
v4.1-devfrom
fix/swift-dip18-test-vectors
Jul 6, 2026
Merged

test(swift-sdk): update address vectors to DIP-0018 after #4021#4024
QuantumExplorer merged 1 commit into
v4.1-devfrom
fix/swift-dip18-test-vectors

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

#4021 moved AddressValidator / AddressTransformer to the DIP-0018 HRPs (tdash/dash) but did not update SwiftTests/, so the legacy tdashevo1… vectors now (correctly) fail validation and the Swift package test suite is red on v4.1-devValidationTests.testValidateBech32mAddress_valid and testValidateAddress_autoDetect fail on CI. (This fix rode on the #4019 branch but landed just after that PR was squash-merged, so it needs its own PR.)

What was done?

  • testValidateBech32mAddress_valid / testValidateAddress_autoDetect: vectors replaced with a real proof-verified testnet platform address (tdash1kzdl4c…).
  • testValidateBech32mAddress_invalid: the pre-DIP-0018 tdashevo1… vector added as an explicitly rejected case — a regression pin on fix(swift-sdk): decode DIP-0018 platform addresses in address queries #4021's behavior change.
  • DataTransformersTests.testParseAddressBech32m: was silently vacuous (nil || count == 21 with a vector that now always decodes to nil) — now asserts the real address yields the 21-byte payload and the legacy HRP yields nil.

How was it tested?

Full Swift package suite via run_tests.sh (the CI job's runner script): TEST SUCCEEDED, with ValidationTests, DataTransformersTests, and AddressBalancePersistTests all passing.

Breaking changes

None (test-only).

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

Merge v4.1-dev and fix the Swift test breakage #4021 left behind: it
moved AddressValidator / AddressTransformer to the DIP-0018 HRPs
("tdash"/"dash") without updating SwiftTests, so the legacy
"tdashevo1..." vectors in ValidationTests now (correctly) fail
validation and the suite is red on v4.1-dev itself.

- testValidateBech32mAddress_valid / testValidateAddress_autoDetect:
  use a real proof-verified testnet address (tdash1kzdl4c...).
- testValidateBech32mAddress_invalid: assert the pre-DIP-0018 HRP is
  rejected — a regression pin on #4021's behavior change.
- testParseAddressBech32m: was silently vacuous ("nil or 21 bytes"
  with a vector that now always decodes to nil) — assert the real
  address yields the 21-byte payload and the legacy HRP yields nil.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@QuantumExplorer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6bad22de-41c4-405c-8cfc-689d9bc0a5cb

📥 Commits

Reviewing files that changed from the base of the PR and between a7df9d6 and d88a086.

📒 Files selected for processing (2)
  • packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DataTransformersTests.swift
  • packages/swift-sdk/SwiftTests/SwiftDashSDKTests/ValidationTests.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/swift-dip18-test-vectors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added this to the v4.1.0 milestone Jul 6, 2026
@QuantumExplorer QuantumExplorer merged commit 6d68cce into v4.1-dev Jul 6, 2026
17 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/swift-dip18-test-vectors branch July 6, 2026 09:35
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.

1 participant