mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Propose bumping StringLimit to 128 bytes (#516)
* Propose bumping StringLimit to 64 bytes The StringLimit of 50 bytes is too short for useful hashes of different protocols: - When using IPFS, the hash is 46 bytes. With a protocol prefix and type prefix (IPFS vs IPNS) it becomes: `ipfs://ipfs/QmPK1s3pNYLi9ERiq3BDxKa4XosgWwFRQUydHUtz4YgpqB` or 59 bytes. - On arweave, the hash is 43 bytes. Prefixed with just `arweave://` bumps it up to 53: `arweave://BNttzDav3jHVnNiV7nYbQv-GY0HQ-4XXsdkE5K9ylHQ`. - On Sia, with 46 char hashes, adding `sia://` as the protocol to use will bump it past 50: `sia://GACjmEWXmYF1N3Rc-PyjN304-8M0zOXHYzAXY9222xkGhA` (52) As such, we feel that 64 bytes is a reasonable minimum for the `StringLimit`. * Update lib.rs * Add different const for `UniquesStringLimit` Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -237,7 +237,7 @@ impl pallet_sudo::Config for Runtime {
|
||||
parameter_types! {
|
||||
pub const AssetDeposit: Balance = 100 * UNITS; // 100 WND deposit to create asset
|
||||
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
|
||||
pub const StringLimit: u32 = 50;
|
||||
pub const AssetsStringLimit: u32 = 50;
|
||||
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
|
||||
// https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271
|
||||
pub const MetadataDepositBase: Balance = deposit(1, 68);
|
||||
@@ -254,7 +254,7 @@ impl pallet_assets::Config for Runtime {
|
||||
type MetadataDepositBase = MetadataDepositBase;
|
||||
type MetadataDepositPerByte = MetadataDepositPerByte;
|
||||
type ApprovalDeposit = ApprovalDeposit;
|
||||
type StringLimit = StringLimit;
|
||||
type StringLimit = AssetsStringLimit;
|
||||
type Freezer = ();
|
||||
type Extra = ();
|
||||
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
|
||||
|
||||
Reference in New Issue
Block a user