Skip to content

Releases: PolymeshAssociation/Polymesh

Polymesh v4.0.0 🚀

07 Oct 21:23
245b6d0
Compare
Choose a tag to compare

Polymesh 4.0.0 Release Notes

This is the mainnet release candidate. Release notes are with respect to changes from Polymesh 3.3.0.

MESH-1645,MESH-1666,MESH-1668: Mainnet genesis config and todo cleanup

#1075

Adds stub for mainnet genesis configuration and binaries

MESH-1672: AssetCreated: add disable_iu

#1092

modified API

  • The event Asset.AssetCreated now includes disable_iu: bool.

Fix AuthorizationType in scheme

#1083

Fix for schema file

Fix weight typo

#1094

Fixes typo in weight comment

Clean up a few todos

#1081

Cleans up some TODOs and comments

MESH-1654/ Simple Relayer Integration Test

#1082

Add integration test for simple relayer feature

MESH-1667/Update_identity_pallet_storage_prefix

#1090

Changes the storage prefix from identity to Identity.

MESH-1575: Reenable substrate benches + Bump nightly => 2021-08-24

#1088

  • Bump our version of Rust to nightly-2021-08-24. This involves fixing a bunch of dependencies, creating our own forks of them as necessary. A bunch of this work has therefore occurred outside this PR by making branches and whatnot.
  • Then reactivate the commented out benchmarks for substrate pallets (not our pallets).

MESH-1680 Bump libsecp256k1

#1096

Updates version of libsecp256k1.

MESH-1671/cleanup authorization data

#1086

modified API

  • Wrap Authorizations storage values in identity pallet with Option to remove the need for NoData variant.
  • Remove unused variants Custom, NoData, TransferPrimaryIssuanceAgent, TransferCorporateActionAgent from AuthorizationData.
  • Remove unused variants Custom, and NoData from AuthorizationType.

MESH-1563: Update Storage Hashers

#1099

Updates storage hashers to better reflect underlying data.

