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 generic contracts for object authenticity management #62

Closed
wants to merge 2 commits into from

Conversation

jnmt
Copy link
Collaborator

@jnmt jnmt commented Jul 23, 2024

Description

This PR adds a part of the generic contracts. We will provide generic contracts and functions so that users do not have to write their own contracts and functions for common use cases.

Generic contracts provide two main functionalities: object authenticity management and collection authenticity management. This PR only adds the former as the first step. In object authenticity management, users can check the authenticity of an object by storing the hash value of the object in ScalarDL and comparing it later with the one calculated based on the current object.

See the design doc for the detailed specifications. Sorry most parts except for input/output and examples are currently Japanese. If you have any questions, please feel free to ask.
https://docs.google.com/document/d/1hSldq-D5mSreV4DK7OZOA7XUXTd71MWXPzoQ3iUwoow/edit?usp=sharing

Related issues and/or PRs

N/A

Changes made

  • Add generic contracts for object authenticity management
  • Add basic CI settings that run unit tests, spotless, and spotbugs

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes. Will be added after all-related PRs are merged
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

The following will be added by separate PRs each.

  • Other generic contracts for collection management
  • A generic function for consistent state management of the objects
  • Integration tests or end-to-end tests (to be discussed)

Release notes

Added generic contracts for object authenticity management.

@jnmt jnmt force-pushed the generic-contracts-for-object-authenticity branch 2 times, most recently from edcb15d to 880df71 Compare July 23, 2024 06:14
@jnmt jnmt force-pushed the generic-contracts-for-object-authenticity branch from 880df71 to 5fa573c Compare July 23, 2024 06:32
@jnmt jnmt self-assigned this Jul 23, 2024
@jnmt jnmt added the enhancement New feature or request label Jul 23, 2024
Copy link
Member

@josh-wong josh-wong left a comment

Choose a reason for hiding this comment

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

I've added some minor suggestions. PTAL!

Copy link
Contributor

@supl supl left a comment

Choose a reason for hiding this comment

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

LGTM!
Thank you.
I think it's nice to have them.

@jnmt
Copy link
Collaborator Author

jnmt commented Jul 24, 2024

As discussed with Hiro, we decided to include generic contracts and functions in the scalar-labs/scalar main repository so that we can easily run e2e tests with generic contracts. So, I will close this and re-create a PR in it.

@josh-wong @supl Thank you for the review and suggestions. I will apply them in the re-created PR, so PTAL it again. Sorry for the inconvenience.

@jnmt jnmt closed this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants