-
Notifications
You must be signed in to change notification settings - Fork 0
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
benchmarks for pallets #27
base: main
Are you sure you want to change the base?
Conversation
tlacloc
commented
Dec 13, 2023
•
edited
Loading
edited
- Added pallet-example-basic to the workspace members and dependencies list
- Updated the hashed-pallets repository
- Replaced pallet-template with pallet-example-basic in the workspace members
- Updated the version, authors, homepage, edition, license, repository and readme fields in all pallet Cargo.toml files
- Added Unlicense license to README.md
- Added a new package pallet-example-basic
- Updated dependencies to v1.3.0-rc1
- Added frame-benchmarking, frame-support, frame-system, pallet-balances, sp-io, sp-runtime, sp-std and sp-core dependencies
- Added std and runtime-benchmarks features
- Added try-runtime feature
- Changed the casing of OfferStatus
- Updated StorageVersion to 0
- Removed imports from pallets/gated-marketplace/src/mock.rs
- Added benchmarking for pallet-example-basic
- Added tests for pallet-example-basic
- Added weight functions for pallet-example-basic
…plate 🔥 refactor(lib.rs): Remove migrations module and v2 migration file The benchmarking setup for the pallet-template has been updated to use the `frame_benchmarking::v2` module instead of `frame_benchmarking::{benchmarks, whitelisted_caller}`. This change improves compatibility with the latest version of the frame_benchmarking crate. The migrations module and v2 migration file have been removed as they are no longer needed. The v2 migration logic has been integrated into the main pallet module, eliminating the need for a separate migrations module. This simplifies the codebase and improves maintainability.
…mplate' The workspace members in the Cargo.toml file have been reorganized to improve readability and maintain consistency. The 'pallets/template' has been added as a new member to the workspace.
… pallet 🔀 chore(Cargo.toml): update workspace package information and add new pallet The `[workspace.package]` section in `Cargo.toml` has been updated to include the authors, edition, and repository information for the project. Additionally, a new pallet named `example-basic` has been added to the list of members in the `[workspace]` section. These changes improve the project's metadata and include the new pallet in the workspace.
The commit removes unused code and files related to the `pallet-template` in the Substrate runtime. This cleanup improves code maintainability and reduces unnecessary clutter in the project. 🔥 refactor(mock.rs): remove unused mock file 🔥 refactor(tests.rs): remove unused test file The mock.rs and tests.rs files are no longer needed and have been removed. These files were not being used and were cluttering the codebase. Removing them improves code organization and reduces unnecessary files.
The Cargo.toml file is added for the example-basic pallet. This file includes package metadata such as name, version, authors, license, and description. It also specifies dependencies and features required for the pallet. This addition is necessary for proper configuration and building of the example-basic pallet.
The README.md file is added to the example-basic pallet. It contains the license information, specifically stating that the license is Unlicense.
The Cargo.toml file has been updated to include the homepage and license information. The homepage is set to "https://hashed.io" and the license is specified as "MIT". This provides additional information and clarity about the project for users and contributors.
🔀 chore(pallets): update Cargo.toml files The Cargo.toml files in the pallets directory have been updated to make the following changes: - Set the authors, homepage, edition, license, and repository fields to be workspace-specific. - Added a readme field pointing to the README.md file. These changes were made to improve consistency and provide accurate information for the pallets in the project.
The Scale trait is no longer used in the codebase, so the import statement has been removed to improve code readability and reduce unnecessary dependencies.
The offer status variants in the `OfferStatus` enum have been changed to use proper capitalization. For example, `CREATED` is now `Created`, `TF_PENDING_SIGNATURE` is now `PendingTFSignature`, and so on. This improves consistency and readability of the code. 🐛 fix(mapped-assets): remove unused constant LOG_TARGET The unused constant `LOG_TARGET` has been removed from the code. This improves code cleanliness and eliminates unnecessary clutter.
🔧 chore(tests.rs): remove unused Preservation variant In the `mock.rs` file of the `afloat` pallet, the `UncheckedExtrinsic` type is no longer used, so it has been removed. This improves code readability and reduces unnecessary code. In the `tests.rs` file of the `fund-admin` pallet, the `Preservation::Protect` variant is no longer used, so it has been removed. This simplifies the code and removes unnecessary options. In the `mock.rs` file of the `gated-marketplace` pallet, unused imports and types (`RawOrigin`, `Lookup`, `AccountId`, `AccountId32`, `ApplyExtrinsicResult`, `MultiSignature`, `Percent`, `TransactionSource`, `TransactionValidity`, `BlockT`, `IdentifyAccount`, `Verify`, `NumberFor`, `AccountIdLookup`, `impl_opaque_keys`, `
@@ -2145,6 +2145,23 @@ dependencies = [ | |||
"sp-runtime", |
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.
@@ -1,14 +1,23 @@ | |||
[workspace.package] |
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.
@@ -1,13 +1,13 @@ | |||
[package] |
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.
@@ -969,22 +969,22 @@ impl<T: Config> Pallet<T> { | |||
ensure!(is_admin_or_owner || offer.creator_id == who, Error::<T>::Unauthorized); |
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.
GPT summary of 6a0c05 - f30747:
- Changed the casing of
OfferStatus::CREATED
toOfferStatus::Created
- Changed the casing of
OfferStatus::TF_PENDING_SIGNATURE
toOfferStatus::PendingTFSignature
- Added a
cancellation_date
field to bothOfferStatus::Created
andOfferStatus::PendingTFSignature
- Changed the
OfferStatus
of bothOfferStatus::Created
andOfferStatus::PendingTFSignature
toOfferStatus::Cancelled
@@ -15,12 +15,11 @@ pub mod types; | |||
pub mod pallet { |
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.
@@ -9,7 +9,6 @@ use sp_runtime::{ | |||
traits::{BlakeTwo256, IdentityLookup}, |
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.
@@ -72,21 +72,21 @@ pub enum SignUpArgs { | |||
Encode, Decode, Clone, Eq, PartialEq, RuntimeDebugNoBound, MaxEncodedLen, TypeInfo, Copy, |
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.
@@ -1,13 +1,13 @@ | |||
[package] |
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.
@@ -1,13 +1,13 @@ | |||
[package] |
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.
@@ -0,0 +1,59 @@ | |||
[package] |
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.
- Added name, description, version, authors, homepage, edition, license, repository, and readme to [package] section
- Added targets to [package.metadata.docs.rs] section
- Added dependencies to [dependencies] section
- Added dev-dependencies to [dev-dependencies] section
- Added default, std, runtime-benchmarks, and try-runtime features to [features] section
@@ -0,0 +1,118 @@ | |||
// This file is part of Substrate. |
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.
@@ -0,0 +1,542 @@ | |||
// This file is part of Substrate. |
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.
@@ -0,0 +1,198 @@ | |||
// This file is part of Substrate. |
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.
- This git diff adds a test file for the pallet-example-basic pallet.
- It includes tests for the optional value, default value, set_dummy, signed_ext_watch_dummy, counted_map, and weights functions.
- It also includes the GenesisConfig and Config implementations for the Test runtime.
@@ -0,0 +1,95 @@ | |||
// This file is part of Substrate. |
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.
@@ -1,13 +1,13 @@ | |||
[package] |
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.
GPT summary of 4a83df - 8b7768:
- Updated
version
,authors
,homepage
,edition
,license
,repository
, andreadme
fields in the[package]
section ofCargo.toml
- Added
authors.workspace
,homepage.workspace
,edition.workspace
,license.workspace
,repository.workspace
, andreadme
fields in the[package]
section ofCargo.toml
- Added
targets
field in the[package.metadata.docs.rs]
section ofCargo.toml
@@ -1,13 +1,13 @@ | |||
[package] |
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.
@@ -1,13 +1,13 @@ | |||
[package] |
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.
GPT summary of 9fe0a4 - 416139:
- Updated the
version
,authors
,homepage
,edition
,license
,publish
, andrepository
fields in the[package]
section ofCargo.toml
- Added
authors.workspace
,homepage.workspace
,edition.workspace
,license.workspace
,repository.workspace
, andreadme
fields to the[package]
section ofCargo.toml
- Updated the
targets
field in the[package.metadata.docs.rs]
section ofCargo.toml
@@ -10,7 +10,7 @@ use frame_support::{ | |||
traits::{ |
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.
@@ -1,13 +1,13 @@ | |||
[package] |
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.
GPT summary of 061dfb - b64f3b:
- Changed
version
from4.0.0-dev
to4.0.0-dev
- Changed
authors
fromHashed <https://github.com/hashed-io
toauthors.workspace = true
- Changed
homepage
fromhttps://hashed.io
tohomepage.workspace = true
- Changed
edition
from2021
toedition.workspace = true
- Changed
license
fromMIT
tolicense.workspace = true
- Changed
repository
fromhttps://github.com/hashed-io/hashed-pallets
torepository.workspace = true
- Added
readme
with valueREADME.md
@@ -1,6 +1,4 @@ | |||
use crate as pallet_gated_marketplace; |
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.
GPT summary of 102714 - beb263:
- Removed uses of
RawOrigin
andLookup
from theuse
statements - Changed
Balance
type fromu64
tou128
- Changed
AccountId
type fromu64
toAccountId32
- Removed uses of
create_runtime_str
,impl_opaque_keys
,AccountIdLookup
,BlockT
,IdentifyAccount
,NumberFor
,Verify
,ApplyExtrinsicResult
,MultiSignature
, andPercent
from theuse
statements
GPT summary of 59f1b36:
|
GPT summary of 34553b8:
|
GPT summary of 3386cd0: Error: couldn't generate summary |
GPT summary of 300d85d:
|
GPT summary of b15420a: Error: couldn't generate summary |
GPT summary of e595f40:
|
GPT summary of 0b44418:
|
GPT summary of ed1b78b:
|
GPT summary of 3522228:
PR summary so far:
|