From 99eb9288d484b5a2834b6a7fe890bae4c4013c7e Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 25 Oct 2023 14:41:23 -0700 Subject: [PATCH 1/5] bitwise 'Name' method in docs returns correct name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b62e1646..925024f6 100644 --- a/README.md +++ b/README.md @@ -2875,7 +2875,7 @@ func (b *BitwiseBuiltinRunner) Base() memory.Relocatable { } func (b *BitwiseBuiltinRunner) Name() string { - return "range_check" + return "bitwise" } ``` From 75b500fc5cf4e5bf08877eec0f787d11de118abb Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 25 Oct 2023 14:45:44 -0700 Subject: [PATCH 2/5] typo in `BITWISE_INPUT_CELLS_PER_INSTANCE` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 925024f6..5a0d9af2 100644 --- a/README.md +++ b/README.md @@ -2913,7 +2913,7 @@ const BIWISE_INPUT_CELLS_PER_INSTANCE = 2 func (b *BitwiseBuiltinRunner) DeduceMemoryCell(address memory.Relocatable, mem *memory.Memory) (*memory.MaybeRelocatable, error) { index := address.Offset % BITWISE_CELLS_PER_INSTANCE - if index < BIWISE_INPUT_CELLS_PER_INSTANCE { + if index < BITWISE_INPUT_CELLS_PER_INSTANCE { return nil, nil } From e1061b8553342a0964744aab7acc809e592fc65e Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 25 Oct 2023 15:18:05 -0700 Subject: [PATCH 3/5] BIWISE->BITWISE --- pkg/builtins/bitwise.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/builtins/bitwise.go b/pkg/builtins/bitwise.go index 39a9a44c..43951fd9 100644 --- a/pkg/builtins/bitwise.go +++ b/pkg/builtins/bitwise.go @@ -60,7 +60,7 @@ func (b *BitwiseBuiltinRunner) InitialStack() []memory.MaybeRelocatable { func (b *BitwiseBuiltinRunner) DeduceMemoryCell(address memory.Relocatable, mem *memory.Memory) (*memory.MaybeRelocatable, error) { index := address.Offset % BITWISE_CELLS_PER_INSTANCE - if index < BIWISE_INPUT_CELLS_PER_INSTANCE { + if index < BITWISE_INPUT_CELLS_PER_INSTANCE { return nil, nil } From 03262171c9fc11ec9e8ba5683beef213890cd256 Mon Sep 17 00:00:00 2001 From: Johann Date: Thu, 26 Oct 2023 15:26:34 -0700 Subject: [PATCH 4/5] const BIWISE->BITWISE fix --- pkg/builtins/bitwise.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/builtins/bitwise.go b/pkg/builtins/bitwise.go index 43951fd9..24069dc6 100644 --- a/pkg/builtins/bitwise.go +++ b/pkg/builtins/bitwise.go @@ -11,7 +11,7 @@ import ( const BITWISE_BUILTIN_NAME = "bitwise" const BITWISE_CELLS_PER_INSTANCE = 5 const BITWISE_TOTAL_N_BITS = 251 -const BIWISE_INPUT_CELLS_PER_INSTANCE = 2 +const BITWISE_INPUT_CELLS_PER_INSTANCE = 2 type BitwiseBuiltinRunner struct { base memory.Relocatable From 7c02d0d5006179d2203b5269fec56fe2048fe142 Mon Sep 17 00:00:00 2001 From: Johann Date: Fri, 27 Oct 2023 07:07:35 -0700 Subject: [PATCH 5/5] fix for `InputCellsPerInstance` method --- pkg/builtins/bitwise.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/builtins/bitwise.go b/pkg/builtins/bitwise.go index 24069dc6..435949a8 100644 --- a/pkg/builtins/bitwise.go +++ b/pkg/builtins/bitwise.go @@ -112,7 +112,7 @@ func (b *BitwiseBuiltinRunner) CellsPerInstance() uint { } func (b *BitwiseBuiltinRunner) InputCellsPerInstance() uint { - return BIWISE_INPUT_CELLS_PER_INSTANCE + return BITWISE_INPUT_CELLS_PER_INSTANCE } func (b *BitwiseBuiltinRunner) GetAllocatedMemoryUnits(segments *memory.MemorySegmentManager, currentStep uint) (uint, error) {