Skip to content

Conversation

itsyaasir
Copy link
Contributor

@itsyaasir itsyaasir commented Nov 18, 2024

Description of change

This pull request includes several significant changes aimed at updating the resolver to the latest rebased IOTA.

Changes include:

  • Updating all the dependencies
  • Refactor for the tests

Links to any relevant issues

Type of change

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes
  • I have updated the CHANGELOG.md, if my changes are significant enough

@itsyaasir itsyaasir self-assigned this Nov 19, 2024
@itsyaasir itsyaasir requested a review from UMR1352 November 19, 2024 13:06
@itsyaasir itsyaasir marked this pull request as draft November 19, 2024 13:06
@itsyaasir itsyaasir force-pushed the feat/resolver-rebased branch 2 times, most recently from da87029 to 43250ef Compare November 25, 2024 12:52
@itsyaasir itsyaasir marked this pull request as ready for review November 26, 2024 12:50
@itsyaasir itsyaasir force-pushed the feat/resolver-rebased branch from 1b4d2a5 to 658923f Compare November 26, 2024 13:03
Copy link
Contributor

@UMR1352 UMR1352 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably just drop the use of identity_iota::resolver::Resolver in favor of a custom structure (HashMap??) to get the right client for the right network.
If identity_iota_core::rebased::migration::identity::get_identity is exposed by identity_iota I'd probably use that to resolve since it returns a Result<Option<Identity>> allowing you to easily handle 500 error as well as 404 (without having to look into the error message).

@itsyaasir
Copy link
Contributor Author

I'd probably just drop the use of identity_iota::resolver::Resolver in favor of a custom structure (HashMap??) to get the right client for the right network. If identity_iota_core::rebased::migration::identity::get_identity is exposed by identity_iota I'd probably use that to resolve since it returns a Result<Option<Identity>> allowing you to easily handle 500 error as well as 404 (without having to look into the error message).

I have opted to use the HashMap structure; couple of things I changed was the did network tag to unknwn since the devnet was returning this unknwn but IIRC you are working on this so will change as soon as you are done.

@UMR1352
Copy link
Contributor

UMR1352 commented Dec 3, 2024

@itsyaasir good job! Do you mind waiting a bit before merging this? RN we are reworking a bit DID resolution on Rebased and I feel these changes should account for that as well.

- Updated the `.env.sample` to include new network configurations for testnet, devnet, and custom networks.
- Modified `Cargo.toml` to bump the `identity_iota` and `identity_storage` dependencies to version `v1.6.0-alpha.1`.
- Adjusted the `Dockerfile` to set the `NETWORK` environment variable to `devnet`.
- Enhanced the `README.md` to clarify network configuration options and provide examples for single and multiple network setups.
- Refactored `lib.rs` to implement a new `Network` enum for better handling of network configurations and client initialization.
- Updated tests to reflect changes in network handling and ensure compatibility with the new configurations.
@itsyaasir itsyaasir requested a review from UMR1352 December 9, 2024 16:03
Copy link
Contributor

@UMR1352 UMR1352 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the tests run succesfully

@UMR1352 UMR1352 merged commit d183ef6 into main Jun 17, 2025
1 of 2 checks passed
@UMR1352 UMR1352 deleted the feat/resolver-rebased branch June 17, 2025 14:24
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