Skip to content

Conversation

@JoeCap08055
Copy link
Collaborator

@JoeCap08055 JoeCap08055 commented Aug 14, 2025

Goal

The goal of this PR is to implement only the types and pallet storage for the following new on-chain entities:

  • Intents
  • IntentGroups

Closes #2561

NOTE: No tests or benchmarks added in this PR, as it only contains types and storage, no executable runtime code (coming in a separate PR)

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?

@JoeCap08055 JoeCap08055 requested a review from wilwade as a code owner August 14, 2025 20:44
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 14, 2025
@JoeCap08055 JoeCap08055 requested review from a team, aramikm, claireclark1, enddynayn, mattheworris, saraswatpuneet and shannonwells and removed request for a team August 14, 2025 21:06
Copy link
Collaborator

@aramikm aramikm left a comment

Choose a reason for hiding this comment

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

Looks good and some tests will need to get fixed.


/// Maximum number of Intents that can be registered
#[pallet::constant]
type MaxIntentRegistrations: Get<IntentId>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: This is not used anywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will be once the extrinsics are implemented.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Q for the group: I implemented MaxIntentRegistrations because there was already a corresponding MaxSchemaRegistrations. However, given that both ID types are u16, and the constant is currently set to 65_000 (close enough to max u16), I wonder if it would make sense to allow 65_536 registrations and just check for an add overflow when adding a new schema? Would eliminate the need for both constants. Not a runtime or storage efficiency change, but just less design complexity...

...or, if we want to keep the constant, should we just use the same constant for both?

Thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some updates to the design doc based on a Slack conversation with @wesbiggs. Mainly renaming DelegationGroup => IntentGroup

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented and removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 15, 2025
Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions github-actions bot removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 15, 2025
@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 22.22222% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pallets/schemas/src/lib.rs 15.00% 17 Missing ⚠️
common/primitives/src/schema.rs 0.00% 2 Missing ⚠️
pallets/schemas/src/types.rs 60.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
common/primitives/src/schema.rs 49.29% <0.00%> (ø)
pallets/schemas/src/types.rs 93.50% <60.00%> (ø)
pallets/schemas/src/lib.rs 82.86% <15.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Aug 15, 2025
@JoeCap08055 JoeCap08055 merged commit 88d6d93 into feat/schemas-permissions-development Aug 15, 2025
88 of 92 checks passed
@JoeCap08055 JoeCap08055 deleted the feat/schemas-intents-types-storage branch August 15, 2025 16:25
JoeCap08055 added a commit that referenced this pull request Aug 20, 2025
# Goal
The goal of this PR is to implement *only* the *types* and *pallet
storage* for the following new on-chain entities:
* Intents
* IntentGroups

Closes #2561

**NOTE:** No tests or benchmarks added in this PR, as it only contains
types and storage, no executable runtime code (coming in a separate PR)

# Checklist
- [x] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [x] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [ ] Spec version incremented?
# Conflicts:
#	runtime/frequency/src/lib.rs
JoeCap08055 added a commit that referenced this pull request Aug 22, 2025
# Goal
The goal of this PR is to implement *only* the *types* and *pallet
storage* for the following new on-chain entities:
* Intents
* IntentGroups

Closes #2561

**NOTE:** No tests or benchmarks added in this PR, as it only contains
types and storage, no executable runtime code (coming in a separate PR)

# Checklist
- [x] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [x] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [ ] Spec version incremented?
# Conflicts:
#	pallets/schemas/src/lib.rs
#	pallets/schemas/src/tests/other_tests.rs
#	pallets/schemas/src/types.rs
#	runtime/frequency/src/lib.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants