Skip to content

Conversation

@raymondkfcheung
Copy link
Contributor

Addresses #86

@raymondkfcheung raymondkfcheung self-assigned this Dec 3, 2025
@raymondkfcheung raymondkfcheung marked this pull request as draft December 3, 2025 11:38
@raymondkfcheung raymondkfcheung added the enhancement New feature or request label Dec 3, 2025

/// Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`
/// for block authoring.
#[pallet::storage]
Copy link
Contributor Author

@raymondkfcheung raymondkfcheung Dec 3, 2025

Choose a reason for hiding this comment

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

@bkontur Shall we use #[pallet::storage] like on the SDK repo or keep as #[pallet::constant]?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bkontur Shall we use #[pallet::storage] like on the SDK repo or keep as #[pallet::constant]?

hmm, good question, I don't know now, what we use at the end, it is kind of sensible constant, depends on pruning and renewal stuff, but want to have this as a configurable. We will later need to read this by custom inherent provider with runtime api.

So it does not matter if it is storage or const. Hmm, let's keep polkadot-sdk as storage and bulletin as constant for now, when we come to the provider, we will decide

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree. We can keep them as they are for now if there’s a difference between the two repos.

There is one tricky bit though: I think StoragePeriod may need to switch to #[pallet::storage]. In the SDK it’s initialised in genesis_build:

https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/transaction-storage/src/lib.rs#L429

ByteFee::<T>::put(&self.byte_fee);
EntryFee::<T>::put(&self.entry_fee);
StoragePeriod::<T>::put(&self.storage_period);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For StoragePeriod, I’ll follow up on this in a separate PR.

@raymondkfcheung raymondkfcheung marked this pull request as ready for review December 5, 2025 10:37
for NoCurrency<AccountId, HoldReason>
{
type Balance = u128;
type Balance = u64;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@raymondkfcheung just out of curiosity, why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test/mock files were failed to compile.

Copy link
Collaborator

Choose a reason for hiding this comment

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

strange, because there is one more below:

impl<AccountId, HoldReason> Currency<AccountId> for NoCurrency<AccountId, HoldReason> {
	type Balance = u128;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted and it works now.

@bkontur bkontur merged commit 3cbf832 into paritytech:main Dec 8, 2025
7 checks passed
@raymondkfcheung raymondkfcheung deleted the ray-align-types branch December 8, 2025 17:27
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Dec 10, 2025
The PR aligns types between Bulletin and SDK.

Addresses
paritytech/polkadot-bulletin-chain#86

Relates to
* paritytech/polkadot-bulletin-chain#128
* paritytech/polkadot-bulletin-chain#134
* #10582

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <[email protected]>
paritytech-release-backport-bot bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Dec 10, 2025
The PR aligns types between Bulletin and SDK.

Addresses
paritytech/polkadot-bulletin-chain#86

Relates to
* paritytech/polkadot-bulletin-chain#128
* paritytech/polkadot-bulletin-chain#134
* #10582

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <[email protected]>
(cherry picked from commit 18cb5ee)
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.

2 participants