Skip to content

Commit

Permalink
starknet layout
Browse files Browse the repository at this point in the history
  • Loading branch information
TAdev0 committed Sep 5, 2024
1 parent 3618459 commit a42d0da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions integration_tests/cairozero_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ func runPythonVm(testFilename, path string) (time.Duration, string, string, erro
// A file without this suffix will use the default ("plain") layout.
if strings.HasSuffix(testFilename, ".small.cairo") {
args = append(args, "--layout", "small")
} else if strings.HasSuffix(testFilename, ".starknet_without_keccak.cairo") {
args = append(args, "--layout", "starknet")
} else if strings.HasSuffix(testFilename, ".starknet_with_keccak.cairo") {
args = append(args, "--layout", "starknet_with_keccak")
}
Expand Down Expand Up @@ -321,6 +323,8 @@ func runVm(path string) (time.Duration, string, string, string, error) {
layout := "plain"
if strings.Contains(path, ".small") {
layout = "small"
} else if strings.Contains(path, ".starknet_without_keccak") {
layout = "starknet"
} else if strings.Contains(path, ".starknet_with_keccak") {
layout = "starknet_with_keccak"
}
Expand Down
1 change: 0 additions & 1 deletion pkg/vm/builtins/layouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func getStarknetLayout() Layout {
{Runner: &ECDSA{ratio: 2048}, Builtin: starknet.ECDSA},
{Runner: &Bitwise{ratio: 64}, Builtin: starknet.Bitwise},
{Runner: &EcOp{ratio: 1024, cache: make(map[uint64]fp.Element)}, Builtin: starknet.ECOP},
{Runner: &Keccak{ratio: 2048, cache: make(map[uint64]fp.Element)}, Builtin: starknet.Keccak},
{Runner: &Poseidon{ratio: 32, cache: make(map[uint64]fp.Element)}, Builtin: starknet.Poseidon},
}}
}
Expand Down

0 comments on commit a42d0da

Please sign in to comment.