watercompany / chiapos

Chia Proof of Space library
Apache License 2.0
4 stars 4 forks source link

Split Stage 1, Stage 2, Stage 3, Stage 4 apart #12

Open SkycoinSynth opened 3 years ago

SkycoinSynth commented 3 years ago

There are four stages

1> We need to serialize the state or output of "stage 1" and then be able to run "stage 2" on the "stage 1" output file.

We need to take any state in the program at stage 1 and serialize it to disc.

So that we can input that data into stage 2. And so on.

So we need to break these stages up.

Sameeranjoshi commented 3 years ago

Please provide more details/pointers, given that I am unfamiliar with code base.

SkycoinSynth commented 3 years ago

I will document it later.

Sameeranjoshi commented 3 years ago

I check a few files. There are RunPhase* functions respectively for 1,2,3,4 phases. They run a collect return values into Phase{2,3,4}Results data types.

Exception for PhaseResults is RunPhase1 as it collects data into std::vector<uint64_t> table_sizes.[1]

Now do you need this to be in a file and the phase2 should pick this file @SkycoinSynth ?

[1] https://github.com/watercompany/chiapos/blob/f7cb451b28b603a266115099b8cf59ac66f34a60/src/plotter_disk.hpp#L227

PrashanthRaju-PS commented 3 years ago

Created a pull request #46 for supporting plotting of phase-1 and phase-2 (aka stage-1 and stage-2)