Skip to content

Releases: PolymeshAssociation/Polymesh

Polymesh v7.0.0-rc5

18 Oct 16:00
2474e84
Compare
Choose a tag to compare
Polymesh v7.0.0-rc5 Pre-release
Pre-release

changelog

Highlights

Asset ID

Polymesh no longer requires each tokenised asset to have a unique ticker. Instead each asset is assigned a unique AssetID when it is created, which can optionally be linked to a unique Ticker. This change impacts large amounts of storage and API which now expects AssetID to uniquely identify a tokenised asset, rather than the previous Ticker.

Staking

Polymesh has been updated to a more recent upstream version of the Staking pallet. This brings efficiency improvements, and some modifications to the election process. Tokenomics / inflation is not effected.

Keys

The storage of secondary keys, and their associated permissions has been optimised to improve the efficiency of these look-ups which are needed for all extrinsics.

MultiSig

The MultiSig implementation has been updated to simplify the association between MultiSigs and their Identities. The updated implementation provides flexibility to specify which key is responsible for paying for MultiSig signer transactions, and consolidate the behaviour of MultiSig keys with other keys.

Venue ID

Settlements in Polymesh have been updated to not require a Venue ID. This simplifies the settlement process for peer to peer transactions (those not going through an exchange or other matching venue).

New External API

