-
Notifications
You must be signed in to change notification settings - Fork 24
Provider Context: Minimal Profile for Provider and Applications #2549
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
Merged
Conversation
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
…hanges around it (#2537) # Goal This PR introduces changes required to support the new Provider Context model as outlined in the [Provider Contexts Design Doc](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_contexts.md). It updates the structure and handling of providers to allow them to represent a company with one or more applications, supporting internationalized metadata and trusted branding via content-addressed hashes. Closes #2523 ## Summary of Changes ### Registry and Extrinsics - Updated ProviderRegistryEntry: - Replaces the old struct name with a new struct supporting: default_name: BoundedString default_logo: Option<Cid> localized_name: BoundedBTreeMap<LanguageCode, BoundedString> localized_logo: BoundedBTreeMap<LanguageCode, Cid> - Updated propose_to_be_provider extrinsic: - Updated create_provider_by_governance extrinsic - Updated create_provider extrinsic - Updated Benchmarks - Updated Unit tests/e2e tests - Added e2e tests - Added unit tests - Added `ProviderToRegistryEntry` to migration to storage version `2` - Tested try-runtime migration with `Paseo` and `Mainnet` and it works ## In progress - [x] add more unit tests - [ ] run a full cycle of try-runtime to check migrations # Checklist - [ ] Updated Pallet Readme? - [ ] Updated js/api-augment for Custom RPC APIs? - [ ] Design doc(s) updated? - [x] Unit Tests added? - [x] e2e Tests added? - [x] Benchmarks added? - [x] Spec version incremented? ## Snaps - Successful execution of `on_runtime_upgrade` via try-runtime cli on paseo <img width="1574" height="370" alt="image" src="https://github.com/user-attachments/assets/498f3baa-0f67-4088-8fa5-d42dc90bb961" /> --------- Co-authored-by: Joe Caputo <joseph.caputo@projectliberty.io>
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
… a given provider (#2551) # Goal ## Details With respect to provider context design doc, complete the following: Refer [design doc](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_contexts.md#changes-and-additions-in-extrinsics-) - [x] Add a new extrinsic `propose_to_add_application` that receives a `ProviderRegistryEntry` type payload from provider MSA - [x] Ensure the origin is registered provider - [x] Add a new state `ProviderToApplicationRegistry` douple map (ProviderId, ApplicationIndex) to store a new application once a goverance proposal is approved for application, where ApplicationIndex is monotically increasing number for each provider level application from 0..N - [x] Move all the approves hashes from payload to `ApprovedLogoHashes` state - [x] Benchmark new extrinsic - [x] Add unit tests and e2e tests ## Acceptance Criteria 1. Ability to propose and add new applications 2. `ApprovedHashes` successfully contains approved logo hashes from 1 3. Tests emulating range of tests for adding and approving applications for providers 4. Benchmarking and e2e tests Closes #2524 # Discussion - <!-- List discussion items --> # Checklist - [ ] Updated Pallet Readme? - [ ] Updated js/api-augment for Custom RPC APIs? - [x] Design doc(s) updated? - [x] Unit Tests added? - [x] e2e Tests added? - [x] Benchmarks added? - [x] Spec version incremented? --------- Co-authored-by: Joe Caputo <joseph.caputo@projectliberty.io>
# Goal The goal of this PR is <!-- insert goal here --> Closes #2525 - <!-- List discussion items --> # Checklist - [ ] Updated Pallet Readme? - [ ] Updated js/api-augment for Custom RPC APIs? - [ ] Design doc(s) updated? - [x] Unit Tests added? - [x] e2e Tests added? - [x] Benchmarks added? - [x] Spec version incremented?
…ntext (#2573) # Goal The goal of this PR is to introduce a general purpose RPC to fetch provider context. In this rpc if user dont specify application id or locale, a default profile is returned which is registered at time of provider creation otherwise return details for application id provided Closes #2526 # Discussion - <!-- List discussion items --> # Checklist - [ ] Updated Pallet Readme? - [x] Updated js/api-augment for Custom RPC APIs? - [ ] Design doc(s) updated? - [x] Unit Tests added? - [x] e2e Tests added? - [ ] Benchmarks added? - [ ] Spec version incremented?
11 tasks
# Goal The goal of this PR is to introduce following 4 extrinsic to allow updating provider registry and application contexts - [x] `propose_to_update_provider` - [x] `update_provider_via_governance` - [x] `propose_to_update_application` - [x] `update_application_via_governance` Additionally, a `create_application` extrinsic is introduced to make it easy to create applications for testing and is added in `BaseFilter` Closes #2577 Closes #2578 # Checklist - [ ] Updated Pallet Readme? - [ ] Updated js/api-augment for Custom RPC APIs? - [ ] Design doc(s) updated? - [x] Unit Tests added? - [x] e2e Tests added? - [x] Benchmarks added? - [ ] Spec version incremented?
…flow due to v5 breaking change
aramikm
approved these changes
Sep 17, 2025
Collaborator
aramikm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and a lot of great work!
Co-authored-by: Aramik <aramikm@gmail.com>
enddynayn
approved these changes
Sep 17, 2025
Collaborator
enddynayn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 amazing work!
JoeCap08055
approved these changes
Sep 18, 2025
7 tasks
saraswatpuneet
added a commit
that referenced
this pull request
Sep 22, 2025
# Goal The goal of this PR is to retain and remove `deprecated` marking from `create_provider` since it is actively used in paseo/local testing. Also notify repository of changes expected to be implemented. Closes #2610 # Discussion * [Discussion](#2549 (comment)) with ND/Joe. # Checklist - [ ] Updated Pallet Readme? - [ ] Updated js/api-augment for Custom RPC APIs? - [ ] Design doc(s) updated? - [ ] Unit Tests added? - [ ] e2e Tests added? - [ ] Benchmarks added? - [ ] Spec version incremented?
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.
Details
Design Doc
Provider Context allows provider to now register a minimal profile
ProviderRegistryEntryandApplicationContextfor provider's default profile and various applications providers want to register.Providers which want to register multiple applications under single provider delegation but distributed across multiple app. Following issues were resolved as part of this work with following salient points:
ProviderToRegistryEntryto host newProviderRegistryEntrypayloadProviderToApplicationRegistryandApprovedLogosstorage maps.base(cid_v1(sha_256(logo_bytes)))where logo_bytes are .png image bytes.Issues complete as part of
Provider Contextworkpropose_to_be_providerand modifyProviderRegistryEntry#2523propose_to_add_application#2524update_logofor provider/application context #2525ProviderRegistryEntry#2528Closes #2578
Closes #2577
Discussion items
Checklist