Skip to content

feat(wasm-dpp): provide external entropy generator to document factory - #845

Merged
markin-io merged 4 commits into
v0.24-devfrom
feat/wasm-dpp/provide-external-entropy-generator-to-document-factory
Mar 23, 2023
Merged

markin-io merged 4 commits into
v0.24-devfrom
feat/wasm-dpp/provide-external-entropy-generator-to-document-factory

Conversation

@markin-io

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

PR addresses next issues:

  • Need to provide external entropy generator to Document Factory (needed for JS)
  • Proper error handling for entropy generator (need to know what's going on in case external generator fails to produce entropy)

What was done?

  • Return Result instead of panicking in generate() function
  • Add entropy generator as an argument to DocumentFactory
  • Refactor entropy generator file structure
  • Update JS fixture

How Has This Been Tested?

  • CI

Breaking Changes

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

@markin-io markin-io added this to the v0.24.0 milestone Mar 22, 2023

@antouhou antouhou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all good, except I'd use a generic instead of dyn Box

@markin-io
markin-io force-pushed the feat/wasm-dpp/provide-external-entropy-generator-to-document-factory branch from 3ace226 to f22a878 Compare March 23, 2023 09:26
@markin-io

Copy link
Copy Markdown
Contributor Author

Agreed to refactor Box<dyn EntropyGenerator> in a separate ticket

@markin-io
markin-io merged commit 566533d into v0.24-dev Mar 23, 2023
@markin-io
markin-io deleted the feat/wasm-dpp/provide-external-entropy-generator-to-document-factory branch March 23, 2023 11:43
QuantumExplorer added a commit that referenced this pull request Aug 31, 2026
…mit lifting

Rework on grovedb 33a3ad34 (#844/#845): the limited inner page and the
derived outer by-ids fetch are now proven as a SINGLE merged grovedb
proof — prove_query_many merges them, with the inner query's global
limit lifted into its branch's per-instance Query::limit (exact: the
branch executes once). One proof means one root by construction, so
the two-proof envelope, the verifier's root-equality check, and the
Option<outer_proof> shape are gone.

Verification becomes one pass: the caller supplies the server's
CLAIMED join values as an untrusted bootstrap hint, the verifier
re-derives the outer component from it, re-merges at the same grove
version, and runs GroveDb::verify_query — grovedb enforces the lifted
instance cap and range completeness, and the exact-set assembly
against the PROVEN join values refuses any hint lie (dropped,
injected, or substituted ids all covered by tests).

The root-hash bracket survives in a smaller role: materialize and
prove must read the same committed state or the proof's own branches
disagree; the failure is now server-side only.

ChainedProofBundle is gone; the with-proof surfaces return the merged
proof bytes. proof_path_queries is the ONE component builder both
prover and verifier call, so the merged query is byte-identical on
both sides.

Co-Authored-By: Claude Fable 5 <[email protected]>
QuantumExplorer added a commit that referenced this pull request Aug 31, 2026
…mit lifting

Rework on grovedb 33a3ad34 (#844/#845): the limited inner page and the
derived outer by-ids fetch are now proven as a SINGLE merged grovedb
proof — prove_query_many merges them, with the inner query's global
limit lifted into its branch's per-instance Query::limit (exact: the
branch executes once). One proof means one root by construction, so
the two-proof envelope, the verifier's root-equality check, and the
Option<outer_proof> shape are gone.

Verification becomes one pass: the caller supplies the server's
CLAIMED join values as an untrusted bootstrap hint, the verifier
re-derives the outer component from it, re-merges at the same grove
version, and runs GroveDb::verify_query — grovedb enforces the lifted
instance cap and range completeness, and the exact-set assembly
against the PROVEN join values refuses any hint lie (dropped,
injected, or substituted ids all covered by tests).

The root-hash bracket survives in a smaller role: materialize and
prove must read the same committed state or the proof's own branches
disagree; the failure is now server-side only.

ChainedProofBundle is gone; the with-proof surfaces return the merged
proof bytes. proof_path_queries is the ONE component builder both
prover and verifier call, so the merged query is byte-identical on
both sides.

Co-Authored-By: Claude Fable 5 <[email protected]>
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