Skip to content

Commit

Permalink
Merge branch 'main' into feat/alchemyTokenMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikix authored Sep 11, 2023
2 parents 1804c94 + 4f17d52 commit 1dca6cb
Show file tree
Hide file tree
Showing 72 changed files with 2,287 additions and 1,135 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ KATANA_PRIVATE_KEY=0x03000018000000003000001800000000000300000000000030060018000
MADARA_ACCOUNT_ADDRESS=0x3
MADARA_PRIVATE_KEY=0x00c1cf1490de1352865301bb8705143f3ef938f97fdf892f1090dcb5ac7bcd1d

# configuration for the eoa deployer account
DEPLOYER_ACCOUNT_ADDRESS=
DEPLOYER_ACCOUNT_PRIVATE_KEY=0x0288a51c164874bb6a1ca7bd1cb71823c234a86d0f7b150d70fa8f06de645396

# Kakarot Environment
KAKAROT_HTTP_RPC_ADDRESS=0.0.0.0:3030
## check `./deployments/katana/deployments.json` after running `make devnet`
KAKAROT_ADDRESS=
PROXY_ACCOUNT_CLASS_HASH=0x4b9eef81a3f0a582dfed69be93196cedbff063e0fa206b34b4c2f06ac505f0c
PROXY_ACCOUNT_CLASS_HASH=0xba8f3f34eb92f56498fdf14ecac1f19d507dcc6859fa6d85eb8545370654bd

## configurations for testing
COMPILED_KAKAROT_PATH=lib/kakarot/build
Expand Down
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ Please check the type of change your PR introduces:

- [ ] Yes
- [ ] No

# Added changes to [`CHANGELOG.md`](../CHANGELOG.md)

- [ ] Yes
- [ ] No
78 changes: 0 additions & 78 deletions .github/labels.yml

This file was deleted.

202 changes: 101 additions & 101 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
---
name: Task - Benchmark

on:
push:
branches: [main]
name: Task - Benchmark

permissions:
deployments: write
contents: write
pull-requests: write

jobs:
benchmark:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
with:
clean: false

# install dependencies
- name: Install submodules and dependencies
run: |
git submodule update --init --recursive
sudo apt update
sudo apt install -y protobuf-compiler clang jq wget
on:
workflow_call:

- uses: actions/cache@v3
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}}

# build rpc and madara
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build RPC
run: |
cargo build --release
- name: Download Madara
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd ./lib/madara
mkdir -p target/release
cd target/release
wget https://github.com/keep-starknet-strange/madara/releases/download/v0.1.0.experimental.3/x86_64-unknown-linux-gnu-madara
chmod +x x86_64-unknown-linux-gnu-madara && mv x86_64-unknown-linux-gnu-madara madara
# Python Setup and dependencies installation
- uses: actions/setup-python@v4
with:
python-version: "3.9.13"
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}
- name: Install Poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: install kakarot python dependencies
run: |-
cd lib/kakarot
poetry install
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('./lib/kakarot/poetry.lock') }}
permissions:
deployments: write
contents: write
pull-requests: write

# benchmark rpc
- name: install benchmark projects
run: |-
cd ./benchmarking
npm i
- name: Run benchmark
run: |
cd benchmarking
./scripts/benchmark.sh
jobs:
benchmark:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
with:
clean: false

# compare benchmarks and publish
- name: Compare result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "customBiggerIsBetter"
output-file-path: ./benchmarking/reports/metrics.json
alert-threshold: "120%"
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: true
summary-always: ${{ github.ref == 'refs/heads/main' }}
comment-always: false
comment-on-alert: false
auto-push: ${{ github.ref == 'refs/heads/main' }}
# install dependencies
- name: Install submodules and dependencies
run: |
git submodule update --init --recursive
sudo apt update
sudo apt install -y protobuf-compiler clang jq wget
- uses: actions/cache@v3
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}}

# build rpc and madara
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build RPC
run: |
cargo build --release
- name: Download Madara
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd ./lib/madara
mkdir -p target/release
cd target/release
wget https://github.com/keep-starknet-strange/madara/releases/download/v0.1.0.experimental.3/x86_64-unknown-linux-gnu-madara
chmod +x x86_64-unknown-linux-gnu-madara && mv x86_64-unknown-linux-gnu-madara madara
# Python Setup and dependencies installation
- uses: actions/setup-python@v4
with:
python-version: '3.9.13'
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}
- name: Install Poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: install kakarot python dependencies
run: |-
cd lib/kakarot
poetry install
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key:
venv-${{ runner.os }}-${{ hashFiles('./lib/kakarot/poetry.lock') }}

# benchmark rpc
- name: install benchmark projects
run: |-
cd ./benchmarking
npm i
- name: Run benchmark
run: |
cd benchmarking
./scripts/benchmark.sh
# compare benchmarks and publish
- name: Compare result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'customBiggerIsBetter'
output-file-path: ./benchmarking/reports/metrics.json
alert-threshold: '120%'
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: true
summary-always: ${{ github.ref == 'refs/heads/main' }}
comment-always: false
comment-on-alert: false
auto-push: ${{ github.ref == 'refs/heads/main' }}
15 changes: 0 additions & 15 deletions .github/workflows/changelog.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/dump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Dump the Katana state into the .katana folder

on:
workflow_call:

jobs:
dump:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Load cached submodules
id: cached-submodules
uses: actions/cache@v3
with:
path: ./lib/
key: ${{ runner.os }}-submodules
- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
- name: Retrieve cached dependencies
uses: Swatinem/rust-cache@v2
- name: Generate the Katana dumped state
run: ./scripts/make_with_env.sh dump-katana
- name: Save dump as artifact
uses: actions/upload-artifact@v3
with:
name: dump-katana
path: ./.katana/
Loading

0 comments on commit 1dca6cb

Please sign in to comment.