Skip to content

Commit

Permalink
Merge pull request #533 from 0xPolygonHermez/nadim-executor
Browse files Browse the repository at this point in the history
Fix Keccak executor tests
  • Loading branch information
Nadim Kobeissi authored Sep 6, 2023
2 parents 4cb1995 + 744f14c commit 92f09c0
Show file tree
Hide file tree
Showing 17 changed files with 345 additions and 725 deletions.
5 changes: 1 addition & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,7 @@ int main(int argc, char **argv)
{
// Keccak2Test();
KeccakTest();
// These tests are disabled pending review,
// as they were confirmed to not work correctly
// on August 29th, 2023. -- Nadim
// KeccakSMExecutorTest(fr, config);
KeccakSMExecutorTest(fr, config);
}

// Test Storage SM
Expand Down
9 changes: 6 additions & 3 deletions src/sm/gate/gate_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class GateConfig
uint64_t soutRef0;
uint64_t soutRefNumber;
uint64_t soutRefDistance;
uint64_t polLength;

GateConfig() :
zeroRef(0),
Expand All @@ -27,9 +28,10 @@ class GateConfig
sinRefDistance(0),
soutRef0(0),
soutRefNumber(0),
soutRefDistance(0) {};
soutRefDistance(0),
polLength(0) {};

GateConfig(uint64_t zeroRef, uint64_t slotSize, uint64_t maxRefs, uint64_t firstNextRef, uint64_t sinRef0, uint64_t sinRefNumber, uint64_t sinRefDistance, uint64_t soutRef0, uint64_t soutRefNumber, uint64_t soutRefDistance) :
GateConfig(uint64_t zeroRef, uint64_t slotSize, uint64_t maxRefs, uint64_t firstNextRef, uint64_t sinRef0, uint64_t sinRefNumber, uint64_t sinRefDistance, uint64_t soutRef0, uint64_t soutRefNumber, uint64_t soutRefDistance, uint64_t polLength) :
zeroRef(zeroRef),
slotSize(slotSize),
maxRefs(maxRefs),
Expand All @@ -39,7 +41,8 @@ class GateConfig
sinRefDistance(sinRefDistance),
soutRef0(soutRef0),
soutRefNumber(soutRefNumber),
soutRefDistance(soutRefDistance) {};
soutRefDistance(soutRefDistance),
polLength(polLength) {};

// Converts relative references to absolute references, based on the slot
inline uint64_t relRef2AbsRef (uint64_t ref, uint64_t slot)
Expand Down
Loading

0 comments on commit 92f09c0

Please sign in to comment.