-
Notifications
You must be signed in to change notification settings - Fork 59
refactor: change dpp to be based on platform value #809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
251 commits
Select commit
Hold shift + click to select a range
58872cb
added revision to documents when needed
QuantumExplorer 8bf90ef
more work on serialization
QuantumExplorer 3f5ffdc
all tests passing
QuantumExplorer 23df7e1
Merge branch 'v0.24-dev' into refactor/removeDocumentStub
QuantumExplorer 7fb9a26
more work
QuantumExplorer 283350b
merge and fixes
QuantumExplorer 2755443
compiles
QuantumExplorer 358eeb2
many more fixes
QuantumExplorer 871329b
everything passing
QuantumExplorer 84ef989
fix
QuantumExplorer dffbfd4
fixes
QuantumExplorer 0c0acc1
Merge branch 'v0.24-dev' into refactor/removeDocumentStub
QuantumExplorer a74d0dc
fixes
QuantumExplorer faeb3db
fixes
QuantumExplorer 5a0ceb7
fixes
QuantumExplorer 4e4831e
small refactoring
QuantumExplorer 2d6ff0a
test(wasm-dpp): use DocumentInStateTransition instead of Document
markin-io 31a8440
small fixes
QuantumExplorer 0e3a010
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer ffa19a1
renamed to extended document
QuantumExplorer abf4e80
more refactoring
QuantumExplorer 927a660
added path searching
QuantumExplorer 8138ca2
insertion methods
QuantumExplorer 7e68b24
more work
QuantumExplorer c255b7e
more work
QuantumExplorer 83535d0
more work
QuantumExplorer 65ba3be
added identifier to platform value
QuantumExplorer f6390a4
more work
QuantumExplorer 51732d2
more work
QuantumExplorer 2f60d15
more work
QuantumExplorer 08c5e36
more fixes
QuantumExplorer f662caf
fixed issue
QuantumExplorer 1f32e76
fixed another issue
fominok 385e22f
tests passing
QuantumExplorer a2363bf
Merge branch 'v0.24-dev' into refactor/removeDocumentStub
QuantumExplorer 7324cb0
fixes
QuantumExplorer 1c5d05b
more fixes
QuantumExplorer 5a0ac64
last fixes
QuantumExplorer 417c80f
clippy fixes
QuantumExplorer a99b188
added another convenience method
QuantumExplorer 47ed827
attempt to fix appy_document_batch_transition
antouhou 09b8e0d
Merge remote-tracking branch 'origin/refactor/removeDocumentStub' int…
antouhou e5c225a
fix bytes replacement
antouhou 497b47a
fix fetch extended document test
antouhou 6d26833
fmt
QuantumExplorer f3cbc31
much more work
QuantumExplorer 43fe274
more work
QuantumExplorer f954d6a
more work
QuantumExplorer 8b30f85
compiles again
QuantumExplorer 9ac0ff8
more fixes
QuantumExplorer 169d0ea
more fixes
QuantumExplorer 92a52a2
more fixes
QuantumExplorer 1fa33ee
more fixes
QuantumExplorer 2b58cd4
more work
QuantumExplorer d90d949
fmt
QuantumExplorer 9470006
fixes
QuantumExplorer 51dff8a
wasm fixes
QuantumExplorer 779e264
fixes
QuantumExplorer c92318f
fixes
QuantumExplorer 7fd2ea9
fixes
QuantumExplorer 6d382c2
fmt
QuantumExplorer f2d3d32
fix wasm build error
antouhou f3b9cbd
fix create_document
antouhou f5b1f8c
fixes
QuantumExplorer cb9bf5b
fix Document test
antouhou d228b98
another small fix
QuantumExplorer bcd7e09
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer 9a84d32
more fixes
QuantumExplorer e529670
more fixes
QuantumExplorer f2ec484
remove some debugs
QuantumExplorer 2035b24
fix Document test
antouhou e05713d
Merge remote-tracking branch 'origin/refactor/removeDocumentStub' int…
antouhou b206bb3
fix linting issue
antouhou b941aa6
fix some document uniqueness validation tests
antouhou e16e77a
removed contract and document type from document getter
QuantumExplorer 1ea8872
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer ed6015c
fix the other test
antouhou bd24f1e
more fixes
QuantumExplorer 4dce677
fix
QuantumExplorer 9ff42e7
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer ffbdc1c
trial
QuantumExplorer bbeb34c
more fixes
QuantumExplorer a176469
more work
QuantumExplorer 7892054
fmt
QuantumExplorer 1464e93
more fixes
QuantumExplorer 3617039
added another test
QuantumExplorer e49ee14
more fixes
QuantumExplorer e4f5b26
more fixes
QuantumExplorer 182e1bf
more fixes
QuantumExplorer df66bc0
fixed some warnings
QuantumExplorer 42b4ecc
more work
QuantumExplorer c2f77cf
renamed classes
QuantumExplorer 8251007
more fixes
QuantumExplorer ad4edb0
fixes
QuantumExplorer adedff8
more fixes
QuantumExplorer 1415c55
more fixes
QuantumExplorer 40b352c
another fix
QuantumExplorer d3d6116
fixes for serialization
QuantumExplorer 206b09e
another fix
QuantumExplorer 236db0d
fix errors produced by not being able to mock the validator any more
antouhou a99d282
Merge remote-tracking branch 'origin/refactor/removeDocumentStub' int…
antouhou 54250c7
merged
QuantumExplorer e929476
small typo fix
QuantumExplorer f2c5b56
another fix
QuantumExplorer bf199b7
fix DocumentBatchTransition.spec.js
antouhou 2394f79
Merge remote-tracking branch 'origin/refactor/removeDocumentStub' int…
antouhou 5e65fda
Merge branch 'v0.24-dev' into refactor/removeDocumentStub
antouhou 4da3ec4
resolve merge conflicts
antouhou ac1c8da
resolve compilation errors
antouhou 0805694
fix wrong constructor for the data triggers
antouhou 5aa8f7b
fix another test error
antouhou 91fe05b
in porgress
antouhou 11968c6
sledgehammer
QuantumExplorer 0418d31
more work
QuantumExplorer b14c4a8
more work
QuantumExplorer ec57013
more break makes sam happy
QuantumExplorer 6e5b6b6
moooor
QuantumExplorer ce8f437
more work
QuantumExplorer 0858b75
more work
QuantumExplorer 67f52a3
some cleanup
QuantumExplorer 46801a8
more work on deserialization
QuantumExplorer 1b3b42d
even more work on deserialization
fominok 14111ee
more work
QuantumExplorer 7c509e0
more work
QuantumExplorer d32b6b6
more work
QuantumExplorer 55be6e0
more work
QuantumExplorer f95be93
more work
QuantumExplorer fde5bc4
less errors
QuantumExplorer 90ad260
more work
QuantumExplorer 5fd484d
more fixes
QuantumExplorer ac432b1
work on platform value
QuantumExplorer e45a723
fixes
QuantumExplorer b892dc1
more work
QuantumExplorer b1a4d2e
more work
QuantumExplorer 7b6b9f8
more work
QuantumExplorer 040170a
more fixes
QuantumExplorer 8a9736b
compiling
QuantumExplorer c4439de
added arrays to set value at path
QuantumExplorer 3a553c4
more fixes
QuantumExplorer f35c9c1
fixes
QuantumExplorer 87c2522
more fixes
QuantumExplorer eeedb84
more fixes
QuantumExplorer be510bb
dbg
QuantumExplorer 62823e9
more fixes
QuantumExplorer c624e26
more fixes
QuantumExplorer 82f4dad
more fixes
QuantumExplorer 2fa3dd4
more work
QuantumExplorer b32c022
more fixes
QuantumExplorer a87a8c6
more fixes
QuantumExplorer 822ab23
more work
QuantumExplorer a4f318b
more fixes
QuantumExplorer afdd8cd
more fixes
QuantumExplorer b581135
more fixes
QuantumExplorer cc9cb58
more work
QuantumExplorer ef16f86
more fixes
QuantumExplorer d19a63a
more fixes
QuantumExplorer 0b12011
dpp tests all passing
QuantumExplorer b8173e3
fmt
QuantumExplorer 892a9d8
fixes
QuantumExplorer 1638c04
fixes
QuantumExplorer 8a3981c
fixes
QuantumExplorer f6624ae
more fixes
QuantumExplorer 8b711f3
more fixes
QuantumExplorer 5da08d5
more work
QuantumExplorer 234fdca
fixed rs-drive
QuantumExplorer 1544a83
fixed compilation issues
QuantumExplorer 25113b0
more fixes
QuantumExplorer e0a3e9d
more fixes
QuantumExplorer bff7b09
fixes
QuantumExplorer 5efa74f
small change
QuantumExplorer 124197a
merge
QuantumExplorer 361bfc1
fixes
QuantumExplorer 112ca72
fixes
QuantumExplorer bae60a6
more clippy fixes
QuantumExplorer f325875
fix
QuantumExplorer 2548506
more clippy fixes
QuantumExplorer cd5d373
refactoring of replacement methods
QuantumExplorer 7d23113
work on having better replacement methods that support arrays
QuantumExplorer 9618db6
more fixes
QuantumExplorer 1605125
more fixes
QuantumExplorer f605bc3
more clean up
QuantumExplorer 21b925e
more fixes
QuantumExplorer 3d629d2
more work
QuantumExplorer 3419cbe
more fixes
QuantumExplorer 4427640
more fixes
QuantumExplorer a96fd1d
more fixes
QuantumExplorer fa964db
trials
QuantumExplorer a44de5c
another fix
QuantumExplorer c1a0e39
more fixes
QuantumExplorer 632ed2a
more fixes
QuantumExplorer 1b9c7fe
more fixes
QuantumExplorer 19d1eb5
more fixes
QuantumExplorer f1146de
more fixes
QuantumExplorer b6e633c
more fixes
QuantumExplorer 223873d
more fixes
QuantumExplorer 8caa5fb
merged in v24
QuantumExplorer e28d365
more fixes
QuantumExplorer bbb2fac
more fixes
QuantumExplorer 754e793
more fixes
QuantumExplorer 737865a
slight change
QuantumExplorer 2c7afdb
Merge branch 'v0.24-dev' into refactor/removeDocumentStub
antouhou bc55f10
fix $type should be present for document factory
antouhou 2356e8d
fixed duplicate validation error with $ownerId
QuantumExplorer d09023e
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer 945bf15
fixes
QuantumExplorer 3949de7
test(wasm-dpp): fix state transition facade validation tests
markin-io 29b8042
clean recursive
QuantumExplorer 452cbc3
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
markin-io 850227e
fix(rs-dpp): use to_cleaned_object in to_buffer
markin-io 38181b4
remove values matching path
QuantumExplorer 3f796a6
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
markin-io d8a87a4
fix
QuantumExplorer 4de3d23
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
markin-io 48e1fe6
fix(rs-dpp): remove public keys signatures
markin-io 9bab7d4
fixes
QuantumExplorer 963fac8
another fix
QuantumExplorer 54b5e64
fix
QuantumExplorer f0ac157
another fix
QuantumExplorer fdc68f7
another fix
QuantumExplorer e9e237b
more logging
QuantumExplorer 8d6fa9e
added test
QuantumExplorer 0b32504
fix
QuantumExplorer 8170f31
fix
QuantumExplorer 61a8c2d
refactor(rs-dpp): use get_optional_array_slice
markin-io cc09396
test(wasm-dpp): fix Buffer byte size in validateDocumentsBatchTransit…
markin-io 1a31cec
test(wasm-dpp): fix Buffer byte size in validateDocumentsBatchTransit…
markin-io dd4dacf
another fix
QuantumExplorer 646749a
remove optional value path
QuantumExplorer 4aaa396
fix
QuantumExplorer 7a41890
fix(wasm-dpp): use to_cleaned_object in IdentityFacade validate
markin-io ed84a64
refactor(wasm-dpp): dpp rework path removal functions in to_object
markin-io 8e84332
refactor(wasm-dpp): eslint
markin-io 97c6542
renamed method
QuantumExplorer 5205383
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer bfae9c8
fixes
QuantumExplorer df23c37
test(wasm-dpp): add getIdentityUpdateTransitionFixture.js
markin-io 390eb2e
more fixes
QuantumExplorer 29b94be
Merge branch 'refactor/removeDocumentStub' of github.com:dashpay/plat…
QuantumExplorer 157e128
formatting
QuantumExplorer 7c13ffa
more refactoring
QuantumExplorer afd2bd1
more fixes
QuantumExplorer 0c51c90
tests: update document query to allow limit null
shumkov 21869d5
tests: add query document by createAt test
shumkov deb36fe
fixed test with timestamp
QuantumExplorer fc86d4c
fmt
QuantumExplorer 7e81918
fix
QuantumExplorer ccfd543
fix
QuantumExplorer 77b816b
small changes exposing verify
QuantumExplorer 83b5c04
fixes for verify
QuantumExplorer 73d2240
tests: fix document repository timestamp tests
shumkov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "properties": { | ||
| "$protocolVersion": { | ||
| "type": "integer", | ||
| "$comment": "Maximum is the latest protocol version" | ||
| }, | ||
| "$id": { | ||
| "type": "array", | ||
| "byteArray": true, | ||
| "minItems": 32, | ||
| "maxItems": 32, | ||
| "contentMediaType": "application/x.dash.dpp.identifier" | ||
| }, | ||
| "$type": { | ||
| "type": "string" | ||
| }, | ||
| "$revision": { | ||
| "type": "integer", | ||
| "minimum": 1 | ||
| }, | ||
| "$dataContractId": { | ||
| "type": "array", | ||
| "byteArray": true, | ||
| "minItems": 32, | ||
| "maxItems": 32, | ||
| "contentMediaType": "application/x.dash.dpp.identifier" | ||
| }, | ||
| "$ownerId": { | ||
| "type": "array", | ||
| "byteArray": true, | ||
| "minItems": 32, | ||
| "maxItems": 32, | ||
| "contentMediaType": "application/x.dash.dpp.identifier" | ||
| }, | ||
| "$createdAt": { | ||
| "type": "integer", | ||
| "minimum": 0 | ||
| }, | ||
| "$updatedAt": { | ||
| "type": "integer", | ||
| "minimum": 0 | ||
| } | ||
| }, | ||
| "required": [ | ||
| "$protocolVersion", | ||
| "$id", | ||
| "$type", | ||
| "$revision", | ||
| "$dataContractId", | ||
| "$ownerId" | ||
| ], | ||
| "additionalProperties": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,22 @@ | ||
| use platform_value::Value; | ||
| use serde_json::Value as JsonValue; | ||
|
|
||
| use crate::ProtocolError; | ||
|
|
||
| pub trait Convertible { | ||
| /// Returns the [`platform_value::Value`] instance on an object | ||
| fn to_object(&self) -> Result<Value, ProtocolError>; | ||
| fn to_cleaned_object(&self) -> Result<Value, ProtocolError>; | ||
| /// Returns the [`platform_value::Value`] instance on an object | ||
| fn into_object(self) -> Result<Value, ProtocolError>; | ||
| /// Returns the [`serde_json::Value`] instance that preserves the `Vec<u8>` representation | ||
| /// for Identifiers and binary data | ||
| fn to_object(&self) -> Result<JsonValue, ProtocolError>; | ||
| fn to_json_object(&self) -> Result<JsonValue, ProtocolError>; | ||
| /// Returns the [`serde_json::Value`] instance that encodes: | ||
| /// - Identifiers - with base58 | ||
| /// - Binary data - with base64 | ||
| fn to_json(&self) -> Result<JsonValue, ProtocolError>; | ||
| /// Returns the cibor-encoded bytes representation of the object. The data is prefixed by 4 bytes containing | ||
| /// Returns the cbor-encoded bytes representation of the object. The data is prefixed by 4 bytes containing | ||
| /// the Protocol Version | ||
| fn to_buffer(&self) -> Result<Vec<u8>, ProtocolError>; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Perhaps it's out of context of this refactoring, but I want to speak out load that this trait is a joke and the concept of
cleanobjects is also weird; looking at DataContract's implementation of this trait it becomes obvious that there must be two different types, dirty/clean if you want (I suppose one is input data rather than an actual data contract structure -- a good candidate for a separate type) but these magic tricks on untyped data (json/value) is something we should get rid of, what do you think about creating a ticket to get a clear view on what our entities are and possibly stop mixing them?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.
I complete agree, I had to do this in baby steps though. We will have to do a proper refactoring, but now is not the right time.
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.
Would you create a ticket for it?