Skip to content

Commit

Permalink
feat: support dencun hard fork (#1027)
Browse files Browse the repository at this point in the history
<!--- Please provide a general summary of your changes in the title
above -->

<!-- Give an estimate of the time you spent on this PR in terms of work
days.
Did you spend 0.5 days on this PR or rather 2 days?  --> 

Time spent on this PR: 7d

## Pull request type

<!-- Please try to limit your pull request to one type,
submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying,
or link to a relevant issue. -->

Resolves #1000 
Resolves #1006
Resolves #1006
Resolves #1038
Resolves #1039 
Resolves #1040
Resolves #1028
Resolves #914 

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

-  Added the content of the Cancun hard fork.
- 
-

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/1027)
<!-- Reviewable:end -->

---------

Co-authored-by: Clément Walter <clement0walter@gmail.com>
  • Loading branch information
enitrat and ClementWalter authored Mar 25, 2024
1 parent dd7f25b commit 471b191
Show file tree
Hide file tree
Showing 53 changed files with 2,972 additions and 2,566 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A Github token to download the CI artifacts
# Used for fetching resources in the scripts
# Used for fetching resources in the kakarot_scripts
GITHUB_TOKEN=

# Starkent Network
Expand All @@ -8,7 +8,7 @@ STARKNET_NETWORK=katana
# An infura RPC key for mainnet/testnet
INFURA_KEY=

# Account used by default in all scripts
# Account used by default in all kakarot_scripts
# Prefixed accounts {NETWORK}_ will take precedeance over the default one
MADARA_ACCOUNT_ADDRESS=0x3
MADARA_PRIVATE_KEY=0x00c1cf1490de1352865301bb8705143f3ef938f97fdf892f1090dcb5ac7bcd1d
Expand All @@ -28,7 +28,7 @@ KATANA_PRIVATE_KEY=0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24
ACCOUNT_ADDRESS=
PRIVATE_KEY=

# An EVM private to define a default EOA for EVM related scripts
# An EVM private to define a default EOA for EVM related kakarot_scripts
# This default value is Anvil first account private key
EVM_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ KKRT_SSJ_BUILD_ARTIFACT_URL = $(shell curl -L https://api.github.com/repos/kkrt-

build: check
$(MAKE) clean
poetry run python ./scripts/compile_kakarot.py
poetry run python ./kakarot_scripts/compile_kakarot.py

check:
poetry check --lock

fetch-ef-tests:
poetry run python ./scripts/ef_tests/fetch.py
poetry run python ./kakarot_scripts/ef_tests/fetch.py

# This action fetches the latest Kakarot SSJ (Cairo compiler version >=2) artifacts
# from the main branch and unzips them into the build/ssj directory.
Expand All @@ -44,7 +44,7 @@ test-end-to-end: build-sol deploy
poetry run pytest tests/end_to_end

deploy: build
poetry run python ./scripts/deploy_kakarot.py
poetry run python ./kakarot_scripts/deploy_kakarot.py

format:
trunk check --fix
Expand All @@ -58,7 +58,7 @@ clean:
mkdir -p build

check-resources:
poetry run python scripts/check_resources.py
poetry run python kakarot_scripts/check_resources.py

build-sol:
git submodule update --init --recursive
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ by running (in the ef test directory):

```bash
cargo test <test_name> --features v0 -- --nocapture
# e.g. cargo test test_sha3_d7g0v0_Shanghai --features v0 -- --nocapture
# e.g. cargo test test_sha3_d7g0v0_Cancun --features v0 -- --nocapture
```

See [this doc](./docs/general/decode_a_cairo_trace.md) to learn how to debug a
Expand All @@ -252,9 +252,9 @@ on an underlying StarknetOS network.
It is **not** a description on how to deploy a solidity contract on the Kakarot
EVM.

The [deploy script](./scripts/deploy_kakarot.py) relies on some env variables
defined in a `.env` file located at the root of the project and loaded in the
[constant file](./scripts/constants.py). To get started, just
The [deploy script](./kakarot_scripts/deploy_kakarot.py) relies on some env
variables defined in a `.env` file located at the root of the project and loaded
in the [constant file](./kakarot_scripts/constants.py). To get started, just

```bash
cp .env.example .env
Expand All @@ -264,9 +264,9 @@ The default file is self sufficient for using Kakarot with KATANA. If targeting
other networks, make sure to fill the corresponding variables.

Furthermore, if you want to run the
[check-resources](./scripts/check_resources.py) locally to check the steps usage
of your local changes in the EF tests against main and other branches, you need
to fill the following
[check-resources](./kakarot_scripts/check_resources.py) locally to check the
steps usage of your local changes in the EF tests against main and other
branches, you need to fill the following

```text
GITHUB_TOKEN=your_github_token
Expand Down
Loading

0 comments on commit 471b191

Please sign in to comment.