Skip to content

Commit

Permalink
fix test, rm unused
Browse files Browse the repository at this point in the history
  • Loading branch information
StringNick committed Jun 26, 2024
1 parent d695174 commit bae87c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 142 deletions.
141 changes: 0 additions & 141 deletions src/poseidon_consts_gen.zig

This file was deleted.

1 change: 1 addition & 0 deletions src/vm/builtins/builtin_runner/builtin_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ pub const BuiltinRunner = union(BuiltinName) {
return switch (self.*) {
.Output => 0,
.SegmentArena => |*segment_arena| segment_arena.n_input_cells_per_instance,
.Poseidon => PoseidonBuiltinRunner.INPUT_CELLS_PER_POSEIDON,
inline else => |*builtin| builtin.n_input_cells,
};
}
Expand Down
4 changes: 3 additions & 1 deletion src/vm/builtins/builtin_runner/poseidon.zig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const expectEqualSlices = std.testing.expectEqualSlices;
pub const PoseidonBuiltinRunner = struct {
const Self = @This();

pub const INPUT_CELLS_PER_POSEIDON = poseidon_instance_def.INPUT_CELLS_PER_POSEIDON;

/// Base
base: usize = 0,
/// Ratio
Expand Down Expand Up @@ -153,7 +155,7 @@ pub const PoseidonBuiltinRunner = struct {

// Calculate the expected stop pointer value based on the number of used instances.
const stop_ptr = stop_pointer.offset;
if (stop_ptr != try self.getUsedInstances(segments) * self.cells_per_instance)
if (stop_ptr != try self.getUsedInstances(segments) * poseidon_instance_def.CELLS_PER_POSEIDON)
return RunnerError.InvalidStopPointer;

// Set the stop pointer and return the address of the stop pointer.
Expand Down

0 comments on commit bae87c6

Please sign in to comment.