0.21.0 (2021-10-12)
- introduce consensus error codes (#341, #342)
- split validation logic into basic, signature, fee and state (#331)
- protocol versioning updates (#325, #326, #329, #330, #336, #337, #344, #346, #349, #351)
- removed verify SML flag triggers (#324)
- building indices on arrays using
prefixItems
(#343)
stateTransition.validateStructure
renamed tostateTransition.validateBasic
and doesn't perfom signature validationstateTransition.validateData
renamed tostateTransition.validateState
- validation errors are changed
- removed old data triggers
- old serialized data is not compatible
0.20.1 (2021-07-14)
- remove verify SML flag triggers (#324)
0.20.0 (2021-07-08)
- add metadata to document, data contract and identity (#318)
- prevent possible ReDoS attacks for Data Contracts (#311, #317, #315)
- strcit data contract JSON schema validation (#310, #312)
dependencies
is not supported. UsedependentRequired
anddependentSchema
insteadadditionalitems
is not supported. Useitems: false
andprefixItems
insteadpatternProperties
is prohibited for Data Contract- error messages and properties are changed according to the new JSON Schema spec
pattern
keyword accept only RE2 compatible regular expressions- Document type and properties minimum length is 3 chars
definitions
is now defined using$defs
keyword- JSON Schema strict validation is enabled. Previous contract schemas invalid in case they are not respecting strict mode constraints (reference this link for more information)
- usage of
if
,then
,else
,allOf
,anyOf
,oneOf
,patternProperties
in document properties is prohibited .initialize()
must be called before using DashPlatformProtocol
0.19.2 (2021-05-20)
- Cbor not decoding buffers properly in browsers (#306)
0.19.1 (2021-05-04)
topLevelIdentity.getId
is not a function (#306)
0.19.0 (2021-04-30)
- add data triggers for feature flags documents (#297, #302)
- ChainLock Asset Lock proof (#296)
- use
verifyInstantLock
instead offetchSMLStore
(#294)
AssetLock
class was removed.InstantAssetLockProof
requirestransaction
andoutputIndex
property.IdentityCreateTransition
schema changed.assetLock
property renamed toassetLockProof
and expectInstantAssetLockProof
orChainAssetLockProof
.transaction
andoutputIndex
properties are removed.IdentityTopUpTransition
schema changed.assetLock
property renamed toassetLockProof
and expectInstantAssetLockProof
orChainAssetLockProof
.transaction
andoutputIndex
properties are removed.
0.18.0 (2021-03-03)
- get modified data ids from state transitions (#290)
- BLS was throwing an error inside
uncaughtException
handler (#293)
0.17.0 (2020-12-29)
- dashpay data triggers (#285)
- update dashcore-lib (#271, #283, #287)
- fund identity with Asset Lock Proofs (#276, #277, #280)
- limit publicKeys items to 32 (#278)
- fs not found error on deploy (#273)
- Identity Create and Topup Transitions expect Asset Lock object instead of asset lock outpoint
identity.create
andidentity.createIdentityTopUpTransition
expect asset lock transaction, output, and proof instead of outpoint- renamed
skipAssetLockConfirmationValidation
DPP option toskipAssetLockProofSignatureVerification
- identity allows only 32 public keys
0.16.0 (2020-10-26)
- use Buffers for binary data (#238, #240, #241, #246, #247, #261, #262, #263, #266)
- Identifier property type (#252, #265, #267, #268)
byteArray
JSON Schema keyword instead ofcontentEncoding
(#245, #248, #251, #254, #260)- use 32 random bytes instead of blockchain address for entropy (#250, #259)
- validate and store all identity keys instead of the first one (#234, [#237], #242)
- validate document upon creation (#255)
- hash methods responds with Buffer (#249)
- introduce a BLS identity key type (#239)
- add revision property to identity (#235)
isEnabled
property removed from Identity Public Key #236
- Node.JS 10 and lower are not supported
- data models use Buffers instead of strings for binary fields
serialize
methods renamed totoBuffer
createFromSerialized
methods renamed tocreateFromBuffer
StateRepository
acceptIdentifier
andBuffer
instead of strings- identifiers like document, data contract and identity IDs are instances
Identifier
(compatible withBuffer
) contentEncoding
keyword isn't supported anymore. UsebyteArray: true
withtype: array
to store binary data- Data Contract and Document entropy is now a random 32 bytes instead of blockchain address
- identity and identity create transition can't contain duplicate public keys anymore
DocumentFactory#create
throws an error if specified data is not validhash
methods respond withBuffer
instead of hex encoded string- ECDSA Public key (type
0
) must be a 33 long byte array. - Identity's
revision
is required - Identity Public Key's
isEnabled
is not accepted - Data created or serialized by previous is incompatible
0.15.0 (2020-09-04)
- protocol versioning (#217)
- document binary properties (#199, #211, #215, #218, #213)
- handle unique and alias identities in DPNS data triggers (#201)
- add data trigger condition to check allowing subdomain rules (#224, #228)
- reject
replace
anddelete
actions for DPNS preorder document (#210)
- empty where conditions were sent during unique indices validation (#222)
- duplicate key error in case of unique index on optional fields (#230)
- invalid arguments were submitted to search for parent domain (#226)
- invalid where clause was sent, invalid query error was not handled by unique index validation method (#220)
- undefined in data contract schema id (#209)
- data contract fixture was not isolated properly (#207)
- schema with key or id already exists (#203)
protocolVersion
property equals to0
is required for all data structuresDocument
now awaitsDataContract
as a second argument in constructorDocumentsBatchTransition
now awaitsDataContract
as a second argument in constructor- a document compound unique index shouldn't contain both required and optional properties
- a document with a compound unique index must contain all indexed properties or non of them
- only second-level DPNS domain owner is allowed to create its subdomains
- DPNS preorder document is immutable now. Modification and deletion of preorder are restricted.
getDocumentsFixture.dataContract
is not available anymore- DPNS data trigger expect
dashUniqueIdentityId
anddashAliasIdentityId
records, instead of obosletedashIdentity
0.14.0 (2020-07-22)
- missing indexed string property constraint validation (#196)
- error when the indexed field has an undefined value (#194)
- conflicting schema ids in AJV cache (#187)
- add
createdAt
andupdatedAt
timestamps to Document (#192) - disable unsupported JSON Schema conditions (#193)
- readme standard updates (#189)
- Indexed strings should have
maxLength
constraint not greater than 1024 chars - JSON Schema conditions (
allOf
,if
, ...) are not allowed in Document JSON Schema
0.13.1 (2020-06-15)
- conflicting schema ids in AJV cache (#187)
0.13.0 (2020-06-08)
- document validation after validation the contract with the same id (#166)
- support documents from multiple contracts in Documents Batch Transition (#159)
- add
hash
method toIdentityPublicKey
(#170, #173) StateRepository#fetchTransaction
responses with verbose data (#169)- check asset lock transaction is confirmed (#168, #184)
- introduce Identity Topup Transition (#167, #178, #180)
- validate first identity public key uniqueness (#175)
- rename
LockTransaction
toAssetLockTransaction
(#177)
- the first public key in Identity should be unique
- expect
StateRepository#fetchTransaction
to respond with verbose transaction
0.12.1 (2020-04-22)
- data trigger should accept document transition (#164)
0.12.0 (2020-04-17)
- do not allow to change
ownerId
andentropy
(bff5807) - json schema for
signaturePublicKeyId
(#161) - wrong entropy size (#157)
- data contract definitions might be
null
orundefined
(#153) - identity existence validation in data contract structure validation (#149)
- state transition signature validation in data contract structure validation (#150)
- rename
$rev
to$revision
(#140) - rename
userId
toownerId
(b9a5e83) - remove
type
from Identity (227dc4d) - remove
version
from Data Contract (f856ecc) - rename
$ownerId
toownerId
in Data Contract (#160) - rename
$contractId
to$dataContractId
in Document (158) - split document model and it's state transitions (#126, #156)
- store document ID as a part of the document (3d10a01)
- Data Contract Create Transition now accepts raw data (#136)
- start types and indices from
0
instead of1
(#155) - put JSON Schemas into order (#135)
- implement apply state transition function (#138, #139, #142, #141, #147, #143)
- generate Data Contract ID from
ownerId
and entropy (4c0dae1) - introduce balance to Identities (#137, b13a9bb, #146)
- validate ST size is less than 16 Kb (ff7aa51, 70c3c54)
- validate state transition fee (48c9fda, #145, 0cb1d6f)
- create Identity factory now accepts locked out point and public keys (#151)
getDataContractFixture
acceptsownerId
(#148)- implement create identity create transition factory (#152)
- introduce
signByPrivateKey
andverifySignatureByPublicKey
methods to ST (4eb5cdc) - verbose invalid data errors (#134)
- Data Contract ID is ownerId + entropy. You don't need to create an additional identity anymore.
- Data Contract Create Transition now accepts raw data
- size of serialized state transition must be less than 16 Kb
type
removed from Identity due to Data Contract doesn't require it anymoreversion
removed from Data ContractuserId
renamed toownerId
- Documents State Transition renamed to and it's structure is changed
applyStateTransition
methods no longer a part of identity, data contract and document facades- renamed
$rev
field to$revision
in raw document model - applyIdentityStateTransition is now asynchronous
- Documents State Transition is now happening through separate state transition classes and renamed to Documents Batch Transition. Hence document class no longer have
$action
field.$action
is now starting from 0.$entropy
field is now a part of document create state transition.createStateTransition
method of a document factory now accepts a map with actions as keys (create
,replace
,delete
) and document arrays as values respectively. - create Identity factory accepts locked out point and public keys instead of ID and
IndentityPublicKey
- types and indices now starts from
0
instead of1
- Data Provider renamed to State Repository and store/remove functions introduced
0.11.1 (2020-03-17)
- documents validate against wrong Data Contract (0db6e44)
0.11.0 (2020-03-09)
- missing public key during ST signature validation (667402d)
- add npmignore (c2e5f5d)
- prevent to update dependencies with major version
0
to minor versions (ea7de93)
- catch
decode
errors and rethrow consensus error (892be82) - limit data contract schema max depth (f78df33)
- limit serialized Data Contract size to 15Kb (7c95197)
- remove Data Contract restriction option (0edd6ff)
- validate documents JSON Schemas during data contract validation (d88817d)
- ensure
maxItems
withuniqueItems
for large non-scalar arrays (3364325) - ensure
maxLength
in case ofpattern
orformat
(297c754) - ensure all arrays items are defined (43d7b8f)
- ensure all object properties are defined (d9f71df)
- limit number of allowed indices (5adff5d)
validateData
method accept raw data too (e72a627)- prevent of defining
propertyNames
(c40663f) - prevent of defining remote
$ref
(34bdb3f) - prevent of using
default
keyword in Data Contract (7629878) - throw error if 16Kb reached for payload in
encode
function (c6aba8b) - accept
JsonSchemaValidator
as an option (ee1bb0f)
- Data Contract schema max depth is now limited by 500
- Serialized Data Contract size is now limited to 15Kb
validate
,createFromSerialized
,createFromObject
methods of Data Contract Factory are now asyncitems
andadditionalItems
are required for arraysproperties
andadditionalProperties
are required for objects- number of indices limited to 10
- number of unique indices limited to 3
- number of properties in an index limited to 10
- required
maxItems
withuniqueItems
for large non-scalar arrays - required
maxLength
in case ofpattern
orformat
propertyNames
keyword is restricted in document schemadefault
keyword is restricted in Data Contractencode
function throws error if payload is bigger than 16Kb