Skip to content

Commit

Permalink
Merge pull request #517 from 0xPolygonHermez/fractasy_discontinue_for…
Browse files Browse the repository at this point in the history
…k_0_support

Discontinue fork 0 support
  • Loading branch information
fractasy authored Aug 22, 2023
2 parents 56ebf73 + 249b928 commit ddad79d
Show file tree
Hide file tree
Showing 32 changed files with 0 additions and 1,337,741 deletions.
31 changes: 0 additions & 31 deletions src/executor/executor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "executor.hpp"
#include "utils.hpp"
#include "main_sm/fork_0/main_exec_generated/main_exec_generated.hpp"
#include "main_sm/fork_0/main_exec_generated/main_exec_generated_fast.hpp"
#include "main_sm/fork_1/main_exec_generated/main_exec_generated.hpp"
#include "main_sm/fork_1/main_exec_generated/main_exec_generated_fast.hpp"
#include "main_sm/fork_2/main_exec_generated/main_exec_generated.hpp"
Expand All @@ -22,35 +20,6 @@ void Executor::process_batch (ProverRequest &proverRequest)
// Execute the Main State Machine
switch (proverRequest.input.publicInputsExtended.publicInputs.forkID)
{
case 0: // fork_0
{
/*if (config.useMainExecGenerated) // Generated code has been disabled in old forks
{
fork_0::main_exec_generated_fast(mainExecutor_fork_0, proverRequest);
}
else*/
{
zklog.info("Executor::process_batch() fork 0 native");

// Allocate committed polynomials for only 1 evaluation
void * pAddress = calloc(fork_0::CommitPols::numPols()*sizeof(Goldilocks::Element), 1);
if (pAddress == NULL)
{
zklog.error("Executor::process_batch() failed calling calloc(" + to_string(fork_0::CommitPols::pilSize()) + ")");
exitProcess();
}
fork_0::CommitPols commitPols(pAddress,1);

// This instance will store all data required to execute the rest of State Machines
fork_0::MainExecRequired required;

mainExecutor_fork_0.execute(proverRequest, commitPols.Main, required);

// Free committed polynomials address space
free(pAddress);
}
return;
}
case 1: // fork_1
{
/*if (config.useMainExecGenerated) // Generated code has been disabled in old forks
Expand Down
3 changes: 0 additions & 3 deletions src/executor/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "config.hpp"
#include "goldilocks_base_field.hpp"
#include "main_sm/fork_0/main/main_executor.hpp"
#include "main_sm/fork_1/main/main_executor.hpp"
#include "main_sm/fork_2/main/main_executor.hpp"
#include "main_sm/fork_3/main/main_executor.hpp"
Expand All @@ -29,7 +28,6 @@ class Executor
Goldilocks &fr;
const Config &config;

fork_0::MainExecutor mainExecutor_fork_0;
fork_1::MainExecutor mainExecutor_fork_1;
fork_2::MainExecutor mainExecutor_fork_2;
fork_3::MainExecutor mainExecutor_fork_3;
Expand All @@ -51,7 +49,6 @@ class Executor
Executor(Goldilocks &fr, const Config &config, PoseidonGoldilocks &poseidon) :
fr(fr),
config(config),
mainExecutor_fork_0(fr, poseidon, config),
mainExecutor_fork_1(fr, poseidon, config),
mainExecutor_fork_2(fr, poseidon, config),
mainExecutor_fork_3(fr, poseidon, config),
Expand Down
162 changes: 0 additions & 162 deletions src/main_sm/fork_0/main/context.hpp

This file was deleted.

164 changes: 0 additions & 164 deletions src/main_sm/fork_0/main/eth_opcodes.cpp

This file was deleted.

Loading

0 comments on commit ddad79d

Please sign in to comment.