See Mesh 1400/update storage hashers (#796)

MESH-1686: Update mainnet config

#1098

Updates mainnet genesis config:

  • binary version moved to 4.0.0
  • spec version moved to 30 namespace, transaction version to 1
  • identities / keys / GC / committees aligned for mainnet
  • bridge limit removed
  • pip expiry added and minimum bond
  • adds schema fix from 3.3

Fix is_root check.

#1101

Fix the is_root check in utility.batch extrinsic.

We are not using a BaseCallFilter right now, so this bug has no security issues.

MESH-1691 - fix settlement reschedule_instruction benchmark and weight.

#1102

modified logic

  • Fix weight for reschedule_instruction.

MESH-1693 - Fix reject_instruction permissions

#1105

modified logic

  • reject_instruction now checks that the caller is a party of at least one of the legs. If the caller is not a party of the instruction, then UnauthorizedSigner error is returned.

modified agent functionality

  • reject_instruction requires that the sender is the owner/custodian of a portfolio from at least one leg.

MESH-1692: Rip out migrations

#1104

Migration versions were set to 0 and existing migration code was removed.

MESH-1675: Don't check perms in Identity::leave_identity_as_{identity, key}

#1095

modified logic

  • Do not check permissions in Identity::leave_identity_as_key.

modified api

  • Removed extrinsics Identity::{join, leave}_identity_as_identity and Identity::revoke_offchain_authorization.
  • Removed event Identity.ForwardedCall.
  • Removed errors {Permissions, Identity}.RecursionNotAllowed

Add CI runtime with short blocktime

#1106

Adds in a new CI runtime.

This runtime has short block times so it can run quickly for automated tests.

MESH-1669/Remove 100k POLYX mint for new accounts

#1109

Removes 100k POLYX initial funding for mainnet

Add a waitBocks utility function for the integration tests

#1112

Utility function for integration tests

MESH-1695: Round down in transfer_benefit

#1111

modified logic

  • CapitalDistribution.{claim, push_benefit} will now round down for indivisible currencies before transferring gains.

MESH-1704 fix scope in compliance manager tests

#1114

Use Scope::Ticker in compliance manager tests.

MESH-1701/Enforce max leg limit in settlement instructions

#1116

modified API

  • Settlement::reject_instruction now takes two additional params (portfolio and max_leg_count).

MESH-1653: Some benchmark fixes

#1122

Fixes benchmarks - pips, settlement & committee

Update itn_rewards.json

#1124

Updates ITN Reward Points (provisional values)

Update spec & tx version

#1126

Updates all networks to spec_version 3000, tx_version 1

MESH-1653: Update benchmarks for mainnet

#1128

Updated weights for mainnet.

More mainnet genesis config / refactoring

#1129

  • Removes itn / alcyone / buffron networks
  • Fixes mainnet configuration / runtimes
  • Updates genesis bridged amounts
  • Updates benchmarks to use Polymesh DbWeights
  • Syncs dev, ci, testnet and mainnet chain specs
  • Updates itn_rewards to remove invalid accounts
  • Updates Ethereum reserved ticker list
  • Updates testnet & mainnet chain_specs

MESH-1722 fix dedup in compliance requirements (#1142)

#1142

  • Fix bugs in replace_asset_compliance and change_compliance_requirement

Polymesh Testnet v3.3.0

15 Sep 16:04
84e2389
Compare
Choose a tag to compare

Polymesh 3.3.0 Release Notes

Fix Phragman Issue

#1100

Removes pruning of Phragman solution set to allow off-chain calculations to be submitted back on-chain.

Backports fix from:
#992
into 3.3

Authorization refactor; nix accept_authorization for explicit extrinsics

#1035

modified API

  • Removed Identity::accept_authorization in favor of ExternalAgents::accept_become_agent, Portfolio::accept_portfolio_custody,
  • Merge some error types into AuthorizationError::BadType.
  • Cleanup AuthorizationType, removing TransferPrimaryIssuanceAgent and TransferCorporateActionAgent variants.

NCBD-234 Fix cli integration tests

#1040

modified logic

  • in testnet chains, genesis accounts now get BOOTSTRAP_TREASURY POLYX instead of BOOTSTRAP_STASH the higher amount is needed for the integration tests.

Fix deserialization from jsonrpc for the RPC interface.

modified logic

Polkadot's RPC serializes rust enum variant type names to lowercase. This seems to only affect rust style enums like our Singatory enum.

This PR uses #[serde(alias = "identity")] variant attribute to allow deserialize from the lowercase variant name.

Misc refactors and bug fixes, mostly re current DIDs

#1039

modified logic

  • Some bug fixes around permissions in some extrinsics. Not particularly notable.
  • Fixed a bug in make_multisig_signer where you could call it several times for the same multisig.

MESH-1615/Relax CapitalDistribution::reclaim to only require portfolio custody

#1029

modified logic

  • Relaxed CapitalDistribution::reclaim to only require portfolio custody

MESH-1629/create simple relayer

#1028

new features

  • Added Relayer pallet. This pallet provides subsidising support, to allow a paying_key to pay transaction and protocol fees.
  • Added type Subsidy.
  • Added AccountKeyUsage storage map to identity pallet. Internal functions are provided manage a 'usage' counter for account keys to lock them to their identity. This is being used by relayer, but can be used by other pallets.

modified API

  • AuthorizationData::AddRelayerPayingKey(AccountID, AccountID, Balance) and AuthorizationType::AddRelayerPayingKey was added. The authorization is used to add a subsidy to a user_key.
  • Added error AccountKeyIsBeingUsed to the identity pallet. This error is returned if a paying/user key tries to leave their identity.

modified logic

  • Extrinsics accept_primary_key, leave_identity_as_key, leave_identity_as_identity, remove_secondary_keys can throw error AccountKeyIsUsed if the key is being used as a paying_key or user_key in the relayer pallet.

MESH-1651: Don't allow a portfolio with assets to be deleted

#1044

new features

  • A new storage item Portfolio.portfolio_asset_count(pid) => u64 keeps count of the number of distinct assets with non-zero balance stored in the portfolio.

modified logic

  • Portfolio.delete_portfolio(pid) will error with PortfolioNotEmpty when Portfolio.portfolio_asset_count(pid) == 0.

MESH-1652: T::Balance => polymesh_primitives::Balance

#1047

No external impact

MESH-1625: Constant time portfolio name uniqueness

#1048

new features

  • Adds Portfolio.name_to_number for fast PortfolioName => PortfolioNumber lookup.

MESH-1625: Move out AssetName from SecurityToken

#1049

modified API

  • SecurityToken.name is moved into storage item Asset.asset_names(ticker) => AssetName.

MESH-1631/redirect fees to subsidiser

new features

  • Add support to pay transaction & protocol fees using a subsidy in Relayer.
  • Add restriction on pallets that can be subsidised.

modified API

  • Added error InsufficientSubsidyBalance to protocol-fee pallet. This error is returned if the subsidy doesn't have enough remaining POLYX to pay for the protocol fee.
  • Added PalletNotSubsidised to TransactionError.

modified logic

  • If the caller's account key has a subsidy in Relayer, then the transaction and/or protocol fees will be paid by the subsidiser.

MESH-1625: Move out CADetails from CorporateAction

#1053

modified API

  • Moved field CorporateAction.details: CADetails into its own storage item Details: CAId => CADetails.

MESH-1625: Split Venue

#1055

modified API

  • Split Settlement.update_venue into update_venue_type & update_venue_details along with respective events.
  • Removed fields Venue.{details, instructions}. The former improves performance and the latter crucially removes an attack vector.
  • Added storage item Settlement.details(venue_id) -> VenueDetails.
  • Added storage item Settlement.venue_instructions(venue_id, instruction_id) -> ().

MESH-1625: Comment out smart extension code

#1052

modified API

  • Removes smart extension related storage items. These should have been unused on ITN.

MESH-1625: AssetType::Custom uses ID instead of string

#1051

new features

  • Extrinsic Asset.register_custom_asset_type(origin, ty: Vec<u8>) was added. It is used to register string contents for a custom asset type, getting back an CustomAssetTypeId which can be used in AssetType::Custom. The extrinsic uses the following new resources:
    • Storage items Asset.{CustomTypeIdSequence, CustomTypes, CustomTypesInverse}. These are used by register_custom_asset_type
    • Events Asset.{CustomAssetTypeExists, CustomAssetTypeRegistered}.
    • Error Asset.CustomAssetTypeIdOverflow.

modified API

  • AssetType::Custom has a field CustomAssetTypeId(u32) instead of Vec<u8>.

MESH-1656/bridge freezing permissions

#1059

new features

  • Add support for multiple freeze admin accounts to the bridge pallet.

modified API

  • New extrinsics add_freeze_admin and remove_freeze_admin to bridge pallet. These can only be called by the current bridge admin to add/remove freeze admins.
  • New events FreezeAdminAdded and FreezeAdminRemoved.

modified logic

  • Bridge extrinsic freeze can now be called by any of the freeze admin accounts.

MESH-1636/Relayer tests

#1050

Adds additional tests for simple relayer - no downstream impact.

MESH-1662/allow changing paying key

#1057

new features

  • Allow user key to change subsidiser in single transaction.
  • Fix issue with user key calling remove_paying_key.

modified API

  • Removed error AlreadyHasPayingKey.

modified logic

  • accept_paying_key now allows accepting a new paying key without having to first remove the old paying key. (MESH-1663)
  • Fixed issue with the user key calling remove_paying_key. (MESH-1662)

modified agent functionality

  • accept_paying_key can now emit event RemovePayingKey if the user key already had a subsidy.

MESH-1664: Allow different ss58 values

#1069

Allows us to specify correct SS58 values for different networks.

MESH-1661: Optional PUIS

#1065

modified API

  • Asset.create_asset now takes an additional parameter that decides whether the asset will enforce investor uniqueness (IU).
    This information is stored in Asset.disable_iu, which, if true, means that IU is not enforced.

ITN Rewards

new features

  • New pallet rewards and new extrsinc claim_itn_reward.

MESH-1658/audit bridge pallet

#1060

modified API

  • Added event BridgeTxScheduleFailed for when scheduling a transaction failed.

modified logic

  • Extrinsic change_bridge_limit will throw error DivisionByZero if duration == 0.
  • Errors NoValidCdd, DivisionByZero, Overflow, BridgeLimitReached are now reported correctly.

modified agent functionality

  • Event BridgeTxScheduleFailed can be emitted by extrinsics force_handle_bridge_tx, batch_propose_bridge_tx, propose_bridge_tx, handle_bridge_tx, unfreeze_txs, handle_scheduled_bridge_tx.

MESH-1665/ITN Rewards: CDD Check for recipients

#1070

modified logic

Check that the recipient of ITN rewards has a valid CDD claim.

MESH-1659/relayer increase decrease polyx limit

#1068

new features

  • Add extrinsics increase_polyx_limit and decrease_polyx_limit to increase/decrease the POLYX limit of a subsidy.
  • Add error Overflow that can be thrown by increase_polyx_limit or decrease_polyx_limit.

modified agent functionality

  • Added extrinsics increase_polyx_limit and decrease_polyx_limit that can emit event UpdatedPolyxLimit.

MultiSig: Subsidise rejecting proposal and consistent errors

#1071

new features

  • When a MultiSig signer rejects a propos...
Read more

Polymesh Testnet v3.2.0

24 Aug 14:42
5a60827
Compare
Choose a tag to compare

Upgrades from using Substrate 2 to Substrate 3

Polymesh Testnet v3.1.1

10 Aug 15:53
b95b9f8
Compare
Choose a tag to compare

Fix bug related to rotating an identities Primary Key

Polymesh Testnet v3.1.0

30 Jul 15:24
6c6f964
Compare
Choose a tag to compare

Polymesh 3.1.0 Release Notes

MESH-1597: Split issuance and token creation #981

#981

new features

  • Asset::create_asset_and_mint does what Asset::create_asset used to do

modified API

  • Asset::create_asset no longer mints tokens by default

MESH-1543: coverage bridge #979

#979

Refactor on UT of bridge pallet and it also add new ones to increase the coverage of this module.

Changes in Bridge pallet

  1. handle_bridge_tx_now adds new argument exempted_did, which ignore the bridge limits if it is some. This allows to remove the "hacky approach" in force_handle_signed_bridge_tx line 853.
  2. Move code outside decl_storage macro.
  3. Remove some duplicated code.

More stuff

  1. Genesis configuration has been moved out from lib.rs into genesis.rs.
  2. Runtime migrations have been moved out from lib.rs into migration.rs.
  3. ExtBuilder supports bridge configuration.

modified API

  • Bridge::Event::TxsHandled added the recipient account to each handled transaction.

MESH-1603: allow portfolio custodians unilaterally quit #977

#977

new features

  • A new extrinsic quit_portfolio_custody is added in the portfolio module to allow a portfolio custodian to relinquish custodianship duties without going through the authorization sequence.

modified logic

  • Accepting a portfolio custody authorization for the portfolio owner will not add the pair of portfolio owned and the portfolio ID to the PortfoliosInCustody mapping in the portfolio module.
  • The portfolio name length parameter was removed from the weight of the create_portfolio extrinsic in the portfolio module.

MESH-1598: use expect/assert in benchmarks #986

#986

Changed all ? operators in the benchmarks to unwrap() and changed all ensure's to assert.

MESH-1617: Fixed a bug preventing some operators from changing commission #987

#987

MESH-1593: Fix payout_stakers benchmarks #988

#988

MESH-1542: Improve code coverage for Identity module #990

#990

MESH-1581: External Agents #978

#978

new features

  • The ExternalAgents pallet has been added. The functionality is described more thoroughly in the code documentation. As a result, many things noted below, on a best-effort basis, have changed, including extrinsics, schema, events, error types, and some data types.
  • Types AgentGroup and AGId have been added.

modified API

  • SubsetRestriction (i.e. ExtrinsicPermissions & friends) is now redefined as either Whole, These(elems), and Except(elems).
  • TargetIdentity::PrimaryIssuanceAgent is now TargetIdentity::ExternalAgent, testing for if the identity is any of the external agents.
  • AuthorizationData::BecomeAgent(Ticker, AgentGroup) was added. This authorization is used for adding an external agent with a group to an asset. Similarly, AuthorizationType::BecomeAgent was added.
  • AuthIdentifier was removed. It was never actually in use.
  • Extrinsics CorporateActions::reset_caa, Asset::remove_primary_issuance_agent, and Asset::accept_primary_issuance_agent_transfer have been removed.
  • The error IrrelevantAuthorization (Portfolio pallet) was removed.
  • CorporateActions::Agent (storage item) was removed.
  • SecurityToken.primary_issuance_agent was removed.
  • SecondaryKeyNotAuthorizedForAsset was moved to the external agents pallet.

modified logic

  • Relevant extrinsics now check for agent permissions. Sometimes, this replaces other explicit checks such as from the explicit CAA or PIA concepts.
  • AuthorizationData::{TransferPrimaryIssuanceAgent, TransferCorporateActionAgent} are now always rejected by the chain. That is, these variants are deprecated awaiting future removal.

MESH-1587: move Alcyone & general genesis identity balances to the bridge #966

#966

modified logic

  • Genesis identities in dev and testnet configurations are changed a bit to more closely resemble the ITN config.

MESH-1623: add memo field to portfolio #1004

#1004

new features

  • Add optional memo field to portfolio.move_portfolio_funds. Each asset moved can have a memo added to the move.

modified API

  • Add memo field (Option<Memo>) to MovePortfolioItem struct.
  • Add memo field to MovedBetweenPortfolios event.

modified logic

  • Each asset that is moved between portfolios can have a memo attached to the move action.

MESH-1620: refactor #1011

#1011

This is a refactor of the batch functions in the utility pallet. No logic was changed. The main goal is to decrease duplicate code.

ExternalAgents: Fix schema + fn agent_permissions #1012

#1012

modified API

  • Fixed bug in schema, Meta -> ExceptMeta

modified logic

  • Fixed bug in fn agent_permissions for ExceptMeta

MESH-1619: Allow rescheduling failed Settlements #996

#996

new features

  • Event InstructionRescheduled
  • Errors InstructionNotFailed and UnknownInstruction
  • Extrinsic Settlement::reschedule_instruction

modified API

  • Settlement::reject_instruction only takes instruction_id as an argument

modified logic

  • Instructions are no longer pruned upon failure and instead go into a Failed state.

MESH-1621: Script to create snapshot of all user balances #1000

#1000

Created a script to get users balances and store them in a CSV file.

To run: enter yarn polyx_balances from cli folder

MESH-1622: create script to distribute POLYX #1010

#1010

How to run script:
cd scripts/cli/util
node <file_name>.js --account <private_key or mnemonic phrase> --amount <amount>

If you are using mnemonic phrase as the account wrap it in quotes.

MESH-1620: improve batch functions (EventCounts, ErrorAt) #1003

#1003

new features

  • batch functions return number of events emitted from each call.

modified API

  • Changed BatchInterrupted, BatchOptimisticFailed and BatchCompleted events to include a vector of event counts.
  • Wrap the call index and error in a ErrorAt type. This changes BatchInterrupted and BatchOptimisticFailed.

MESH-1638: Add a reverse map to allow an easy lookup from IdentityId to list of assets for which the identity is an EA #1021

#1021

new features

  • External agents now has a mapping for Agents to what tickers they are agents for. This is available in ExternalAgents::AgentOf map (IdentityId, Ticker) => ().

Polymesh Testnet v3.0.4

14 Jun 11:23
b7d6507
Compare
Choose a tag to compare

Fixes for primary and secondary key duplicate linking.

Fix for SecondaryKeyPermissionsUpdated event parameters.

Polymesh Testnet V3.0.2

29 Apr 13:36
1d4cc72
Compare
Choose a tag to compare

changelog

modified logic

  • Set weight for election result submission to max allowed weight for normal extrinsics.

Polymesh Testnet V3.0.1

08 Apr 16:54
8d3bbf7
Compare
Choose a tag to compare

changelog

modified api

  • Removed pips_votingHistoryByAddress, pips_votingHistoryById, and asset_balanceAt RPC functions. (#980)
  • add_investor_uniqueness_claim_v2 now uses scope from the claim to verify the proof. (#970)

new features

  • More constants are now exposed via Metadata for easier consumption (#972)
  • New InvestorUniquenessV2 Claim has been added. (#970)
  • New Identity::revoke_claim_by_index function to revoke claims without inner scope. (#970)

modified logic

  • Fixed a bug in Distribution::{claim, push_benefit} where remaining could underflow/wrap when sufficient tokens were locked but amount was too small. (#975)
  • Setting the portfolio custodian to the owner of the portfolio now clears the PortfolioCustodian mapping of the portfolio ID in question thus saving some runtime storage. (#976)

Polymesh Alcyone Testnet V3.0.0

31 Mar 13:32
7c4c1c7
Compare
Choose a tag to compare
Pre-release

changelog

modified api

  • The AssetType enum now has an extra variant - StableCoin. Schema has been updated accordingly. (#956)
  • The Staking Reward event now also contains the Identity of the key being rewarded. (#958)
  • Added CW, SX & BQ jurisdictions (#917)
  • Removed OfflineSlashingParams from the genesis configuration of pallet-im-online and schema. (#922)
  • Removed *-live configs (#924)
  • No API change but in the metadata, ethereum::EcdsaSignature -> EcdsaSignature, ethereum::EthereumAddress -> EthereumAddress. (#936)
  • Bonding less than MinimumBond to Staking::bond will now throw a BondTooSmall (#921)
  • pallet_confidential(module index = 43) has been removed. (#923)
  • No API change but a few changes in the metadata: secondary_key::api::LegacyPermissions -> LegacyPermissions, secondary_key::api::SecondaryKey -> SecondaryKey, and <T as IdentityTrait>::OffChainSignature -> T::OffChainSignature. (#943)
  • register_did, mock_cdd_register_did, get_my_did, and get_cdd_of extrinsics have been moved to a new Testnet pallet. (#940)
  • [Only applies to new networks] Address prefix changed from 5xxx to 2xxx. i.e. We are not using 12 as the ss58 prefix. (#935)
  • Changed how classic tickers are serialized and deserialized. It shouldn't have impact on existing networks since there was no classic ticker reserved there. (#929)

modified logic

  • Calling the add_investor_uniqueness_claim extrinsic in the identity pallet with a new investor uniqueness claim that has a new ScopeId cleans up identity-ticker balances related to the ScopeId of the old investor uniqueness claim if there was one. (#955)
  • A Base pallet has been added; moving UnexpectedError event from the pallet Identity to Base.
  • The Base pallet has an error TooLong triggered in cases where a stored list would cross more than 2048 elements. (#959)
  • The error NowAfterPayment is no longer emitted by the distribute extrinsic of the CapitalDistribution pallet. (#926)
  • Tipping is allowed only for Operational transactions that are called from CDD or Governance Committee members. (#918)
  • If there are multiple PIPs scheduled for a given block, they now respect block weight limits. (#918)
  • Removed error BalanceAmountProductSupplyDivisionFailed in Capital Distributions. (#942)
  • Renamed error BalanceAmountProductOverflowed to BalancePerShareProductOverflowed in Capital Distributions. (#942)
  • Fixed tracking of validators being run by an Operator. Involved storage migration to retroactively fix the running_count. (#946)
  • The distribute extrinsic of the CapitalDistribution pallet can now be called past the dividend date defined in the payment_at argument. (#926)
  • By default, polymesh_contracts::put_code is disabled. 💥 (#920)
  • Testnet only functions moved to a new testnet pallet. Transaction version breaking change. (#940)

new features

  • Added a new asset_balanceAt RPC call to query identity-ticker balance at a checkpoint. (#957)
  • ITN Genesis Config (#954)
  • Primary key of every new Identity now gets seeded with some POLYX on ITN (#954)
  • New RPC can_transfer_granular (#928)
  • Added the ITN runtime (#919)
  • New extrinsic polymesh_contracts::set_put_code_flag which enables/disables polymesh_contracts::put_code. (#920)
  • New event polymesh_contracts::Event::PutCodeFlagChanged is emitted, when root calls polymesh_contracts::set_put_code_flag. (#920)
  • New Identity::add_investor_uniqueness_claim_v2 extrinsic that supports InvestorUniqueness claims generated by PIUS v2.

Polymesh Alcyone Testnet V2.6.0

04 Mar 16:14
9201ad0
Compare
Choose a tag to compare

Alcyone 2.6.0 Release Notes

modified API

  • Type Distribution has gained per_share: Balance field. This is used instead the total supply to compute the benefit of a claimant as per_share * shares_at_checkpoint. (#942)

modified logic

  • Fixed tracking of validators being run by an Operator. Involved storage migration to retroactively fix the running_count. (#946)
  • Removed error BalanceAmountProductSupplyDivisionFailed in Capital Distributions. (#942)
  • Renamed error BalanceAmountProductOverflowed to BalancePerShareProductOverflowed in Capital Distributions. (#942)