Skip to content

feat(wasm-dpp) fix unused tests and tests in Document, DocumentFactory and DataContractFactory - #850

Merged
antouhou merged 10 commits into
v0.24-devfrom
feat-move-fixtures
Mar 27, 2023
Merged

feat(wasm-dpp) fix unused tests and tests in Document, DocumentFactory and DataContractFactory#850
antouhou merged 10 commits into
v0.24-devfrom
feat-move-fixtures

Conversation

@antouhou

@antouhou antouhou commented Mar 23, 2023

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Some tests for documents and data contract weren't function properly or we failing

What was done?

Fix tests; Fix some bugs in the implementation; Moved all fixtures from js-dpp to wasm-dpp

How Has This Been Tested?

Run tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

# Conflicts:
#	packages/wasm-dpp/lib/test/fixtures/getIdentityUpdateTransitionFixture.js
#	packages/wasm-dpp/lib/test/fixtures/getInstantAssetLockProofFixture.js
#	packages/wasm-dpp/test/integration/document/Document.spec.js
# Conflicts:
#	packages/rs-dpp/src/document/document_factory.rs
# Conflicts:
#	packages/wasm-dpp/lib/test/fixtures/getIdentityCreateTransitionFixture.js
#	packages/wasm-dpp/lib/test/fixtures/getIdentityFixture.js
@antouhou antouhou changed the title feat(wasm-dpp) move fixtures from js-dpp feat(wasm-dpp) fix unused tests and tests in Document, DocumentFactory and DataContractFactory Mar 27, 2023
@antouhou
antouhou marked this pull request as ready for review March 27, 2023 07:24
@antouhou
antouhou requested a review from shumkov as a code owner March 27, 2023 07:24
@antouhou
antouhou merged commit c4a4d4d into v0.24-dev Mar 27, 2023
@antouhou
antouhou deleted the feat-move-fixtures branch March 27, 2023 10:42
QuantumExplorer added a commit that referenced this pull request Sep 4, 2026
…a shared key, #850)

Pins grovedb at dashpay/grovedb#850: `PathQuery::merge` (v1) now
descends into a key another grafted branch already owns and grafts a
limited branch where the two actually diverge, instead of refusing the
collision at the first key past the common path; a lone body landing at
a merged root keeps the caps on its own branches. Composite document
queries (a page plus derived sub-queries under one merged proof) need
this: a limited page on `post` merged with a by-id fetch on `post`, or a
limited page and a limited lookup under one contract once a
cross-contract sub-query lifts the common path to the root, all collide
one level above where they diverge. Also carries #849 (flat-subtree
drop) from develop. No API change on the platform side.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
QuantumExplorer added a commit that referenced this pull request Sep 4, 2026
…a shared key, #850)

Pins grovedb at dashpay/grovedb#850: `PathQuery::merge` (v1) now
descends into a key another grafted branch already owns and grafts a
limited branch where the two actually diverge, instead of refusing the
collision at the first key past the common path; a lone body landing at
a merged root keeps the caps on its own branches. Composite document
queries (a page plus derived sub-queries under one merged proof) need
this: a limited page on `post` merged with a by-id fetch on `post`, or a
limited page and a limited lookup under one contract once a
cross-contract sub-query lifts the common path to the root, all collide
one level above where they diverge. Also carries #849 (flat-subtree
drop) from develop. No API change on the platform side.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
QuantumExplorer added a commit that referenced this pull request Sep 4, 2026
…ies under one merged proof

A feed is a page of posts and, for that page, everything a card renders:
the quoted posts, the per-post counts, the authors' profiles, the
viewer's own likes. Each is a query whose input is the page, so today a
single feed is a burst of dependent round trips. A composite query
carries the page and its sub-queries in one request and proves them
together: the server materializes the page, derives every sub-query's
`IN` clause from it (or from an earlier documents sub-query), and
`prove_query_many` merges every component into one proof over one root.

Three bound shapes and one unbound one: a by-id join (the source
property must be a `refersTo: permanentDocument`, so every derived id
resolves and the result is set-equal to the ids), a documents lookup by
an indexed property (absence inherent in the range proof; may target
another contract; limit required unless a unique index or an indexOnly
terminal already bounds it to one row per value), a grouped point-lookup
count on a countable index, and a sibling documents query. Derived
values are identifiers; the page carries an explicit limit of at most
100 and no cursor.

The verifier trusts nothing about the derivation: it bootstraps the
page (and any sub-query feeding a later binding) with a subset pass,
derives every sub-query with the same builders the server ran, merges
the same way, verifies the composition in one authoritative pass, routes
the proved entries back to their components (by path, by element kind,
and by bound-value membership), and refuses an entry no derivation asked
for, a dangling join, or a page that derives different values than the
proof covers. A page-only proof from a node ignoring the sub-queries
fails closed.

Needs grovedb #850 (limited branches graft below a shared key). A count
may not share an index path with a documents component: the count reads
the value trees the lookup descends past.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
QuantumExplorer added a commit that referenced this pull request Sep 5, 2026
QuantumExplorer added a commit that referenced this pull request Sep 5, 2026
…ies under one merged proof

A feed is a page of posts and, for that page, everything a card renders:
the quoted posts, the per-post counts, the authors' profiles, the
viewer's own likes. Each is a query whose input is the page, so today a
single feed is a burst of dependent round trips. A composite query
carries the page and its sub-queries in one request and proves them
together: the server materializes the page, derives every sub-query's
`IN` clause from it (or from an earlier documents sub-query), and
`prove_query_many` merges every component into one proof over one root.

Three bound shapes and one unbound one: a by-id join (the source
property must be a `refersTo: permanentDocument`, so every derived id
resolves and the result is set-equal to the ids), a documents lookup by
an indexed property (absence inherent in the range proof; may target
another contract; limit required unless a unique index or an indexOnly
terminal already bounds it to one row per value), a grouped point-lookup
count on a countable index, and a sibling documents query. Derived
values are identifiers; the page carries an explicit limit of at most
100 and no cursor.

The verifier trusts nothing about the derivation: it bootstraps the
page (and any sub-query feeding a later binding) with a subset pass,
derives every sub-query with the same builders the server ran, merges
the same way, verifies the composition in one authoritative pass, routes
the proved entries back to their components (by path, by element kind,
and by bound-value membership), and refuses an entry no derivation asked
for, a dangling join, or a page that derives different values than the
proof covers. A page-only proof from a node ignoring the sub-queries
fails closed.

Needs grovedb #850 (limited branches graft below a shared key). A count
may not share an index path with a documents component: the count reads
the value trees the lookup descends past.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants