-
Notifications
You must be signed in to change notification settings - Fork 6
feat: immutibility and contracts that allow document history #79
Conversation
@QuantumExplorer We planned to use a special JSON Schema As I understood there are four different changes in this PR:
Could you please split them into different PRs according to our contributing guide? |
@shumkov Are you aware that this splitting will take me quite some time. Since this has not been released to production I don't see the benefit of value/time. We need to stop with the approach of everything needs to be perfect all the time or velocity will be reduced. Regarding some comments:
|
@QuantumExplorer If the project is not in production it doesn't mean that our contributing guide is not valid anymore (and other best practices). I don't see why this functionality is so urgent that we should merge it with breaking our rules.
|
@shumkov My point is that before production, and with very important time constraints, we could bend the contributing guide. As a compromise could we merge this one in, but in the future I'll be sure to make my PRs more single feature focused?
|
@QuantumExplorer Sounds good to me!
|
drive/tests/supporting_files/contract/dashpay/dashpay-contract-with-profile-history.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…/rs-platform#79) * added contract and document type fields for mutability and historical data * added in immutability * basic contract history * better test for import contract * added test for mutability for DashPay contact Requests * better updating of documents, and documents with keep history * added in tests verifying historical contracts * added test and fixed limit issue * fixed some warnings * various fixes and tests * formatting and clippy fixes * update to node bindings * fixed bindings * fixed linting * clippy warnings * clippy warnings * added more fixes * changed readonly to readOnly
…/rs-platform#79) * added contract and document type fields for mutability and historical data * added in immutability * basic contract history * better test for import contract * added test for mutability for DashPay contact Requests * better updating of documents, and documents with keep history * added in tests verifying historical contracts * added test and fixed limit issue * fixed some warnings * various fixes and tests * formatting and clippy fixes * update to node bindings * fixed bindings * fixed linting * clippy warnings * clippy warnings * added more fixes * changed readonly to readOnly
Contracts now should allow the following four fields:
keepsHistory: keep the history of all previous versions of the contract. Default False
readonly: is the contract readonly? If it is it can never be changed. Default False
documentsKeepHistoryContractDefault: should contract documents keep history by default? Default False
documentsMutableContractDefault: should contract documents be mutable by default? Default True
Document Types also have two new fields:
documentsKeepHistory: should contract documents keep history? Overrides contract default at the document type level.
documentsMutable: should contract documents be mutable? Overrides contract default at the document type level.
Querying documents at a block level is now also allowed. However for now just one document by its Id can be queried.
The query looks like this: