MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 529 forks source link

Begin implementing Non-consensus node RFC #3762

Closed imeckler closed 2 years ago

imeckler commented 5 years ago

@deepthiskumar to make a list of the separate pieces that need to be implemented, then we will piece it out.

imeckler commented 4 years ago

@psteckler to do the gossip net part of this

deepthiskumar commented 4 years ago

Things to do:

imeckler commented 4 years ago

We need to replicate some computations and some networking in the browser node

Computation

Have snarky-independent versions of

Additional functionality

Networking

enolan commented 4 years ago

For fetching the current and "final" account states we need to either make syncable_ledger work on sparse ledgers or write new separate code to fetch the minimal updates necessary. Getting the entire Merkle proof for each new block is too much wasted network traffic. With a ledger depth of 20, that's 20 curve points fetched per block, or ~2k. Twice that since we want the status in two different blocks. That or we need to implement the improved Merkle storage system. I favor option 1.

psteckler commented 4 years ago

We need parameterized versions of Random_oracle and Transaction_union_payload, which are mentioned in Receipt.Chain_hash.

psteckler commented 4 years ago

Also Transaction_union_tag.

bkase commented 4 years ago

We want to prioritize some of the JS client sdk, so if we could prioritize ripping out the graph reachable from these roots it would be ideal:

psteckler commented 4 years ago

graph reachable from these roots

the first three items listed above I believe are included in that graph:

- Public_key.t and signing
- Transaction.t
- Account.t

and so far, I've been working on items related to those.

psteckler commented 4 years ago

@bkase : Nathan suggests using dune virtual libraries instead of functors. I'm trying that now, and if it works, no code changes will be needed (and we can undo the bits I've done so far).

bkase commented 4 years ago

oh wow that's nice!

psteckler commented 4 years ago

New plan: use conditional compilation to open Snark_params or some stripped-down module for nonconsensus nodes. Also use conditional compilation to include snarky-dependent code or not. Use consensus_mechanism parameter, which already exists, for that purpose.

Virtual libraries would be nice, but they require writing out interfaces, which we don't have for Snark_params (and other points of snarky contact).

psteckler commented 2 years ago

Stale.