Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDS: Already Existing DID Create Account Support #46

Merged

Conversation

TheRipperoni
Copy link
Contributor

Redid the CreateAccount API call to be easier to read, as well as have better tracing and error handling.

Removed the, now legacy, genesis creation methods as they are no longer needed.

Added necessary support for already existing DIDs. This step is critical in order to allow for account migration to RSky PDS

- Now accepts already existing DIDs
- Better error handling on it
- Easier to understand
Copy link
Member

@rudyfraser rudyfraser left a comment

Choose a reason for hiding this comment

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

Can you elaborate on the changes related to the genesis operation? The genesis op itself uses a legacy format but the genesis block is still important and needs to be written to the did:plc log.

I'm not seeing where the genesis op is being sent to the plc directory in your new changes.

@TheRipperoni
Copy link
Contributor Author

Can you elaborate on the changes related to the genesis operation? The genesis op itself uses a legacy format but the genesis block is still important and needs to be written to the did:plc log.

I'm not seeing where the genesis op is being sent to the plc directory in your new changes.

I moved the logic of the Genesis operation to the plc/operation instead. If you check line 344 of create_account.rs, you can see there is a call to the new create function inside plc which handles the creation of the Operation. Line 85 is where the create_account.rs invokes the plc_client to send the operation to the plc directory.

The logic of this was to separate the plc logic more to the plc package, and less to the create_account. It also doesn't invoke the plc call in the cases where a DID is supplied, as in that particular case the PLC already exists. That instead is used before invoking the importRepo call for migrating accounts

@rudyfraser rudyfraser merged commit 2a8aaba into blacksky-algorithms:main Feb 5, 2025
3 of 4 checks passed
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