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

feat: ⏫ upgrade to Polkadot SDK v1.10.0 #210

Merged
merged 20 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2eff08b
refactor: :art: moved runtime apis into their own file
TDemeco Sep 27, 2024
303feb3
fix: :arrow_up: fix upgrade to polkadot-sdk v1.10.0
TDemeco Sep 27, 2024
e5ba5bd
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 27, 2024
3e4328d
fix: :bug: add removed runtime api `get_worst_case_scenario_slashable…
TDemeco Sep 27, 2024
3605611
fix: :bug: add missing generic in storage providers runtime api
TDemeco Sep 27, 2024
3659377
chore: :label: run typegen
TDemeco Sep 27, 2024
c1219f1
style: :rotating_light: run cargo fmt
TDemeco Sep 27, 2024
5ac0258
fix: :art: fix cargo clippy
TDemeco Sep 28, 2024
e82a113
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 28, 2024
91ae601
fix: :ambulance: fix mocked relay chain randomness
TDemeco Sep 28, 2024
97c0b64
style: :rotating_light: run cargo fmt
TDemeco Sep 28, 2024
787d1df
chore: :rotating_light: temporary remove unused import (until v1.13.0)
TDemeco Sep 28, 2024
9653a4e
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 28, 2024
6fb8bd4
fix: :adhesive_bandage: update `query_earliest_file_volunteer_tick` r…
TDemeco Sep 28, 2024
cde6b90
fix: :ambulance: fix issues with merge from main
TDemeco Sep 28, 2024
570e548
style: :rotating_light: run cargo fmt
TDemeco Sep 28, 2024
2947b01
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 30, 2024
5c07140
chore: :label: run typegen
TDemeco Sep 30, 2024
bed97cf
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Oct 3, 2024
260172f
fix: :adhesive_bandage: fix merge from main
TDemeco Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: ⬆️ fix upgrade to polkadot-sdk v1.10.0
  • Loading branch information
TDemeco committed Sep 27, 2024
commit 303feb3cfef7b970f3dce6218e6017317f293f24
2,576 changes: 1,288 additions & 1,288 deletions Cargo.lock

Large diffs are not rendered by default.

198 changes: 100 additions & 98 deletions Cargo.toml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client/common/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use sp_core::Hasher;
use sp_runtime::{traits::Block as BlockT, KeyTypeId};
use sp_std::collections::btree_map::BTreeMap;
use sp_trie::CompactProof;
use storage_hub_runtime::{opaque::Block, Runtime, RuntimeApi};
use storage_hub_runtime::{apis::RuntimeApi, opaque::Block, Runtime};
use trie_db::TrieLayout;

/// The hash type of trie node keys
Expand Down Expand Up @@ -48,7 +48,7 @@ pub type KeyProofs = BTreeMap<ForestLeaf, KeyProof>;
pub type Balance = pallet_storage_providers::types::BalanceOf<Runtime>;

#[cfg(not(feature = "runtime-benchmarks"))]
type HostFunctions = (cumulus_client_service::ParachainHostFunctions);
type HostFunctions = cumulus_client_service::ParachainHostFunctions;

#[cfg(feature = "runtime-benchmarks")]
type HostFunctions = (
Expand Down
17 changes: 0 additions & 17 deletions pallets/file-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ pub mod pallet {
pub struct Pallet<T>(_);

#[pallet::storage]
#[pallet::getter(fn storage_requests)]
pub type StorageRequests<T: Config> =
StorageMap<_, Blake2_128Concat, MerkleHash<T>, StorageRequestMetadata<T>>;

Expand All @@ -265,7 +264,6 @@ pub mod pallet {
///
/// When a storage request is expired or removed, the corresponding storage request prefix in this map is removed.
#[pallet::storage]
#[pallet::getter(fn storage_request_bsps)]
pub type StorageRequestBsps<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -278,7 +276,6 @@ pub mod pallet {

/// Bookkeeping of the buckets containing open storage requests.
#[pallet::storage]
#[pallet::getter(fn storage_request_buckets)]
pub type BucketsWithStorageRequests<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -291,7 +288,6 @@ pub mod pallet {

/// A map of blocks to expired storage requests.
#[pallet::storage]
#[pallet::getter(fn storage_request_expirations)]
pub type StorageRequestExpirations<T: Config> = StorageMap<
_,
Blake2_128Concat,
Expand All @@ -302,7 +298,6 @@ pub mod pallet {

/// A map of blocks to expired file deletion requests.
#[pallet::storage]
#[pallet::getter(fn file_deletion_request_expirations)]
pub type FileDeletionRequestExpirations<T: Config> = StorageMap<
_,
Blake2_128Concat,
Expand All @@ -313,7 +308,6 @@ pub mod pallet {

/// A map of blocks to expired move bucket requests.
#[pallet::storage]
#[pallet::getter(fn move_bucket_request_expirations)]
pub type MoveBucketRequestExpirations<T: Config> = StorageMap<
_,
Blake2_128Concat,
Expand All @@ -326,23 +320,20 @@ pub mod pallet {
///
/// This should always be greater or equal than current block + [`Config::StorageRequestTtl`].
#[pallet::storage]
#[pallet::getter(fn next_available_storage_request_expiration_block)]
pub type NextAvailableStorageRequestExpirationBlock<T: Config> =
StorageValue<_, BlockNumberFor<T>, ValueQuery>;

/// A pointer to the earliest available block to insert a new file deletion request expiration.
///
/// This should always be greater or equal than current block + [`Config::PendingFileDeletionRequestTtl`].
#[pallet::storage]
#[pallet::getter(fn next_available_file_deletion_request_expiration_block)]
pub type NextAvailableFileDeletionRequestExpirationBlock<T: Config> =
StorageValue<_, BlockNumberFor<T>, ValueQuery>;

/// A pointer to the earliest available block to insert a new move bucket request expiration.
///
/// This should always be greater or equal than current block + [`Config::MoveBucketRequestTtl`].
#[pallet::storage]
#[pallet::getter(fn next_available_move_bucket_request_expiration_block)]
pub type NextAvailableMoveBucketRequestExpirationBlock<T: Config> =
StorageValue<_, BlockNumberFor<T>, ValueQuery>;

Expand All @@ -352,14 +343,12 @@ pub mod pallet {
/// attempt to accelerate this block pointer as close to or up to the current block number. This
/// will execute provided that there is enough remaining weight to do so.
#[pallet::storage]
#[pallet::getter(fn next_starting_block_to_clean_up)]
pub type NextStartingBlockToCleanUp<T: Config> = StorageValue<_, BlockNumberFor<T>, ValueQuery>;

/// Pending file deletion requests.
///
/// A mapping from a user account id to a list of pending file deletion requests, holding a tuple of the file key and bucket id.
#[pallet::storage]
#[pallet::getter(fn pending_file_deletion_requests)]
pub type PendingFileDeletionRequests<T: Config> = StorageMap<
_,
Blake2_128Concat,
Expand All @@ -375,7 +364,6 @@ pub mod pallet {
/// The block number is used to avoid BSPs being able to stop storing files immediately which would allow them to avoid challenges
/// of missing files. The size is to be able to decrease their used capacity when they confirm to stop storing the file.
#[pallet::storage]
#[pallet::getter(fn pending_stop_storing_requests)]
pub type PendingStopStoringRequests<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -390,7 +378,6 @@ pub mod pallet {
/// A double mapping from MSP IDs to a list of bucket IDs which they can accept or decline to take over.
/// The value is the user who requested the move.
#[pallet::storage]
#[pallet::getter(fn pending_move_bucket_requests)]
pub type PendingMoveBucketRequests<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -402,7 +389,6 @@ pub mod pallet {

/// BSP data servers for move bucket requests.
#[pallet::storage]
#[pallet::getter(fn data_servers_for_move_bucket)]
pub type DataServersForMoveBucket<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -414,20 +400,17 @@ pub mod pallet {

/// Bookkeeping of buckets that are pending to be moved to a new MSP.
#[pallet::storage]
#[pallet::getter(fn pending_buckets_to_move)]
pub type PendingBucketsToMove<T: Config> =
StorageMap<_, Blake2_128Concat, BucketIdFor<T>, (), ValueQuery>;

/// Number of BSPs required to fulfill a storage request
///
/// This is also used as a default value if the BSPs required are not specified when creating a storage request.
#[pallet::storage]
#[pallet::getter(fn replication_target)]
pub type ReplicationTarget<T: Config> = StorageValue<_, ReplicationTargetType<T>, ValueQuery>;

/// Number of blocks until all BSPs would reach the [`Config::MaximumThreshold`] to ensure that all BSPs are able to volunteer.
#[pallet::storage]
#[pallet::getter(fn block_range_to_maximum_threshold)]
pub type BlockRangeToMaximumThreshold<T: Config> =
StorageValue<_, BlockNumberFor<T>, ValueQuery>;

Expand Down
Loading