Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Update cairo_rs_py_patch to be compatible with cairo-lang 0.11 (#439
Browse files Browse the repository at this point in the history
)
  • Loading branch information
fmoletta authored Apr 13, 2023
1 parent 75188cc commit 5d9f66e
Show file tree
Hide file tree
Showing 6 changed files with 646 additions and 459 deletions.
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ aliases:
<<: *on_master
requires:
- test_py_max
# TMP: rust vm
# - test_py_max_rust
- test_py_max_rust
- image_build
- image_build_arm

Expand Down Expand Up @@ -128,8 +127,7 @@ workflows:
test_and_publish:
jobs:
- test_py_max
# TMP: rust vm
# - test_py_max_rust
- test_py_max_rust
- image_build:
<<: *on_master
- image_build_arm:
Expand Down
4 changes: 0 additions & 4 deletions page/docs/guide/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ If you don't specify the `HOST` part, the server will indeed be available on all

## Run with the Rust implementation of Cairo VM

<!-- # TMP: rust vm -->

### ⚠️ This feature is temporarily suspended! ⚠️

By default, Devnet uses the [Python implementation](https://github.com/starkware-libs/cairo-lang/) of Cairo VM.

Using the Rust implementation brings improvement for Cairo-VM-intensive operations, but introduces its own overhead, so it may not be useful for simple contracts.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ requests = "~2.28"
isort = "^5.10.1"

[tool.poetry.group.vm.dependencies]
cairo-rs-py = "~0.1.1"
cairo-rs-py = "~0.2.0"

[tool.isort]
profile = "black"
Expand Down
10 changes: 4 additions & 6 deletions starknet_devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,14 @@ def simpler_copy(self, memo): # pylint: disable=unused-argument

def _patch_cairo_vm():
"""Apply cairo-rs-py monkey patch"""
# TMP: rust vm
# from starknet_devnet.cairo_rs_py_patch import cairo_rs_py_monkeypatch

# cairo_rs_py_monkeypatch()
from starknet_devnet.cairo_rs_py_patch import cairo_rs_py_monkeypatch

# from .util import warn
cairo_rs_py_monkeypatch()

# warn("Using Cairo VM: Rust")
from .util import warn

sys.exit("Rust Cairo VM is temporarily not available")
warn("Using Cairo VM: Rust")


_VM_VAR = "STARKNET_DEVNET_CAIRO_VM"
Expand Down
Loading

0 comments on commit 5d9f66e

Please sign in to comment.