Skip to content

refactor: split impls into feature-grouped impls module#248

Closed
danielbui12 wants to merge 4 commits into
subxt_runtime_metadatafrom
more_runtime_api
Closed

refactor: split impls into feature-grouped impls module#248
danielbui12 wants to merge 4 commits into
subxt_runtime_metadatafrom
more_runtime_api

Conversation

@danielbui12

@danielbui12 danielbui12 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Follow up #239 (comment)

@danielbui12 ok, let's push this PR, I suggest couple of things:

  • create impls.rs and move all this functions impl<T: Config> Pallet { there
  • create separate PR just for this changes touching pallet + runtimes (looks like just introducing new runtime apis)

Move the 42 Pallet<T> helper and runtime-API query methods out of the
monolithic helper impl block in lib.rs into pallet/src/impls/, grouped
by feature across 9 files (signatures, members, providers, buckets,
agreements, challenges, checkpoints, queries, marketplace), declared
from impls/mod.rs.

All methods are now pub: once they live in a sibling module, the
dispatchables in lib.rs reach them via Self::, so private/pub(crate)
visibility would no longer compile. Pure move + visibility change;
behavior is unchanged and all 194 pallet tests pass.
Extract challenge_to_response helper so the ChallengeResponse construction
lives in one place instead of being copy-pasted across four query functions.
Move the bucket_id/provider/challenger filters ahead of the map so encoding
only runs on matching challenges.
@danielbui12
danielbui12 marked this pull request as ready for review June 30, 2026 07:03
@danielbui12 danielbui12 self-assigned this Jul 1, 2026
@bkontur

bkontur commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator
  • create separate PR just for this changes touching pallet + runtimes (looks like just introducing new runtime apis)

@danielbui12 my bad, sorry, I should have been more explicit, I meant to open this PR (+ #249) to the dev branch, so we can easily review and simplify the big one: #239

@danielbui12 can you please join #248 + #249 to the one and open against dev branch?

@danielbui12

Copy link
Copy Markdown
Member Author

@bkontur but the 248 + 249 include changes from 239 as well (using storage-subxt). do you want me to take runtime api changes to another branch based on dev?

@danielbui12 danielbui12 closed this Jul 1, 2026
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