-
Notifications
You must be signed in to change notification settings - Fork 35
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
Refactor backend #144
Comments
Yes, you are correct. The Snapshot API that follows the original plan largely mirrors the CLI app from the PoC - summa-playground.
Separating The term struct Round {
snapshot: Snapshot,
signer: SummaSigner,
}
struct Snapshot {
mst: MerkleSumTree,
trusted_setup: [SetupArtifcats; 2],
} generic consts are ignored in above. |
struct Round {
snapshot: Snapshot,
signer: SummaSigner,
}
struct Snapshot {
mst: MerkleSumTree,
trusted_setup: [SetupArtifcats; 2],
} I like this. We can go ahead. Also, all the core methods run by the CEX should be on Round namely:
|
As described in the blogpost, the
AddressOwnership
part and theRound
part should be two separate (and asynchronous) steps.summa-solvency/backend/src/apis/snapshot.rs
Lines 25 to 29 in 90c4242
In particular,
proof_of_address_ownership
should be independent from a Snapshot.EDIT: As I was reviewing #141 I noticed that
Snapshot
andSummaSigner
are completely independent and do not talk to each other. Snapshot APIs was originally planned to be the entry point for a user of the backend, but actually, they cannot do much with that as they cannot interact with the contract!Following the description and the naming in the blogpost, I think we should have two high-level classes:
AddressOwnership
andRound
.AddressOwnership
should be used to submit proof of solvency to the Smart ContractRound
should be used to:The goal should be to allow the user (exchange) of our library to fully complete the flow described in the blogpost
The text was updated successfully, but these errors were encountered: