Releases: PolymeshAssociation/Polymesh
Polymesh v4.0.0 🚀
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
Adds stub for mainnet genesis configuration and binaries
MESH-1672: AssetCreated: add disable_iu
modified API
- The event
Asset.AssetCreated
now includesdisable_iu: bool
.
Fix AuthorizationType in scheme
Fix for schema file
Fix weight typo
Fixes typo in weight comment
Clean up a few todos
Cleans up some TODOs and comments
MESH-1654/ Simple Relayer Integration Test
Add integration test for simple relayer feature
MESH-1667/Update_identity_pallet_storage_prefix
Changes the storage prefix from identity
to Identity
.
MESH-1575: Reenable substrate benches + Bump nightly => 2021-08-24
- 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
Updates version of libsecp256k1.
MESH-1671/cleanup authorization data
modified API
- Wrap
Authorizations
storage values in identity pallet withOption
to remove the need forNoData
variant. - Remove unused variants
Custom
,NoData
,TransferPrimaryIssuanceAgent
,TransferCorporateActionAgent
fromAuthorizationData
. - Remove unused variants
Custom
, andNoData
fromAuthorizationType
.
MESH-1563: Update Storage Hashers
Updates storage hashers to better reflect underlying data.
See Mesh 1400/update storage hashers (#796)
MESH-1686: Update mainnet config
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.
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.
modified logic
- Fix weight for
reschedule_instruction
.
MESH-1693 - Fix reject_instruction permissions
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, thenUnauthorizedSigner
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
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}
modified logic
- Do not check permissions in
Identity::leave_identity_as_key
.
modified api
- Removed extrinsics
Identity::{join, leave}_identity_as_identity
andIdentity::revoke_offchain_authorization
. - Removed event
Identity.ForwardedCall
. - Removed errors
{Permissions, Identity}.RecursionNotAllowed
Add CI runtime with short blocktime
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
Removes 100k POLYX initial funding for mainnet
Add a waitBocks utility function for the integration tests
Utility function for integration tests
MESH-1695: Round down in transfer_benefit
modified logic
CapitalDistribution.{claim, push_benefit}
will now round down for indivisible currencies before transferring gains.
MESH-1704 fix scope in compliance manager tests
Use Scope::Ticker
in compliance manager tests.
MESH-1701/Enforce max leg limit in settlement instructions
modified API
Settlement::reject_instruction
now takes two additional params (portfolio and max_leg_count).
MESH-1653: Some benchmark fixes
Fixes benchmarks - pips, settlement & committee
Update itn_rewards.json
Updates ITN Reward Points (provisional values)
Update spec & tx version
Updates all networks to spec_version 3000, tx_version 1
MESH-1653: Update benchmarks for mainnet
Updated weights for mainnet.
More mainnet genesis config / refactoring
- 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)
- Fix bugs in replace_asset_compliance and change_compliance_requirement
Polymesh Testnet v3.3.0
Polymesh 3.3.0 Release Notes
Fix Phragman Issue
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
modified API
- Removed
Identity::accept_authorization
in favor ofExternalAgents::accept_become_agent
,Portfolio::accept_portfolio_custody
, - Merge some error types into
AuthorizationError::BadType
. - Cleanup
AuthorizationType
, removingTransferPrimaryIssuanceAgent
andTransferCorporateActionAgent
variants.
NCBD-234 Fix cli integration tests
modified logic
- in testnet chains, genesis accounts now get
BOOTSTRAP_TREASURY
POLYX instead ofBOOTSTRAP_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
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
modified logic
- Relaxed
CapitalDistribution::reclaim
to only require portfolio custody
MESH-1629/create simple relayer
new features
- Added
Relayer
pallet. This pallet provides subsidising support, to allow apaying_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)
andAuthorizationType::AddRelayerPayingKey
was added. The authorization is used to add a subsidy to auser_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 errorAccountKeyIsUsed
if the key is being used as apaying_key
oruser_key
in the relayer pallet.
MESH-1651: Don't allow a portfolio with assets to be deleted
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 withPortfolioNotEmpty
whenPortfolio.portfolio_asset_count(pid) == 0
.
MESH-1652: T::Balance => polymesh_primitives::Balance
No external impact
MESH-1625: Constant time portfolio name uniqueness
new features
- Adds
Portfolio.name_to_number
for fastPortfolioName
=>PortfolioNumber
lookup.
MESH-1625: Move out AssetName from SecurityToken
modified API
SecurityToken.name
is moved into storage itemAsset.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
toprotocol-fee
pallet. This error is returned if the subsidy doesn't have enough remaining POLYX to pay for the protocol fee. - Added
PalletNotSubsidised
toTransactionError
.
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
modified API
- Moved field
CorporateAction.details: CADetails
into its own storage itemDetails: CAId => CADetails
.
MESH-1625: Split Venue
modified API
- Split
Settlement.update_venue
intoupdate_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
modified API
- Removes smart extension related storage items. These should have been unused on ITN.
MESH-1625: AssetType::Custom uses ID instead of string
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 anCustomAssetTypeId
which can be used inAssetType::Custom
. The extrinsic uses the following new resources:- Storage items
Asset.{CustomTypeIdSequence, CustomTypes, CustomTypesInverse}
. These are used byregister_custom_asset_type
- Events
Asset.{CustomAssetTypeExists, CustomAssetTypeRegistered}
. - Error
Asset.CustomAssetTypeIdOverflow
.
- Storage items
modified API
AssetType::Custom
has a fieldCustomAssetTypeId(u32)
instead ofVec<u8>
.
MESH-1656/bridge freezing permissions
new features
- Add support for multiple freeze admin accounts to the bridge pallet.
modified API
- New extrinsics
add_freeze_admin
andremove_freeze_admin
tobridge
pallet. These can only be called by the current bridge admin to add/remove freeze admins. - New events
FreezeAdminAdded
andFreezeAdminRemoved
.
modified logic
- Bridge extrinsic
freeze
can now be called by any of the freeze admin accounts.
MESH-1636/Relayer tests
Adds additional tests for simple relayer - no downstream impact.
MESH-1662/allow changing paying key
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 eventRemovePayingKey
if the user key already had a subsidy.
MESH-1664: Allow different ss58 values
Allows us to specify correct SS58 values for different networks.
MESH-1661: Optional PUIS
modified API
Asset.create_asset
now takes an additional parameter that decides whether the asset will enforce investor uniqueness (IU).
This information is stored inAsset.disable_iu
, which, if true, means that IU is not enforced.
ITN Rewards
new features
- New pallet
rewards
and new extrsincclaim_itn_reward
.
MESH-1658/audit bridge pallet
modified API
- Added event
BridgeTxScheduleFailed
for when scheduling a transaction failed.
modified logic
- Extrinsic
change_bridge_limit
will throw errorDivisionByZero
ifduration == 0
. - Errors
NoValidCdd
,DivisionByZero
,Overflow
,BridgeLimitReached
are now reported correctly.
modified agent functionality
- Event
BridgeTxScheduleFailed
can be emitted by extrinsicsforce_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
modified logic
Check that the recipient of ITN rewards has a valid CDD claim.
MESH-1659/relayer increase decrease polyx limit
new features
- Add extrinsics
increase_polyx_limit
anddecrease_polyx_limit
to increase/decrease the POLYX limit of a subsidy. - Add error
Overflow
that can be thrown byincrease_polyx_limit
ordecrease_polyx_limit
.
modified agent functionality
- Added extrinsics
increase_polyx_limit
anddecrease_polyx_limit
that can emit eventUpdatedPolyxLimit
.
MultiSig: Subsidise rejecting proposal and consistent errors
new features
- When a MultiSig signer rejects a propos...
Polymesh Testnet v3.2.0
Upgrades from using Substrate 2 to Substrate 3
Polymesh Testnet v3.1.1
Fix bug related to rotating an identities Primary Key
Polymesh Testnet v3.1.0
Polymesh 3.1.0 Release Notes
MESH-1597: Split issuance and token creation #981
new features
Asset::create_asset_and_mint
does whatAsset::create_asset
used to do
modified API
Asset::create_asset
no longer mints tokens by default
MESH-1543: coverage bridge #979
Refactor on UT of bridge
pallet and it also add new ones to increase the coverage of this module.
Changes in Bridge
pallet
handle_bridge_tx_now
adds new argumentexempted_did
, which ignore the bridge limits if it is some. This allows to remove the "hacky approach" inforce_handle_signed_bridge_tx
line 853.- Move code outside
decl_storage
macro. - Remove some duplicated code.
More stuff
- Genesis configuration has been moved out from
lib.rs
intogenesis.rs
. - Runtime migrations have been moved out from
lib.rs
intomigration.rs
. ExtBuilder
supports bridge configuration.
modified API
Bridge::Event::TxsHandled
added therecipient
account to each handled transaction.
MESH-1603: allow portfolio custodians unilaterally quit #977
new features
- A new extrinsic
quit_portfolio_custody
is added in theportfolio
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 theportfolio
module. - The portfolio name length parameter was removed from the weight of the
create_portfolio
extrinsic in theportfolio
module.
MESH-1598: use expect/assert in benchmarks #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
MESH-1593: Fix payout_stakers benchmarks #988
MESH-1542: Improve code coverage for Identity module #990
MESH-1581: External Agents #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
andAGId
have been added.
modified API
SubsetRestriction
(i.e.ExtrinsicPermissions
& friends) is now redefined as eitherWhole
,These(elems)
, andExcept(elems)
.TargetIdentity::PrimaryIssuanceAgent
is nowTargetIdentity::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
, andAsset::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
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
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>
) toMovePortfolioItem
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
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
modified API
- Fixed bug in schema,
Meta
->ExceptMeta
modified logic
- Fixed bug in
fn agent_permissions
forExceptMeta
MESH-1619: Allow rescheduling failed Settlements #996
new features
- Event
InstructionRescheduled
- Errors
InstructionNotFailed
andUnknownInstruction
- 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
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
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
new features
- batch functions return number of events emitted from each call.
modified API
- Changed
BatchInterrupted
,BatchOptimisticFailed
andBatchCompleted
events to include a vector of event counts. - Wrap the call index and error in a
ErrorAt
type. This changesBatchInterrupted
andBatchOptimisticFailed
.
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
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
Fixes for primary and secondary key duplicate linking.
Fix for SecondaryKeyPermissionsUpdated event parameters.
Polymesh Testnet V3.0.2
changelog
modified logic
- Set weight for election result submission to max allowed weight for normal extrinsics.
Polymesh Testnet V3.0.1
changelog
modified api
- Removed
pips_votingHistoryByAddress
,pips_votingHistoryById
, andasset_balanceAt
RPC functions. (#980) add_investor_uniqueness_claim_v2
now usesscope
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}
whereremaining
could underflow/wrap when sufficient tokens were locked butamount
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
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 ofpallet-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
toStaking::bond
will now throw aBondTooSmall
(#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
, andget_cdd_of
extrinsics have been moved to a newTestnet
pallet. (#940)- [Only applies to new networks] Address prefix changed from
5xxx
to2xxx
. 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 theidentity
pallet with a new investor uniquenessclaim
that has a newScopeId
cleans up identity-ticker balances related to theScopeId
of the old investor uniqueness claim if there was one. (#955) - A
Base
pallet has been added; movingUnexpectedError
event from the palletIdentity
toBase
. - The
Base
pallet has an errorTooLong
triggered in cases where a stored list would cross more than 2048 elements. (#959) - The error
NowAfterPayment
is no longer emitted by thedistribute
extrinsic of theCapitalDistribution
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
toBalancePerShareProductOverflowed
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 theCapitalDistribution
pallet can now be called past the dividend date defined in thepayment_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/disablespolymesh_contracts::put_code
. (#920) - New event
polymesh_contracts::Event::PutCodeFlagChanged
is emitted, when root callspolymesh_contracts::set_put_code_flag
. (#920) - New
Identity::add_investor_uniqueness_claim_v2
extrinsic that supportsInvestorUniqueness
claims generated by PIUS v2.
Polymesh Alcyone Testnet V2.6.0
Alcyone 2.6.0 Release Notes
modified API
- Type
Distribution
has gainedper_share: Balance
field. This is used instead the total supply to compute the benefit of a claimant asper_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
toBalancePerShareProductOverflowed
in Capital Distributions. (#942)