Conversation
also printing out wormhole address for clarity
illuzen
approved these changes
Apr 18, 2026
n13
added a commit
that referenced
this pull request
Apr 18, 2026
Port the derivation-path fix from main (#93): the wormhole HD path for `collect_rewards` must be `m/44'/CHAIN/0'/0'/index'` — the intermediate segment is 0', not 1'. Also move the `derive` progress call to after resolution so it reports the actual derived SS58 address, matching main's behavior. Add `test_resolve_credential_mnemonic_pinned_derivation_path` which pins the expected (address_bytes, secret_bytes) for the canonical abandon-art test mnemonic at index 0. Any future silent regression of the path segments will fail this test.
n13
added a commit
that referenced
this pull request
Apr 18, 2026
* Cover new credential code paths and drop duplicate address compute Follow-up review feedback for #92. The original PR tested helpers indirectly (parse_secret_hex_str, compute_wormhole_address) but never exercised the new match arms in collect_rewards, and left the clap mutual-exclusion constraints without a guardrail. - Extract credential resolution into `resolve_credential` so the Mnemonic / Secret branches are directly testable, and call it from `collect_rewards`. - Remove the redundant `compute_wormhole_address` call inside the per-transfer proof loop now that `wormhole_address_bytes` is already produced at the top of the flow. - Replace the 6 indirect tests with 7 direct tests that actually run `resolve_credential`, including a mnemonic -> HD-derived-secret -> `Secret { hex }` equivalence test and the `HD derivation failed` error path. - Add 3 clap parsing tests covering `required_unless_present_any` and the three `conflicts_with_all` pairs (wallet+mnemonic, wallet+secret, mnemonic+secret). * Fix wormhole HD path and pin it with a regression test Port the derivation-path fix from main (#93): the wormhole HD path for `collect_rewards` must be `m/44'/CHAIN/0'/0'/index'` — the intermediate segment is 0', not 1'. Also move the `derive` progress call to after resolution so it reports the actual derived SS58 address, matching main's behavior. Add `test_resolve_credential_mnemonic_pinned_derivation_path` which pins the expected (address_bytes, secret_bytes) for the canonical abandon-art test mnemonic at index 0. Any future silent regression of the path segments will fail this test. * format
illuzen
added a commit
that referenced
this pull request
Apr 18, 2026
* allow using secret to collect rewards * add tests * Cover new credential code paths and drop duplicate address compute (#94) * Cover new credential code paths and drop duplicate address compute Follow-up review feedback for #92. The original PR tested helpers indirectly (parse_secret_hex_str, compute_wormhole_address) but never exercised the new match arms in collect_rewards, and left the clap mutual-exclusion constraints without a guardrail. - Extract credential resolution into `resolve_credential` so the Mnemonic / Secret branches are directly testable, and call it from `collect_rewards`. - Remove the redundant `compute_wormhole_address` call inside the per-transfer proof loop now that `wormhole_address_bytes` is already produced at the top of the flow. - Replace the 6 indirect tests with 7 direct tests that actually run `resolve_credential`, including a mnemonic -> HD-derived-secret -> `Secret { hex }` equivalence test and the `HD derivation failed` error path. - Add 3 clap parsing tests covering `required_unless_present_any` and the three `conflicts_with_all` pairs (wallet+mnemonic, wallet+secret, mnemonic+secret). * Fix wormhole HD path and pin it with a regression test Port the derivation-path fix from main (#93): the wormhole HD path for `collect_rewards` must be `m/44'/CHAIN/0'/0'/index'` — the intermediate segment is 0', not 1'. Also move the `derive` progress call to after resolution so it reports the actual derived SS58 address, matching main's behavior. Add `test_resolve_credential_mnemonic_pinned_derivation_path` which pins the expected (address_bytes, secret_bytes) for the canonical abandon-art test mnemonic at index 0. Any future silent regression of the path segments will fail this test. * format --------- Co-authored-by: Nikolaus Heger <nheger@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
also printing out wormhole address for clarity