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

Add identity chain actions, switch from hex to base58, switch to borsh for signature, refactor identity chain #273

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

zupzup
Copy link
Collaborator

@zupzup zupzup commented Dec 17, 2024

📝 Description

Future PRs in this task: adding atomicity for surrealdb blockchain actions and rollback logic in case of errors

This PR refactors the identity chain to use in-module data objects and a fail-safe API to add blocks.
It also switches from hex to base58 encoding and to borsh for the signature.
It also re-implements changing identity fields to use an Option-based approach.

Relates to #140


✅ Checklist

Please ensure the following tasks are completed before requesting a review:

  • My code adheres to the coding guidelines of this project.
  • I have run cargo fmt.
  • I have added or updated tests (if applicable).
  • All CI/CD steps were successful.
  • I have updated the documentation (if applicable).
  • I have checked that there are no console errors or warnings.
  • I have verified that the application builds without errors.
  • I've described the changes made to the API. (modification, addition, deletion).

🚀 Changes Made

  • New Features:

    • Added actions for identity chain
  • Refactoring:

    • Identity chain API
  • Other Changes:

    • Changed hex to base58

💡 How to Test

Please provide clear instructions on how reviewers can test your changes:

  • Run tests
  • Create a company, add/remove signatories, Create a new identity and do signed bill actions and make sure the according Identity Chain entries are added to surrealdb

🤝 Related Issues

List any related issues, pull requests, or discussions:


📋 Review Guidelines

Please focus on the following while reviewing:

  • Does the code follow the repository's contribution guidelines?
  • Are there any potential bugs or performance issues?
  • Are there any typos or grammatical errors in the code or comments?

@zupzup zupzup self-assigned this Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

src/blockchain/identity/mod.rs Show resolved Hide resolved
src/service/company_service.rs Show resolved Hide resolved
@zupzup zupzup marked this pull request as ready for review December 18, 2024 09:57
@zupzup zupzup merged commit 426c397 into master Dec 18, 2024
6 checks passed
@zupzup zupzup deleted the 140-identity-chain-operations branch December 18, 2024 10:07
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