Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] DPC and Ledger decoupling #272

Closed
Tracked by #233
howardwu opened this issue Jul 18, 2021 · 2 comments
Closed
Tracked by #233

[Proposal] DPC and Ledger decoupling #272

howardwu opened this issue Jul 18, 2021 · 2 comments
Assignees
Labels
staging Staging

Comments

@howardwu
Copy link
Contributor

howardwu commented Jul 18, 2021

馃挜 Proposal

Current Design

We currently implement a DPC struct that takes Components as input.

  • DPC implements DPCScheme<L: LedgerScheme>
  • Components implements DPCComponents
  • L: LedgerScheme is an associated item in all DPC instantiations

The result is that we must use DPC with DPC<Components> where L: LedgerScheme<{bind Components to LedgerScheme types}>.

Proposed Change

We decouple LedgerScheme from DPCScheme, so that an instantiated Ledger is independent. This allows us to merge DPCComponents associated items to DPCScheme, and move ledger-integrated methods in DPCScheme to LedgerScheme.

Finally, we can rename the current Components to DPC, and the current DPC to Ledger.

New Design

We implement a DPC struct that implements DPCScheme, which includes its associated types built in.

We implement a Ledger struct that implements LedgerScheme, which includes ledger-integrated methods in it.

@howardwu
Copy link
Contributor Author

One of the major benefits to this architecture will be the ability to test DPC circuits without need for a fully-instantiated ledger as we currently do in .integration/.

@howardwu howardwu self-assigned this Jul 18, 2021
@howardwu
Copy link
Contributor Author

Discussed with @weikengchen offline, sounds like we are in agreement with the benefits of the change.

I will add this to the testnet2 checklist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staging Staging
Projects
None yet
Development

No branches or pull requests

1 participant