Asset ID

  • pallet_asset
    • The following storage have been added: UniqueTickerRegistration, SecurityTokens, AssetIdentifiers, AssetsExemptFromAffirmation, PreApprovedAsset, TickersOwnedByUser, SecurityTokensOwnedByuser, AssetIDTicker, TickerAssetID, RngNonce;
    • The following extrinsics have been added: register_unique_ticker, exempt_asset_affirmation, remove_asset_affirmation_exemption, pre_approve_asset, remove_asset_pre_approval, link_ticker_to_asset_id.
      (#1694)
  • Adds unlink_ticker_from_asset_id extrinsic. (#1728)

Staking

  • Adds the following storage: MinNominatorBond, MinValidatorBond, MinimumActiveStake, MinCommission, MaxValidatorsCount, MaxNominatorsCount, CurrentPlannedSession, ChillThreshold. (#1678)
  • Removes the following storage: EarliestUnappliedSlash, SnapshotValidators, SnapshotNominators, QueuedElected, QueuedScore, EraElectionStatus, IsCurrentSessionFinal, MinimumBondThreshold (#1678)
  • The following extrinsics have been added: kick, set_staking_configs, chill_other, force_apply_min_commission, set_min_commission. (httpshttps://github.com//pull/1678)

Keys

  • Split secondary key permissions out of Identity.KeyRecords to allow for more efficient permissions checks. (#1679)

MultiSig

  • Execute MultiSig proposal at the same time as the last required approval. No longer uses the scheduler to execute the proposal in the next block. (#1687)
  • Convert the MultiSig pallet to frame v2. (#1687)
  • A Multisig can be made a secondary key with custom permissions (if called by the primary key). (#1687)
  • A Multisig can add/remove multiple singers in a single proposal now with multisig.add_multisig_signers and multisig.remove_multisig_signers. (#1687)
  • Prune proposals when they are executed or rejected. (#1687)
  • Limit the total number of signers per MultiSig to 50. (#1687)
  • Split MultiSig CreatorDid into AdminDid and PayingDid. (#1687)
  • A MultiSig can add an admin DID to enable the *_via_admin controls. (#1687)
  • A MultiSig can remove it's admin to disable the *_via_admin controls. The admin DID can also remove itself as the admin of a MultiSig. (#1687)
  • A MultiSig can remove it's paying DID to pay for its own transaction/protocol fees. (#1687)
  • A MultiSig unlinked from an identity (via identity.leave_identity_as_key) and join a new identity using multisig.approve_join_identity and the transaction fees will be paid by the primary key of the joining identity. (#1687)
  • A MultiSig can't be a signer on another MultiSig. (#1687)
  • Adds remove_adminextrinsic; (#1726)
  • multisig.add_admin(identity) callable by the MultiSig to add an identity as admin. (#1687)
  • multisig.remove_admin_via_admin(multisig) callable by the admin to remove itself as admin of a MultiSig. (#1687)
  • multisig.remove_payer() callable by the MultiSig to remove the paying identity. The MultiSig will need to pay for its own transaction/protocol fees. (#1687)
  • multisig.remove_payer_via_payer(multisig) callable by the paying identity to remove itself as the payer of fees for the MultiSig. (#1687)
  • multisig.approve_join_identity(auth_id) callable by MultiSig signers to approve joining a new identity. The primary key of the joining identity will pay for transaction fees. (#1687)
  • multisig.join_identity(auth_id) this is called by the proposal created in approve_join_identity to accept a join identity authorization. (#1687)
  • Added storage AuthToProposalId used by multisig.approve_join_identity to map an auth_id to proposal_id. (#1687)
  • Adds remove_adminextrinsic. (httpshttps://github.com//pull/1726)

Other

  • Remove most of the Bridge code (extrinsics, events, errors). Only keeping the storage. (#1687)
  • Use manual pallet index values, to avoid breaking pallet ids when adding/removing pallets. Also this makes sure that all runtimes use the same pallet indices. (#1687)

Modified External API

Asset ID

  • pallet_asset
    • The following storage have been remove: Tickers, Tokens, Identifiers, TickersExemptFromAffirmation; PreApprovedTicker;
    • The following storage have changed types: AssetNames, BalanceOf, FundingRound, IssuedInFundingRound, Frozen, AssetDocuments, AssetDocumentsIdSequence, AssetMetadataValues, AssetMetadataValueDetails, AssetMetadataLocalNameToKey, AssetMetadataLocalKeyToName, AssetMetadataLocalSpecs, AssetMetadataNextLocalKey, MandatoryMediators, CurrentAssetMetadataLocalKey;
    • The following extrinsics have been removed: register_ticker, redeem_from_portfolio, exempt_ticker_affirmation, remove_ticker_affirmation_exemption, pre_approve_ticker, remove_ticker_pre_approval;
    • The following extrinsics have been changed: create_asset, freeze, unfreeze, rename_asset, issue, redeem, make_divisible, add_documents, remove_documents, set_funding_round, update_identifiers, controller_transfer, create_asset_with_custom_type, set_asset_metadata, set_asset_metadata_details, register_and_set_local_asset_metadata, register_asset_metadata_local_type, update_asset_type, remove_local_metadata_key, remove_metadata_value, add_mandatory_mediators, remove_mandatory_mediators.
      (#1694)
  • pallet_checkpoint
    • The following storage have changed types: TotalSupply, Balance, CheckpointIdSequence, BalanceUpdates, Timestamps, ScheduleIdSequence, CachedNextCheckpoints, ScheduledCheckpoints, ScheduleRefCount, SchedulePoints;
    • The following extrinsics have been changed: create_checkpoint, create_schedule, remove_schedule; * pallet_compliance_manager
    • The following storage have changed types: AssetCompliances, TrustedClaimIssuer;
    • The following extrinsics have been changed: add_compliance_requirement, remove_compliance_requirement, replace_asset_compliance, reset_asset_compliance, pause_asset_compliance, resume_asset_compliance, add_default_trusted_claim_issuer, remove_default_trusted_claim_issuer, change_compliance_requirement; * pallet_corporate_actions
    • The following storage have changed types: DefaultTargetIdentities, DefaultWithholdingTax, DidWithholdingTax, CAIdSequence, CorporateActions;
    • The following extrinsics have been changed: set_default_targets, set_default_withholding_tax, set_did_withholding_tax, initiate_corporate_action, link_ca_doc, remove_ca, change_record_date. (#1694)
  • pallet_distribution
    • The following extrinsics have been changed: distribute
      (#1694)
  • pallet_external_agents
    • The following storage have changed types: AGIdSequence, AgentOf, GroupOfAgent, NumFullAgents, GroupPermissions;
    • The following extrinsics have been changed: create_group, set_group_permissions, remove_agent, abdicate, change_group, create_group_and_add_auth, create_and_change_custom_group
      (#1694)
  • pallet_nft
    • __The follo...
Read more

Polymesh v6.3.5

10 Oct 14:26
dab5d1a
Compare
Choose a tag to compare

changelog

other

  • when redeeming (aka burning) NFTs, due to an upstream bug, the cost of the transaction is under-valued
  • when affirming settlement instructions, it is possible for a user to construct a complex transaction that is expensive to process, but cheap to submit, causing a possible DoS attack vector

Polymesh v6.3.3

28 Jul 20:45
7e570da
Compare
Choose a tag to compare

Fix bug with NFT controller transfer

Polymesh v6.3.2

10 Jul 13:23
cfb6ba2
Compare
Choose a tag to compare

changelog

other

  • Allow updating the controller if the stash is the same as the controller;
  • Update reference count even if the validator is not a permissioned identity;

data migration

  • Update reference count for three keys;

Polymesh v6.3.1

03 Jul 17:01
ca0fd5e
Compare
Choose a tag to compare

changelog

modified events

  • Ordering of InstructionCreated and InstructionAutomaticallyAffirmed reversed (with InstructionAutomaticallyAffirmed now being emitted after InstructionCreated) (#1684)

other

  • Fix expiry check for mediator approvals (#1684)
  • Add missing runtime-benchmarks feature settings (#1677)

Polymesh v6.3.0

19 Jun 08:28
bb97f00
Compare
Choose a tag to compare

changelog

new features

  • Adds the following rpc endpoints: get_transfer_report, get_execute_instruction_report, compliance_report #1650
  • Change compliance rules - if there are no rules returns Ok #1631
  • If no one else has voted on a multisig proposal, allows the owner of the proposal to reject it immediately #1632
  • Adds check for valid cdd when transferring an asset #1650
  • Prevents stash accounts to become controllers #1661
  • Allows running the trie migration #1660
  • Adds multiple checks for execute_instruction #1630
  • In function ensure_portfolio_transfer_validity_granular, PortfolioValidityResult::receiver_is_same_portfolio will be set to true if the transfer is between different portfolios, but belong to the Identity #1628
  • Allow Identity pallet extrinsics to be subsidised #1676

new external API

  • Adds the following errors to the asset pallet: InvalidTransferInvalidReceiverCDD, InvalidTransferInvalidSenderCDD #1650
  • Adds the following errors to the nft pallet: InvalidNFTTransferSenderIdMatchesReceiverId, InvalidNFTTransferInvalidReceiverCDD, InvalidNFTTransferInvalidSenderCDD #1650
  • Adds the following rpc endpoints: get_transfer_report, get_execute_instruction_report, compliance_report #1650
  • Add the following asset storage: CurrentAssetMetadataLocalKey, CurrentAssetMetadataGlobalKey #1650
  • Add the following NFT storage: CurrentNFTId, CurrentCollectionId #1650
  • Adds the following error variant to the portfolio pallet: InvalidTransferSenderIdMatchesReceiverId #1628
  • Adds the ProposalFailedToExecute event to the multsig pallet #1632
  • Adds the following error variants to the asset_pallet: InvalidTransferFrozenAsset, InvalidTransferComplianceFailure #1591

modified external API

  • Deprecate the can_transfer_granular rpc endpoints #1650
  • Deprecate the following asset storage: AssetMetadataNextLocalKey, AssetMetadataNextGlobalKey #1658
  • Deprecate the following NFT storage: NextCollectionId, NextNFTId #1658
  • Adds two error variants: BoundNotMet, TooManyNominators to the staking pallet Error #1623
  • Removes useless type: TickerRegistrationStatus #1591
  • Remove useless error constants (ERC1400_TRANSFERS_HALTED, PORTFOLIO_FAILURE, TRANSFER_MANAGER_FAILURE, COMPLIANCE_MANAGER_FAILURE, ERC1400_TRANSFER_SUCCESS) #1591

new events

  • The state-trie-migration pallet adds 4 new events: Migrated, Slashed, AutoMigrationFinished, Halted

data migration

  • Initializes new storage for the asset pallet #1658
  • Initializes new storage for the nft pallet #1658

other

  • Adds pallet_state_trie_migration to the runtime #1660
  • Read the Epoch config from on-chain storage #1659
  • Add settlement and asset const to chain metadata #1651
  • Add global asset metadata to genesis config for common NFT metadata #1626
  • Refactor Asset module #1603
  • Updates our staking pallet to use the new Substrate macros and updated logic #1623

Polymesh v6.2.1

10 Apr 16:44
b2bb084
Compare
Choose a tag to compare

Fixes

  • Update dependencies for Rust and TypeScript code, including the h2 crate.
  • Restrict validate_cdd_expiry_nominators to only be callable via governance.
  • Update staging genesis with telemetry and new bootnode.

Polymesh v6.2.0

05 Apr 07:40
b24ce30
Compare
Choose a tag to compare

Polymesh v6.2.0-rc4

changelog

new features

  • Allows instructions and assets to have mediators #1584
  • Update example contracts to Ink! 4.3 #1569
  • Add logging of Chain Extension errors for easier debugging #1569
  • Add example NFT Royalty Smart Contract #1570
  • Add support for CallRuntimeWithError chain_extension #1581
  • Update chain extension whitelist to include common extrinsics #1606
  • Add polymesh-upgradable-ink contract and set upgradable API hash on genesis #1606

new external API

  • Adds the following storage to the asset pallet: MandatoryMediators #1584
  • Adds the following error to the asset pallet: NumberOfAssetMediatorsExceeded #1584
  • Adds the following extrinsics to the asset pallet: add_mandatory_mediators , remove_mandatory_mediators #1584
  • Adds the following storage to the settlement pallet: InstructionMediatorsAffirmations #1584
  • Adds the following error to the settlement pallet: CallerIsNotAMediator, InvalidExpiryDate, MediatorAffirmationExpired #1584
  • Adds the following extrinsics to the settlement pallet add_instruction_with_mediators, affirm_instruction_as_mediator, withdraw_affirmation_as_mediator, add_and_affirm_with_mediators, reject_instruction_as_mediator #1584
  • Add support for CallRuntimeWithError chain_extension #1581

modified external API

  • Adds ChildDid storage, which tracks all child identities of a given parent identity #1568
  • Settlement legs transferring from different portfolios for the same identity will be rejected #1567
  • Remove support for deprecated chain_extension OldCallRuntime #1581

new events

  • Adds the following events to the asset pallet: SetAssetMediators, AssetMediatorsRemoved #1584
  • Adds the following events to the settlement pallet: MediatorAffirmationReceived, MediatorAffirmationWithdrawn #1584
  • Adds the InstructionMediators event to the settlement pallet #1610

data migration

  • Initializes the ChildDid storage #1568

other

  • Use workspace dependencies and use new Polkadot-sdk repo for Substrate #1573

  • Fix WASM runtime builds on newer Rust compiler (target-cpu=mvp and disable sign-ext WASM extension) #1573

  • Fix the debian Rust docker image builds #1573

  • Adds staging genesis files #1621

Polymesh v6.1.3

15 Feb 20:06
db7f786
Compare
Choose a tag to compare

fixes

  • Only allow upper case tickers to be registered
  • Only allow a subset of non-alphanumeric characters to be used in tickers, specifically A..Z 0..9 _ - . /
  • Only allow controller transfers of unlocked asset balances (i.e. not balances that are currently locked in a settlement instruction)

Polymesh v6.1.2

12 Jan 22:50
4e2f8af
Compare
Choose a tag to compare

Updates token inflation behaviour when POLYX total supply is greater than 1 billion.

Previous behaviour

When the total supply exceeds 1 billion, a fixed amount of 140 million POLYX will be minted annually for validators / nominators.

New behaviour

When the total supply exceeds 1 billion, and the reward curve based annual inflation (calculated based on the reward curve, staking ratio and total supply) exceeds 140 million, a fixed inflation of 140 million will be used instead.

Rationale for change

Without this change, as soon as the total supply exceeds 1 billion, there will be a jump in the inflation rate (and corresponding interest rate for nominators) due to moving to a fixed inflation amount of 140 million annually.

Instead of this behaviour we would rather see a smooth transition, continuing to use the reward curve based mechanism until that mechanism would result in inflation greater than 140 million annually, at which point we revert to the previous logic, capping the annual inflation at 140 million.

In other words, the 140 million annual inflation becomes a cap on annual inflation, rather than a fixed value, once the total supply reaches 1 billion POLYX.