diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 0000000000..d0cb96957b --- /dev/null +++ b/.clippy.toml @@ -0,0 +1,6 @@ +# Place configuration for clippy lints here, when applicable (lints that can be configured +# state so in clippy's documentation). +# Note: only lint configurations can be placed here, lints must be placed in `.cargo/config.toml`. + +allow-unwrap-in-tests = true +enum-variant-size-threshold = 500 diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..4431bfca82 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +/data +/deployments +/logs +/target +.git +!crates/papyrus_load_test/resources diff --git a/.github/.codecov.yml b/.github/.codecov.yml new file mode 100644 index 0000000000..3a3400e09c --- /dev/null +++ b/.github/.codecov.yml @@ -0,0 +1,16 @@ +ignore: + - "crates/**/*test*.rs" +coverage: + status: + project: + default: + target: auto # set the target coverage to the value of the parent commit + threshold: 10% # pct of drop in coverage that is still considered as success + informational: true # if true does not fail the CI is coverage is bellow the target value + only_pulls: true # run only on PRs + patch: + default: + target: 100% + threshold: 0% + informational: true + only_pulls: true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..9304789c01 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +.github/ @dan-starkware diff --git a/.github/ISSUE_TEMPLATE/01_BUG_REPORT.md b/.github/ISSUE_TEMPLATE/01_BUG_REPORT.md new file mode 100644 index 0000000000..aec8127497 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01_BUG_REPORT.md @@ -0,0 +1,37 @@ +--- +name: Bug Report +about: Create a report to help Papyrus to improve +title: "bug: " +labels: "bug" +assignees: "" +--- + +# Bug Report + +**Papyrus version:** + + + +**Current behavior:** + + + +**Expected behavior:** + + + +**Steps to reproduce:** + + + +**Related code:** + + + +``` +insert short code snippets here +``` + +**Other information:** + + diff --git a/.github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md new file mode 100644 index 0000000000..571914791b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md @@ -0,0 +1,35 @@ +--- +name: Feature Request +about: Suggest an idea for this project +title: "feat: " +labels: "enhancement" +assignees: "" +--- + +# Feature Request + +**Describe the Feature Request** + + + +**Describe Preferred Solution** + + + +**Describe Alternatives** + + + +**Related Code** + + + +**Additional Context** + + + +**If the feature request is approved, would you be willing to submit a PR?** +_(Help can be provided if you need assistance submitting a PR)_ + +- [ ] Yes +- [ ] No diff --git a/.github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md b/.github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md new file mode 100644 index 0000000000..bcd6cb773d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md @@ -0,0 +1,7 @@ +--- +name: Codebase improvement +about: Provide your feedback for the existing codebase. Suggest a better solution for algorithms, development tools, etc. +title: "dev: " +labels: "enhancement" +assignees: "" +--- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..8a760c4589 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +--- +blank_issues_enabled: false +contact_links: + - name: Papyrus Community Support + url: https://github.com/starkware-libs/papyrus/discussions + about: Please ask and answer questions here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..f4b08c2eaf --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,34 @@ +## Pull Request type + +Please check the type of change your PR introduces: + +- [ ] Bugfix +- [ ] 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? + + + +Issue Number: N/A + +## What is the new behavior? + + + +- + +## Does this introduce a breaking change? + +- [ ] Yes +- [ ] No + + + +## Other information + + diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000000..6fc63e100f --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,78 @@ +--- +- name: "breaking-change" + color: ee0701 + description: "A change that changes the API or breaks backward compatibility for users." +- name: "bugfix" + color: ee0701 + description: "Inconsistencies or issues which will cause a problem for users or implementors." +- name: "documentation" + color: 0052cc + description: "Solely about the documentation of the project." +- name: "enhancement" + color: 1d76db + description: "Enhancement of the code, not introducing new features." +- name: "refactor" + color: 1d76db + description: "Updating the code with simpler, easier to understand or more efficient syntax or methods, but not introducing new features." +- name: "performance" + color: 1d76db + description: "Improving performance of the project, not introducing new features." +- name: "new-feature" + color: 0e8a16 + description: "New features or options." +- name: "maintenance" + color: 2af79e + description: "Generic maintenance tasks." +- name: "ci" + color: 1d76db + description: "Work that improves the continuous integration." +- name: "dependencies" + color: 1d76db + description: "Change in project dependencies." + +- name: "in-progress" + color: fbca04 + description: "Issue is currently being worked on by a developer." +- name: "stale" + color: fef2c0 + description: "No activity for quite some time." +- name: "no-stale" + color: fef2c0 + description: "This is exempt from the stale bot." + +- name: "security" + color: ee0701 + description: "Addressing a vulnerability or security risk in this project." +- name: "incomplete" + color: fef2c0 + description: "Missing information." +- name: "invalid" + color: fef2c0 + description: "This is off-topic, spam, or otherwise doesn't apply to this project." + +- name: "beginner-friendly" + color: 0e8a16 + description: "Good first issue for people wanting to contribute to this project." +- name: "help-wanted" + color: 0e8a16 + description: "We need some extra helping hands or expertise in order to resolve this!" + +- name: "priority-critical" + color: ee0701 + description: "Must be addressed as soon as possible." +- name: "priority-high" + color: b60205 + description: "After critical issues are fixed, these should be dealt with before any further issues." +- name: "priority-medium" + color: 0e8a16 + description: "This issue may be useful, and needs some attention." +- name: "priority-low" + color: e4ea8a + description: "Nice addition, maybe... someday..." + +- name: "major" + color: b60205 + description: "This PR causes a major bump in the version number." +- name: "minor" + color: 0e8a16 + description: "This PR causes a minor bump in the version number." diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml new file mode 100644 index 0000000000..f10d3c0487 --- /dev/null +++ b/.github/workflows/blockifier_ci.yml @@ -0,0 +1,100 @@ +name: Blockifier-CI + +on: + push: + branches: + - main + - main-v[0-9].** + tags: + - v[0-9].** + paths: + - 'crates/blockifier/**' + + pull_request: + types: + - opened + - reopened + - synchronize + - auto_merge_enabled + - edited + paths: + - 'crates/blockifier/**' + +jobs: + featureless-build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + - run: cargo build -p blockifier + - run: cargo test -p blockifier + + run-python-tests: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + - run: | + python -m pip install --upgrade pip + pip install pytest + - run: pytest scripts/merge_paths_test.py + + native-blockifier-artifacts-push: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + + - name: Build native blockifier + run: ./build_native_blockifier.sh + + # Commit hash on pull request event would be the head commit of the branch. + - name: Get commit hash prefix for PR update + if: ${{ github.event_name == 'pull_request' }} + env: + COMMIT_SHA: ${{ github.event.pull_request.head.sha }} + run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV + + # On push event (to main, for example) we should take the commit post-push. + - name: Get commit hash prefix for merge + if: ${{ github.event_name != 'pull_request' }} + env: + COMMIT_SHA: ${{ github.event.after }} + run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV + + # Rename is required; see https://pyo3.rs/v0.19.2/building_and_distribution#manual-builds. + - name: Rename shared object + run: | + mv \ + target/release/libnative_blockifier.so \ + target/release/native_blockifier.pypy39-pp73-x86_64-linux-gnu.so + + - name: Authenticate with GCS + uses: "google-github-actions/auth@v2" + with: + credentials_json: ${{ secrets.SA_NATIVE_BLOCKIFIER_ARTIFACTS_BUCKET_WRITER_ACCESS_KEY }} + + - name: Upload binary to GCP + id: upload_file + uses: "google-github-actions/upload-cloud-storage@v2" + with: + path: "target/release/native_blockifier.pypy39-pp73-x86_64-linux-gnu.so" + destination: "native_blockifier_artifacts/${{ env.SHORT_HASH }}/release/" + + # Keep the name 'udeps' to match original action name, so we don't need to define specific branch + # rules on Github for specific version branches. + udeps: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run Machete (detect unused dependencies) + uses: bnjbvr/cargo-machete@main diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml new file mode 100644 index 0000000000..c4111b1118 --- /dev/null +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -0,0 +1,41 @@ +name: Blockifier-Compiled-Cairo + +on: + push: + branches: + - main + tags: + - v[0-9].** + paths: + - 'crates/blockifier/feature_contracts/cairo0/**' + pull_request: + types: + - opened + - reopened + - synchronize + paths: + - 'crates/blockifier/feature_contracts/cairo0/**' + +jobs: + verify_cairo_file_dependencies: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + + # Setup pypy and link to the location expected by .cargo/config.toml. + - uses: actions/setup-python@v5 + id: setup-pypy + with: + python-version: 'pypy3.9' + - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 + - env: + LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin + run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - run: + pip install -r crates/blockifier/tests/requirements.txt; + cargo test verify_feature_contracts -- --include-ignored diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml new file mode 100644 index 0000000000..fd5541d041 --- /dev/null +++ b/.github/workflows/blockifier_coverage.yml @@ -0,0 +1,44 @@ +name: Blockifier-Coverage + +on: + pull_request: + paths: + - 'crates/blockifier/**' + push: + paths: + - 'crates/blockifier/**' + +jobs: + coverage: + runs-on: ubuntu-20.04 + env: + CARGO_TERM_COLOR: always + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + + # Setup pypy and link to the location expected by .cargo/config.toml. + - uses: actions/setup-python@v5 + id: setup-pypy + with: + python-version: 'pypy3.9' + - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 + - env: + LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin + run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + # - name: Generate code coverage + # run: cargo llvm-cov --codecov --output-path codecov.json + # env: + # SEED: 0 + # - name: Upload coverage to Codecov + # uses: codecov/codecov-action@v3 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} + # verbose: true + # fail_ci_if_error: true diff --git a/.github/workflows/blockifier_post-merge.yml b/.github/workflows/blockifier_post-merge.yml new file mode 100644 index 0000000000..4de0e4e9a9 --- /dev/null +++ b/.github/workflows/blockifier_post-merge.yml @@ -0,0 +1,32 @@ +name: Blockifier-Post-Merge + +on: + pull_request: + types: + - closed + paths: + - 'crates/blockifier/**' +jobs: + if_merged: + if: github.event.pull_request.merged == true + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + + # Setup pypy and link to the location expected by .cargo/config.toml. + - uses: actions/setup-python@v5 + id: setup-pypy + with: + python-version: 'pypy3.9' + - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 + - env: + LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin + run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - run: | + pip install -r crates/blockifier/tests/requirements.txt + cargo test -- --include-ignored diff --git a/.github/workflows/clean_stale_prs.yml b/.github/workflows/clean_stale_prs.yml new file mode 100644 index 0000000000..8d4efa091a --- /dev/null +++ b/.github/workflows/clean_stale_prs.yml @@ -0,0 +1,44 @@ +--- +name: Clean-Stale-PRs + +on: + schedule: + - cron: "0 8 * * *" + workflow_dispatch: + +jobs: + stale: + name: šŸ§¹ Clean up stale issues and PRs + runs-on: ubuntu-latest + steps: + - name: šŸš€ Run stale + uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 30 + days-before-close: 7 + remove-stale-when-updated: true + stale-issue-label: "stale" + exempt-issue-labels: "no-stale,help-wanted" + stale-issue-message: > + There hasn't been any activity on this issue recently, and in order + to prioritize active issues, it will be marked as stale. + + Please make sure to update to the latest version and + check if that solves the issue. Let us know if that works for you + by leaving a šŸ‘ + + Because this issue is marked as stale, it will be closed and locked + in 7 days if no further activity occurs. + + Thank you for your contributions! + stale-pr-label: "stale" + exempt-pr-labels: "no-stale" + stale-pr-message: > + There hasn't been any activity on this pull request recently, and in + order to prioritize active work, it has been marked as stale. + + This PR will be closed and locked in 7 days if no further activity + occurs. + + Thank you for your contributions! diff --git a/.github/workflows/committer_ci.yml b/.github/workflows/committer_ci.yml new file mode 100644 index 0000000000..35511cb264 --- /dev/null +++ b/.github/workflows/committer_ci.yml @@ -0,0 +1,142 @@ +name: Committer-CI + +on: + push: + branches: + - main + - main-v[0-9].** + tags: + - v[0-9].** + paths: + - 'crates/committer/**' + - 'crates/committer_cli/**' + + pull_request: + types: + - opened + - reopened + - synchronize + - auto_merge_enabled + - edited + paths: + - 'crates/committer/**' + - 'crates/committer_cli/**' + +jobs: + run-regression-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - id: auth + uses: "google-github-actions/auth@v2" + with: + credentials_json: ${{ secrets.COMMITER_PRODUCTS_EXT_WRITER_JSON }} + - uses: 'google-github-actions/setup-gcloud@v2' + - run: echo "BENCH_INPUT_FILES_PREFIX=$(cat ./crates/committer_cli/src/tests/flow_test_files_prefix)" >> $GITHUB_ENV + - run: gcloud storage cp -r gs://committer-testing-artifacts/$BENCH_INPUT_FILES_PREFIX/* ./crates/committer_cli/benches + - run: cargo test --release -- --include-ignored test_regression + + benchmarking: + runs-on: ubuntu-latest + steps: + # Checkout the base branch to get the old code. + - uses: actions/checkout@v4 + with: + ref: ${{ github.base_ref }} + - uses: Swatinem/rust-cache@v2 + + # Download the old benchmark inputs. + - id: auth + uses: "google-github-actions/auth@v2" + with: + credentials_json: ${{ secrets.COMMITER_PRODUCTS_EXT_WRITER_JSON }} + - uses: 'google-github-actions/setup-gcloud@v2' + - run: echo "OLD_BENCH_INPUT_FILES_PREFIX=$(cat ./crates/committer_cli/src/tests/flow_test_files_prefix)" >> $GITHUB_ENV + - run: gcloud storage cp -r gs://committer-testing-artifacts/$OLD_BENCH_INPUT_FILES_PREFIX/* ./crates/committer_cli/benches + + # List the existing benchmarks. + - run: | + cargo bench -- --list | grep ': benchmark$' | sed -e "s/: benchmark$//" > benchmarks_list.txt + + # Benchmark the old code. + - run: cargo bench + + # Backup the downloaded files to avoid re-downloading them if they didn't change (overwritten by checkout). + - run: mv ./crates/committer_cli/benches/tree_flow_inputs.json ./crates/committer_cli/benches/tree_flow_inputs.json_bu + - run: mv ./crates/committer_cli/benches/committer_flow_inputs.json ./crates/committer_cli/benches/committer_flow_inputs.json_bu + + # Checkout the new code. + - uses: actions/checkout@v4 + with: + clean: false + - run: echo "NEW_BENCH_INPUT_FILES_PREFIX=$(cat ./crates/committer_cli/src/tests/flow_test_files_prefix)" >> $GITHUB_ENV + + # Input files didn't change. + - if: env.OLD_BENCH_INPUT_FILES_PREFIX == env.NEW_BENCH_INPUT_FILES_PREFIX + run: | + mv ./crates/committer_cli/benches/tree_flow_inputs.json_bu ./crates/committer_cli/benches/tree_flow_inputs.json + mv ./crates/committer_cli/benches/committer_flow_inputs.json_bu ./crates/committer_cli/benches/committer_flow_inputs.json + + # Input files did change, download new inputs. + - if: env.OLD_BENCH_INPUT_FILES_PREFIX != env.NEW_BENCH_INPUT_FILES_PREFIX + run: | + gcloud storage cp -r gs://committer-testing-artifacts/$NEW_BENCH_INPUT_FILES_PREFIX/* ./crates/committer_cli/benches + + # Benchmark the new code, splitting the benchmarks, and prepare the results for posting a comment. + - run: bash ./crates/committer_cli/benches/bench_split_and_prepare_post.sh benchmarks_list.txt bench_new.txt + + - run: echo BENCHES_RESULT=$(cat bench_new.txt) >> $GITHUB_ENV + + # Post comment in case of performance regression or improvement. + - run: npm install fs + - if: contains(env.BENCHES_RESULT, 'regressed') || contains(env.BENCHES_RESULT, 'improved') + uses: actions/github-script@v6 + with: + script: | + const fs = require('fs') + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: fs.readFileSync('bench_new.txt', 'utf8'), + path: 'Commits' + }) + + gcs-push: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + # Commit hash on pull request event would be the head commit of the branch. + - name: Get commit hash prefix for PR update + if: ${{ github.event_name == 'pull_request' }} + env: + COMMIT_SHA: ${{ github.event.pull_request.head.sha }} + run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV + + # On push event (to main, for example) we should take the commit post-push. + - name: Get commit hash prefix for merge + if: ${{ github.event_name != 'pull_request' }} + env: + COMMIT_SHA: ${{ github.event.after }} + run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV + + - name: Build CLI binary + run: cargo build -p committer_cli -r --bin committer_cli --target-dir CLI_TARGET + + - id: auth + uses: "google-github-actions/auth@v2" + with: + credentials_json: ${{ secrets.COMMITER_PRODUCTS_EXT_WRITER_JSON }} + + - name: Upload binary to GCP + id: upload_file + uses: "google-github-actions/upload-cloud-storage@v2" + with: + path: "CLI_TARGET/release/committer_cli" + destination: "committer-products-external/${{ env.SHORT_HASH }}/release/" \ No newline at end of file diff --git a/.github/workflows/lock_closed_prs.yml b/.github/workflows/lock_closed_prs.yml new file mode 100644 index 0000000000..f097fc6306 --- /dev/null +++ b/.github/workflows/lock_closed_prs.yml @@ -0,0 +1,32 @@ +--- +name: Lock-Closed-Issues + +on: + schedule: + - cron: "0 9 * * *" + workflow_dispatch: + +jobs: + lock: + name: šŸ”’ Lock closed issues and PRs + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v2.0.3 + with: + github-token: ${{ github.token }} + issue-lock-inactive-days: "30" + issue-lock-reason: "" + issue-comment: > + Issue closed and locked due to lack of activity. + + If you encounter this same issue, please open a new issue and refer + to this closed one. + pr-lock-inactive-days: "1" + pr-lock-reason: "" + pr-comment: > + Pull Request closed and locked due to lack of activity. + + If you'd like to build on this closed PR, you can clone it using + this method: https://stackoverflow.com/a/14969986 + + Then open a new PR, referencing this closed PR in your message. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..3efec85a49 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,141 @@ +name: Main-CI-Flow + +on: + push: + branches: + - main + - main-v[0-9].** + tags: + - v[0-9].** + + pull_request: + types: + - opened + - reopened + - synchronize + - auto_merge_enabled + - edited + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install commitlint + run: npm install --global @commitlint/cli @commitlint/config-conventional + + - name: Validate PR commits with commitlint + if: github.event_name == 'pull_request' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main')) + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: commitlint --from "$BASE_SHA" --to "$HEAD_SHA" --verbose + + - name: Validate PR title with commitlint + if: github.event_name != 'merge_group' && github.event_name != 'push' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main')) + env: + TITLE: ${{ github.event.pull_request.title }} + run: echo "$TITLE" | commitlint --verbose + + format: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + components: rustfmt + toolchain: nightly-2024-04-29 + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + - run: scripts/rust_fmt.sh --check + + clippy: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: Noelware/setup-protoc@1.1.0 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + + # Setup pypy and link to the location expected by .cargo/config.toml. + - uses: actions/setup-python@v5 + id: setup-pypy + with: + python-version: 'pypy3.9' + - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 + - env: + LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin + run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + - run: scripts/clippy.sh + + run-tests: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + with: + # Fetch the entire history. + fetch-depth: 0 + - uses: dtolnay/rust-toolchain@stable + - uses: Noelware/setup-protoc@1.1.0 + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v0-rust-ubuntu-20.04" + + # Setup pypy and link to the location expected by .cargo/config.toml. + - uses: actions/setup-python@v5 + id: setup-pypy + with: + python-version: 'pypy3.9' + - run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 + - env: + LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin + run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + - name: "Run tests pull request" + if: github.event_name == 'pull_request' + run: | + python3 -m venv ci + ci/bin/pip install -r scripts/requirements.txt + ci/bin/python scripts/run_tests.py --changes_only --commit_id ${{ github.event.pull_request.base.sha }} + ci/bin/python scripts/run_tests.py --changes_only --concurrency --commit_id ${{ github.event.pull_request.base.sha }} + env: + SEED: 0 + + - name: "Run tests on push" + if: github.event_name == 'push' + # TODO: Better support for running tests on push. + run: | + python3 -m venv ci + ci/bin/pip install -r scripts/requirements.txt + ci/bin/python scripts/run_tests.py + ci/bin/python scripts/run_tests.py --concurrency + env: + SEED: 0 + + machete: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run Machete (detect unused dependencies) + uses: bnjbvr/cargo-machete@main + + check: + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: "-D warnings" + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: Noelware/setup-protoc@1.1.0 + with: + version: ${{env.PROTOC_VERSION}} + - run: cargo check --workspace -r --all-features diff --git a/.github/workflows/papyrus/helm-install.yml b/.github/workflows/papyrus/helm-install.yml new file mode 100644 index 0000000000..e06b2ca832 --- /dev/null +++ b/.github/workflows/papyrus/helm-install.yml @@ -0,0 +1,58 @@ +# A simple workflow which deploys the papyrus helm chart to a gke cluster, waits for the pod to be +# ready and then deletes the release. +name: Papyrus-Helm-Install + +on: + workflow_dispatch: + pull_request: + branches: + - main + paths: + - deployments/** + - config/papyrus/default_config.json + - .github/workflows/papyrus/helm-install.yml + +jobs: + deploy-teardown: + runs-on: ubuntu-latest + permissions: + contents: "read" + id-token: "write" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set a unique run identifier + run: echo "UNIQE_ID=${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV + + - id: "auth" + name: "Authenticate to Google Cloud" + uses: "google-github-actions/auth@v1" + with: + credentials_json: "${{ secrets.GOOGLE_CI_SA_CREDENTIALS }}" + + - id: "get-credentials" + name: Get GKE credentials + uses: "google-github-actions/get-gke-credentials@v1" + with: + cluster_name: "${{ secrets.GKE_CI_CLUSTER_NAME }}" + location: "${{ secrets.GKE_CI_CLUSTER_REGION }}" + + - id: "helm-install" + name: Deploy to Kubernetes using helm + run: | + helm upgrade --install papyrus-${UNIQE_ID} deployments/helm/ \ + --namespace papyrus \ + --values deployments/helm/CI/values.yaml \ + --set base_layer_node_url=${{ secrets.CI_BASE_LAYER_NODE_URL }} \ + --create-namespace + + - name: Wait for papyrus pods to be ready + run: kubectl --namespace papyrus rollout status deployment papyrus-${UNIQE_ID} --timeout 5m + + - name: Clean the deployment + if: always() + run: | + chmod 600 "$KUBECONFIG" + helm uninstall --namespace papyrus papyrus-${UNIQE_ID} diff --git a/.github/workflows/papyrus_benchmark.yaml b/.github/workflows/papyrus_benchmark.yaml new file mode 100644 index 0000000000..b7912e4957 --- /dev/null +++ b/.github/workflows/papyrus_benchmark.yaml @@ -0,0 +1,57 @@ +name: Papyrus-Benchmarks + +on: + workflow_dispatch: + # TODO: Uncomment and run this automatically when the storage benchmark is fixed. + # push: + # branches: [main] + +jobs: + storage-benchmark: + runs-on: ubuntu-latest + permissions: + contents: "write" + id-token: "write" + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - id: "auth" + name: "Authenticate to Google Cloud" + uses: "google-github-actions/auth@v1" + with: + credentials_json: "${{ secrets.GOOGLE_CI_SA_CREDENTIALS }}" + + - id: "get-credentials" + name: Get GKE credentials + uses: "google-github-actions/get-gke-credentials@v1" + with: + cluster_name: "${{ secrets.GKE_CI_CLUSTER_NAME }}" + location: "${{ secrets.GKE_CI_CLUSTER_REGION }}" + + - name: Run benchmark test + run: sh -c "deployments/storage-benchmark/run_benchmark.bash 5m" + + - name: Download previous benchmark data + uses: actions/cache@v4 + with: + path: ./cache + key: ${{ runner.os }}-benchmark + + # Run `github-action-benchmark` action + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + name: "Papyrus storage benchmark" + # What benchmark tool the output.txt came from + tool: 'customSmallerIsBetter' + # Where the output from the benchmark tool is stored + output-file-path: output.txt + + # Push to gh-pages branch + - name: Push benchmark result + run: | + git switch gh-pages + git push https://github.com/starkware-libs/papyrus.git gh-pages:gh-pages --no-verify + git checkout - diff --git a/.github/workflows/papyrus_ci.yml b/.github/workflows/papyrus_ci.yml new file mode 100644 index 0000000000..b3b8b1f7c6 --- /dev/null +++ b/.github/workflows/papyrus_ci.yml @@ -0,0 +1,179 @@ +name: Papyrus-CI + +on: + push: + branches: [main] + paths: + - 'crates/papyrus**/**' + + pull_request: + types: + - opened + - reopened + - synchronize + - auto_merge_enabled + - edited # for when the PR title is edited + paths: + - 'crates/papyrus**/**' + + merge_group: + types: [checks_requested] + +env: + PROTOC_VERSION: v25.1 + +jobs: + executable-run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: Noelware/setup-protoc@1.1.0 + with: + version: ${{env.PROTOC_VERSION}} + - name: Build node + run: | + mkdir data + cargo build -r + + - name: Run executable + run: > + target/release/papyrus_node --base_layer.node_url ${{ secrets.CI_BASE_LAYER_NODE_URL }} + & sleep 30 ; kill $! + + executable-run-no-rpc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: Noelware/setup-protoc@1.1.0 + with: + version: ${{env.PROTOC_VERSION}} + - name: Build node + run: | + mkdir data + cargo build -r --no-default-features + + - name: Run executable + run: > + target/release/papyrus_node --base_layer.node_url ${{ secrets.CI_BASE_LAYER_NODE_URL }} + & sleep 30 ; kill $! + + integration-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: Noelware/setup-protoc@1.1.0 + with: + version: ${{env.PROTOC_VERSION}} + - run: > + cargo test -r + --test latency_histogram + --test gateway_integration_test + --test feeder_gateway_integration_test + -- --include-ignored --skip test_gw_integration_testnet; + cargo run -r -p papyrus_node --bin central_source_integration_test --features="futures-util tokio-stream" + + test-no-rpc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: Noelware/setup-protoc@1.1.0 + + - run: | + cargo test -p papyrus_node --no-default-features + env: + SEED: 0 + + doc: + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: "-D warnings" + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: Noelware/setup-protoc@1.1.0 + with: + version: ${{env.PROTOC_VERSION}} + - run: cargo doc --workspace -r --document-private-items --no-deps + + codecov: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Set-Up + run: | + sudo apt-get update + sudo apt-get install -y clang llvm libudev-dev + - uses: Noelware/setup-protoc@1.1.0 + with: + version: ${{env.PROTOC_VERSION}} + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - uses: Swatinem/rust-cache@v2 + - run: npm install -g ganache@7.4.3 + - name: Coverage + run: cargo llvm-cov --codecov -r --output-path codecov.json + env: + SEED: 0 + - name: Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + fail_ci_if_error: true + version: "v0.1.15" + + check-starknet_api-dependency: + runs-on: ubuntu-latest + if: github.base_ref == 'main' # this step is only run if the pr is to the main branch + steps: + - uses: actions/checkout@v4 + - run: sudo apt-get install jq + - run: ./check_starknet_api_version_dependency.sh # this script checks that if the starknet_api dependency is by git rev then this rev (commit) is on main + + build-papyrus-utilities-image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build Papyrus utilites docker image + uses: docker/build-push-action@v3.2.0 + continue-on-error: true # ignore the failure of a step and avoid terminating the job. + with: + push: false + context: . + file: papyrus_utilities.Dockerfile + cache-from: type=gha,scope=buildkit-ci + cache-to: type=gha,mode=max,scope=buildkit-ci + + random-table-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # run this job only if the path 'crates/papyrus_storage/src/db/**' is changed, because it takes around 2 minutes. + - uses: dorny/paths-filter@v3 + id: changes + with: + # The 'base' and 'ref' parameters are set to be able to run the job in a 'merge_group' event. in a 'pull_request' event + # those parameters are ignored. + base: ${{ github.event.merge_group.base_ref}} + ref: ${{ github.event.merge_group.head_ref }} + filters: | + target_directory: + - 'crates/papyrus_storage/src/db/**' + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + # repeat this job 32 times. this is a random test for part of the code that may cause a corrupted database. + - run: for run in {1..32}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done + if: steps.changes.outputs.target_directory == 'true' diff --git a/.github/workflows/papyrus_docker-publish.yml b/.github/workflows/papyrus_docker-publish.yml new file mode 100644 index 0000000000..53c54d3047 --- /dev/null +++ b/.github/workflows/papyrus_docker-publish.yml @@ -0,0 +1,70 @@ +name: Papyrus-Docker-Publish + +on: + workflow_dispatch: + push: + branches: [main] + tags: ["v*.*.*"] + paths: + - 'crates/papyrus**/**' + + pull_request: + paths: + - 'crates/papyrus**/**' + +env: + REGISTRY: ghcr.io + REPO_NAME: ${{ github.repository }} + +jobs: + docker-build-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Not required but recommended - enables build multi-platform images, export cache, etc + # Also workaround for: https://github.com/docker/build-push-action/issues/461 + # https://github.com/docker/setup-buildx-action + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2.2.1 + + # Login to a Docker registry except on PR + # https://github.com/docker/login-action + - name: Login to registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v2.1.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.GHCR_USERNAME }} + password: ${{ secrets.GHCR_TOKEN }} + logout: true + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v4.1.1 + with: + images: ${{ env.REGISTRY }}/${{ env.REPO_NAME }} + tags: | + type=semver,pattern={{raw}} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=ref,event=pr + # set `dev` tag for the default branch (`main`). + type=raw,value=dev,enable={{is_default_branch}} + type=raw,value={{branch}}{{tag}}-{{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} + + # Build and push Docker image with Buildx + # https://github.com/docker/build-push-action + - name: Build and push Docker image + uses: docker/build-push-action@v3.2.0 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/papyrus_nightly-tests-call.yml b/.github/workflows/papyrus_nightly-tests-call.yml new file mode 100644 index 0000000000..afdc528be0 --- /dev/null +++ b/.github/workflows/papyrus_nightly-tests-call.yml @@ -0,0 +1,60 @@ +name: Papyrus-Nightly-Tests-Call + +on: + workflow_call: + inputs: + os: + required: true + type: string + secrets: + INTEGRATION_TESTNET_NODE_URL: + required: true + INTEGRATION_TESTNET_SENDER_PRIVATE_KEY: + required: true + SLACK_BOT_TOKEN: + required: true + SLACK_ALERT_CHANNEL: + required: true + +jobs: + GW-integration-test-call: + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: sudo apt update; sudo apt -y install libclang-dev + # Install libclang-dev that is not a part of the ubuntu vm in github actions. + if: runner.os == 'Linux' + - name: Run gateway_integration_test. + id: run_test + # Workflow steps exit upon failure of a subcommand (running `set -e` implicitly before the + # run). As we want to keep running this step after a test failure we can either start with + # `set +e` to suppress all errors, or, as done below, append `|| retVal=$?` to the command + # which makes it successful while storing the potential erroneous code. + run: > + retVal=0; + INTEGRATION_TESTNET_NODE_URL=${{ secrets.INTEGRATION_TESTNET_NODE_URL }} + SENDER_PRIVATE_KEY=${{ secrets.INTEGRATION_TESTNET_SENDER_PRIVATE_KEY }} + cargo test --test gateway_integration_test -p papyrus_rpc test_gw_integration_testnet + -- --ignored || retVal=$?; + echo "retVal=$retVal" >> $GITHUB_OUTPUT; + if [ $retVal -ne 0 ]; then + echo "Integration test failed with exit code $retVal"; + fi; + - name: In case of a failure - post to a Slack channel. + id: slack + if: ${{ steps.run_test.outputs.retVal != 0 }} + uses: slackapi/slack-github-action@v1.24.0 + with: + channel-id: ${{ secrets.SLACK_ALERT_CHANNEL }} + slack-message: > + gateway_integration_test failed with exit code: ${{ steps.run_test.outputs.retVal }}, + see + <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}| + logs>. + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + - name: Fail job in case of test failure. + if: ${{ steps.run_test.outputs.retVal != 0 }} + run: exit 1 diff --git a/.github/workflows/papyrus_nightly-tests.yml b/.github/workflows/papyrus_nightly-tests.yml new file mode 100644 index 0000000000..3ee41bb567 --- /dev/null +++ b/.github/workflows/papyrus_nightly-tests.yml @@ -0,0 +1,99 @@ +name: Papyrus-Nightly-Tests +# We run gateway_integration_test at different times, to avoid a nonce race between parallel runs. +on: + schedule: + - cron: '30 22 * * *' # Uses ubuntu runner. + - cron: '30 0 * * *' # Uses macos runner. + workflow_dispatch: # Uses ubuntu runner. + +env: + PROTOC_VERSION: 25 # homebrew doesn't support minor versions + +jobs: + GW-integration-test-ubuntu: + uses: ./.github/workflows/papyrus_nightly-tests-call.yml + with: + os: ubuntu-latest + secrets: + INTEGRATION_TESTNET_NODE_URL: ${{ secrets.INTEGRATION_TESTNET_NODE_URL }} + INTEGRATION_TESTNET_SENDER_PRIVATE_KEY: ${{ secrets.INTEGRATION_TESTNET_SENDER_PRIVATE_KEY }} + SLACK_ALERT_CHANNEL: ${{ secrets.SLACK_ALERT_CHANNEL }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + if: github.event.schedule != '30 0 * * *' + + GW-integration-test-macos: + uses: ./.github/workflows/papyrus_nightly-tests-call.yml + with: + os: macos-latest + secrets: + INTEGRATION_TESTNET_NODE_URL: ${{ secrets.INTEGRATION_TESTNET_NODE_URL }} + INTEGRATION_TESTNET_SENDER_PRIVATE_KEY: ${{ secrets.INTEGRATION_TESTNET_SENDER_PRIVATE_KEY }} + SLACK_ALERT_CHANNEL: ${{ secrets.SLACK_ALERT_CHANNEL }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + if: github.event.schedule == '30 0 * * *' + + executable-run: + runs-on: macos-latest + if: github.event.schedule == '30 0 * * *' + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - run: mkdir data + + - run: brew install protobuf@$PROTOC_VERSION + + - name: Build node + run: cargo build -r + + - name: Run executable + run: > + target/release/papyrus_node --base_layer.node_url ${{ secrets.CI_BASE_LAYER_NODE_URL }} + & sleep 30 ; kill $! + + test: + runs-on: macos-latest + if: github.event.schedule == '30 0 * * *' + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: npm install -g ganache@7.4.3 + + - run: brew install protobuf@$PROTOC_VERSION + + - run: | + cargo test -r + env: + SEED: 0 + + build-load-test: + runs-on: macos-latest + if: github.event.schedule == '30 0 * * *' + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo build -r -p papyrus_load_test + + integration-test: + runs-on: macos-latest + if: github.event.schedule == '30 0 * * *' + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: > + cargo test -r --test '*' -- --include-ignored --skip test_gw_integration_testnet; + cargo run -r -p papyrus_node --bin central_source_integration_test --features="futures-util tokio-stream" + + # TODO(dvir): make this run only if the path 'crates/papyrus_storage/src/db/**' (same path as in the CI) was changed on the + # last day and increase the number of repetitions. + random-table-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: for run in {1..100}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done diff --git a/.github/workflows/verify-deps.yml b/.github/workflows/verify-deps.yml new file mode 100644 index 0000000000..5e11b67b97 --- /dev/null +++ b/.github/workflows/verify-deps.yml @@ -0,0 +1,20 @@ +name: Nightly Latest Dependencies Check + +on: + schedule: + - cron: '0 0 * * *' # Runs at 00:00 UTC every day + +jobs: + latest_deps: + name: Latest Dependencies + runs-on: ubuntu-20.04 + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Update Dependencies + run: cargo update --verbose + - name: Build + run: cargo build --verbose + - name: Test + run: cargo test --verbose diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..2778bb95de --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +*.egg-info +build +dist +target +*/.vscode/* +*.DS_Store +tmp_venv/* +.vscode/settings.json +/data +/logs +/target +/.vscode +# Git hooks +/.husky diff --git a/BUILD b/BUILD new file mode 100644 index 0000000000..2adca64db7 --- /dev/null +++ b/BUILD @@ -0,0 +1,8 @@ +# Export the built artifact to allow local builds. +exports_files([ + "target/release/libnative_blockifier.so", + "target/debug/committer_cli", + "target/release/committer_cli", + "target/x86_64-unknown-linux-musl/debug/committer_cli", + "target/x86_64-unknown-linux-musl/release/committer_cli", +]) diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000000..6680afca25 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,10717 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" + +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits 0.2.19", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.5", + "num-traits 0.2.19", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-secp256k1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c02e954eaeb4ddb29613fee20840c2bbc85ca4396d53e33837e11905363c5f2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-secp256r1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3975a01b0a6e3eae0f72ec7ca8598a6620fc72fa5981f6f5cca33b7cd788f633" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint 0.4.5", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits 0.2.19", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits 0.2.19", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "assert-json-diff" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" +dependencies = [ + "concurrent-queue", + "event-listener 5.3.0", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-compression" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +dependencies = [ + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-executor" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.1.0", + "futures-lite 2.3.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg 1.3.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.2.1", + "async-executor", + "async-io 2.3.2", + "async-lock 3.3.0", + "blocking", + "futures-lite 2.3.0", + "once_cell", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg 1.3.0", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +dependencies = [ + "async-lock 3.3.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.3.0", + "parking", + "polling 3.7.0", + "rustix 0.38.34", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite", +] + +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.34", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "async-signal" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +dependencies = [ + "async-io 2.3.2", + "async-lock 3.3.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.34", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-std" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +dependencies = [ + "async-channel 1.9.0", + "async-global-executor", + "async-io 1.13.0", + "async-lock 2.8.0", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite 1.13.0", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + +[[package]] +name = "asynchronous-codec" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", +] + +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "attohttpc" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +dependencies = [ + "http", + "log", + "url", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "autocfg" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.3.0", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +dependencies = [ + "serde", +] + +[[package]] +name = "bigdecimal" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +dependencies = [ + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bincode" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.66.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.61", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.61", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blockifier" +version = "0.8.0-rc.1" +dependencies = [ + "anyhow", + "ark-ec", + "ark-ff", + "ark-secp256k1", + "ark-secp256r1", + "assert_matches", + "cached", + "cairo-lang-casm", + "cairo-lang-runner", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "cairo-vm", + "criterion 0.3.6", + "derive_more", + "glob", + "indexmap 2.2.6", + "itertools 0.10.5", + "keccak", + "log", + "num-bigint 0.4.5", + "num-integer", + "num-rational 0.4.2", + "num-traits 0.2.19", + "once_cell", + "paste", + "phf", + "pretty_assertions", + "rand 0.8.5", + "regex", + "rstest", + "serde", + "serde_json", + "sha2", + "sha3", + "starknet-types-core", + "starknet_api", + "strum 0.25.0", + "strum_macros 0.25.3", + "test-case", + "thiserror", + "tikv-jemallocator", +] + +[[package]] +name = "blocking" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +dependencies = [ + "async-channel 2.2.1", + "async-lock 3.3.0", + "async-task", + "futures-io", + "futures-lite 2.3.0", + "piper", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "bytecount" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cached" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b195e4fbc4b6862bbd065b991a34750399c119797efff72492f28a5864de8700" +dependencies = [ + "async-trait", + "cached_proc_macro", + "cached_proc_macro_types", + "futures", + "hashbrown 0.13.2", + "instant", + "once_cell", + "thiserror", + "tokio", +] + +[[package]] +name = "cached_proc_macro" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b48814962d2fd604c50d2b9433c2a41a0ab567779ee2c02f7fba6eca1221f082" +dependencies = [ + "cached_proc_macro_types", + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" + +[[package]] +name = "cairo-lang-casm" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5abf875e93f696e783412d3f2a7c6f66e94e07c30b01559380b4d0707dc0050e" +dependencies = [ + "cairo-lang-utils", + "indoc 2.0.5", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "parity-scale-codec", + "schemars", + "serde", +] + +[[package]] +name = "cairo-lang-compiler" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f135e1768e199e88b04f824e34b9411ff49fc31970e77cbf5c6f448170441d18" +dependencies = [ + "anyhow", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-parser", + "cairo-lang-project", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-syntax", + "cairo-lang-utils", + "indoc 2.0.5", + "salsa", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-debug" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e2bf0a6caf1e54938bc67ca082cbeb5385969784bfb1109c187ca9dc5e1806" +dependencies = [ + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-defs" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c65bb0e855afeb88d11585605f836bd0cd444375b234103e87342df2c91aba1b" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.12.1", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-diagnostics" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab96083f60a077d300d0b89bd4b9c31731c95f5db355a11c4657ee25f3acc198" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "itertools 0.12.1", +] + +[[package]] +name = "cairo-lang-eq-solver" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf2aaa50fa5b15070b2bf02c60a62f917f9aa1ff6dedf5a2627ecafe8e33cfa" +dependencies = [ + "cairo-lang-utils", + "good_lp", +] + +[[package]] +name = "cairo-lang-filesystem" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8094bcf7e44204c2fc2f10760e7e2e5769a6267cba5d8a303c0331dd480d5663" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-utils", + "path-clean", + "salsa", + "serde", + "smol_str", +] + +[[package]] +name = "cairo-lang-formatter" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a1d92f1163b3b0e22e6392d22f7a275b9e64ab453f32b8b62bb1aeedbe73e04" +dependencies = [ + "anyhow", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "diffy", + "ignore", + "itertools 0.12.1", + "salsa", + "serde", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-lowering" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25eb629a773c07c2863717d1711fd3ecc17807c1fc094bb90cccac56061056a4" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-proc-macros", + "cairo-lang-semantic", + "cairo-lang-syntax", + "cairo-lang-utils", + "id-arena", + "itertools 0.12.1", + "log", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-parser" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7b1d7af8e1bff971b8b9bbce796650a57de93dfb092bc0c17c2f85d915de6e" +dependencies = [ + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-syntax", + "cairo-lang-syntax-codegen", + "cairo-lang-utils", + "colored", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-plugins" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eccf06d643d155a72057dc93c40cf34dabe11e8c629dbf3111c528a3d750a66" +dependencies = [ + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "indent", + "indoc 2.0.5", + "itertools 0.12.1", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-proc-macros" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa10434f9ce0828e8d77f3a13ae2f878da453345b14d54a66de3e196c0e4674" +dependencies = [ + "cairo-lang-debug", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "cairo-lang-project" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4882d2263fb7c95dbab0c3b5578d8c0e2417fd680df8cc61aa50321b6a5a40d" +dependencies = [ + "cairo-lang-filesystem", + "cairo-lang-utils", + "serde", + "smol_str", + "thiserror", + "toml", +] + +[[package]] +name = "cairo-lang-runner" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ab7b0e0640adaed21b9d9b9b94b3edf7f7ab95514b1dd40c679317a33dabea" +dependencies = [ + "ark-ff", + "ark-secp256k1", + "ark-secp256r1", + "cairo-lang-casm", + "cairo-lang-lowering", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-generator", + "cairo-lang-sierra-to-casm", + "cairo-lang-sierra-type-size", + "cairo-lang-starknet", + "cairo-lang-utils", + "cairo-vm", + "itertools 0.12.1", + "keccak", + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "rand 0.8.5", + "sha2", + "smol_str", + "starknet-types-core", + "thiserror", +] + +[[package]] +name = "cairo-lang-semantic" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba49614f98322e1ccda33265f8193f66cbd88eff23b0deb94db981aa0666650" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-plugins", + "cairo-lang-proc-macros", + "cairo-lang-syntax", + "cairo-lang-test-utils", + "cairo-lang-utils", + "id-arena", + "indoc 2.0.5", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", + "toml", +] + +[[package]] +name = "cairo-lang-sierra" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a41d56c6afebdbe2c5ffb4e216f60b07391c29c91fccf0a60790817f49ba68" +dependencies = [ + "anyhow", + "cairo-lang-utils", + "const-fnv1a-hash", + "convert_case 0.6.0", + "derivative", + "itertools 0.12.1", + "lalrpop", + "lalrpop-util", + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "once_cell", + "regex", + "salsa", + "serde", + "serde_json", + "sha3", + "smol_str", + "starknet-types-core", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-ap-change" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667050b93db661ebce0b33c92ce44abffebde37c5645e4761722ad3c49a1c34f" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-gas" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27fcbf81e8ed4efe7e9c30bbdfa8074b9af01a5e16154999dd9527baba27f1fb" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-generator" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058c05d10913a130fb21964f0bf1a37b05eafcf2f50a73cd4aa3e11da7e4cfc7" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-parser", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.12.1", + "num-traits 0.2.19", + "once_cell", + "salsa", + "serde", + "serde_json", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra-to-casm" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8607cc5cf16f3a930ad4b3799e986b0ca36ada2c0da1dd6bd2ef35cbb1eb9e74" +dependencies = [ + "assert_matches", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "indoc 2.0.5", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "starknet-types-core", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-type-size" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224624b1e279b3eea7693680f577335e66e6dd5fbfbd2576f4a7d0b5d697f61d" +dependencies = [ + "cairo-lang-sierra", + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-starknet" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a54ebea4ea990a33a2158ecdf46ffb3cb1af8fff6a79c3dd310c6a9ed43e82" +dependencies = [ + "anyhow", + "cairo-lang-compiler", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-plugins", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-starknet-classes", + "cairo-lang-syntax", + "cairo-lang-utils", + "const_format", + "indent", + "indoc 2.0.5", + "itertools 0.12.1", + "once_cell", + "serde", + "serde_json", + "smol_str", + "starknet-types-core", + "thiserror", +] + +[[package]] +name = "cairo-lang-starknet-classes" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb66ae799e1963318e1bab782848f53797787c396dfd590be539f3f12d56ac4" +dependencies = [ + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-to-casm", + "cairo-lang-utils", + "convert_case 0.6.0", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "once_cell", + "serde", + "serde_json", + "sha3", + "smol_str", + "starknet-types-core", + "thiserror", +] + +[[package]] +name = "cairo-lang-syntax" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e673dc1058a8639c094a330a701e8902cbd34defe659a3d95bcf6c3f3de249d" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-syntax-codegen" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0dd466dbac4263573b81b83e22534285da30a4e7c15b888407fbb33d8accb9" +dependencies = [ + "genco", + "xshell", +] + +[[package]] +name = "cairo-lang-test-utils" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09431da22acc1cf081b1802b73ff484bdc75ca1cd5ad6fa9b84fba8753b2e08f" +dependencies = [ + "cairo-lang-formatter", + "cairo-lang-utils", + "colored", + "log", + "pretty_assertions", +] + +[[package]] +name = "cairo-lang-utils" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97498c08958be8d569c16982cac431d785adc3effdfa6d0775c65aec578dfd91" +dependencies = [ + "hashbrown 0.14.5", + "indexmap 2.2.6", + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "parity-scale-codec", + "schemars", + "serde", +] + +[[package]] +name = "cairo-vm" +version = "1.0.0-rc5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e09134ea1e0be6c1fbd330f0945df0512fa70944fd0b3ecc2f74a6008f01e9da" +dependencies = [ + "anyhow", + "bincode 2.0.0-rc.3", + "bitvec", + "generic-array", + "hashbrown 0.14.5", + "hex", + "keccak", + "lazy_static", + "nom", + "num-bigint 0.4.5", + "num-integer", + "num-prime", + "num-traits 0.2.19", + "rand 0.8.5", + "rust_decimal", + "serde", + "serde_json", + "sha2", + "sha3", + "starknet-crypto 0.6.2", + "starknet-types-core", + "thiserror-no-std", + "zip", +] + +[[package]] +name = "camelpaste" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d88a780e6aa14b75d7be99f374d8b5c315aaf9c12ada1e2b1cb281468584c9" + +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits 0.2.19", + "serde", + "wasm-bindgen", + "windows-targets 0.52.5", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half 2.4.1", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "bitflags 1.3.2", + "textwrap", + "unicode-width", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", +] + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "colored" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + +[[package]] +name = "committer" +version = "0.1.0-rc.0" +dependencies = [ + "async-recursion", + "derive_more", + "ethnum", + "hex", + "log", + "pretty_assertions", + "rand 0.8.5", + "rstest", + "serde", + "serde_json", + "starknet-types-core", + "strum 0.25.0", + "strum_macros 0.25.3", + "thiserror", + "tokio", +] + +[[package]] +name = "committer_cli" +version = "0.1.0-rc.0" +dependencies = [ + "clap 4.5.4", + "committer", + "criterion 0.5.1", + "derive_more", + "ethnum", + "indexmap 2.2.6", + "log", + "pretty_assertions", + "rand 0.8.5", + "rand_distr", + "serde", + "serde_json", + "serde_repr", + "simplelog", + "starknet-types-core", + "starknet_api", + "strum 0.25.0", + "strum_macros 0.25.3", + "thiserror", + "tokio", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + +[[package]] +name = "const-hex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" +dependencies = [ + "cookie", + "idna 0.3.0", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +dependencies = [ + "atty", + "cast", + "clap 2.34.0", + "criterion-plot 0.4.5", + "csv", + "itertools 0.10.5", + "lazy_static", + "num-traits 0.2.19", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_cbor", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap 4.5.4", + "criterion-plot 0.5.0", + "is-terminal", + "itertools 0.10.5", + "num-traits 0.2.19", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "ctrlc" +version = "3.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +dependencies = [ + "nix 0.28.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +dependencies = [ + "darling_core 0.20.8", + "darling_macro 0.20.8", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.61", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +dependencies = [ + "darling_core 0.20.8", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + +[[package]] +name = "deadqueue" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a2561fd313df162315935989dceb8c99db4ee1933358270a57a3cfb8c957f3" +dependencies = [ + "crossbeam-queue", + "tokio", +] + +[[package]] +name = "defaultmap" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c4d4fbd66561c3acff86b297b024826505a715eb1b0984a78013b349d0e834" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case 0.4.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "diffy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e616e59155c92257e84970156f506287853355f58cd4a6eb167385722c32b790" +dependencies = [ + "nu-ansi-term", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "enum-iterator" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", +] + +[[package]] +name = "env_logger" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.61", + "toml", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.61", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum 0.26.2", + "syn 2.0.61", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + +[[package]] +name = "ethnum" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.0", + "pin-project-lite", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fancy-regex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +dependencies = [ + "bit-set", + "regex", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin 0.9.8", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fraction" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3027ae1df8d41b4bed2241c8fdad4acc1e7af60c8e17743534b545e77182d678" +dependencies = [ + "lazy_static", + "num 0.4.3", +] + +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-bounded" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e2774cc104e198ef3d3e1ff4ab40f86fa3245d6cb6a3a46174f21463cee173" +dependencies = [ + "futures-timer", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand 2.1.0", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "futures-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" +dependencies = [ + "futures-io", + "rustls", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-ticker" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9763058047f713632a52e916cc7f6a4b3fc6e9fc1ff8c5b1dc49e5a89041682e" +dependencies = [ + "futures", + "futures-timer", + "instant", +] + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "genco" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" +dependencies = [ + "genco-macros", + "relative-path", + "smallvec", +] + +[[package]] +name = "genco-macros" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "gloo-net" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "good_lp" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3198bd13dea84c76a64621d6ee8ee26a4960a9a0d538eca95ca8f1320a469ac9" +dependencies = [ + "fnv", + "minilp", +] + +[[package]] +name = "goose" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cfeedc01d217935e1371901ea642ea6693d68893c67336d146eba23be04bf11" +dependencies = [ + "async-trait", + "chrono", + "ctrlc", + "downcast-rs", + "flume", + "futures", + "gumdrop", + "http", + "itertools 0.11.0", + "lazy_static", + "log", + "num-format", + "rand 0.8.5", + "regex", + "reqwest", + "serde", + "serde_json", + "simplelog", + "strum 0.25.0", + "strum_macros 0.25.3", + "tokio", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "gumdrop" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bc700f989d2f6f0248546222d9b4258f5b02a171a431f8285a81c08142629e3" +dependencies = [ + "gumdrop_derive", +] + +[[package]] +name = "gumdrop_derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729f9bd3449d77e7831a18abfb7ba2f99ee813dfd15b8c2167c9a54ba20aa99d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "byteorder", + "num-traits 0.2.19", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex_fmt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" + +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "socket2 0.5.7", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.2", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "human_bytes" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core 0.52.0", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "if-addrs" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "if-watch" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" +dependencies = [ + "async-io 2.3.2", + "core-foundation", + "fnv", + "futures", + "if-addrs", + "ipnet", + "log", + "rtnetlink", + "smol", + "system-configuration", + "tokio", + "windows 0.51.1", +] + +[[package]] +name = "if_chain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" + +[[package]] +name = "igd-next" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064d90fec10d541084e7b39ead8875a5a80d9114a2b18791565253bae25f49e4" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http", + "hyper", + "log", + "rand 0.8.5", + "tokio", + "url", + "xmltree", +] + +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata 0.4.6", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indent" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f1a0777d972970f204fdf8ef319f1f4f8459131636d7e3c96c5d59570d0fa6" + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg 1.3.0", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", + "serde", +] + +[[package]] +name = "indoc" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" + +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "insta" +version = "1.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +dependencies = [ + "console", + "lazy_static", + "linked-hash-map", + "serde", + "similar", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "integer-encoding" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2 0.5.7", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "iso8601" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" +dependencies = [ + "nom", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpsee" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" +dependencies = [ + "futures-channel", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "url", + "webpki-roots", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" +dependencies = [ + "anyhow", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types", + "parking_lot 0.12.2", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" +dependencies = [ + "futures-util", + "http", + "hyper", + "jsonrpsee-core", + "jsonrpsee-types", + "route-recognizer", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c7cbb3447cf14fd4d2f407c3cc96e6c9634d5440aa1fbed868a31f3c02b27f0" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +dependencies = [ + "http", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", + "url", +] + +[[package]] +name = "jsonschema" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978" +dependencies = [ + "ahash", + "anyhow", + "base64 0.21.7", + "bytecount", + "clap 4.5.4", + "fancy-regex", + "fraction", + "getrandom", + "iso8601", + "itoa", + "memchr", + "num-cmp", + "once_cell", + "parking_lot 0.12.2", + "percent-encoding", + "regex", + "reqwest", + "serde", + "serde_json", + "time", + "url", + "uuid 1.8.0", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem 1.1.1", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "pico-args", + "regex", + "regex-syntax 0.8.3", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.6", +] + +[[package]] +name = "lambdaworks-crypto" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb5d4f22241504f7c7b8d2c3a7d7835d7c07117f10bff2a7d96a9ef6ef217c3" +dependencies = [ + "lambdaworks-math", + "serde", + "sha2", + "sha3", +] + +[[package]] +name = "lambdaworks-math" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358e172628e713b80a530a59654154bfc45783a6ed70ea284839800cebdf8f97" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libmdbx" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f0bee397dc9a7003e7bd34fffc1dc2d4c4fdc96530a0c439a5f98c9402bc7bf" +dependencies = [ + "bitflags 2.5.0", + "byteorder", + "derive_more", + "indexmap 1.9.3", + "libc", + "lifetimed-bytes", + "mdbx-sys", + "parking_lot 0.12.2", + "thiserror", +] + +[[package]] +name = "libp2p" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681fb3f183edfbedd7a57d32ebe5dcdc0b9f94061185acf3c30249349cc6fc99" +dependencies = [ + "bytes", + "either", + "futures", + "futures-timer", + "getrandom", + "instant", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", + "libp2p-dns", + "libp2p-gossipsub", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-mdns", + "libp2p-metrics", + "libp2p-noise", + "libp2p-quic", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-upnp", + "libp2p-yamux", + "multiaddr", + "pin-project", + "rw-stream-sink", + "thiserror", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.41.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8130a8269e65a2554d55131c770bdf4bcd94d2b8d4efb24ca23699be65066c05" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-identity", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot 0.12.2", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", + "serde", + "smallvec", + "thiserror", + "tracing", + "unsigned-varint 0.8.0", + "void", +] + +[[package]] +name = "libp2p-dns" +version = "0.41.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d17cbcf7160ff35c3e8e560de4a068fe9d6cb777ea72840e48eb76ff9576c4b6" +dependencies = [ + "async-trait", + "futures", + "hickory-resolver", + "libp2p-core", + "libp2p-identity", + "parking_lot 0.12.2", + "smallvec", + "tracing", +] + +[[package]] +name = "libp2p-gossipsub" +version = "0.46.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d665144a616dadebdc5fff186b1233488cdcd8bfb1223218ff084b6d052c94f7" +dependencies = [ + "asynchronous-codec 0.7.0", + "base64 0.21.7", + "byteorder", + "bytes", + "either", + "fnv", + "futures", + "futures-ticker", + "getrandom", + "hex_fmt", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "prometheus-client", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "rand 0.8.5", + "regex", + "serde", + "sha2", + "smallvec", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identify" +version = "0.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5d635ebea5ca0c3c3e77d414ae9b67eccf2a822be06091b9c1a0d13029a1e2f" +dependencies = [ + "asynchronous-codec 0.7.0", + "either", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "lru", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "smallvec", + "thiserror", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identity" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +dependencies = [ + "bs58", + "ed25519-dalek", + "hkdf", + "multihash", + "quick-protobuf", + "rand 0.8.5", + "serde", + "sha2", + "thiserror", + "tracing", + "zeroize", +] + +[[package]] +name = "libp2p-kad" +version = "0.45.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc5767727d062c4eac74dd812c998f0e488008e82cce9c33b463d38423f9ad2" +dependencies = [ + "arrayvec", + "asynchronous-codec 0.7.0", + "bytes", + "either", + "fnv", + "futures", + "futures-bounded", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "rand 0.8.5", + "serde", + "sha2", + "smallvec", + "thiserror", + "tracing", + "uint", + "void", +] + +[[package]] +name = "libp2p-mdns" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49007d9a339b3e1d7eeebc4d67c05dbf23d300b7d091193ec2d3f26802d7faf2" +dependencies = [ + "data-encoding", + "futures", + "hickory-proto", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand 0.8.5", + "smallvec", + "socket2 0.5.7", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-metrics" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdac91ae4f291046a3b2660c039a2830c931f84df2ee227989af92f7692d3357" +dependencies = [ + "futures", + "instant", + "libp2p-core", + "libp2p-gossipsub", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-swarm", + "pin-project", + "prometheus-client", +] + +[[package]] +name = "libp2p-noise" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecd0545ce077f6ea5434bcb76e8d0fe942693b4380aaad0d34a358c2bd05793" +dependencies = [ + "asynchronous-codec 0.7.0", + "bytes", + "curve25519-dalek", + "futures", + "libp2p-core", + "libp2p-identity", + "multiaddr", + "multihash", + "once_cell", + "quick-protobuf", + "rand 0.8.5", + "sha2", + "snow", + "static_assertions", + "thiserror", + "tracing", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "libp2p-plaintext" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67330af40b67217e746d42551913cfb7ad04c74fa300fb329660a56318590b3f" +dependencies = [ + "asynchronous-codec 0.6.2", + "bytes", + "futures", + "libp2p-core", + "libp2p-identity", + "quick-protobuf", + "quick-protobuf-codec 0.2.0", + "tracing", +] + +[[package]] +name = "libp2p-quic" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0375cdfee57b47b313ef1f0fdb625b78aed770d33a40cf1c294a371ff5e6666" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-tls", + "parking_lot 0.12.2", + "quinn", + "rand 0.8.5", + "ring 0.16.20", + "rustls", + "socket2 0.5.7", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "libp2p-swarm" +version = "0.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80cae6cb75f89dbca53862f9ebe0b9f463aa7b302762fcfaafb9e51dcc9b0f7e" +dependencies = [ + "async-std", + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm-derive", + "lru", + "multistream-select", + "once_cell", + "rand 0.8.5", + "smallvec", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-swarm-derive" +version = "0.34.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5daceb9dd908417b6dfcfe8e94098bc4aac54500c282e78120b885dadc09b999" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "libp2p-swarm-test" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a73027f1bdabd15d08b2c7954911cd56a6265c476763b2ceb10d9dc5ea4366b2" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-plaintext", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-yamux", + "rand 0.8.5", + "tracing", +] + +[[package]] +name = "libp2p-tcp" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2460fc2748919adff99ecbc1aab296e4579e41f374fb164149bd2c9e529d4c" +dependencies = [ + "async-io 1.13.0", + "futures", + "futures-timer", + "if-watch", + "libc", + "libp2p-core", + "libp2p-identity", + "socket2 0.5.7", + "tokio", + "tracing", +] + +[[package]] +name = "libp2p-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" +dependencies = [ + "futures", + "futures-rustls", + "libp2p-core", + "libp2p-identity", + "rcgen", + "ring 0.16.20", + "rustls", + "rustls-webpki", + "thiserror", + "x509-parser", + "yasna", +] + +[[package]] +name = "libp2p-upnp" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccf04b0e3ff3de52d07d5fd6c3b061d0e7f908ffc683c32d9638caedce86fc8" +dependencies = [ + "futures", + "futures-timer", + "igd-next", + "libp2p-core", + "libp2p-swarm", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-yamux" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200cbe50349a44760927d50b431d77bed79b9c0a3959de1af8d24a63434b71e5" +dependencies = [ + "either", + "futures", + "libp2p-core", + "thiserror", + "tracing", + "yamux 0.12.1", + "yamux 0.13.2", +] + +[[package]] +name = "libproc" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9ea4b75e1a81675429dafe43441df1caea70081e82246a8cccf514884a88bb" +dependencies = [ + "bindgen 0.69.4", + "errno", + "libc", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "lifetimed-bytes" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c970c8ea4c7b023a41cfa4af4c785a16694604c2f2a3b0d1f20a9bcb73fa550" +dependencies = [ + "bytes", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg 1.3.0", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +dependencies = [ + "value-bag", +] + +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "matrixmultiply" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +dependencies = [ + "rawpointer", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "mdbx-sys" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a329f8d655fb646cc9511c00886eefcddb6ef131869ef2d4b02c24c66825ac" +dependencies = [ + "bindgen 0.66.1", + "cc", + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memmap2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg 1.3.0", +] + +[[package]] +name = "mempool_test_utils" +version = "0.0.0" +dependencies = [ + "assert_matches", + "blockifier", + "serde_json", + "starknet-types-core", + "starknet_api", +] + +[[package]] +name = "metrics" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" +dependencies = [ + "ahash", + "metrics-macros", + "portable-atomic", +] + +[[package]] +name = "metrics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be3cbd384d4e955b231c895ce10685e3d8260c5ccffae898c96c723b0772835" +dependencies = [ + "ahash", + "portable-atomic", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" +dependencies = [ + "base64 0.21.7", + "hyper", + "indexmap 1.9.3", + "ipnet", + "metrics 0.21.1", + "metrics-util", + "quanta", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "metrics-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "metrics-process" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f69c2a98ebe047f74b834c7eeaad0db5a9fd3604e129721d212e0ef9442e238a" +dependencies = [ + "libproc", + "mach2", + "metrics 0.22.3", + "once_cell", + "procfs", + "rlimit", + "windows 0.54.0", +] + +[[package]] +name = "metrics-util" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111cb375987443c3de8d503580b536f77dc8416d32db62d9456db5d93bd7ac47" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.13.2", + "metrics 0.21.1", + "num_cpus", + "quanta", + "sketches-ddsketch", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minilp" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a7750a9e5076c660b7bec5e6457b4dbff402b9863c8d112891434e18fd5385" +dependencies = [ + "log", + "sprs", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "mockall" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "mockito" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80f9fece9bd97ab74339fe19f4bcaf52b76dcc18e5364c7977c1838f76b38de9" +dependencies = [ + "assert-json-diff", + "colored", + "httparse", + "lazy_static", + "log", + "rand 0.8.5", + "regex", + "serde_json", + "serde_urlencoded", + "similar", +] + +[[package]] +name = "mockito" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6e023aa5bdf392aa06c78e4a4e6d498baab5138d0c993503350ebbc37bf1e" +dependencies = [ + "assert-json-diff", + "colored", + "futures-core", + "hyper", + "log", + "rand 0.8.5", + "regex", + "serde_json", + "serde_urlencoded", + "similar", + "tokio", +] + +[[package]] +name = "multiaddr" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.7.2", + "url", +] + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "serde", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multimap" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" + +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "native_blockifier" +version = "0.8.0-rc.0" +dependencies = [ + "blockifier", + "cached", + "cairo-lang-starknet-classes", + "cairo-vm", + "indexmap 2.2.6", + "log", + "num-bigint 0.4.5", + "papyrus_storage", + "pretty_assertions", + "pyo3", + "pyo3-log", + "serde", + "serde_json", + "starknet-types-core", + "starknet_api", + "tempfile", + "thiserror", +] + +[[package]] +name = "ndarray" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" +dependencies = [ + "matrixmultiply", + "num-complex 0.2.4", + "num-integer", + "num-traits 0.2.19", + "rawpointer", +] + +[[package]] +name = "netlink-packet-core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" +dependencies = [ + "anyhow", + "byteorder", + "libc", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-route" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" +dependencies = [ + "anyhow", + "bitflags 1.3.2", + "byteorder", + "libc", + "netlink-packet-core", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +dependencies = [ + "anyhow", + "byteorder", + "paste", + "thiserror", +] + +[[package]] +name = "netlink-proto" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" +dependencies = [ + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror", + "tokio", +] + +[[package]] +name = "netlink-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" +dependencies = [ + "async-io 1.13.0", + "bytes", + "futures", + "libc", + "log", + "tokio", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex 0.2.4", + "num-integer", + "num-iter", + "num-rational 0.2.4", + "num-traits 0.2.19", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.5", + "num-complex 0.4.6", + "num-integer", + "num-iter", + "num-rational 0.4.2", + "num-traits 0.2.19", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg 1.3.0", + "num-integer", + "num-traits 0.2.19", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits 0.2.19", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "num-cmp" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg 1.3.0", + "num-traits 0.2.19", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits 0.2.19", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits 0.2.19", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg 1.3.0", + "num-integer", + "num-traits 0.2.19", +] + +[[package]] +name = "num-modular" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" +dependencies = [ + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", +] + +[[package]] +name = "num-prime" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e238432a7881ec7164503ccc516c014bf009be7984cde1ba56837862543bdec3" +dependencies = [ + "bitvec", + "either", + "lru", + "num-bigint 0.4.5", + "num-integer", + "num-modular", + "num-traits 0.2.19", + "rand 0.8.5", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg 1.3.0", + "num-bigint 0.2.6", + "num-integer", + "num-traits 0.2.19", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.19", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg 1.3.0", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "os_info" +version = "3.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +dependencies = [ + "log", + "serde", + "windows-sys 0.52.0", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "papyrus_base_layer" +version = "0.4.0-rc.0" +dependencies = [ + "async-trait", + "ethers", + "ethers-core", + "papyrus_config", + "pretty_assertions", + "rustc-hex", + "serde", + "serde_json", + "starknet-types-core", + "starknet_api", + "tar", + "tempfile", + "test-with", + "thiserror", + "tokio", + "url", +] + +[[package]] +name = "papyrus_block_builder" +version = "0.4.0-rc.0" +dependencies = [ + "papyrus_storage", + "papyrus_test_utils", + "pretty_assertions", + "starknet_api", + "thiserror", + "tracing", +] + +[[package]] +name = "papyrus_common" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "cairo-lang-starknet-classes", + "hex", + "indexmap 2.2.6", + "itertools 0.10.5", + "lazy_static", + "papyrus_test_utils", + "pretty_assertions", + "rand 0.8.5", + "serde", + "serde_json", + "sha3", + "starknet-types-core", + "starknet_api", + "thiserror", +] + +[[package]] +name = "papyrus_config" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "clap 4.5.4", + "itertools 0.10.5", + "lazy_static", + "papyrus_test_utils", + "serde", + "serde_json", + "strum_macros 0.25.3", + "tempfile", + "thiserror", + "validator", +] + +[[package]] +name = "papyrus_consensus" +version = "0.4.0-rc.0" +dependencies = [ + "async-trait", + "futures", + "metrics 0.21.1", + "mockall", + "papyrus_common", + "papyrus_config", + "papyrus_network", + "papyrus_protobuf", + "papyrus_storage", + "papyrus_test_utils", + "serde", + "starknet-types-core", + "starknet_api", + "test-case", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "papyrus_execution" +version = "0.4.0-rc.0" +dependencies = [ + "anyhow", + "assert_matches", + "blockifier", + "cairo-lang-casm", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "cairo-vm", + "indexmap 2.2.6", + "itertools 0.10.5", + "lazy_static", + "once_cell", + "papyrus_common", + "papyrus_config", + "papyrus_storage", + "papyrus_test_utils", + "pretty_assertions", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "starknet-types-core", + "starknet_api", + "thiserror", + "tracing", +] + +[[package]] +name = "papyrus_load_test" +version = "0.4.0-rc.0" +dependencies = [ + "anyhow", + "assert_matches", + "goose", + "lazy_static", + "once_cell", + "pretty_assertions", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "tokio", +] + +[[package]] +name = "papyrus_monitoring_gateway" +version = "0.4.0-rc.0" +dependencies = [ + "axum", + "http-body", + "hyper", + "metrics 0.21.1", + "metrics-exporter-prometheus", + "metrics-process", + "papyrus_config", + "papyrus_storage", + "pretty_assertions", + "rand 0.8.5", + "serde", + "serde_json", + "starknet_client", + "thiserror", + "tokio", + "tower", + "tracing", + "validator", +] + +[[package]] +name = "papyrus_network" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "async-stream", + "bytes", + "clap 4.5.4", + "deadqueue", + "defaultmap", + "derive_more", + "futures", + "lazy_static", + "libp2p", + "libp2p-swarm-test", + "metrics 0.21.1", + "mockall", + "papyrus_common", + "papyrus_config", + "pretty_assertions", + "replace_with", + "serde", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "unsigned-varint 0.8.0", + "validator", + "void", +] + +[[package]] +name = "papyrus_node" +version = "0.4.0-rc.0" +dependencies = [ + "anyhow", + "assert-json-diff", + "clap 4.5.4", + "colored", + "const_format", + "futures", + "futures-util", + "insta", + "itertools 0.10.5", + "lazy_static", + "metrics-exporter-prometheus", + "once_cell", + "papyrus_base_layer", + "papyrus_common", + "papyrus_config", + "papyrus_consensus", + "papyrus_monitoring_gateway", + "papyrus_network", + "papyrus_p2p_sync", + "papyrus_protobuf", + "papyrus_rpc", + "papyrus_storage", + "papyrus_sync", + "papyrus_test_utils", + "pretty_assertions", + "reqwest", + "serde", + "serde_json", + "starknet_api", + "starknet_client", + "strum 0.25.0", + "tempfile", + "tokio", + "tokio-stream", + "tracing", + "tracing-subscriber", + "validator", +] + +[[package]] +name = "papyrus_p2p_sync" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "async-stream", + "enum-iterator", + "futures", + "indexmap 2.2.6", + "lazy_static", + "metrics 0.21.1", + "papyrus_common", + "papyrus_config", + "papyrus_network", + "papyrus_proc_macros", + "papyrus_protobuf", + "papyrus_storage", + "papyrus_test_utils", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "starknet-types-core", + "starknet_api", + "static_assertions", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "papyrus_proc_macros" +version = "0.4.0-rc.0" +dependencies = [ + "metrics 0.21.1", + "metrics-exporter-prometheus", + "papyrus_common", + "papyrus_test_utils", + "prometheus-parse", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "papyrus_protobuf" +version = "0.4.0-rc.0" +dependencies = [ + "indexmap 2.2.6", + "lazy_static", + "papyrus_common", + "papyrus_test_utils", + "primitive-types", + "prost", + "prost-build", + "rand 0.8.5", + "rand_chacha 0.3.1", + "starknet-types-core", + "starknet_api", + "thiserror", +] + +[[package]] +name = "papyrus_rpc" +version = "0.4.0-rc.0" +dependencies = [ + "anyhow", + "assert_matches", + "async-trait", + "base64 0.13.1", + "cairo-lang-casm", + "cairo-lang-starknet-classes", + "camelpaste", + "derive_more", + "enum-iterator", + "ethers", + "flate2", + "futures-util", + "hex", + "hyper", + "indexmap 2.2.6", + "insta", + "itertools 0.10.5", + "jsonrpsee", + "jsonschema", + "lazy_static", + "metrics 0.21.1", + "metrics-exporter-prometheus", + "mockall", + "papyrus_common", + "papyrus_config", + "papyrus_execution", + "papyrus_proc_macros", + "papyrus_storage", + "papyrus_test_utils", + "pretty_assertions", + "prometheus-parse", + "rand 0.8.5", + "rand_chacha 0.3.1", + "regex", + "reqwest", + "serde", + "serde_json", + "starknet-core", + "starknet-types-core", + "starknet_api", + "starknet_client", + "strum 0.25.0", + "strum_macros 0.25.3", + "tokio", + "tower", + "tracing", + "validator", +] + +[[package]] +name = "papyrus_storage" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "byteorder", + "cairo-lang-casm", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "camelpaste", + "clap 4.5.4", + "human_bytes", + "indexmap 2.2.6", + "insta", + "integer-encoding", + "lazy_static", + "libmdbx", + "memmap2", + "metrics 0.21.1", + "metrics-exporter-prometheus", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "page_size", + "papyrus_common", + "papyrus_config", + "papyrus_proc_macros", + "papyrus_test_utils", + "parity-scale-codec", + "paste", + "pretty_assertions", + "primitive-types", + "prometheus-parse", + "rand 0.8.5", + "rand_chacha 0.3.1", + "schemars", + "serde", + "serde_json", + "simple_logger", + "starknet-types-core", + "starknet_api", + "statistical", + "tempfile", + "test-case", + "test-log", + "thiserror", + "tokio", + "tracing", + "validator", + "zstd 0.13.2", +] + +[[package]] +name = "papyrus_sync" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "async-stream", + "async-trait", + "cairo-lang-starknet-classes", + "chrono", + "futures", + "futures-util", + "indexmap 2.2.6", + "itertools 0.10.5", + "lru", + "metrics 0.21.1", + "mockall", + "papyrus_base_layer", + "papyrus_common", + "papyrus_config", + "papyrus_proc_macros", + "papyrus_storage", + "papyrus_test_utils", + "pretty_assertions", + "reqwest", + "serde", + "simple_logger", + "starknet-types-core", + "starknet_api", + "starknet_client", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "papyrus_test_utils" +version = "0.4.0-rc.0" +dependencies = [ + "cairo-lang-casm", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "indexmap 2.2.6", + "num-bigint 0.4.5", + "pretty_assertions", + "primitive-types", + "prometheus-parse", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reqwest", + "serde", + "serde_json", + "starknet-types-core", + "starknet_api", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.1", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "path-clean" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.1.0", + "futures-io", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits 0.2.19", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg 1.3.0", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.3.9", + "pin-project-lite", + "rustix 0.38.34", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "predicates" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +dependencies = [ + "anstyle", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.61", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "procfs" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +dependencies = [ + "bitflags 2.5.0", + "hex", + "lazy_static", + "procfs-core", + "rustix 0.38.34", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.5.0", + "hex", +] + +[[package]] +name = "prometheus-client" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa" +dependencies = [ + "dtoa", + "itoa", + "parking_lot 0.12.2", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "prometheus-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "811031bea65e5a401fb2e1f37d802cca6601e204ac463809a3189352d13b78a5" +dependencies = [ + "chrono", + "itertools 0.12.1", + "once_cell", + "regex", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bitflags 2.5.0", + "lazy_static", + "num-traits 0.2.19", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift 0.3.0", + "regex-syntax 0.8.3", + "unarray", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80b776a1b2dc779f5ee0641f8ade0125bc1298dd41a9a0c16d8bd57b42d222b1" +dependencies = [ + "bytes", + "heck 0.5.0", + "itertools 0.12.1", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.61", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "prost-types" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +dependencies = [ + "prost", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +dependencies = [ + "idna 0.3.0", + "psl-types", +] + +[[package]] +name = "pyo3" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "indoc 1.0.9", + "libc", + "memoffset", + "num-bigint 0.4.5", + "parking_lot 0.12.2", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-log" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c09c2b349b6538d8a73d436ca606dab6ce0aaab4dad9e6b7bdd57a4f556c3bc3" +dependencies = [ + "arc-swap", + "log", + "pyo3", +] + +[[package]] +name = "pyo3-macros" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "quanta" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" +dependencies = [ + "crossbeam-utils", + "libc", + "mach2", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ededb1cd78531627244d51dd0c7139fbe736c7d57af0092a76f0ffb2f56e98" +dependencies = [ + "asynchronous-codec 0.6.2", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0580ab32b169745d7a39db2ba969226ca16738931be152a3209b409de2474" +dependencies = [ + "asynchronous-codec 0.7.0", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint 0.8.0", +] + +[[package]] +name = "quinn" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +dependencies = [ + "bytes", + "futures-io", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +dependencies = [ + "bytes", + "libc", + "socket2 0.5.7", + "tracing", + "windows-sys 0.48.0", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.8", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift 0.1.1", + "winapi", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits 0.2.19", + "rand 0.8.5", +] + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rcgen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" +dependencies = [ + "pem 3.0.4", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + +[[package]] +name = "replace_with" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "async-compression", + "base64 0.21.7", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlimit" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" +dependencies = [ + "libc", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + +[[package]] +name = "rstest" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de1bb486a691878cd320c2f0d319ba91eeaa2e894066d8b5f8f117c000e9d962" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version", +] + +[[package]] +name = "rstest_macros" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290ca1a1c8ca7edb7c3283bd44dc35dd54fdec6253a3912e201ba1072018fca8" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", + "unicode-ident", +] + +[[package]] +name = "rtnetlink" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" +dependencies = [ + "async-global-executor", + "futures", + "log", + "netlink-packet-route", + "netlink-proto", + "nix 0.24.3", + "thiserror", + "tokio", +] + +[[package]] +name = "rust_decimal" +version = "1.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +dependencies = [ + "arrayvec", + "num-traits 0.2.19", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" + +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "salsa" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" +dependencies = [ + "crossbeam-utils", + "indexmap 1.9.3", + "lock_api", + "log", + "oorandom", + "parking_lot 0.11.2", + "rustc-hash", + "salsa-macros", + "smallvec", +] + +[[package]] +name = "salsa-macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3904a4ba0a9d0211816177fd34b04c7095443f8cdacd11175064fe541c8fe2" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "schemars" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.61", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.201" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half 1.8.3", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.201" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_json_pythonic" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62212da9872ca2a0cad0093191ee33753eddff9266cbbc1b4a602d13a3a768db" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "base64 0.13.1", + "chrono", + "hex", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling 0.20.8", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "similar" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.5", + "num-traits 0.2.19", + "thiserror", + "time", +] + +[[package]] +name = "simple_logger" +version = "4.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7e46c8c90251d47d08b28b8a419ffb4aede0f87c2eea95e17d1d5bacbf3ef1" +dependencies = [ + "colored", + "log", + "time", + "windows-sys 0.48.0", +] + +[[package]] +name = "simplelog" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0" +dependencies = [ + "log", + "termcolor", + "time", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "sketches-ddsketch" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg 1.3.0", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", +] + +[[package]] +name = "snow" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" +dependencies = [ + "aes-gcm", + "blake2", + "chacha20poly1305", + "curve25519-dalek", + "rand_core 0.6.4", + "ring 0.17.8", + "rustc_version", + "sha2", + "subtle", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "futures", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha-1", +] + +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sprs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec63571489873d4506683915840eeb1bb16b3198ee4894cc6f2fe3013d505e56" +dependencies = [ + "ndarray", + "num-complex 0.2.4", + "num-traits 0.1.43", +] + +[[package]] +name = "starknet-core" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14139b1c39bdc2f1e663c12090ff5108fe50ebe62c09e15e32988dfaf445a7e4" +dependencies = [ + "base64 0.21.7", + "flate2", + "hex", + "serde", + "serde_json", + "serde_json_pythonic", + "serde_with", + "sha3", + "starknet-crypto 0.6.2", + "starknet-ff", +] + +[[package]] +name = "starknet-crypto" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f2175b0b3fc24ff2ec6dc07f5a720498994effca7e78b11a6e1c1bd02cad52" +dependencies = [ + "crypto-bigint", + "hex", + "hmac", + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "rfc6979", + "sha2", + "starknet-crypto-codegen", + "starknet-curve 0.3.0", + "starknet-ff", + "zeroize", +] + +[[package]] +name = "starknet-crypto" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2c30c01e8eb0fc913c4ee3cf676389fffc1d1182bfe5bb9670e4e72e968064" +dependencies = [ + "crypto-bigint", + "hex", + "hmac", + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "rfc6979", + "sha2", + "starknet-crypto-codegen", + "starknet-curve 0.4.2", + "starknet-ff", + "zeroize", +] + +[[package]] +name = "starknet-crypto-codegen" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" +dependencies = [ + "starknet-curve 0.4.2", + "starknet-ff", + "syn 2.0.61", +] + +[[package]] +name = "starknet-curve" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252610baff59e4c4332ce3569f7469c5d3f9b415a2240d698fb238b2b4fc0942" +dependencies = [ + "starknet-ff", +] + +[[package]] +name = "starknet-curve" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c383518bb312751e4be80f53e8644034aa99a0afb29d7ac41b89a997db875b" +dependencies = [ + "starknet-ff", +] + +[[package]] +name = "starknet-ff" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abf1b44ec5b18d87c1ae5f54590ca9d0699ef4dd5b2ffa66fc97f24613ec585" +dependencies = [ + "ark-ff", + "bigdecimal", + "crypto-bigint", + "getrandom", + "hex", + "serde", +] + +[[package]] +name = "starknet-types-core" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6bacf0ba19bc721e518bc4bf389ff13daa8a7c5db5fd320600473b8aa9fcbd" +dependencies = [ + "lambdaworks-crypto", + "lambdaworks-math", + "lazy_static", + "num-bigint 0.4.5", + "num-integer", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "starknet_api" +version = "0.13.0-rc.0" +dependencies = [ + "assert_matches", + "bitvec", + "cairo-lang-starknet-classes", + "derive_more", + "hex", + "indexmap 2.2.6", + "itertools 0.12.1", + "once_cell", + "primitive-types", + "rstest", + "serde", + "serde_json", + "sha3", + "starknet-crypto 0.5.2", + "starknet-types-core", + "strum 0.24.1", + "strum_macros 0.24.3", + "thiserror", +] + +[[package]] +name = "starknet_client" +version = "0.4.0-rc.0" +dependencies = [ + "assert_matches", + "async-trait", + "cairo-lang-starknet-classes", + "enum-iterator", + "http", + "indexmap 2.2.6", + "mockall", + "mockito 0.31.1", + "os_info", + "papyrus_common", + "papyrus_config", + "papyrus_test_utils", + "pretty_assertions", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "simple_logger", + "starknet-types-core", + "starknet_api", + "strum 0.25.0", + "strum_macros 0.25.3", + "thiserror", + "tokio", + "tokio-retry", + "tracing", + "url", +] + +[[package]] +name = "starknet_gateway" +version = "0.0.0" +dependencies = [ + "assert_matches", + "async-trait", + "axum", + "blockifier", + "cairo-lang-starknet-classes", + "cairo-vm", + "hyper", + "mempool_test_utils", + "mockall", + "mockito 1.4.0", + "num-bigint 0.4.5", + "num-traits 0.2.19", + "papyrus_config", + "papyrus_rpc", + "pretty_assertions", + "reqwest", + "rstest", + "serde", + "serde_json", + "starknet-types-core", + "starknet_api", + "starknet_mempool", + "starknet_mempool_infra", + "starknet_mempool_types", + "starknet_sierra_compile", + "thiserror", + "tokio", + "tracing", + "validator", +] + +[[package]] +name = "starknet_mempool" +version = "0.0.0" +dependencies = [ + "assert_matches", + "async-trait", + "derive_more", + "itertools 0.10.5", + "pretty_assertions", + "rstest", + "starknet-types-core", + "starknet_api", + "starknet_mempool_infra", + "starknet_mempool_types", + "tokio", +] + +[[package]] +name = "starknet_mempool_infra" +version = "0.0.0" +dependencies = [ + "assert_matches", + "async-trait", + "bincode 1.3.3", + "hyper", + "pretty_assertions", + "rstest", + "serde", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "starknet_mempool_integration_tests" +version = "0.0.0" +dependencies = [ + "axum", + "blockifier", + "cairo-lang-starknet-classes", + "indexmap 2.2.6", + "itertools 0.10.5", + "mempool_test_utils", + "papyrus_common", + "papyrus_rpc", + "papyrus_storage", + "pretty_assertions", + "reqwest", + "rstest", + "serde_json", + "starknet-types-core", + "starknet_api", + "starknet_client", + "starknet_gateway", + "starknet_mempool_infra", + "starknet_mempool_node", + "starknet_mempool_types", + "starknet_task_executor", + "strum 0.25.0", + "tempfile", + "tokio", +] + +[[package]] +name = "starknet_mempool_node" +version = "0.0.0" +dependencies = [ + "anyhow", + "assert-json-diff", + "assert_matches", + "clap 4.5.4", + "colored", + "const_format", + "futures", + "mempool_test_utils", + "papyrus_config", + "pretty_assertions", + "serde", + "serde_json", + "starknet_gateway", + "starknet_mempool", + "starknet_mempool_infra", + "starknet_mempool_types", + "tokio", + "tracing", + "validator", +] + +[[package]] +name = "starknet_mempool_types" +version = "0.0.0" +dependencies = [ + "async-trait", + "mockall", + "starknet_api", + "starknet_mempool_infra", + "thiserror", +] + +[[package]] +name = "starknet_sierra_compile" +version = "0.0.0" +dependencies = [ + "assert_matches", + "cairo-lang-sierra", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "mempool_test_utils", + "serde", + "serde_json", + "starknet-types-core", + "starknet_api", + "thiserror", +] + +[[package]] +name = "starknet_task_executor" +version = "0.0.0" +dependencies = [ + "futures", + "rstest", + "tokio", + "tokio-test", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "statistical" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49d57902bb128e5e38b5218d3681215ae3e322d99f65d5420e9849730d2ea372" +dependencies = [ + "num 0.2.1", + "rand 0.6.5", +] + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.2", + "phf_shared 0.10.0", + "precomputed-hash", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +dependencies = [ + "strum_macros 0.26.2", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.61", +] + +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.61", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2", + "thiserror", + "url", + "zip", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand 2.1.0", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "test-case" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" +dependencies = [ + "test-case-macros", +] + +[[package]] +name = "test-case-core" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "test-case-macros" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", + "test-case-core", +] + +[[package]] +name = "test-log" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dffced63c2b5c7be278154d76b479f9f9920ed34e7574201407f0b14e2bbb93" +dependencies = [ + "env_logger", + "test-log-macros", + "tracing-subscriber", +] + +[[package]] +name = "test-log-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "test-with" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3e3e1275a1442b99772321d4a35e0622f7abc04f6af49bd801c7119645bc9e" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 2.0.61", + "which", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot 0.12.2", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.7", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand 0.8.5", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-test" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.12", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.8", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "hdrhistogram", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unescaper" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" +dependencies = [ + "thiserror", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-width" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "unindent" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" +dependencies = [ + "asynchronous-codec 0.6.2", + "bytes", +] + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna 0.5.0", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", + "serde", +] + +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" + +[[package]] +name = "validator" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" +dependencies = [ + "idna 0.2.3", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_derive", + "validator_types", +] + +[[package]] +name = "validator_derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286b4497f270f59276a89ae0ad109d5f8f18c69b613e3fb22b61201aadb0c4d" +dependencies = [ + "if_chain", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "validator_types", +] + +[[package]] +name = "validator_types" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "value-bag" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.61", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.34", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core 0.51.1", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +dependencies = [ + "windows-core 0.54.0", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-result" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek", + "rand_core 0.6.4", + "serde", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys 0.4.13", + "rustix 0.38.34", +] + +[[package]] +name = "xml-rs" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + +[[package]] +name = "xshell" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db0ab86eae739efd1b054a8d3d16041914030ac4e01cd1dca0cf252fd8b6437" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" + +[[package]] +name = "yamux" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed0164ae619f2dc144909a9f082187ebb5893693d8c0196e8085283ccd4b776" +dependencies = [ + "futures", + "log", + "nohash-hasher", + "parking_lot 0.12.2", + "pin-project", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "yamux" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f97202f6b125031b95d83e01dc57292b529384f80bfae4677e4bbc10178cf72" +dependencies = [ + "futures", + "instant", + "log", + "nohash-hasher", + "parking_lot 0.12.2", + "pin-project", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe 7.2.0", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-safe" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000000..8d1665c784 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,183 @@ +[workspace] +# Using version 2 to avoid unifying features. For more info, read: +# https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2 +resolver = "2" + +members = [ + "crates/blockifier", + "crates/committer", + "crates/committer_cli", + "crates/gateway", + "crates/mempool", + "crates/mempool_infra", + "crates/mempool_node", + "crates/mempool_test_utils", + "crates/mempool_types", + "crates/native_blockifier", + "crates/papyrus_base_layer", + "crates/papyrus_common", + "crates/papyrus_config", + "crates/papyrus_execution", + "crates/papyrus_load_test", + "crates/papyrus_monitoring_gateway", + "crates/papyrus_network", + "crates/papyrus_node", + "crates/papyrus_p2p_sync", + "crates/papyrus_proc_macros", + "crates/papyrus_protobuf", + "crates/papyrus_rpc", + "crates/papyrus_storage", + "crates/papyrus_sync", + "crates/papyrus_test_utils", + "crates/sequencing/papyrus_block_builder", + "crates/sequencing/papyrus_consensus", + "crates/starknet_api", + "crates/starknet_client", + "crates/starknet_sierra_compile", + "crates/task_executor", + "crates/tests-integration", +] + +[workspace.package] +version = "0.0.0" +edition = "2021" +repository = "https://github.com/starkware-libs/sequencer/" +license = "Apache-2.0" +license-file = "LICENSE" + +[workspace.dependencies] +# fixating the version of parity-scale-codec and parity-scale-codec-derive due to an error in udeps. +# TODO: Remove this once udeps is fixed. +anyhow = "1.0.44" +ark-ec = "0.4.2" +ark-ff = "0.4.0-alpha.7" +ark-secp256k1 = "0.4.0" +ark-secp256r1 = "0.4.0" +assert_matches = "1.5.0" +assert-json-diff = "2.0.2" +async-recursion = "1.1.0" +async-stream = "0.3.3" +async-trait = "0.1.79" +axum = "0.6.12" +base64 = "0.13.0" +bincode = "1.3.3" +bisection = "0.1.0" +bitvec = "1.0.1" +byteorder = "1.4.3" +bytes = "1" +cached = "0.44.0" +cairo-felt = "0.9.1" +cairo-lang-casm = "2.7.0-rc.3" +cairo-lang-runner = "2.7.0-rc.3" +cairo-lang-sierra = "=2.7.0-rc.3" +cairo-lang-starknet-classes = "2.7.0-rc.3" +cairo-lang-utils = "2.7.0-rc.3" +cairo-vm = "=1.0.0-rc5" +camelpaste = "0.1.0" +chrono = "0.4.26" +clap = "4.3.10" +colored = "2.1.0" +const_format = "0.2.30" +criterion = "0.3" +deadqueue = "0.2.4" +defaultmap = "0.5.0" +derive_more = "0.99.17" +enum-iterator = "1.4.1" +ethers = "2.0.3" +ethnum = "1.5.0" +flate2 = "1.0.24" +futures = "0.3.21" +futures-channel = "0.3.21" +futures-util = "0.3.21" +glob = "0.3.1" +hex = "0.4.3" +http = "0.2.8" +human_bytes = "0.4.3" +hyper = "0.14" +indexmap = "2.1.0" +insta = "1.29.0" +integer-encoding = "3.0.4" +itertools = "0.10.5" +jsonrpsee = "0.20.3" +jsonschema = "0.17.0" +keccak = "0.1.3" +lazy_static = "1.4.0" +libmdbx = "0.3.5" +libp2p = "0.53.2" +libp2p-swarm-test = "0.3.0" +log = "0.4" +lru = "0.12.0" +memmap2 = "0.8.0" +metrics = "0.21.0" +metrics-exporter-prometheus = "0.12.1" +mockall = "0.12.1" +num-bigint = "0.4" +num-integer = "0.1.45" +num-rational = { version = "0.4", features = ["serde"] } +num-traits = "0.2.15" +once_cell = "1.19.0" +os_info = "3.6.0" +page_size = "0.6.0" +parity-scale-codec = "=3.6.9" +parity-scale-codec-derive = "=3.6.9" +paste = "1.0.15" +phf = { version = "0.11", features = ["macros"] } +pretty_assertions = "1.4.0" +primitive-types = "0.12.1" +prometheus-parse = "0.2.4" +prost = "0.12.1" +prost-build = "0.12.1" +prost-types = "0.12.1" +pyo3 = "0.19.1" +pyo3-log = "0.8.1" +rand = "0.8.5" +rand_chacha = "0.3.1" +rand_distr = "0.4.3" +regex = "1.10.4" +replace_with = "0.1.7" +reqwest = { version = "0.11", features = ["blocking", "json"] } +rstest = "0.17.0" +rustc-hex = "2.1.0" +schemars = "0.8.12" +serde = "1.0.193" +serde_json = "1.0.81" +serde_repr = "0.1" +serde_yaml = "0.9.16" +sha2 = "0.10.8" +sha3 = "0.10.8" +simple_logger = "4.0.0" +simplelog = "0.12.2" +starknet-core = "0.6.0" +starknet-crypto = "0.5.1" +starknet-types-core = { version = "0.1.5", features = ["hash", "prime-bigint", "std"] } +static_assertions = "1.1.0" +statistical = "1.0.0" +strum = "0.25.0" +strum_macros = "0.25.2" +tempfile = "3.7.0" +test-case = "3.2.1" +test-log = "0.2.14" +thiserror = "1.0.37" +tikv-jemallocator = "0.5.4" +tokio = { version = "1.37.0", features = ["full"] } +tokio-retry = "0.3" +tokio-stream = "0.1.8" +tokio-test = "0.4.4" +tower = "0.4.13" +tracing = "0.1.37" +tracing-subscriber = "0.3.16" +unsigned-varint = "0.8.0" +url = "2.5.0" +validator = "0.12" +void = "1.0.2" +zstd = "0.13.1" + +[workspace.lints.rust] +future-incompatible = "deny" +nonstandard-style = "deny" +rust-2018-idioms = "deny" +unused = "deny" +warnings = "deny" + +[workspace.lints.clippy] +as_conversions = "deny" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..25fc653bbd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,85 @@ +# Dockerfile with multi-stage builds for efficient dependency caching and lightweight final image. +# For more on Docker stages, visit: https://docs.docker.com/build/building/multi-stage/ + +# We use Cargo Chef to compile dependencies before compiling the rest of the crates. +# This approach ensures proper Docker caching, where dependency layers are cached until a dependency changes. +# Code changes in our crates won't affect these cached layers, making the build process more efficient. +# More info on Cargo Chef: https://github.com/LukeMathWalker/cargo-chef + +# We start by creating a base image using 'clux/muslrust' with additional required tools. +FROM clux/muslrust:1.78.0-stable AS chef +WORKDIR /app +RUN apt update && apt install -y clang unzip +RUN cargo install cargo-chef +ENV PROTOC_VERSION=25.1 +RUN curl -L "https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip" -o protoc.zip && unzip ./protoc.zip -d $HOME/.local && rm ./protoc.zip +ENV PROTOC=/root/.local/bin/protoc +# Add the x86_64-unknown-linux-musl target to rustup for compiling statically linked binaries. +# This enables the creation of fully self-contained binaries that do not depend on the system's dynamic libraries, +# resulting in more portable executables that can run on any Linux distribution. +RUN rustup target add x86_64-unknown-linux-musl + +##################### +# Stage 1 (planer): # +##################### +FROM chef AS planner +COPY . . +# * Running Cargo Chef prepare that will generate recipe.json which will be used in the next stage. +RUN cargo chef prepare + +##################### +# Stage 2 (cacher): # +##################### +# Compile all the dependecies using Cargo Chef cook. +FROM chef AS cacher + +# Copy recipe.json from planner stage +COPY --from=planner /app/recipe.json recipe.json + +# Build dependencies - this is the caching Docker layer! +RUN cargo chef cook --target x86_64-unknown-linux-musl --release --package papyrus_node + +###################### +# Stage 3 (builder): # +###################### +FROM chef AS builder +COPY . . +COPY --from=cacher /app/target target +# Disable incremental compilation for a cleaner build. +ENV CARGO_INCREMENTAL=0 + +# Compile the papyrus_node crate for the x86_64-unknown-linux-musl target in release mode, ensuring dependencies are locked. +RUN cargo build --target x86_64-unknown-linux-musl --release --package papyrus_node --locked + +########################### +# Stage 4 (papyrus_node): # +########################### +# Uses Alpine Linux to run a lightweight and secure container. +FROM alpine:3.17.0 AS papyrus_node +ENV ID=1000 +WORKDIR /app + +# Copy the node executable and its configuration. +COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/papyrus_node /app/target/release/papyrus_node +COPY config config + +# Install tini, a lightweight init system, to call our executable. +RUN set -ex; \ + apk update; \ + apk add --no-cache tini; \ + mkdir data + +# Create a new user "papyrus". +RUN set -ex; \ + addgroup --gid ${ID} papyrus; \ + adduser --ingroup $(getent group ${ID} | cut -d: -f1) --uid ${ID} --gecos "" --disabled-password --home /app papyrus; \ + chown -R papyrus:papyrus /app + +# Expose RPC and monitoring ports. +EXPOSE 8080 8081 + +# Switch to the new user. +USER ${ID} + +# Set the entrypoint to use tini to manage the process. +ENTRYPOINT ["/sbin/tini", "--", "/app/target/release/papyrus_node"] diff --git a/Monitoring/papyrus/alerts_grafana.json b/Monitoring/papyrus/alerts_grafana.json new file mode 100644 index 0000000000..02c027a8b0 --- /dev/null +++ b/Monitoring/papyrus/alerts_grafana.json @@ -0,0 +1,7768 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "panel", + "id": "alertlist", + "name": "Alert list", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.5.5" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 64, + "panels": [], + "title": "Main Alerts", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "h": 27, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "alertName": "(Papyrus)", + "dashboardAlerts": false, + "dashboardTitle": "", + "maxItems": 90, + "showOptions": "current", + "sortOrder": 3, + "stateFilter": { + "alerting": false, + "execution_error": false, + "no_data": false, + "ok": false, + "paused": false, + "pending": false + }, + "tags": [] + }, + "pluginVersion": "8.5.5", + "title": "Alerts Panel", + "type": "alertlist" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "min" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10m", + "frequency": "1m", + "handler": 1, + "name": "Unsynced headers alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 6, + "x": 6, + "y": 1 + }, + "hiddenSeries": false, + "id": 67, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"NAMESPACE\"} - papyrus_header_marker{kubernetes_namespace=\"NAMESPACE\"}", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 2, + "visible": true + } + ], + "timeRegions": [], + "title": "Unsynced headers", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "min" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10m", + "frequency": "1m", + "handler": 1, + "name": "Unsynced bodies alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 6, + "x": 12, + "y": 1 + }, + "hiddenSeries": false, + "id": 68, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"NAMESPACE\"} - papyrus_body_marker{kubernetes_namespace=\"NAMESPACE\"}", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 2, + "visible": true + } + ], + "timeRegions": [], + "title": "Unsynced bodies", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "min" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10m", + "frequency": "1m", + "handler": 1, + "name": "Unsynced state diffs alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 6, + "x": 18, + "y": 1 + }, + "hiddenSeries": false, + "id": 69, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"NAMESPACE\"} - papyrus_state_marker{kubernetes_namespace=\"NAMESPACE\"}", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 2, + "visible": true + } + ], + "timeRegions": [], + "title": "Unsynced state diffs", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "min" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10m", + "frequency": "1m", + "handler": 1, + "name": "Unsynced compiled classes alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 6, + "x": 6, + "y": 10 + }, + "hiddenSeries": false, + "id": 70, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"NAMESPACE\"} - papyrus_compiled_class_marker{kubernetes_namespace=\"NAMESPACE\"}", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 2, + "visible": true + } + ], + "timeRegions": [], + "title": "Unsynced compiled classes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 100 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Execution Request Load Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Rate of requests for methods that change Starknet", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 6, + "x": 12, + "y": 10 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(sum(rpc_incoming_requests{kubernetes_namespace=\"NAMESPACE\", method=~\"addDeclareTransaction|addDeployAccountTransaction|addInvokeTransaction\"})[10m:])", + "legendFormat": "Incoming requests rate (in 10 mins)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 100, + "visible": true + } + ], + "title": "Requests Rate - Execute Functions", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 100 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Call Request Load Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Rate of requests for methods that query Starknet", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 6, + "x": 18, + "y": 10 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rate(sum(rpc_incoming_requests{kubernetes_namespace=\"NAMESPACE\", method!~\"addDeclareTransaction|addDeployAccountTransaction|addInvokeTransaction\"})[10m:])", + "legendFormat": "Incoming requests rate (in 10 mins)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 100, + "visible": true + } + ], + "title": "Requests Rate - Call Functions", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 0.00001 + ], + "type": "lt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "No New Block Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 6, + "x": 6, + "y": 19 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "max(rate(papyrus_central_block_marker{kubernetes_namespace=\"NAMESPACE\"}[4m])*225)", + "legendFormat": "Number of Blocks", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 0.00001, + "visible": true + } + ], + "timeRegions": [], + "title": "Starknet Block Creation Rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 52, + "panels": [], + "title": "Latency Alert - Execute Functions", + "type": "row" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet addDeclareTransaction OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 29 + }, + "id": 55, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"addDeclareTransaction\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "addDeclareTransaction OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet addDeclareTransaction NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 29 + }, + "id": 54, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"addDeclareTransaction\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "addDeclareTransaction NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet addDeployAccountTransaction OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 29 + }, + "id": 57, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"addDeployAccountTransaction\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "addDeployAccountTransaction OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet addDeployAccountTransaction NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 29 + }, + "id": 56, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"addDeployAccountTransaction\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "addDeployAccountTransaction NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet addInvokeTransaction OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 36 + }, + "id": 53, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"addInvokeTransaction\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "addInvokeTransaction OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet addInvokeTransaction NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 36 + }, + "id": 58, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"addInvokeTransaction\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "addInvokeTransaction NEW_VERSION Latency", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 60, + "panels": [], + "title": "Latency Alert - Call Functions - Blocks", + "type": "row" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet blockHashAndNumber OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 44 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"blockHashAndNumber\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "blockHashAndNumber OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet blockHashAndNumber NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 44 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"blockHashAndNumber\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "blockHashAndNumber NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet blockNumber OLD_VERSION Latency Alert(Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 44 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"blockNumber\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "blockNumber OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet blockNumber NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 44 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"blockNumber\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "blockNumber NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getBlockTransactionCount OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 51 + }, + "id": 18, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getBlockTransactionCount\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getBlockTransactionCount OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getBlockTransactionCount NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 51 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getBlockTransactionCount\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getBlockTransactionCount NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getBlockWithTxHashes OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 51 + }, + "id": 25, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getBlockWithTxHashes\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getBlockWithTxHashes OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getBlockWithTxHashes NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 51 + }, + "id": 24, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getBlockWithTxHashes\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getBlockWithTxHashes NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getBlockWithTxs OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 58 + }, + "id": 28, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getBlockWithTxs\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getBlockWithTxs OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getBlockWithTxs NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 58 + }, + "id": 26, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getBlockWithTxs\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getBlockWithTxs NEW_VERSION Latency", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 65 + }, + "id": 62, + "panels": [], + "title": "Latency Alert - Call Functions - Transactions", + "type": "row" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getTransactionByBlockIdAndIndex OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 66 + }, + "id": 43, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getTransactionByBlockIdAndIndex\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getTransactionByBlockIdAndIndex OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getTransactionByBlockIdAndIndex NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 66 + }, + "id": 42, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getTransactionByBlockIdAndIndex\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getTransactionByBlockIdAndIndex NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getTransactionByHash OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 66 + }, + "id": 45, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getTransactionByHash\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getTransactionByHash OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getTransactionByHash NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 66 + }, + "id": 44, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getTransactionByHash\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getTransactionByHash NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getTransactionReceipt OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 73 + }, + "id": 47, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getTransactionReceipt\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getTransactionReceipt OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getTransactionReceipt NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 73 + }, + "id": 46, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getTransactionReceipt\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getTransactionReceipt NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet pendingTransactions OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 73 + }, + "id": 49, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"pendingTransactions\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "pendingTransactions OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet pendingTransactions NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 73 + }, + "id": 48, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"pendingTransactions\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "pendingTransactions NEW_VERSION Latency", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 80 + }, + "id": 66, + "panels": [], + "title": "Latency Alert - Call Functions - Classes", + "type": "row" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getClass OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 81 + }, + "id": 30, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getClass\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getClass OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getClass NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 81 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getClass\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getClass NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getClassAt OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 81 + }, + "id": 31, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getClassAt\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getClassAt OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getClassAt NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 81 + }, + "id": 29, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getClassAt\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getClassAt NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getClassHashAt OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 88 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getClassHashAt\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getClassHashAt OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getClassHashAt NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 88 + }, + "id": 32, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getClassHashAt\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getClassHashAt NEW_VERSION Latency", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 95 + }, + "id": 12, + "panels": [], + "title": "Latency Alert - Call Functions - Others", + "type": "row" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet call OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 96 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"call\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "call OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet call NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 96 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"call\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "call NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet chainId OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 96 + }, + "id": 19, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"chainId\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "chainId OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet chainId NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 96 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"chainId\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "chainId NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet estimateFee OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 103 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"estimateFee\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "estimateFee OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet estimateFee NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 103 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"estimateFee\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "estimateFee NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getNonce OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 103 + }, + "id": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getNonce\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getNonce OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getNonce NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 103 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getNonce\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getNonce NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getEvents OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 110 + }, + "id": 35, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getEvents\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getEvents OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getEvents NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 110 + }, + "id": 34, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getEvents\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getEvents NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getStorageAt OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 110 + }, + "id": 41, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getStorageAt\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getStorageAt OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getStorageAt NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 110 + }, + "id": 40, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getStorageAt\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getStorageAt NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getStateUpdate OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 117 + }, + "id": 39, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getStateUpdate\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getStateUpdate OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet getStateUpdate NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 117 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"getStateUpdate\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "getStateUpdate NEW_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet syncing OLD_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 117 + }, + "id": 33, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"syncing\",version=\"OLD_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "syncing OLD_VERSION Latency", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Starknet syncing NEW_VERSION Latency Alert (Papyrus)", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Latency (seconds)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 117 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"NAMESPACE\", method=\"syncing\",version=\"NEW_VERSION\",quantile=\"0.95\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 1, + "visible": true + } + ], + "title": "syncing NEW_VERSION Latency", + "type": "timeseries" + } + ], + "refresh": false, + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "NAMESPACE-alerts", + "uid": "NAMESPACE", + "version": 58, + "weekStart": "" +} diff --git a/Monitoring/papyrus/grafana.json b/Monitoring/papyrus/grafana.json new file mode 100644 index 0000000000..b2533758d2 --- /dev/null +++ b/Monitoring/papyrus/grafana.json @@ -0,0 +1,9286 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.5.5" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "iteration": 1697099323886, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 30, + "panels": [], + "title": "Sync", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The difference, in seconds, between the time the node received the batch and the batch creation timestamp.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisGridShow": true, + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "papyrus_header_latency{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "legendFormat": "Latency (seconds)", + "range": true, + "refId": "A" + } + ], + "title": "Header Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The Current Starknet block number.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 16, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "Starknet Block Number", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The block number of the last Starknet block that was finalized on L1.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 0, + "noValue": "0", + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 15, + "x": 0, + "y": 14 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "papyrus_base_layer_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "L1 Block Number", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The difference between Starknet Block Number and L1 Block Number.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "light-blue", + "value": 100 + }, + { + "color": "super-light-orange", + "value": 1000 + }, + { + "color": "orange", + "value": 10000 + }, + { + "color": "red", + "value": 100000 + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 14 + }, + "id": 69, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} - papyrus_base_layer_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "L1 Block Number Diff", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The current block header marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 19 + }, + "id": 21, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "papyrus_header_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "Block Header", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The current block body marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 19 + }, + "id": 18, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "papyrus_body_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "Block Body", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The current state update marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 19 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "papyrus_state_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "State Update", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The current compiled class marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 19 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "papyrus_compiled_class_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "Compiled Class (CASM)", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The difference between the current Starknet block number and the current block header marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-green", + "value": 1 + }, + { + "color": "super-light-orange", + "value": 5 + }, + { + "color": "orange", + "value": 10 + }, + { + "color": "red", + "value": 20 + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 24 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} - papyrus_header_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "Block Header Diff", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The difference between the current Starknet block number and the current block body marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-green", + "value": 1 + }, + { + "color": "super-light-orange", + "value": 5 + }, + { + "color": "orange", + "value": 10 + }, + { + "color": "red", + "value": 20 + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 24 + }, + "id": 66, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} - papyrus_body_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "Block Body Diff", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The difference between the current Starknet block number and the current state update marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-green", + "value": 1 + }, + { + "color": "super-light-orange", + "value": 5 + }, + { + "color": "orange", + "value": 10 + }, + { + "color": "red", + "value": 20 + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 24 + }, + "id": 67, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} - papyrus_state_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "State Update Diff", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The difference between the current Starknet block number and the current compiled class marker.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-green", + "value": 1 + }, + { + "color": "super-light-orange", + "value": 5 + }, + { + "color": "orange", + "value": 10 + }, + { + "color": "red", + "value": 20 + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 24 + }, + "id": 68, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} - papyrus_compiled_class_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"}", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "Compiled Class (CASM) Diff", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The percentage of the current block header marker from the current Starknet block number.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 0.5 + }, + { + "color": "super-light-orange", + "value": 0.75 + }, + { + "color": "super-light-green", + "value": 0.9 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 29 + }, + "id": 65, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "floor(papyrus_header_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} / papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} * 10^4) / 10^4", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "Block Header %", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The percentage of the current block body marker from the current Starknet block number.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 0.5 + }, + { + "color": "super-light-orange", + "value": 0.75 + }, + { + "color": "super-light-green", + "value": 0.9 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 29 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "floor(papyrus_body_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} / papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} * 10^4) / 10^4", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "Block Body %", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The percentage of the current state update marker from the current Starknet block number.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 0.5 + }, + { + "color": "super-light-orange", + "value": 0.75 + }, + { + "color": "super-light-green", + "value": 0.9 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 29 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "floor(papyrus_state_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} / papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} * 10^4) / 10^4", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "State Update %", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The percentage of the current compiled class marker from the current Starknet block number.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 0.5 + }, + { + "color": "super-light-orange", + "value": 0.75 + }, + { + "color": "super-light-green", + "value": 0.9 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Central" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 29 + }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "floor(papyrus_compiled_class_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} / papyrus_central_block_marker{kubernetes_namespace=\"$namespace\", pod=~\"$pod\"} * 10^4) / 10^4", + "hide": false, + "refId": "Head / Central" + } + ], + "title": "Compiled Class (CASM) %", + "transformations": [], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 34, + "panels": [], + "title": "Resources usage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "CPU usage percentage.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Percentage", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 35 + }, + "id": 36, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[1m])", + "interval": "", + "legendFormat": "{{container}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Memory usage in bytes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 35 + }, + "id": 38, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}) by (container, pod)", + "legendFormat": "{{container}}", + "range": true, + "refId": "A" + } + ], + "title": "Memory usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Storage usage in bytes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 3, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 40, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\"} - kubelet_volume_stats_available_bytes{namespace=\"$namespace\"}", + "legendFormat": "{{namespace}}", + "range": true, + "refId": "A" + } + ], + "title": "Storage usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Networking usage.\nTx - Transmitting.\nRx - Receiving.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Bytes / Minute", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Tx" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Rx" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 45 + }, + "id": 44, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "- sum(rate(container_network_transmit_bytes_total{image!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[1m])) by (container, pod)", + "hide": false, + "legendFormat": "Tx", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(rate(container_network_receive_bytes_total{image!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[1m])) by (container, pod)", + "hide": false, + "legendFormat": "Rx", + "range": true, + "refId": "B" + } + ], + "title": "Networking usage", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 32, + "panels": [], + "title": "Requests and latencies", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 54 + }, + "id": 62, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockNumber\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "blockNumber Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 54 + }, + "id": 70, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockNumber\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "blockNumber Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 54 + }, + "id": 71, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockNumber\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "blockNumber Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 54 + }, + "id": 72, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockNumber\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "blockNumber Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 61 + }, + "id": 73, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getNonce\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getNonce Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 61 + }, + "id": 74, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getNonce\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getNonce Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 61 + }, + "id": 75, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getNonce\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getNonce Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 61 + }, + "id": 76, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getNonce\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getNonce Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 68 + }, + "id": 84, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStateUpdate\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getStateUpdate Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 68 + }, + "id": 83, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStateUpdate\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getStateUpdate Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 68 + }, + "id": 82, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStateUpdate\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getStateUpdate Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 68 + }, + "id": 80, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStateUpdate\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getStateUpdate Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 75 + }, + "id": 77, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByHash\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getTransactionByHash Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 75 + }, + "id": 101, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByHash\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getTransactionByHash Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 75 + }, + "id": 79, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByHash\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getTransactionByHash Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 75 + }, + "id": 85, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByHash\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getTransactionByHash Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 82 + }, + "id": 103, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClass\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getClass Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 82 + }, + "id": 104, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClass\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getClass Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 82 + }, + "id": 105, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClass\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getClass Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 82 + }, + "id": 81, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClass\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getClass Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 89 + }, + "id": 106, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getEvents\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getEvents Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 89 + }, + "id": 107, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getEvents\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getEvents Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 89 + }, + "id": 108, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getEvents\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getEvents Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 89 + }, + "id": 86, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getNonce\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getEvents Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 96 + }, + "id": 109, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassAt\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getClassAt Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 96 + }, + "id": 110, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassAt\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getClassAt Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 96 + }, + "id": 102, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassAt\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getClassAt Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 96 + }, + "id": 87, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassAt\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getClassAt Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 103 + }, + "id": 112, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassHashAt\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getClassHashAt Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 103 + }, + "id": 113, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassHashAt\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getClassHashAt Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 103 + }, + "id": 114, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassHashAt\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getClassHashAt Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 103 + }, + "id": 88, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getClassHashAt\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getClassHashAt Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 110 + }, + "id": 115, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxs\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getBlockWithTxs Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 110 + }, + "id": 116, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxs\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getBlockWithTxs Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 110 + }, + "id": 117, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxs\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getBlockWithTxs Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 110 + }, + "id": 89, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxs\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getBlockWithTxs Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 117 + }, + "id": 118, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStorageAt\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getStorageAt Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 117 + }, + "id": 78, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStorageAt\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getStorageAt Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 117 + }, + "id": 111, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStorageAt\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getStorageAt Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 117 + }, + "id": 90, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getStorageAt\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getStorageAt Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 124 + }, + "id": 121, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockTransactionCount\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getBlockTransactionCount Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 124 + }, + "id": 122, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockTransactionCount\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getBlockTransactionCount Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 124 + }, + "id": 123, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockTransactionCount\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getBlockTransactionCount Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 124 + }, + "id": 91, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockTransactionCount\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getBlockTransactionCount Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 131 + }, + "id": 124, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionReceipt\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getTransactionReceipt Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 131 + }, + "id": 125, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionReceipt\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getTransactionReceipt Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 131 + }, + "id": 126, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionReceipt\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getTransactionReceipt Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 131 + }, + "id": 92, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionReceipt\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getTransactionReceipt Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 138 + }, + "id": 127, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxHashes\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getBlockWithTxHashes Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 138 + }, + "id": 128, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxHashes\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getBlockWithTxHashes Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 138 + }, + "id": 129, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxHashes\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getBlockWithTxHashes Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 138 + }, + "id": 93, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getBlockWithTxHashes\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getBlockWithTxHashes Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 145 + }, + "id": 130, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByBlockIdAndIndex\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "getTransactionByBlockIdAndIndex Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 145 + }, + "id": 131, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByBlockIdAndIndex\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "getTransactionByBlockIdAndIndex Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 145 + }, + "id": 132, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByBlockIdAndIndex\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "getTransactionByBlockIdAndIndex Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 145 + }, + "id": 94, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"getTransactionByBlockIdAndIndex\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "getTransactionByBlockIdAndIndex Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 152 + }, + "id": 133, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "addInvokeTransaction Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 152 + }, + "id": 134, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "addInvokeTransaction Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 152 + }, + "id": 135, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "addInvokeTransaction Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 152 + }, + "id": 95, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "addInvokeTransaction Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 159 + }, + "id": 136, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockHashAndNumber\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "blockHashAndNumber Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 159 + }, + "id": 137, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockHashAndNumber\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "blockHashAndNumber Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 159 + }, + "id": 138, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockHashAndNumber\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "blockHashAndNumber Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 159 + }, + "id": 96, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"blockHashAndNumber\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "blockHashAndNumber Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 166 + }, + "id": 139, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"chainId\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "chainId Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 166 + }, + "id": 140, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"chainId\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "chainId Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 166 + }, + "id": 141, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"chainId\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "chainId Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 166 + }, + "id": 97, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"chainId\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "chainId Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 173 + }, + "id": 142, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"syncing\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "syncing Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 173 + }, + "id": 143, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"syncing\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "syncing Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 173 + }, + "id": 144, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"syncing\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "syncing Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 173 + }, + "id": 98, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"syncing\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "syncing Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 180 + }, + "id": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"call\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "call Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 180 + }, + "id": 119, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"call\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "call Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 180 + }, + "id": 120, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"call\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "call Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 180 + }, + "id": 99, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"call\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "call Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 169 + }, + "id": 153, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"simulateTransactions\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "simulateTransactions Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 169 + }, + "id": 154, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"simulateTransactions\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "simulateTransactions Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 169 + }, + "id": 155, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"simulateTransactions\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "simulateTransactions Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 169 + }, + "id": 156, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"simulateTransactions\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "simulateTransactions Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 176 + }, + "id": 157, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"estimateFee\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "estimateFee Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 176 + }, + "id": 158, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"estimateFee\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "estimateFee Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 176 + }, + "id": 159, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"estimateFee\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "estimateFee Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 176 + }, + "id": 160, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"estimateFee\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "estimateFee Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 183 + }, + "id": 145, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceTransaction\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "traceTransaction Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 183 + }, + "id": 146, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "traceTransaction Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 183 + }, + "id": 147, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceTransaction\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "traceTransaction Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 183 + }, + "id": 148, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "traceTransaction Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 190 + }, + "id": 149, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceBlockTransactions\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "traceBlockTransactions Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 190 + }, + "id": 150, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceBlockTransactions\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "traceBlockTransactions Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 190 + }, + "id": 151, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceBlockTransactions\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "traceBlockTransactions Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 190 + }, + "id": 152, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"traceBlockTransactions\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "traceBlockTransactions Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 197 + }, + "id": 164, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "addInvokeTransaction Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 197 + }, + "id": 163, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "addInvokeTransaction Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 197 + }, + "id": 162, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "addInvokeTransaction Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 197 + }, + "id": 161, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addInvokeTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "addInvokeTransaction Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 204 + }, + "id": 172, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeployAccountTransaction\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "addDeployAccountTransaction Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 204 + }, + "id": 170, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeployAccountTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "addDeployAccountTransaction Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 204 + }, + "id": 167, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeployAccountTransaction\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "addDeployAccountTransaction Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 204 + }, + "id": 166, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeployAccountTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "addDeployAccountTransaction Latencies", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of incoming requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 211 + }, + "id": 171, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_incoming_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeclareTransaction\",version=\"$version\"}", + "legendFormat": "Incoming requests", + "range": true, + "refId": "A" + } + ], + "title": "addDeclareTransaction Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Number of failed requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 211 + }, + "id": 169, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_failed_requests{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeclareTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "Failed requests", + "range": true, + "refId": "C" + } + ], + "title": "addDeclareTransaction Failed Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latency of the quickest 95% of the requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 211 + }, + "id": 168, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeclareTransaction\",version=\"$version\",quantile=\"0.95\"}", + "hide": false, + "legendFormat": "Latency", + "range": true, + "refId": "B" + } + ], + "title": "addDeclareTransaction Latency (0.95)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximal latencies of different percentages of the quickest requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 10, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 211 + }, + "id": 165, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "rpc_request_latency_seconds{kubernetes_namespace=\"$namespace\", pod=~\"$pod\", method=\"addDeclareTransaction\",version=\"$version\"}", + "hide": false, + "legendFormat": "{{quantile}}", + "range": true, + "refId": "B" + } + ], + "title": "addDeclareTransaction Latencies", + "type": "timeseries" + } + ], + "refresh": false, + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(papyrus_header_marker, kubernetes_namespace)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(papyrus_header_marker, kubernetes_namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(papyrus_header_marker{kubernetes_namespace=\"$namespace\"}, pod)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(papyrus_header_marker{kubernetes_namespace=\"$namespace\"}, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": "V0_7", + "value": "V0_7" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "version", + "options": [ + { + "selected": false, + "text": "V0_6", + "value": "V0_6" + }, + { + "selected": false, + "text": "V0_7", + "value": "V0_7" + } + ], + "query": "V0_6,V0_7", + "queryValue": "None", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Papyrus-node-data", + "uid": "Tv-UWle4k", + "version": 60, + "weekStart": "" +} diff --git a/README.md b/README.md new file mode 100644 index 0000000000..4a18d3e7a3 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Sequencer diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/blockifier.Dockerfile b/blockifier.Dockerfile new file mode 100644 index 0000000000..e6d9a8d4ee --- /dev/null +++ b/blockifier.Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:20.04 + +RUN apt update && apt -y install \ + build-essential \ + clang \ + curl \ + python3-dev + +ENV RUSTUP_HOME=/opt/rust +ENV CARGO_HOME=/opt/rust +ENV PATH=$PATH:/opt/rust/bin + +COPY scripts/install_build_tools.sh . +RUN bash install_build_tools.sh diff --git a/build_native_blockifier.sh b/build_native_blockifier.sh new file mode 100755 index 0000000000..8274992eda --- /dev/null +++ b/build_native_blockifier.sh @@ -0,0 +1,16 @@ +#!/bin/env bash +set -e + +docker_image_name=blockifier-ci +docker build . -t ${docker_image_name} --file blockifier.Dockerfile + +docker run \ + --rm \ + --net host \ + -e CARGO_HOME=${HOME}/.cargo \ + -u $UID \ + -v /tmp:/tmp \ + -v "${HOME}:${HOME}" \ + --workdir ${PWD} \ + ${docker_image_name} \ + cargo build --release -p native_blockifier --features "testing" diff --git a/check_starknet_api_version_dependency.sh b/check_starknet_api_version_dependency.sh new file mode 100755 index 0000000000..2baccc9fd3 --- /dev/null +++ b/check_starknet_api_version_dependency.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +set -e + +# Fetch the package's dependencies using cargo metadata +CARGO_METADATA=$(cargo metadata --no-deps --format-version 1) + +# Extract the names of the dependencies from the metadata using jq +DEPENDENCIES=$(echo "$CARGO_METADATA" | jq '.packages[].dependencies[].name') + +# cleanup the dependencies names from duble quotes +DEPENDENCIES=$(echo "$DEPENDENCIES" | grep -oE "\"[^\"]+\"" | tr -d "\"") + +if [[ $DEPENDENCIES =~ starknet_api ]]; then + # Use jq to extract the dependencies which have the name "starknet_api" and get their source information. + # The result will be the Git revision or other source details, if "starknet_api" is a dependency. + SOURCE_INFO=$(echo "$CARGO_METADATA" | jq '.packages[].dependencies[] | select(.name == "starknet_api") | .source') + + # cleanup and sort. + REVISION=$(echo "$SOURCE_INFO" | tr -d "\"" | sort -u) + + if [[ $REVISION =~ ^git\+https:\/\/github.com\/starkware-libs\/starknet-api\?rev=([a-f0-9]+)$ ]]; then + # Extract the commit hash from the Git URL. + COMMIT_HASH=${BASH_REMATCH[1]} + + # Check if the commit exists in the main branch of the "starknet-api" repository. + GIT_API_URL="https://api.github.com/search/commits?q=repo:starkware-libs/starknet-api+hash:" + HTTP_RESPONSE=$(curl -s -w "%{http_code}" "${GIT_API_URL}${COMMIT_HASH}" | tr -d '\n' | grep -o --regex='{.*}') + TOTAL_COUNT=$(echo "$HTTP_RESPONSE" | jq '.total_count') + + if [[ "$TOTAL_COUNT" -eq 1 ]]; then + echo "starknet_api is dependent on a git revision, and the commit is part of the main branch." + exit 0 + else + echo "starknet_api is dependent on a git revision, but the commit is not part of the main branch." + exit 1 + fi + else + echo "starknet_api is dependent on a non-git version." + exit 0 + fi +else + echo "starknet_api is not a dependency." + exit 0 +fi diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..e1f9c2f8b4 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,19 @@ +ignore: + - "crates/test_utils" + - "crates/papyrus_load_test" + - "crates/papyrus_node/src/bin/*integration_test.rs" + - "crates/**/*test*.rs" +coverage: + status: + project: + default: + target: auto # set the target coverage to the value of the parent commit + threshold: 0% # pct of drop in coverage that is still considered as success + informational: true # if true does not fail the CI is coverage is bellow the target value + only_pulls: true # run only on PRs + patch: + default: + target: 100% + threshold: 0% + informational: true + only_pulls: true diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000000..6766638422 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,84 @@ +const Configuration = { + /* + * Resolve and load @commitlint/config-conventional from node_modules. + * Referenced packages must be installed + */ + extends: ['@commitlint/config-conventional'], + /* + * Resolve and load conventional-changelog-atom from node_modules. + * Referenced packages must be installed + */ + // parserPreset: 'conventional-changelog-atom', + /* + * Resolve and load @commitlint/format from node_modules. + * Referenced package must be installed + */ + formatter: '@commitlint/format', + /* + * Any rules defined here will override rules from @commitlint/config-conventional + */ + rules: { + 'scope-enum': [2, 'always', [ + 'base_layer', + 'block_builder', + 'ci', + 'common', + 'config', + 'consensus', + 'execution', + 'helm', + 'JSON-RPC', + 'load_test', + 'monitoring', + 'network', + 'node', + 'protobuf', + 'release', + 'starknet_client', + 'storage', + 'sync', + 'test_utils', + 'ci', + 'gateway', + 'mempool', + 'mempool_node', + 'tests-integration', + 'concurrency', + 'execution', + 'fee', + 'native_blockifier', + 'state', + 'transaction', + 'block_hash', + 'ci', + 'skeleton', + 'types', + ]], + }, + /* + * Functions that return true if commitlint should ignore the given message. + */ + ignores: [(commit) => commit === ''], + /* + * Whether commitlint uses the default ignore rules. + */ + defaultIgnores: true, + /* + * Custom URL to show upon failure + */ + helpUrl: + 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint', + /* + * Custom prompt configs, not used currently. + */ + prompt: { + messages: {}, + questions: { + type: { + description: 'please input type:', + }, + }, + }, +}; + +module.exports = Configuration; diff --git a/config/mempool/default_config.json b/config/mempool/default_config.json new file mode 100644 index 0000000000..162161a4e4 --- /dev/null +++ b/config/mempool/default_config.json @@ -0,0 +1,122 @@ +{ + "components.gateway.execute": { + "description": "The component execution flag.", + "privacy": "Public", + "value": true + }, + "components.mempool.execute": { + "description": "The component execution flag.", + "privacy": "Public", + "value": true + }, + "gateway_config.network_config.ip": { + "description": "The gateway server ip.", + "privacy": "Public", + "value": "0.0.0.0" + }, + "gateway_config.network_config.port": { + "description": "The gateway server port.", + "privacy": "Public", + "value": 8080 + }, + "gateway_config.stateful_tx_validator_config.chain_info.chain_id": { + "description": "The chain ID of the StarkNet chain.", + "privacy": "Public", + "value": "0x0" + }, + "gateway_config.stateful_tx_validator_config.chain_info.eth_fee_token_address": { + "description": "Address of the ETH fee token.", + "privacy": "Public", + "value": "0x0" + }, + "gateway_config.stateful_tx_validator_config.chain_info.strk_fee_token_address": { + "description": "Address of the STRK fee token.", + "privacy": "Public", + "value": "0x0" + }, + "gateway_config.stateful_tx_validator_config.max_nonce_for_validation_skip": { + "description": "Maximum nonce for which the validation is skipped.", + "privacy": "Public", + "value": "0x1" + }, + "gateway_config.stateful_tx_validator_config.max_recursion_depth": { + "description": "Maximum recursion depth for nested calls during blockifier validation.", + "privacy": "Public", + "value": 50 + }, + "gateway_config.stateful_tx_validator_config.validate_max_n_steps": { + "description": "Maximum number of steps the validation function is allowed to take.", + "privacy": "Public", + "value": 1000000 + }, + "gateway_config.stateless_tx_validator_config.max_bytecode_size": { + "description": "Limitation of contract bytecode size.", + "privacy": "Public", + "value": 81920 + }, + "gateway_config.stateless_tx_validator_config.max_calldata_length": { + "description": "Limitation of calldata length.", + "privacy": "Public", + "value": 4000 + }, + "gateway_config.stateless_tx_validator_config.max_raw_class_size": { + "description": "Limitation of contract class object size.", + "privacy": "Public", + "value": 4089446 + }, + "gateway_config.stateless_tx_validator_config.max_sierra_version.major": { + "description": "The major version of the configuration.", + "privacy": "Public", + "value": 1 + }, + "gateway_config.stateless_tx_validator_config.max_sierra_version.minor": { + "description": "The minor version of the configuration.", + "privacy": "Public", + "value": 5 + }, + "gateway_config.stateless_tx_validator_config.max_sierra_version.patch": { + "description": "The patch version of the configuration.", + "privacy": "Public", + "value": 18446744073709551615 + }, + "gateway_config.stateless_tx_validator_config.max_signature_length": { + "description": "Limitation of signature length.", + "privacy": "Public", + "value": 4000 + }, + "gateway_config.stateless_tx_validator_config.min_sierra_version.major": { + "description": "The major version of the configuration.", + "privacy": "Public", + "value": 1 + }, + "gateway_config.stateless_tx_validator_config.min_sierra_version.minor": { + "description": "The minor version of the configuration.", + "privacy": "Public", + "value": 1 + }, + "gateway_config.stateless_tx_validator_config.min_sierra_version.patch": { + "description": "The patch version of the configuration.", + "privacy": "Public", + "value": 0 + }, + "gateway_config.stateless_tx_validator_config.validate_non_zero_l1_gas_fee": { + "description": "If true, validates that a transaction has non-zero L1 resource bounds.", + "privacy": "Public", + "value": true + }, + "gateway_config.stateless_tx_validator_config.validate_non_zero_l2_gas_fee": { + "description": "If true, validates that a transaction has non-zero L2 resource bounds.", + "privacy": "Public", + "value": false + }, + "rpc_state_reader_config.json_rpc_version": { + "description": "The json rpc version.", + "privacy": "Public", + "value": "" + }, + "rpc_state_reader_config.url": { + "description": "The url of the rpc server.", + "privacy": "Public", + "value": "" + } +} diff --git a/config/papyrus/default_config.json b/config/papyrus/default_config.json new file mode 100644 index 0000000000..fc720b9cad --- /dev/null +++ b/config/papyrus/default_config.json @@ -0,0 +1,352 @@ +{ + "base_layer.node_url": { + "description": "A required param! Ethereum node URL. A schema to match to Infura node: https://mainnet.infura.io/v3/, but any other node can be used.", + "param_type": "String", + "privacy": "Private" + }, + "base_layer.starknet_contract_address": { + "description": "Starknet contract address in ethereum.", + "privacy": "Public", + "value": "0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4" + }, + "central.class_cache_size": { + "description": "Size of class cache, must be a positive integer.", + "privacy": "Public", + "value": 100 + }, + "central.concurrent_requests": { + "description": "Maximum number of concurrent requests to Starknet feeder-gateway for getting a type of data (for example, blocks).", + "privacy": "Public", + "value": 10 + }, + "central.http_headers": { + "description": "'k1:v1 k2:v2 ...' headers for SN-client.", + "privacy": "Private", + "value": "" + }, + "central.max_classes_to_download": { + "description": "Maximum number of classes to download at a given time.", + "privacy": "Public", + "value": 20 + }, + "central.max_state_updates_to_download": { + "description": "Maximum number of state updates to download at a given time.", + "privacy": "Public", + "value": 20 + }, + "central.max_state_updates_to_store_in_memory": { + "description": "Maximum number of state updates to store in memory at a given time.", + "privacy": "Public", + "value": 20 + }, + "central.retry_config.max_retries": { + "description": "Maximum number of retries before the node stops retrying.", + "privacy": "Public", + "value": 10 + }, + "central.retry_config.retry_base_millis": { + "description": "Base waiting time after a failed request. After that, the time increases exponentially.", + "privacy": "Public", + "value": 30 + }, + "central.retry_config.retry_max_delay_millis": { + "description": "Max waiting time after a failed request.", + "privacy": "Public", + "value": 30000 + }, + "central.url": { + "description": "Starknet feeder-gateway URL. It should match chain_id.", + "pointer_target": "starknet_url", + "privacy": "Public" + }, + "chain_id": { + "description": "The chain to follow. For more details see https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#chain-id.", + "privacy": "TemporaryValue", + "value": "SN_MAIN" + }, + "collect_metrics": { + "description": "If true, collect metrics for the node.", + "privacy": "TemporaryValue", + "value": false + }, + "collect_profiling_metrics": { + "description": "If true, collect profiling metrics for the node.", + "privacy": "Public", + "value": false + }, + "consensus.#is_none": { + "description": "Flag for an optional field.", + "privacy": "TemporaryValue", + "value": true + }, + "consensus.num_validators": { + "description": "The number of validators in the consensus.", + "privacy": "Public", + "value": 4 + }, + "consensus.start_height": { + "description": "The height to start the consensus from.", + "privacy": "Public", + "value": 0 + }, + "consensus.topic": { + "description": "The topic of the consensus.", + "privacy": "Public", + "value": "consensus" + }, + "consensus.validator_id": { + "description": "A required param! The validator id of the node.", + "param_type": "String", + "privacy": "Public" + }, + "monitoring_gateway.collect_metrics": { + "description": "If true, collect and return metrics in the monitoring gateway.", + "pointer_target": "collect_metrics", + "privacy": "Public" + }, + "monitoring_gateway.metric_labels": { + "description": "'label1:value1 label2:value2 ...' additional labels for metrics.", + "privacy": "Public", + "value": "" + }, + "monitoring_gateway.present_full_config_secret": { + "description": "A secret for presenting the full general config. If no value is provided, the system will generate one.", + "param_type": "String", + "privacy": "Private" + }, + "monitoring_gateway.server_address": { + "description": "node's monitoring server.", + "privacy": "Public", + "value": "0.0.0.0:8081" + }, + "monitoring_gateway.starknet_url": { + "description": "The URL of a centralized Starknet gateway.", + "pointer_target": "starknet_url", + "privacy": "Public" + }, + "network.#is_none": { + "description": "Flag for an optional field.", + "privacy": "TemporaryValue", + "value": true + }, + "network.bootstrap_peer_multiaddr": { + "description": "The multiaddress of the peer node. It should include the peer's id. For more info: https://docs.libp2p.io/concepts/fundamentals/peers/", + "privacy": "Public", + "value": "" + }, + "network.bootstrap_peer_multiaddr.#is_none": { + "description": "Flag for an optional field.", + "privacy": "TemporaryValue", + "value": true + }, + "network.idle_connection_timeout": { + "description": "Amount of time in seconds that a connection with no active sessions will stay alive.", + "privacy": "Public", + "value": 120 + }, + "network.quic_port": { + "description": "The port that the node listens on for incoming quic connections.", + "privacy": "Public", + "value": 10001 + }, + "network.secret_key": { + "description": "The secret key used for building the peer id. If it's an empty string a random one will be used.", + "privacy": "Private", + "value": "" + }, + "network.session_timeout": { + "description": "Maximal time in seconds that each session can take before failing on timeout.", + "privacy": "Public", + "value": 120 + }, + "network.tcp_port": { + "description": "The port that the node listens on for incoming tcp connections.", + "privacy": "Public", + "value": 10000 + }, + "p2p_sync.#is_none": { + "description": "Flag for an optional field.", + "privacy": "TemporaryValue", + "value": true + }, + "p2p_sync.buffer_size": { + "description": "Size of the buffer for read from the storage and for incoming responses.", + "privacy": "Public", + "value": 100000 + }, + "p2p_sync.num_block_state_diffs_per_query": { + "description": "The maximum amount of block's state diffs to ask from peers in each iteration.", + "privacy": "Public", + "value": 100 + }, + "p2p_sync.num_headers_per_query": { + "description": "The maximum amount of headers to ask from peers in each iteration.", + "privacy": "Public", + "value": 10000 + }, + "p2p_sync.stop_sync_at_block_number": { + "description": "Stops the sync at given block number and closes the node cleanly. Used to run profiling on the node.", + "privacy": "Public", + "value": 1000 + }, + "p2p_sync.stop_sync_at_block_number.#is_none": { + "description": "Flag for an optional field.", + "privacy": "TemporaryValue", + "value": true + }, + "p2p_sync.wait_period_for_new_data": { + "description": "Time in seconds to wait when a query returned with partial data before sending a new query", + "privacy": "Public", + "value": 5 + }, + "rpc.chain_id": { + "description": "The chain to follow. For more details see https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#chain-id.", + "pointer_target": "chain_id", + "privacy": "Public" + }, + "rpc.collect_metrics": { + "description": "If true, collect metrics for the rpc.", + "pointer_target": "collect_metrics", + "privacy": "Public" + }, + "rpc.execution_config.eth_fee_contract_address": { + "description": "The eth fee token address to receive fees", + "privacy": "Public", + "value": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" + }, + "rpc.execution_config.initial_gas_cost": { + "description": "The initial gas cost for a transaction", + "privacy": "Public", + "value": 10000000000 + }, + "rpc.execution_config.strk_fee_contract_address": { + "description": "The strk fee token address to receive fees", + "privacy": "Public", + "value": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + }, + "rpc.max_events_chunk_size": { + "description": "Maximum chunk size supported by the node in get_events requests.", + "privacy": "Public", + "value": 1000 + }, + "rpc.max_events_keys": { + "description": "Maximum number of keys supported by the node in get_events requests.", + "privacy": "Public", + "value": 100 + }, + "rpc.server_address": { + "description": "IP:PORT of the node`s JSON-RPC server.", + "privacy": "Public", + "value": "0.0.0.0:8080" + }, + "rpc.starknet_gateway_retry_config.max_retries": { + "description": "For communicating with Starknet gateway, maximum number of retries before the node stops retrying.", + "privacy": "Public", + "value": 5 + }, + "rpc.starknet_gateway_retry_config.retry_base_millis": { + "description": "For communicating with Starknet gateway, base waiting time after a failed request. After that, the time increases exponentially.", + "privacy": "Public", + "value": 50 + }, + "rpc.starknet_gateway_retry_config.retry_max_delay_millis": { + "description": "For communicating with Starknet gateway, max waiting time after a failed request.", + "privacy": "Public", + "value": 1000 + }, + "rpc.starknet_url": { + "description": "URL for communicating with Starknet in write_api methods.", + "pointer_target": "starknet_url", + "privacy": "Public" + }, + "starknet_url": { + "description": "The URL of a centralized Starknet gateway.", + "privacy": "TemporaryValue", + "value": "https://alpha-mainnet.starknet.io/" + }, + "storage.db_config.chain_id": { + "description": "The chain to follow. For more details see https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#chain-id.", + "pointer_target": "chain_id", + "privacy": "Public" + }, + "storage.db_config.enforce_file_exists": { + "description": "Whether to enforce that the path exists. If true, `open_env` fails when the mdbx.dat file does not exist.", + "privacy": "Public", + "value": false + }, + "storage.db_config.growth_step": { + "description": "The growth step in bytes, must be greater than zero to allow the database to grow.", + "privacy": "Public", + "value": 4294967296 + }, + "storage.db_config.max_size": { + "description": "The maximum size of the node's storage in bytes.", + "privacy": "Public", + "value": 1099511627776 + }, + "storage.db_config.min_size": { + "description": "The minimum size of the node's storage in bytes.", + "privacy": "Public", + "value": 1048576 + }, + "storage.db_config.path_prefix": { + "description": "Prefix of the path of the node's storage directory, the storage file path will be /. The path is not created automatically.", + "privacy": "Public", + "value": "./data" + }, + "storage.mmap_file_config.growth_step": { + "description": "The growth step in bytes, must be greater than max_object_size.", + "privacy": "Public", + "value": 1073741824 + }, + "storage.mmap_file_config.max_object_size": { + "description": "The maximum size of a single object in the file in bytes", + "privacy": "Public", + "value": 268435456 + }, + "storage.mmap_file_config.max_size": { + "description": "The maximum size of a memory mapped file in bytes. Must be greater than growth_step.", + "privacy": "Public", + "value": 1099511627776 + }, + "storage.scope": { + "description": "The categories of data saved in storage.", + "privacy": "Public", + "value": "FullArchive" + }, + "sync.#is_none": { + "description": "Flag for an optional field.", + "privacy": "TemporaryValue", + "value": false + }, + "sync.base_layer_propagation_sleep_duration": { + "description": "Time in seconds to poll the base layer to get the latest proved block.", + "privacy": "Public", + "value": 10 + }, + "sync.block_propagation_sleep_duration": { + "description": "Time in seconds before checking for a new block after the node is synchronized.", + "privacy": "Public", + "value": 2 + }, + "sync.blocks_max_stream_size": { + "description": "Max amount of blocks to download in a stream.", + "privacy": "Public", + "value": 1000 + }, + "sync.recoverable_error_sleep_duration": { + "description": "Waiting time in seconds before restarting synchronization after a recoverable error.", + "privacy": "Public", + "value": 3 + }, + "sync.state_updates_max_stream_size": { + "description": "Max amount of state updates to download in a stream.", + "privacy": "Public", + "value": 1000 + }, + "sync.verify_blocks": { + "description": "Whether to verify incoming blocks.", + "privacy": "Public", + "value": true + } +} diff --git a/config/papyrus/presets/mainnet.json b/config/papyrus/presets/mainnet.json new file mode 100644 index 0000000000..47fa3da893 --- /dev/null +++ b/config/papyrus/presets/mainnet.json @@ -0,0 +1,5 @@ +{ + "chain_id": "SN_MAIN", + "starknet_url": "https://alpha-mainnet.starknet.io/", + "base_layer.starknet_contract_address": "0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4" +} diff --git a/config/papyrus/presets/sepolia_integration.json b/config/papyrus/presets/sepolia_integration.json new file mode 100644 index 0000000000..221c1e92c4 --- /dev/null +++ b/config/papyrus/presets/sepolia_integration.json @@ -0,0 +1,5 @@ +{ + "chain_id": "SN_INTEGRATION_SEPOLIA", + "starknet_url": "https://integration-sepolia.starknet.io/", + "base_layer.starknet_contract_address": "0x4737c0c1b4d5b1a687b42610ddabee781152359c" +} diff --git a/config/papyrus/presets/sepolia_testnet.json b/config/papyrus/presets/sepolia_testnet.json new file mode 100644 index 0000000000..209ab2978e --- /dev/null +++ b/config/papyrus/presets/sepolia_testnet.json @@ -0,0 +1,5 @@ +{ + "chain_id": "SN_SEPOLIA", + "starknet_url": "https://alpha-sepolia.starknet.io/", + "base_layer.starknet_contract_address": "0xe2bb56ee936fd6433dc0f6e7e3b8365c906aa057" +} diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index 8516535f71..a3395538e1 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blockifier" -version.workspace = true +version = "0.8.0-rc.1" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -47,7 +47,7 @@ serde_json = { workspace = true, features = ["arbitrary_precision"] } sha2.workspace = true sha3.workspace = true starknet-types-core.workspace = true -starknet_api = { workspace = true, features = ["testing"] } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } strum.workspace = true strum_macros.workspace = true thiserror.workspace = true diff --git a/crates/blockifier/bench/blockifier_bench.rs b/crates/blockifier/bench/blockifier_bench.rs index a59d71d6c0..2097bb1cec 100644 --- a/crates/blockifier/bench/blockifier_bench.rs +++ b/crates/blockifier/bench/blockifier_bench.rs @@ -8,7 +8,9 @@ //! Run the benchmarks using `cargo bench --bench blockifier_bench`. use blockifier::test_utils::transfers_generator::{ - RecipientGeneratorType, TransfersGenerator, TransfersGeneratorConfig, + RecipientGeneratorType, + TransfersGenerator, + TransfersGeneratorConfig, }; use criterion::{criterion_group, criterion_main, Criterion}; diff --git a/crates/blockifier/src/abi/abi_utils.rs b/crates/blockifier/src/abi/abi_utils.rs index ba2f00175c..eea1dc8ef3 100644 --- a/crates/blockifier/src/abi/abi_utils.rs +++ b/crates/blockifier/src/abi/abi_utils.rs @@ -1,6 +1,9 @@ use sha3::{Digest, Keccak256}; use starknet_api::core::{ - ContractAddress, EntryPointSelector, PatriciaKey, L2_ADDRESS_UPPER_BOUND, + ContractAddress, + EntryPointSelector, + PatriciaKey, + L2_ADDRESS_UPPER_BOUND, }; use starknet_api::state::StorageKey; use starknet_types_core::felt::{Felt, NonZeroFelt}; diff --git a/crates/blockifier/src/blockifier/stateful_validator.rs b/crates/blockifier/src/blockifier/stateful_validator.rs index bb89e3d5fc..3c6a8606dd 100644 --- a/crates/blockifier/src/blockifier/stateful_validator.rs +++ b/crates/blockifier/src/blockifier/stateful_validator.rs @@ -6,7 +6,9 @@ use thiserror::Error; use crate::blockifier::config::TransactionExecutorConfig; use crate::blockifier::transaction_executor::{ - TransactionExecutor, TransactionExecutorError, BLOCK_STATE_ACCESS_ERR, + TransactionExecutor, + TransactionExecutorError, + BLOCK_STATE_ACCESS_ERR, }; use crate::context::{BlockContext, TransactionContext}; use crate::execution::call_info::CallInfo; diff --git a/crates/blockifier/src/blockifier/stateful_validator_test.rs b/crates/blockifier/src/blockifier/stateful_validator_test.rs index 0467ab49cc..dc1fd08cc3 100644 --- a/crates/blockifier/src/blockifier/stateful_validator_test.rs +++ b/crates/blockifier/src/blockifier/stateful_validator_test.rs @@ -9,8 +9,11 @@ use crate::test_utils::initial_test_state::{fund_account, test_state}; use crate::test_utils::{CairoVersion, BALANCE}; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::test_utils::{ - block_context, create_account_tx_for_validate_test_nonce_0, FaultyAccountTxCreatorArgs, - INVALID, VALID, + block_context, + create_account_tx_for_validate_test_nonce_0, + FaultyAccountTxCreatorArgs, + INVALID, + VALID, }; use crate::transaction::transaction_types::TransactionType; diff --git a/crates/blockifier/src/blockifier/transaction_executor_test.rs b/crates/blockifier/src/blockifier/transaction_executor_test.rs index b0139de8ba..b3f649d5c4 100644 --- a/crates/blockifier/src/blockifier/transaction_executor_test.rs +++ b/crates/blockifier/src/blockifier/transaction_executor_test.rs @@ -7,7 +7,9 @@ use starknet_types_core::felt::Felt; use crate::blockifier::config::TransactionExecutorConfig; use crate::blockifier::transaction_executor::{ - TransactionExecutor, TransactionExecutorError, BLOCK_STATE_ACCESS_ERR, + TransactionExecutor, + TransactionExecutorError, + BLOCK_STATE_ACCESS_ERR, }; use crate::bouncer::{Bouncer, BouncerWeights}; use crate::context::BlockContext; @@ -18,13 +20,22 @@ use crate::test_utils::declare::declare_tx; use crate::test_utils::deploy_account::deploy_account_tx; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - create_calldata, CairoVersion, NonceManager, BALANCE, DEFAULT_STRK_L1_GAS_PRICE, + create_calldata, + CairoVersion, + NonceManager, + BALANCE, + DEFAULT_STRK_L1_GAS_PRICE, }; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::errors::TransactionExecutionError; use crate::transaction::test_utils::{ - account_invoke_tx, block_context, calculate_class_info_for_testing, create_test_init_data, - emit_n_events_tx, l1_resource_bounds, TestInitData, + account_invoke_tx, + block_context, + calculate_class_info_for_testing, + create_test_init_data, + emit_n_events_tx, + l1_resource_bounds, + TestInitData, }; use crate::transaction::transaction_execution::Transaction; use crate::transaction::transactions::L1HandlerTransaction; diff --git a/crates/blockifier/src/blockifier/transfers_flow_test.rs b/crates/blockifier/src/blockifier/transfers_flow_test.rs index 949e242eff..0e47383651 100644 --- a/crates/blockifier/src/blockifier/transfers_flow_test.rs +++ b/crates/blockifier/src/blockifier/transfers_flow_test.rs @@ -1,5 +1,7 @@ use crate::test_utils::transfers_generator::{ - RecipientGeneratorType, TransfersGenerator, TransfersGeneratorConfig, + RecipientGeneratorType, + TransfersGenerator, + TransfersGeneratorConfig, }; #[test] diff --git a/crates/blockifier/src/bouncer.rs b/crates/blockifier/src/bouncer.rs index 7ec8d5a627..0aa83d08ad 100644 --- a/crates/blockifier/src/bouncer.rs +++ b/crates/blockifier/src/bouncer.rs @@ -6,7 +6,8 @@ use serde::{Deserialize, Serialize}; use starknet_api::core::ClassHash; use crate::blockifier::transaction_executor::{ - TransactionExecutorError, TransactionExecutorResult, + TransactionExecutorError, + TransactionExecutorResult, }; use crate::execution::call_info::ExecutionSummary; use crate::fee::gas_usage::get_onchain_data_segment_length; @@ -14,7 +15,9 @@ use crate::state::cached_state::{StateChangesKeys, StorageEntry}; use crate::state::state_api::StateReader; use crate::transaction::errors::TransactionExecutionError; use crate::transaction::objects::{ - ExecutionResourcesTraits, TransactionExecutionResult, TransactionResources, + ExecutionResourcesTraits, + TransactionExecutionResult, + TransactionResources, }; #[cfg(test)] diff --git a/crates/blockifier/src/bouncer_test.rs b/crates/blockifier/src/bouncer_test.rs index 9976ca0f13..dc1c2e9736 100644 --- a/crates/blockifier/src/bouncer_test.rs +++ b/crates/blockifier/src/bouncer_test.rs @@ -7,7 +7,8 @@ use starknet_api::{class_hash, contract_address, felt, patricia_key}; use super::BouncerConfig; use crate::blockifier::transaction_executor::{ - TransactionExecutorError, TransactionExecutorResult, + TransactionExecutorError, + TransactionExecutorResult, }; use crate::bouncer::{verify_tx_weights_in_bounds, Bouncer, BouncerWeights, BuiltinCount}; use crate::context::BlockContext; diff --git a/crates/blockifier/src/concurrency/versioned_state_test.rs b/crates/blockifier/src/concurrency/versioned_state_test.rs index ab99698b4e..79cac9ee12 100644 --- a/crates/blockifier/src/concurrency/versioned_state_test.rs +++ b/crates/blockifier/src/concurrency/versioned_state_test.rs @@ -5,22 +5,33 @@ use std::thread; use assert_matches::assert_matches; use rstest::{fixture, rstest}; use starknet_api::core::{ - calculate_contract_address, ClassHash, ContractAddress, Nonce, PatriciaKey, + calculate_contract_address, + ClassHash, + ContractAddress, + Nonce, + PatriciaKey, }; use starknet_api::transaction::{Calldata, ContractAddressSalt, ResourceBoundsMapping}; use starknet_api::{calldata, class_hash, contract_address, felt, patricia_key}; use crate::abi::abi_utils::{get_fee_token_var_address, get_storage_var_address}; use crate::concurrency::test_utils::{ - class_hash, contract_address, safe_versioned_state_for_testing, + class_hash, + contract_address, + safe_versioned_state_for_testing, }; use crate::concurrency::versioned_state::{ - ThreadSafeVersionedState, VersionedState, VersionedStateProxy, + ThreadSafeVersionedState, + VersionedState, + VersionedStateProxy, }; use crate::concurrency::TxIndex; use crate::context::BlockContext; use crate::state::cached_state::{ - CachedState, ContractClassMapping, StateMaps, TransactionalState, + CachedState, + ContractClassMapping, + StateMaps, + TransactionalState, }; use crate::state::errors::StateError; use crate::state::state_api::{State, StateReader, UpdatableState}; diff --git a/crates/blockifier/src/concurrency/worker_logic.rs b/crates/blockifier/src/concurrency/worker_logic.rs index 60d5b19e71..2a52138efc 100644 --- a/crates/blockifier/src/concurrency/worker_logic.rs +++ b/crates/blockifier/src/concurrency/worker_logic.rs @@ -16,7 +16,10 @@ use crate::concurrency::versioned_state::ThreadSafeVersionedState; use crate::concurrency::TxIndex; use crate::context::BlockContext; use crate::state::cached_state::{ - ContractClassMapping, StateChanges, StateMaps, TransactionalState, + ContractClassMapping, + StateChanges, + StateMaps, + TransactionalState, }; use crate::state::state_api::{StateReader, UpdatableState}; use crate::transaction::objects::{TransactionExecutionInfo, TransactionExecutionResult}; diff --git a/crates/blockifier/src/concurrency/worker_logic_test.rs b/crates/blockifier/src/concurrency/worker_logic_test.rs index 1f28b1ee4f..c6e085ff0c 100644 --- a/crates/blockifier/src/concurrency/worker_logic_test.rs +++ b/crates/blockifier/src/concurrency/worker_logic_test.rs @@ -4,7 +4,10 @@ use std::sync::Mutex; use rstest::rstest; use starknet_api::core::{ContractAddress, Nonce, PatriciaKey}; use starknet_api::transaction::{ - ContractAddressSalt, Fee, ResourceBoundsMapping, TransactionVersion, + ContractAddressSalt, + Fee, + ResourceBoundsMapping, + TransactionVersion, }; use starknet_api::{contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; @@ -26,14 +29,21 @@ use crate::test_utils::contracts::FeatureContract; use crate::test_utils::declare::declare_tx; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - create_calldata, create_trivial_calldata, CairoVersion, NonceManager, BALANCE, + create_calldata, + create_trivial_calldata, + CairoVersion, + NonceManager, + BALANCE, TEST_ERC20_CONTRACT_ADDRESS2, }; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::constants::DEPLOY_CONTRACT_FUNCTION_ENTRY_POINT_NAME; use crate::transaction::objects::HasRelatedFeeType; use crate::transaction::test_utils::{ - account_invoke_tx, calculate_class_info_for_testing, emit_n_events_tx, max_fee, + account_invoke_tx, + calculate_class_info_for_testing, + emit_n_events_tx, + max_fee, max_resource_bounds, }; use crate::transaction::transaction_execution::Transaction; diff --git a/crates/blockifier/src/context.rs b/crates/blockifier/src/context.rs index eef59dc3de..383a14d7e6 100644 --- a/crates/blockifier/src/context.rs +++ b/crates/blockifier/src/context.rs @@ -3,7 +3,10 @@ use starknet_api::core::{ChainId, ContractAddress}; use crate::blockifier::block::BlockInfo; use crate::bouncer::BouncerConfig; use crate::transaction::objects::{ - FeeType, HasRelatedFeeType, TransactionInfo, TransactionInfoCreator, + FeeType, + HasRelatedFeeType, + TransactionInfo, + TransactionInfoCreator, }; use crate::versioned_constants::VersionedConstants; diff --git a/crates/blockifier/src/execution/common_hints.rs b/crates/blockifier/src/execution/common_hints.rs index 962984c0c8..ae188fa307 100644 --- a/crates/blockifier/src/execution/common_hints.rs +++ b/crates/blockifier/src/execution/common_hints.rs @@ -3,10 +3,12 @@ use std::ops::Shl; use std::rc::Rc; use cairo_vm::hint_processor::builtin_hint_processor::builtin_hint_processor_definition::{ - BuiltinHintProcessor, HintFunc, + BuiltinHintProcessor, + HintFunc, }; use cairo_vm::hint_processor::builtin_hint_processor::hint_utils::{ - get_integer_from_var_name, insert_value_from_var_name, + get_integer_from_var_name, + insert_value_from_var_name, }; use cairo_vm::hint_processor::hint_processor_definition::HintReference; use cairo_vm::serde::deserialize_program::ApTracking; @@ -18,7 +20,8 @@ use num_bigint::BigUint; use starknet_types_core::felt::Felt; use crate::execution::hint_code::{ - NORMALIZE_ADDRESS_SET_IS_250_HINT, NORMALIZE_ADDRESS_SET_IS_SMALL_HINT, + NORMALIZE_ADDRESS_SET_IS_250_HINT, + NORMALIZE_ADDRESS_SET_IS_SMALL_HINT, }; /// Transaction execution mode. diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 36e1391a07..c6f1afe612 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -7,7 +7,10 @@ use cairo_lang_casm::hints::Hint; use cairo_lang_starknet_classes::casm_contract_class::{CasmContractClass, CasmContractEntryPoint}; use cairo_lang_starknet_classes::NestedIntList; use cairo_vm::serde::deserialize_program::{ - ApTracking, FlowTrackingData, HintParams, ReferenceManager, + ApTracking, + FlowTrackingData, + HintParams, + ReferenceManager, }; use cairo_vm::types::builtin_name::BuiltinName; use cairo_vm::types::errors::program_errors::ProgramError; @@ -19,7 +22,10 @@ use serde::de::Error as DeserializationError; use serde::{Deserialize, Deserializer}; use starknet_api::core::EntryPointSelector; use starknet_api::deprecated_contract_class::{ - ContractClass as DeprecatedContractClass, EntryPoint, EntryPointOffset, EntryPointType, + ContractClass as DeprecatedContractClass, + EntryPoint, + EntryPointOffset, + EntryPointType, Program as DeprecatedProgram, }; use starknet_types_core::felt::Felt; diff --git a/crates/blockifier/src/execution/deprecated_entry_point_execution.rs b/crates/blockifier/src/execution/deprecated_entry_point_execution.rs index 4f84b19d03..878c2e276b 100644 --- a/crates/blockifier/src/execution/deprecated_entry_point_execution.rs +++ b/crates/blockifier/src/execution/deprecated_entry_point_execution.rs @@ -14,7 +14,9 @@ use crate::execution::call_info::{CallExecution, CallInfo}; use crate::execution::contract_class::ContractClassV0; use crate::execution::deprecated_syscalls::hint_processor::DeprecatedSyscallHintProcessor; use crate::execution::entry_point::{ - CallEntryPoint, EntryPointExecutionContext, EntryPointExecutionResult, + CallEntryPoint, + EntryPointExecutionContext, + EntryPointExecutionResult, }; use crate::execution::errors::{PostExecutionError, PreExecutionError}; use crate::execution::execution_utils::{read_execution_retdata, Args, ReadOnlySegments}; diff --git a/crates/blockifier/src/execution/deprecated_syscalls/deprecated_syscalls_test.rs b/crates/blockifier/src/execution/deprecated_syscalls/deprecated_syscalls_test.rs index 3106d562db..53722c921f 100644 --- a/crates/blockifier/src/execution/deprecated_syscalls/deprecated_syscalls_test.rs +++ b/crates/blockifier/src/execution/deprecated_syscalls/deprecated_syscalls_test.rs @@ -8,7 +8,13 @@ use rstest::rstest; use starknet_api::core::{calculate_contract_address, ChainId, PatriciaKey}; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, EventContent, EventData, EventKey, Fee, TransactionHash, + Calldata, + ContractAddressSalt, + EventContent, + EventData, + EventKey, + Fee, + TransactionHash, TransactionVersion, }; use starknet_api::{calldata, felt}; @@ -27,13 +33,22 @@ use crate::state::state_api::StateReader; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - calldata_for_deploy_test, get_syscall_resources, trivial_external_entry_point_new, - CairoVersion, CHAIN_ID_NAME, CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_NUMBER_FOR_VALIDATE, - CURRENT_BLOCK_TIMESTAMP, CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, TEST_SEQUENCER_ADDRESS, + calldata_for_deploy_test, + get_syscall_resources, + trivial_external_entry_point_new, + CairoVersion, + CHAIN_ID_NAME, + CURRENT_BLOCK_NUMBER, + CURRENT_BLOCK_NUMBER_FOR_VALIDATE, + CURRENT_BLOCK_TIMESTAMP, + CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, + TEST_SEQUENCER_ADDRESS, }; use crate::transaction::constants::QUERY_VERSION_BASE_BIT; use crate::transaction::objects::{ - CommonAccountFields, DeprecatedTransactionInfo, TransactionInfo, + CommonAccountFields, + DeprecatedTransactionInfo, + TransactionInfo, }; use crate::versioned_constants::VersionedConstants; use crate::{check_entry_point_execution_error_for_custom_hint, nonce, retdata, storage_key}; diff --git a/crates/blockifier/src/execution/deprecated_syscalls/hint_processor.rs b/crates/blockifier/src/execution/deprecated_syscalls/hint_processor.rs index c73e914967..f39d4f6401 100644 --- a/crates/blockifier/src/execution/deprecated_syscalls/hint_processor.rs +++ b/crates/blockifier/src/execution/deprecated_syscalls/hint_processor.rs @@ -2,7 +2,8 @@ use std::any::Any; use std::collections::{HashMap, HashSet}; use cairo_vm::hint_processor::builtin_hint_processor::builtin_hint_processor_definition::{ - BuiltinHintProcessor, HintProcessorData, + BuiltinHintProcessor, + HintProcessorData, }; use cairo_vm::hint_processor::builtin_hint_processor::hint_utils::get_ptr_from_var_name; use cairo_vm::hint_processor::hint_processor_definition::{HintProcessorLogic, HintReference}; @@ -28,20 +29,43 @@ use crate::blockifier::block::BlockInfo; use crate::context::TransactionContext; use crate::execution::call_info::{CallInfo, OrderedEvent, OrderedL2ToL1Message}; use crate::execution::common_hints::{ - extended_builtin_hint_processor, ExecutionMode, HintExecutionResult, + extended_builtin_hint_processor, + ExecutionMode, + HintExecutionResult, }; use crate::execution::deprecated_syscalls::{ - call_contract, delegate_call, delegate_l1_handler, deploy, emit_event, get_block_number, - get_block_timestamp, get_caller_address, get_contract_address, get_sequencer_address, - get_tx_info, get_tx_signature, library_call, library_call_l1_handler, replace_class, - send_message_to_l1, storage_read, storage_write, DeprecatedSyscallResult, - DeprecatedSyscallSelector, StorageReadResponse, StorageWriteResponse, SyscallRequest, + call_contract, + delegate_call, + delegate_l1_handler, + deploy, + emit_event, + get_block_number, + get_block_timestamp, + get_caller_address, + get_contract_address, + get_sequencer_address, + get_tx_info, + get_tx_signature, + library_call, + library_call_l1_handler, + replace_class, + send_message_to_l1, + storage_read, + storage_write, + DeprecatedSyscallResult, + DeprecatedSyscallSelector, + StorageReadResponse, + StorageWriteResponse, + SyscallRequest, SyscallResponse, }; use crate::execution::entry_point::{CallEntryPoint, CallType, EntryPointExecutionContext}; use crate::execution::errors::{ConstructorEntryPointExecutionError, EntryPointExecutionError}; use crate::execution::execution_utils::{ - felt_from_ptr, felt_range_from_ptr, max_fee_for_execution_info, ReadOnlySegment, + felt_from_ptr, + felt_range_from_ptr, + max_fee_for_execution_info, + ReadOnlySegment, ReadOnlySegments, }; use crate::execution::hint_code; diff --git a/crates/blockifier/src/execution/deprecated_syscalls/mod.rs b/crates/blockifier/src/execution/deprecated_syscalls/mod.rs index 1f81cffb80..9e75f5be6b 100644 --- a/crates/blockifier/src/execution/deprecated_syscalls/mod.rs +++ b/crates/blockifier/src/execution/deprecated_syscalls/mod.rs @@ -3,26 +3,45 @@ use cairo_vm::vm::vm_core::VirtualMachine; use serde::Deserialize; use starknet_api::block::{BlockNumber, BlockTimestamp}; use starknet_api::core::{ - calculate_contract_address, ClassHash, ContractAddress, EntryPointSelector, EthAddress, + calculate_contract_address, + ClassHash, + ContractAddress, + EntryPointSelector, + EthAddress, }; use starknet_api::deprecated_contract_class::EntryPointType; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, EventContent, EventData, EventKey, L2ToL1Payload, + Calldata, + ContractAddressSalt, + EventContent, + EventData, + EventKey, + L2ToL1Payload, }; use starknet_types_core::felt::Felt; use strum_macros::EnumIter; use self::hint_processor::{ - execute_inner_call, execute_library_call, felt_to_bool, read_call_params, read_calldata, - read_felt_array, DeprecatedSyscallExecutionError, DeprecatedSyscallHintProcessor, + execute_inner_call, + execute_library_call, + felt_to_bool, + read_call_params, + read_calldata, + read_felt_array, + DeprecatedSyscallExecutionError, + DeprecatedSyscallHintProcessor, }; use super::syscalls::exceeds_event_size_limit; use crate::execution::call_info::{MessageToL1, OrderedEvent, OrderedL2ToL1Message}; use crate::execution::common_hints::ExecutionMode; use crate::execution::entry_point::{CallEntryPoint, CallType, ConstructorContext}; use crate::execution::execution_utils::{ - execute_deployment, felt_from_ptr, write_felt, write_maybe_relocatable, ReadOnlySegment, + execute_deployment, + felt_from_ptr, + write_felt, + write_maybe_relocatable, + ReadOnlySegment, }; #[cfg(test)] diff --git a/crates/blockifier/src/execution/entry_point.rs b/crates/blockifier/src/execution/entry_point.rs index cb2c298529..998d80cadc 100644 --- a/crates/blockifier/src/execution/entry_point.rs +++ b/crates/blockifier/src/execution/entry_point.rs @@ -16,7 +16,9 @@ use crate::context::{BlockContext, TransactionContext}; use crate::execution::call_info::CallInfo; use crate::execution::common_hints::ExecutionMode; use crate::execution::errors::{ - ConstructorEntryPointExecutionError, EntryPointExecutionError, PreExecutionError, + ConstructorEntryPointExecutionError, + EntryPointExecutionError, + PreExecutionError, }; use crate::execution::execution_utils::execute_entry_point_call; use crate::state::state_api::State; diff --git a/crates/blockifier/src/execution/entry_point_execution.rs b/crates/blockifier/src/execution/entry_point_execution.rs index e63b4085d5..9e5bae7245 100644 --- a/crates/blockifier/src/execution/entry_point_execution.rs +++ b/crates/blockifier/src/execution/entry_point_execution.rs @@ -16,11 +16,17 @@ use starknet_types_core::felt::Felt; use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; use crate::execution::contract_class::{ContractClassV1, EntryPointV1}; use crate::execution::entry_point::{ - CallEntryPoint, EntryPointExecutionContext, EntryPointExecutionResult, + CallEntryPoint, + EntryPointExecutionContext, + EntryPointExecutionResult, }; use crate::execution::errors::{EntryPointExecutionError, PostExecutionError, PreExecutionError}; use crate::execution::execution_utils::{ - read_execution_retdata, write_felt, write_maybe_relocatable, Args, ReadOnlySegments, + read_execution_retdata, + write_felt, + write_maybe_relocatable, + Args, + ReadOnlySegments, SEGMENT_ARENA_BUILTIN_SIZE, }; use crate::execution::syscalls::hint_processor::SyscallHintProcessor; diff --git a/crates/blockifier/src/execution/execution_utils.rs b/crates/blockifier/src/execution/execution_utils.rs index 8934b133dc..a433a34574 100644 --- a/crates/blockifier/src/execution/execution_utils.rs +++ b/crates/blockifier/src/execution/execution_utils.rs @@ -2,7 +2,11 @@ use std::collections::HashMap; use cairo_lang_runner::casm_run::format_next_item; use cairo_vm::serde::deserialize_program::{ - deserialize_array_of_bigint_hex, Attribute, HintParams, Identifier, ReferenceManager, + deserialize_array_of_bigint_hex, + Attribute, + HintParams, + Identifier, + ReferenceManager, }; use cairo_vm::types::builtin_name::BuiltinName; use cairo_vm::types::errors::program_errors::ProgramError; @@ -23,8 +27,11 @@ use super::errors::ConstructorEntryPointExecutionError; use crate::execution::call_info::{CallInfo, Retdata}; use crate::execution::contract_class::ContractClass; use crate::execution::entry_point::{ - execute_constructor_entry_point, CallEntryPoint, ConstructorContext, - EntryPointExecutionContext, EntryPointExecutionResult, + execute_constructor_entry_point, + CallEntryPoint, + ConstructorContext, + EntryPointExecutionContext, + EntryPointExecutionResult, }; use crate::execution::errors::PostExecutionError; use crate::execution::{deprecated_entry_point_execution, entry_point_execution}; diff --git a/crates/blockifier/src/execution/stack_trace_test.rs b/crates/blockifier/src/execution/stack_trace_test.rs index 1fcb2106c1..6aa7523507 100644 --- a/crates/blockifier/src/execution/stack_trace_test.rs +++ b/crates/blockifier/src/execution/stack_trace_test.rs @@ -3,7 +3,11 @@ use regex::Regex; use rstest::rstest; use starknet_api::core::{calculate_contract_address, Nonce}; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, Fee, ResourceBoundsMapping, TransactionSignature, + Calldata, + ContractAddressSalt, + Fee, + ResourceBoundsMapping, + TransactionSignature, TransactionVersion, }; use starknet_api::{calldata, felt}; @@ -17,12 +21,21 @@ use crate::test_utils::initial_test_state::{fund_account, test_state}; use crate::test_utils::{create_calldata, CairoVersion, BALANCE}; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::constants::{ - DEPLOY_CONTRACT_FUNCTION_ENTRY_POINT_NAME, EXECUTE_ENTRY_POINT_NAME, FELT_TRUE, - VALIDATE_DECLARE_ENTRY_POINT_NAME, VALIDATE_DEPLOY_ENTRY_POINT_NAME, VALIDATE_ENTRY_POINT_NAME, + DEPLOY_CONTRACT_FUNCTION_ENTRY_POINT_NAME, + EXECUTE_ENTRY_POINT_NAME, + FELT_TRUE, + VALIDATE_DECLARE_ENTRY_POINT_NAME, + VALIDATE_DEPLOY_ENTRY_POINT_NAME, + VALIDATE_ENTRY_POINT_NAME, }; use crate::transaction::test_utils::{ - account_invoke_tx, block_context, create_account_tx_for_validate_test_nonce_0, - max_resource_bounds, run_invoke_tx, FaultyAccountTxCreatorArgs, INVALID, + account_invoke_tx, + block_context, + create_account_tx_for_validate_test_nonce_0, + max_resource_bounds, + run_invoke_tx, + FaultyAccountTxCreatorArgs, + INVALID, }; use crate::transaction::transaction_types::TransactionType; use crate::transaction::transactions::ExecutableTransaction; diff --git a/crates/blockifier/src/execution/syscalls/hint_processor.rs b/crates/blockifier/src/execution/syscalls/hint_processor.rs index 449cf3705c..0ed6f2868b 100644 --- a/crates/blockifier/src/execution/syscalls/hint_processor.rs +++ b/crates/blockifier/src/execution/syscalls/hint_processor.rs @@ -28,19 +28,48 @@ use crate::execution::common_hints::{ExecutionMode, HintExecutionResult}; use crate::execution::entry_point::{CallEntryPoint, CallType, EntryPointExecutionContext}; use crate::execution::errors::{ConstructorEntryPointExecutionError, EntryPointExecutionError}; use crate::execution::execution_utils::{ - felt_from_ptr, felt_range_from_ptr, max_fee_for_execution_info, write_maybe_relocatable, - ReadOnlySegment, ReadOnlySegments, + felt_from_ptr, + felt_range_from_ptr, + max_fee_for_execution_info, + write_maybe_relocatable, + ReadOnlySegment, + ReadOnlySegments, }; use crate::execution::syscalls::secp::{ - secp256k1_add, secp256k1_get_point_from_x, secp256k1_get_xy, secp256k1_mul, secp256k1_new, - secp256r1_add, secp256r1_get_point_from_x, secp256r1_get_xy, secp256r1_mul, secp256r1_new, + secp256k1_add, + secp256k1_get_point_from_x, + secp256k1_get_xy, + secp256k1_mul, + secp256k1_new, + secp256r1_add, + secp256r1_get_point_from_x, + secp256r1_get_xy, + secp256r1_mul, + secp256r1_new, SecpHintProcessor, }; use crate::execution::syscalls::{ - call_contract, deploy, emit_event, get_block_hash, get_execution_info, keccak, library_call, - library_call_l1_handler, replace_class, send_message_to_l1, sha_256_process_block, - storage_read, storage_write, StorageReadResponse, StorageWriteResponse, SyscallRequest, - SyscallRequestWrapper, SyscallResponse, SyscallResponseWrapper, SyscallResult, SyscallSelector, + call_contract, + deploy, + emit_event, + get_block_hash, + get_execution_info, + keccak, + library_call, + library_call_l1_handler, + replace_class, + send_message_to_l1, + sha_256_process_block, + storage_read, + storage_write, + StorageReadResponse, + StorageWriteResponse, + SyscallRequest, + SyscallRequestWrapper, + SyscallResponse, + SyscallResponseWrapper, + SyscallResult, + SyscallSelector, }; use crate::state::errors::StateError; use crate::state::state_api::State; diff --git a/crates/blockifier/src/execution/syscalls/mod.rs b/crates/blockifier/src/execution/syscalls/mod.rs index ecb2fe611e..27ea5377df 100644 --- a/crates/blockifier/src/execution/syscalls/mod.rs +++ b/crates/blockifier/src/execution/syscalls/mod.rs @@ -3,19 +3,37 @@ use cairo_vm::vm::vm_core::VirtualMachine; use num_traits::ToPrimitive; use starknet_api::block::{BlockHash, BlockNumber}; use starknet_api::core::{ - calculate_contract_address, ClassHash, ContractAddress, EntryPointSelector, EthAddress, + calculate_contract_address, + ClassHash, + ContractAddress, + EntryPointSelector, + EthAddress, }; use starknet_api::deprecated_contract_class::EntryPointType; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, EventContent, EventData, EventKey, L2ToL1Payload, + Calldata, + ContractAddressSalt, + EventContent, + EventData, + EventKey, + L2ToL1Payload, }; use starknet_types_core::felt::Felt; use self::hint_processor::{ - create_retdata_segment, execute_inner_call, execute_library_call, felt_to_bool, - read_call_params, read_calldata, read_felt_array, write_segment, EmitEventError, - SyscallExecutionError, SyscallHintProcessor, BLOCK_NUMBER_OUT_OF_RANGE_ERROR, + create_retdata_segment, + execute_inner_call, + execute_library_call, + felt_to_bool, + read_call_params, + read_calldata, + read_felt_array, + write_segment, + EmitEventError, + SyscallExecutionError, + SyscallHintProcessor, + BLOCK_NUMBER_OUT_OF_RANGE_ERROR, }; use crate::abi::constants; use crate::execution::call_info::{MessageToL1, OrderedEvent, OrderedL2ToL1Message}; @@ -23,7 +41,11 @@ use crate::execution::contract_class::ContractClass; use crate::execution::deprecated_syscalls::DeprecatedSyscallSelector; use crate::execution::entry_point::{CallEntryPoint, CallType, ConstructorContext}; use crate::execution::execution_utils::{ - execute_deployment, felt_from_ptr, write_felt, write_maybe_relocatable, ReadOnlySegment, + execute_deployment, + felt_from_ptr, + write_felt, + write_maybe_relocatable, + ReadOnlySegment, }; use crate::execution::syscalls::hint_processor::{INVALID_INPUT_LENGTH_ERROR, OUT_OF_GAS_ERROR}; use crate::transaction::transaction_utils::update_remaining_gas; diff --git a/crates/blockifier/src/execution/syscalls/secp.rs b/crates/blockifier/src/execution/syscalls/secp.rs index 60df6dc30d..d23bbd15dc 100644 --- a/crates/blockifier/src/execution/syscalls/secp.rs +++ b/crates/blockifier/src/execution/syscalls/secp.rs @@ -10,10 +10,16 @@ use starknet_types_core::felt::Felt; use crate::abi::sierra_types::{SierraType, SierraU256}; use crate::execution::execution_utils::{felt_from_ptr, write_maybe_relocatable, write_u256}; use crate::execution::syscalls::hint_processor::{ - felt_to_bool, SyscallHintProcessor, INVALID_ARGUMENT, + felt_to_bool, + SyscallHintProcessor, + INVALID_ARGUMENT, }; use crate::execution::syscalls::{ - SyscallExecutionError, SyscallRequest, SyscallResponse, SyscallResult, WriteResponseResult, + SyscallExecutionError, + SyscallRequest, + SyscallResponse, + SyscallResult, + WriteResponseResult, }; #[derive(Debug, Default, Eq, PartialEq)] diff --git a/crates/blockifier/src/execution/syscalls/syscalls_test.rs b/crates/blockifier/src/execution/syscalls/syscalls_test.rs index d57ad5f770..a5cb569630 100644 --- a/crates/blockifier/src/execution/syscalls/syscalls_test.rs +++ b/crates/blockifier/src/execution/syscalls/syscalls_test.rs @@ -8,14 +8,30 @@ use num_traits::Pow; use pretty_assertions::assert_eq; use rstest::rstest; use starknet_api::core::{ - calculate_contract_address, ChainId, ContractAddress, EthAddress, PatriciaKey, + calculate_contract_address, + ChainId, + ContractAddress, + EthAddress, + PatriciaKey, }; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - AccountDeploymentData, Calldata, ContractAddressSalt, EventContent, EventData, EventKey, Fee, - L2ToL1Payload, PaymasterData, Resource, ResourceBounds, ResourceBoundsMapping, Tip, - TransactionHash, TransactionVersion, + AccountDeploymentData, + Calldata, + ContractAddressSalt, + EventContent, + EventData, + EventKey, + Fee, + L2ToL1Payload, + PaymasterData, + Resource, + ResourceBounds, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionVersion, }; use starknet_api::{calldata, felt}; use starknet_types_core::felt::Felt; @@ -25,27 +41,48 @@ use crate::abi::abi_utils::selector_from_name; use crate::abi::constants; use crate::context::ChainInfo; use crate::execution::call_info::{ - CallExecution, CallInfo, MessageToL1, OrderedEvent, OrderedL2ToL1Message, Retdata, + CallExecution, + CallInfo, + MessageToL1, + OrderedEvent, + OrderedL2ToL1Message, + Retdata, }; use crate::execution::common_hints::ExecutionMode; use crate::execution::entry_point::{CallEntryPoint, CallType}; use crate::execution::errors::EntryPointExecutionError; use crate::execution::syscalls::hint_processor::{ - EmitEventError, BLOCK_NUMBER_OUT_OF_RANGE_ERROR, L1_GAS, L2_GAS, OUT_OF_GAS_ERROR, + EmitEventError, + BLOCK_NUMBER_OUT_OF_RANGE_ERROR, + L1_GAS, + L2_GAS, + OUT_OF_GAS_ERROR, }; use crate::execution::syscalls::SyscallSelector; use crate::state::state_api::{State, StateReader}; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - calldata_for_deploy_test, create_calldata, get_syscall_resources, - trivial_external_entry_point_new, trivial_external_entry_point_with_address, CairoVersion, - BALANCE, CHAIN_ID_NAME, CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_NUMBER_FOR_VALIDATE, - CURRENT_BLOCK_TIMESTAMP, CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, TEST_SEQUENCER_ADDRESS, + calldata_for_deploy_test, + create_calldata, + get_syscall_resources, + trivial_external_entry_point_new, + trivial_external_entry_point_with_address, + CairoVersion, + BALANCE, + CHAIN_ID_NAME, + CURRENT_BLOCK_NUMBER, + CURRENT_BLOCK_NUMBER_FOR_VALIDATE, + CURRENT_BLOCK_TIMESTAMP, + CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, + TEST_SEQUENCER_ADDRESS, }; use crate::transaction::constants::QUERY_VERSION_BASE_BIT; use crate::transaction::objects::{ - CommonAccountFields, CurrentTransactionInfo, DeprecatedTransactionInfo, TransactionInfo, + CommonAccountFields, + CurrentTransactionInfo, + DeprecatedTransactionInfo, + TransactionInfo, }; use crate::versioned_constants::VersionedConstants; use crate::{check_entry_point_execution_error_for_custom_hint, nonce, retdata, storage_key}; diff --git a/crates/blockifier/src/fee/actual_cost.rs b/crates/blockifier/src/fee/actual_cost.rs index 73d6992da4..36967058b8 100644 --- a/crates/blockifier/src/fee/actual_cost.rs +++ b/crates/blockifier/src/fee/actual_cost.rs @@ -7,7 +7,10 @@ use crate::execution::call_info::CallInfo; use crate::state::cached_state::StateChanges; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::objects::{ - GasVector, HasRelatedFeeType, StarknetResources, TransactionExecutionResult, + GasVector, + HasRelatedFeeType, + StarknetResources, + TransactionExecutionResult, TransactionResources, }; use crate::transaction::transaction_types::TransactionType; diff --git a/crates/blockifier/src/fee/actual_cost_test.rs b/crates/blockifier/src/fee/actual_cost_test.rs index 1db2f14c56..e9dcbd19b7 100644 --- a/crates/blockifier/src/fee/actual_cost_test.rs +++ b/crates/blockifier/src/fee/actual_cost_test.rs @@ -6,7 +6,8 @@ use crate::context::BlockContext; use crate::execution::call_info::{CallExecution, CallInfo, MessageToL1, OrderedL2ToL1Message}; use crate::fee::eth_gas_constants; use crate::fee::gas_usage::{ - get_consumed_message_to_l2_emissions_cost, get_log_message_to_l1_emissions_cost, + get_consumed_message_to_l2_emissions_cost, + get_log_message_to_l1_emissions_cost, get_message_segment_length, }; use crate::state::cached_state::StateChangesCount; @@ -16,7 +17,9 @@ use crate::test_utils::{create_calldata, create_trivial_calldata, CairoVersion, use crate::transaction::constants; use crate::transaction::objects::{GasVector, HasRelatedFeeType, StarknetResources}; use crate::transaction::test_utils::{ - account_invoke_tx, calculate_class_info_for_testing, max_resource_bounds, + account_invoke_tx, + calculate_class_info_for_testing, + max_resource_bounds, }; use crate::transaction::transactions::ExecutableTransaction; use crate::utils::{u128_from_usize, usize_from_u128}; diff --git a/crates/blockifier/src/fee/fee_checks.rs b/crates/blockifier/src/fee/fee_checks.rs index f613ec9848..d09c96de80 100644 --- a/crates/blockifier/src/fee/fee_checks.rs +++ b/crates/blockifier/src/fee/fee_checks.rs @@ -9,7 +9,10 @@ use crate::fee::gas_usage::compute_discounted_gas_from_gas_vector; use crate::state::state_api::StateReader; use crate::transaction::errors::TransactionExecutionError; use crate::transaction::objects::{ - FeeType, GasVector, TransactionExecutionResult, TransactionInfo, + FeeType, + GasVector, + TransactionExecutionResult, + TransactionInfo, }; #[derive(Clone, Copy, Debug, Error)] diff --git a/crates/blockifier/src/fee/fee_utils.rs b/crates/blockifier/src/fee/fee_utils.rs index 5f526cbbd0..3de23b228e 100644 --- a/crates/blockifier/src/fee/fee_utils.rs +++ b/crates/blockifier/src/fee/fee_utils.rs @@ -15,7 +15,11 @@ use crate::context::{BlockContext, TransactionContext}; use crate::state::state_api::StateReader; use crate::transaction::errors::TransactionFeeError; use crate::transaction::objects::{ - ExecutionResourcesTraits, FeeType, GasVector, TransactionFeeResult, TransactionInfo, + ExecutionResourcesTraits, + FeeType, + GasVector, + TransactionFeeResult, + TransactionInfo, }; use crate::utils::u128_from_usize; use crate::versioned_constants::VersionedConstants; diff --git a/crates/blockifier/src/fee/gas_usage_test.rs b/crates/blockifier/src/fee/gas_usage_test.rs index 1f145c09dc..f9ccee395e 100644 --- a/crates/blockifier/src/fee/gas_usage_test.rs +++ b/crates/blockifier/src/fee/gas_usage_test.rs @@ -11,7 +11,9 @@ use crate::execution::call_info::{CallExecution, CallInfo, OrderedEvent}; use crate::fee::eth_gas_constants; use crate::fee::fee_utils::get_fee_by_gas_vector; use crate::fee::gas_usage::{ - compute_discounted_gas_from_gas_vector, get_da_gas_cost, get_message_segment_length, + compute_discounted_gas_from_gas_vector, + get_da_gas_cost, + get_message_segment_length, }; use crate::invoke_tx_args; use crate::state::cached_state::StateChangesCount; diff --git a/crates/blockifier/src/test_utils.rs b/crates/blockifier/src/test_utils.rs index d898183597..6832b5601c 100644 --- a/crates/blockifier/src/test_utils.rs +++ b/crates/blockifier/src/test_utils.rs @@ -15,7 +15,11 @@ use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use starknet_api::core::{ClassHash, ContractAddress, Nonce, PatriciaKey}; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, Resource, ResourceBounds, ResourceBoundsMapping, + Calldata, + ContractAddressSalt, + Resource, + ResourceBounds, + ResourceBoundsMapping, TransactionVersion, }; use starknet_api::{contract_address, felt, patricia_key}; @@ -155,8 +159,8 @@ macro_rules! storage_key { } // TODO(Yoni, 1/1/2025): move to SN API. -/// A utility macro to create a [`CompiledClassHash`] from a hex string / unsigned integer -/// representation. +/// A utility macro to create a [`starknet_api::core::CompiledClassHash`] from a hex string / +/// unsigned integer representation. #[macro_export] macro_rules! compiled_class_hash { ($s:expr) => { diff --git a/crates/blockifier/src/test_utils/contracts.rs b/crates/blockifier/src/test_utils/contracts.rs index f7149c3fdc..1f19b43c77 100644 --- a/crates/blockifier/src/test_utils/contracts.rs +++ b/crates/blockifier/src/test_utils/contracts.rs @@ -1,8 +1,14 @@ use starknet_api::core::{ - ClassHash, CompiledClassHash, ContractAddress, EntryPointSelector, PatriciaKey, + ClassHash, + CompiledClassHash, + ContractAddress, + EntryPointSelector, + PatriciaKey, }; use starknet_api::deprecated_contract_class::{ - ContractClass as DeprecatedContractClass, EntryPointOffset, EntryPointType, + ContractClass as DeprecatedContractClass, + EntryPointOffset, + EntryPointType, }; use starknet_api::{class_hash, contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; diff --git a/crates/blockifier/src/test_utils/declare.rs b/crates/blockifier/src/test_utils/declare.rs index d64f574d33..6973d18ca7 100644 --- a/crates/blockifier/src/test_utils/declare.rs +++ b/crates/blockifier/src/test_utils/declare.rs @@ -1,8 +1,16 @@ use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - AccountDeploymentData, DeclareTransactionV0V1, DeclareTransactionV2, DeclareTransactionV3, Fee, - PaymasterData, ResourceBoundsMapping, Tip, TransactionHash, TransactionSignature, + AccountDeploymentData, + DeclareTransactionV0V1, + DeclareTransactionV2, + DeclareTransactionV3, + Fee, + PaymasterData, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionSignature, TransactionVersion, }; diff --git a/crates/blockifier/src/test_utils/deploy_account.rs b/crates/blockifier/src/test_utils/deploy_account.rs index 9e13f00474..f3157add88 100644 --- a/crates/blockifier/src/test_utils/deploy_account.rs +++ b/crates/blockifier/src/test_utils/deploy_account.rs @@ -1,8 +1,16 @@ use starknet_api::core::{calculate_contract_address, ClassHash, ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, DeployAccountTransactionV1, DeployAccountTransactionV3, Fee, - PaymasterData, ResourceBoundsMapping, Tip, TransactionHash, TransactionSignature, + Calldata, + ContractAddressSalt, + DeployAccountTransactionV1, + DeployAccountTransactionV3, + Fee, + PaymasterData, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionSignature, TransactionVersion, }; diff --git a/crates/blockifier/src/test_utils/invoke.rs b/crates/blockifier/src/test_utils/invoke.rs index da2f790ece..42ae6ba854 100644 --- a/crates/blockifier/src/test_utils/invoke.rs +++ b/crates/blockifier/src/test_utils/invoke.rs @@ -2,9 +2,18 @@ use starknet_api::calldata; use starknet_api::core::{ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - AccountDeploymentData, Calldata, Fee, InvokeTransactionV0, InvokeTransactionV1, - InvokeTransactionV3, PaymasterData, ResourceBoundsMapping, Tip, TransactionHash, - TransactionSignature, TransactionVersion, + AccountDeploymentData, + Calldata, + Fee, + InvokeTransactionV0, + InvokeTransactionV1, + InvokeTransactionV3, + PaymasterData, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionSignature, + TransactionVersion, }; use crate::abi::abi_utils::selector_from_name; diff --git a/crates/blockifier/src/test_utils/struct_impls.rs b/crates/blockifier/src/test_utils/struct_impls.rs index eedfcdc956..60c722fcd7 100644 --- a/crates/blockifier/src/test_utils/struct_impls.rs +++ b/crates/blockifier/src/test_utils/struct_impls.rs @@ -14,21 +14,37 @@ use crate::context::{BlockContext, ChainInfo, FeeTokenAddresses, TransactionCont use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; use crate::execution::contract_class::{ContractClassV0, ContractClassV1}; use crate::execution::entry_point::{ - CallEntryPoint, EntryPointExecutionContext, EntryPointExecutionResult, + CallEntryPoint, + EntryPointExecutionContext, + EntryPointExecutionResult, }; use crate::fee::fee_utils::get_fee_by_gas_vector; use crate::state::state_api::State; use crate::test_utils::{ - get_raw_contract_class, CHAIN_ID_NAME, CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_TIMESTAMP, - DEFAULT_ETH_L1_DATA_GAS_PRICE, DEFAULT_ETH_L1_GAS_PRICE, DEFAULT_STRK_L1_DATA_GAS_PRICE, - DEFAULT_STRK_L1_GAS_PRICE, TEST_ERC20_CONTRACT_ADDRESS, TEST_ERC20_CONTRACT_ADDRESS2, + get_raw_contract_class, + CHAIN_ID_NAME, + CURRENT_BLOCK_NUMBER, + CURRENT_BLOCK_TIMESTAMP, + DEFAULT_ETH_L1_DATA_GAS_PRICE, + DEFAULT_ETH_L1_GAS_PRICE, + DEFAULT_STRK_L1_DATA_GAS_PRICE, + DEFAULT_STRK_L1_GAS_PRICE, + TEST_ERC20_CONTRACT_ADDRESS, + TEST_ERC20_CONTRACT_ADDRESS2, TEST_SEQUENCER_ADDRESS, }; use crate::transaction::objects::{ - DeprecatedTransactionInfo, FeeType, TransactionFeeResult, TransactionInfo, TransactionResources, + DeprecatedTransactionInfo, + FeeType, + TransactionFeeResult, + TransactionInfo, + TransactionResources, }; use crate::versioned_constants::{ - GasCosts, OsConstants, VersionedConstants, VERSIONED_CONSTANTS_LATEST_JSON, + GasCosts, + OsConstants, + VersionedConstants, + VERSIONED_CONSTANTS_LATEST_JSON, }; impl CallEntryPoint { diff --git a/crates/blockifier/src/transaction/account_transaction.rs b/crates/blockifier/src/transaction/account_transaction.rs index 51ee47b660..56ecba63bf 100644 --- a/crates/blockifier/src/transaction/account_transaction.rs +++ b/crates/blockifier/src/transaction/account_transaction.rs @@ -15,7 +15,9 @@ use crate::execution::entry_point::{CallEntryPoint, CallType, EntryPointExecutio use crate::fee::actual_cost::TransactionReceipt; use crate::fee::fee_checks::{FeeCheckReportFields, PostExecutionReport}; use crate::fee::fee_utils::{ - get_fee_by_gas_vector, get_sequencer_balance_keys, verify_can_pay_committed_bounds, + get_fee_by_gas_vector, + get_sequencer_balance_keys, + verify_can_pay_committed_bounds, }; use crate::fee::gas_usage::{compute_discounted_gas_from_gas_vector, estimate_minimal_gas_vector}; use crate::retdata; @@ -23,18 +25,29 @@ use crate::state::cached_state::{StateChanges, TransactionalState}; use crate::state::state_api::{State, StateReader, UpdatableState}; use crate::transaction::constants; use crate::transaction::errors::{ - TransactionExecutionError, TransactionFeeError, TransactionPreValidationError, + TransactionExecutionError, + TransactionFeeError, + TransactionPreValidationError, }; use crate::transaction::objects::{ - DeprecatedTransactionInfo, HasRelatedFeeType, TransactionExecutionInfo, - TransactionExecutionResult, TransactionInfo, TransactionInfoCreator, + DeprecatedTransactionInfo, + HasRelatedFeeType, + TransactionExecutionInfo, + TransactionExecutionResult, + TransactionInfo, + TransactionInfoCreator, TransactionPreValidationResult, }; use crate::transaction::transaction_types::TransactionType; use crate::transaction::transaction_utils::update_remaining_gas; use crate::transaction::transactions::{ - DeclareTransaction, DeployAccountTransaction, Executable, ExecutableTransaction, - ExecutionFlags, InvokeTransaction, ValidatableTransaction, + DeclareTransaction, + DeployAccountTransaction, + Executable, + ExecutableTransaction, + ExecutionFlags, + InvokeTransaction, + ValidatableTransaction, }; #[cfg(test)] diff --git a/crates/blockifier/src/transaction/account_transactions_test.rs b/crates/blockifier/src/transaction/account_transactions_test.rs index 89eb2fb9ca..5e99b92386 100644 --- a/crates/blockifier/src/transaction/account_transactions_test.rs +++ b/crates/blockifier/src/transaction/account_transactions_test.rs @@ -9,14 +9,21 @@ use starknet_api::core::{calculate_contract_address, ClassHash, ContractAddress, use starknet_api::hash::StarkHash; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, DeclareTransactionV2, Fee, ResourceBoundsMapping, - TransactionHash, TransactionVersion, + Calldata, + ContractAddressSalt, + DeclareTransactionV2, + Fee, + ResourceBoundsMapping, + TransactionHash, + TransactionVersion, }; use starknet_api::{calldata, class_hash, contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; use crate::abi::abi_utils::{ - get_fee_token_var_address, get_storage_var_address, selector_from_name, + get_fee_token_var_address, + get_storage_var_address, + selector_from_name, }; use crate::context::BlockContext; use crate::execution::contract_class::{ContractClass, ContractClassV1}; @@ -32,23 +39,44 @@ use crate::test_utils::deploy_account::deploy_account_tx; use crate::test_utils::initial_test_state::{fund_account, test_state}; use crate::test_utils::invoke::InvokeTxArgs; use crate::test_utils::{ - create_calldata, create_trivial_calldata, get_syscall_resources, get_tx_resources, - u64_from_usize, CairoVersion, NonceManager, BALANCE, DEFAULT_STRK_L1_GAS_PRICE, MAX_FEE, + create_calldata, + create_trivial_calldata, + get_syscall_resources, + get_tx_resources, + u64_from_usize, + CairoVersion, + NonceManager, + BALANCE, + DEFAULT_STRK_L1_GAS_PRICE, + MAX_FEE, }; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::constants::TRANSFER_ENTRY_POINT_NAME; use crate::transaction::objects::{FeeType, GasVector, HasRelatedFeeType, TransactionInfoCreator}; use crate::transaction::test_utils::{ - account_invoke_tx, block_context, calculate_class_info_for_testing, - create_account_tx_for_validate_test_nonce_0, create_test_init_data, deploy_and_fund_account, - l1_resource_bounds, max_fee, max_resource_bounds, run_invoke_tx, FaultyAccountTxCreatorArgs, - TestInitData, INVALID, + account_invoke_tx, + block_context, + calculate_class_info_for_testing, + create_account_tx_for_validate_test_nonce_0, + create_test_init_data, + deploy_and_fund_account, + l1_resource_bounds, + max_fee, + max_resource_bounds, + run_invoke_tx, + FaultyAccountTxCreatorArgs, + TestInitData, + INVALID, }; use crate::transaction::transaction_types::TransactionType; use crate::transaction::transactions::{DeclareTransaction, ExecutableTransaction, ExecutionFlags}; use crate::{ - check_transaction_execution_error_for_invalid_scenario, declare_tx_args, - deploy_account_tx_args, invoke_tx_args, nonce, storage_key, + check_transaction_execution_error_for_invalid_scenario, + declare_tx_args, + deploy_account_tx_args, + invoke_tx_args, + nonce, + storage_key, }; #[rstest] diff --git a/crates/blockifier/src/transaction/execution_flavors_test.rs b/crates/blockifier/src/transaction/execution_flavors_test.rs index e186ad8151..82cb6e9f47 100644 --- a/crates/blockifier/src/transaction/execution_flavors_test.rs +++ b/crates/blockifier/src/transaction/execution_flavors_test.rs @@ -4,7 +4,11 @@ use rstest::rstest; use starknet_api::core::ContractAddress; use starknet_api::felt; use starknet_api::transaction::{ - Calldata, Fee, ResourceBoundsMapping, TransactionSignature, TransactionVersion, + Calldata, + Fee, + ResourceBoundsMapping, + TransactionSignature, + TransactionVersion, }; use starknet_types_core::felt::Felt; @@ -17,16 +21,29 @@ use crate::test_utils::contracts::FeatureContract; use crate::test_utils::dict_state_reader::DictStateReader; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - create_calldata, create_trivial_calldata, get_syscall_resources, get_tx_resources, - u64_from_usize, CairoVersion, NonceManager, BALANCE, MAX_FEE, MAX_L1_GAS_AMOUNT, + create_calldata, + create_trivial_calldata, + get_syscall_resources, + get_tx_resources, + u64_from_usize, + CairoVersion, + NonceManager, + BALANCE, + MAX_FEE, + MAX_L1_GAS_AMOUNT, MAX_L1_GAS_PRICE, }; use crate::transaction::errors::{ - TransactionExecutionError, TransactionFeeError, TransactionPreValidationError, + TransactionExecutionError, + TransactionFeeError, + TransactionPreValidationError, }; use crate::transaction::objects::{FeeType, GasVector, TransactionExecutionInfo}; use crate::transaction::test_utils::{ - account_invoke_tx, l1_resource_bounds, max_resource_bounds, INVALID, + account_invoke_tx, + l1_resource_bounds, + max_resource_bounds, + INVALID, }; use crate::transaction::transaction_types::TransactionType; use crate::transaction::transactions::ExecutableTransaction; diff --git a/crates/blockifier/src/transaction/objects.rs b/crates/blockifier/src/transaction/objects.rs index 0ba4006a8d..a08dbd5e8d 100644 --- a/crates/blockifier/src/transaction/objects.rs +++ b/crates/blockifier/src/transaction/objects.rs @@ -7,8 +7,16 @@ use serde::Serialize; use starknet_api::core::{ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - AccountDeploymentData, Fee, PaymasterData, Resource, ResourceBounds, ResourceBoundsMapping, - Tip, TransactionHash, TransactionSignature, TransactionVersion, + AccountDeploymentData, + Fee, + PaymasterData, + Resource, + ResourceBounds, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionSignature, + TransactionVersion, }; use starknet_types_core::felt::Felt; use strum_macros::EnumIter; @@ -20,13 +28,17 @@ use crate::fee::actual_cost::TransactionReceipt; use crate::fee::eth_gas_constants; use crate::fee::fee_utils::{calculate_l1_gas_by_vm_usage, get_fee_by_gas_vector}; use crate::fee::gas_usage::{ - get_consumed_message_to_l2_emissions_cost, get_da_gas_cost, - get_log_message_to_l1_emissions_cost, get_onchain_data_segment_length, + get_consumed_message_to_l2_emissions_cost, + get_da_gas_cost, + get_log_message_to_l1_emissions_cost, + get_onchain_data_segment_length, }; use crate::state::cached_state::StateChangesCount; use crate::transaction::constants; use crate::transaction::errors::{ - TransactionExecutionError, TransactionFeeError, TransactionPreValidationError, + TransactionExecutionError, + TransactionFeeError, + TransactionPreValidationError, }; use crate::utils::{u128_from_usize, usize_from_u128}; use crate::versioned_constants::VersionedConstants; diff --git a/crates/blockifier/src/transaction/objects_test.rs b/crates/blockifier/src/transaction/objects_test.rs index 7d1ef479e1..10e0a954d6 100644 --- a/crates/blockifier/src/transaction/objects_test.rs +++ b/crates/blockifier/src/transaction/objects_test.rs @@ -3,7 +3,11 @@ use starknet_api::core::ClassHash; use starknet_api::{class_hash, felt}; use crate::execution::call_info::{ - CallExecution, CallInfo, ExecutionSummary, OrderedEvent, TestExecutionSummary, + CallExecution, + CallInfo, + ExecutionSummary, + OrderedEvent, + TestExecutionSummary, }; use crate::execution::entry_point::CallEntryPoint; use crate::transaction::objects::TransactionExecutionInfo; diff --git a/crates/blockifier/src/transaction/post_execution_test.rs b/crates/blockifier/src/transaction/post_execution_test.rs index a9b9e67321..3cf9c3c5ba 100644 --- a/crates/blockifier/src/transaction/post_execution_test.rs +++ b/crates/blockifier/src/transaction/post_execution_test.rs @@ -17,8 +17,13 @@ use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::errors::TransactionExecutionError; use crate::transaction::objects::{FeeType, HasRelatedFeeType, TransactionInfoCreator}; use crate::transaction::test_utils::{ - account_invoke_tx, block_context, l1_resource_bounds, max_fee, max_resource_bounds, - run_invoke_tx, TestInitData, + account_invoke_tx, + block_context, + l1_resource_bounds, + max_fee, + max_resource_bounds, + run_invoke_tx, + TestInitData, }; use crate::transaction::transactions::ExecutableTransaction; diff --git a/crates/blockifier/src/transaction/test_utils.rs b/crates/blockifier/src/transaction/test_utils.rs index a5a353a056..d6b1724e3a 100644 --- a/crates/blockifier/src/transaction/test_utils.rs +++ b/crates/blockifier/src/transaction/test_utils.rs @@ -1,9 +1,18 @@ use rstest::fixture; use starknet_api::core::{ClassHash, ContractAddress, Nonce}; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, Fee, InvokeTransactionV0, InvokeTransactionV1, - InvokeTransactionV3, Resource, ResourceBounds, ResourceBoundsMapping, TransactionHash, - TransactionSignature, TransactionVersion, + Calldata, + ContractAddressSalt, + Fee, + InvokeTransactionV0, + InvokeTransactionV1, + InvokeTransactionV3, + Resource, + ResourceBounds, + ResourceBoundsMapping, + TransactionHash, + TransactionSignature, + TransactionVersion, }; use starknet_api::{calldata, felt}; use starknet_types_core::felt::Felt; @@ -21,7 +30,12 @@ use crate::test_utils::dict_state_reader::DictStateReader; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::invoke::{invoke_tx, InvokeTxArgs}; use crate::test_utils::{ - create_calldata, CairoVersion, NonceManager, BALANCE, MAX_FEE, MAX_L1_GAS_AMOUNT, + create_calldata, + CairoVersion, + NonceManager, + BALANCE, + MAX_FEE, + MAX_L1_GAS_AMOUNT, MAX_L1_GAS_PRICE, }; use crate::transaction::account_transaction::AccountTransaction; diff --git a/crates/blockifier/src/transaction/transaction_execution.rs b/crates/blockifier/src/transaction/transaction_execution.rs index e617ad1c5f..9d0b209c7b 100644 --- a/crates/blockifier/src/transaction/transaction_execution.rs +++ b/crates/blockifier/src/transaction/transaction_execution.rs @@ -14,11 +14,19 @@ use crate::state::state_api::UpdatableState; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::errors::TransactionFeeError; use crate::transaction::objects::{ - TransactionExecutionInfo, TransactionExecutionResult, TransactionInfo, TransactionInfoCreator, + TransactionExecutionInfo, + TransactionExecutionResult, + TransactionInfo, + TransactionInfoCreator, }; use crate::transaction::transactions::{ - DeclareTransaction, DeployAccountTransaction, Executable, ExecutableTransaction, - ExecutionFlags, InvokeTransaction, L1HandlerTransaction, + DeclareTransaction, + DeployAccountTransaction, + Executable, + ExecutableTransaction, + ExecutionFlags, + InvokeTransaction, + L1HandlerTransaction, }; // TODO: Move into transaction.rs, makes more sense to be defined there. diff --git a/crates/blockifier/src/transaction/transactions.rs b/crates/blockifier/src/transaction/transactions.rs index 4e3188c150..830efbd7b3 100644 --- a/crates/blockifier/src/transaction/transactions.rs +++ b/crates/blockifier/src/transaction/transactions.rs @@ -5,8 +5,15 @@ use starknet_api::calldata; use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use starknet_api::deprecated_contract_class::EntryPointType; use starknet_api::transaction::{ - AccountDeploymentData, Calldata, ContractAddressSalt, DeclareTransactionV2, - DeclareTransactionV3, Fee, TransactionHash, TransactionSignature, TransactionVersion, + AccountDeploymentData, + Calldata, + ContractAddressSalt, + DeclareTransactionV2, + DeclareTransactionV3, + Fee, + TransactionHash, + TransactionSignature, + TransactionVersion, }; use starknet_types_core::felt::Felt; @@ -15,7 +22,10 @@ use crate::context::{BlockContext, TransactionContext}; use crate::execution::call_info::CallInfo; use crate::execution::contract_class::{ClassInfo, ContractClass}; use crate::execution::entry_point::{ - CallEntryPoint, CallType, ConstructorContext, EntryPointExecutionContext, + CallEntryPoint, + CallType, + ConstructorContext, + EntryPointExecutionContext, }; use crate::execution::execution_utils::execute_deployment; use crate::state::cached_state::TransactionalState; @@ -24,8 +34,14 @@ use crate::state::state_api::{State, UpdatableState}; use crate::transaction::constants; use crate::transaction::errors::TransactionExecutionError; use crate::transaction::objects::{ - CommonAccountFields, CurrentTransactionInfo, DeprecatedTransactionInfo, HasRelatedFeeType, - TransactionExecutionInfo, TransactionExecutionResult, TransactionInfo, TransactionInfoCreator, + CommonAccountFields, + CurrentTransactionInfo, + DeprecatedTransactionInfo, + HasRelatedFeeType, + TransactionExecutionInfo, + TransactionExecutionResult, + TransactionInfo, + TransactionInfoCreator, }; use crate::transaction::transaction_utils::{update_remaining_gas, verify_contract_class_version}; diff --git a/crates/blockifier/src/transaction/transactions_test.rs b/crates/blockifier/src/transaction/transactions_test.rs index e21c90de2e..6e7ef6058c 100644 --- a/crates/blockifier/src/transaction/transactions_test.rs +++ b/crates/blockifier/src/transaction/transactions_test.rs @@ -13,21 +13,35 @@ use starknet_api::core::{ChainId, ClassHash, ContractAddress, EthAddress, Nonce, use starknet_api::deprecated_contract_class::EntryPointType; use starknet_api::state::StorageKey; use starknet_api::transaction::{ - Calldata, EventContent, EventData, EventKey, Fee, L2ToL1Payload, ResourceBoundsMapping, - TransactionSignature, TransactionVersion, + Calldata, + EventContent, + EventData, + EventKey, + Fee, + L2ToL1Payload, + ResourceBoundsMapping, + TransactionSignature, + TransactionVersion, }; use starknet_api::{calldata, class_hash, contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; use strum::IntoEnumIterator; use crate::abi::abi_utils::{ - get_fee_token_var_address, get_storage_var_address, selector_from_name, + get_fee_token_var_address, + get_storage_var_address, + selector_from_name, }; use crate::abi::constants as abi_constants; use crate::abi::sierra_types::next_storage_key; use crate::context::{BlockContext, ChainInfo, FeeTokenAddresses, TransactionContext}; use crate::execution::call_info::{ - CallExecution, CallInfo, MessageToL1, OrderedEvent, OrderedL2ToL1Message, Retdata, + CallExecution, + CallInfo, + MessageToL1, + OrderedEvent, + OrderedL2ToL1Message, + Retdata, }; use crate::execution::entry_point::{CallEntryPoint, CallType}; use crate::execution::errors::{ConstructorEntryPointExecutionError, EntryPointExecutionError}; @@ -36,7 +50,9 @@ use crate::execution::syscalls::SyscallSelector; use crate::fee::actual_cost::TransactionReceipt; use crate::fee::fee_utils::balance_to_big_uint; use crate::fee::gas_usage::{ - estimate_minimal_gas_vector, get_da_gas_cost, get_onchain_data_segment_length, + estimate_minimal_gas_vector, + get_da_gas_cost, + get_onchain_data_segment_length, }; use crate::state::cached_state::{CachedState, StateChangesCount, TransactionalState}; use crate::state::errors::StateError; @@ -49,35 +65,70 @@ use crate::test_utils::initial_test_state::test_state; use crate::test_utils::invoke::invoke_tx; use crate::test_utils::prices::Prices; use crate::test_utils::{ - create_calldata, create_trivial_calldata, get_syscall_resources, get_tx_resources, - test_erc20_sequencer_balance_key, CairoVersion, NonceManager, SaltManager, BALANCE, - CHAIN_ID_NAME, CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_NUMBER_FOR_VALIDATE, - CURRENT_BLOCK_TIMESTAMP, CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, MAX_FEE, MAX_L1_GAS_AMOUNT, - MAX_L1_GAS_PRICE, TEST_SEQUENCER_ADDRESS, + create_calldata, + create_trivial_calldata, + get_syscall_resources, + get_tx_resources, + test_erc20_sequencer_balance_key, + CairoVersion, + NonceManager, + SaltManager, + BALANCE, + CHAIN_ID_NAME, + CURRENT_BLOCK_NUMBER, + CURRENT_BLOCK_NUMBER_FOR_VALIDATE, + CURRENT_BLOCK_TIMESTAMP, + CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, + MAX_FEE, + MAX_L1_GAS_AMOUNT, + MAX_L1_GAS_PRICE, + TEST_SEQUENCER_ADDRESS, }; use crate::transaction::account_transaction::AccountTransaction; use crate::transaction::constants; use crate::transaction::errors::{ - TransactionExecutionError, TransactionFeeError, TransactionPreValidationError, + TransactionExecutionError, + TransactionFeeError, + TransactionPreValidationError, }; use crate::transaction::objects::{ - FeeType, GasVector, HasRelatedFeeType, StarknetResources, TransactionExecutionInfo, - TransactionInfo, TransactionResources, + FeeType, + GasVector, + HasRelatedFeeType, + StarknetResources, + TransactionExecutionInfo, + TransactionInfo, + TransactionResources, }; use crate::transaction::test_utils::{ - account_invoke_tx, block_context, calculate_class_info_for_testing, - create_account_tx_for_validate_test, create_account_tx_for_validate_test_nonce_0, - l1_resource_bounds, max_resource_bounds, FaultyAccountTxCreatorArgs, CALL_CONTRACT, - GET_BLOCK_HASH, GET_BLOCK_NUMBER, GET_BLOCK_TIMESTAMP, GET_EXECUTION_INFO, - GET_SEQUENCER_ADDRESS, INVALID, VALID, + account_invoke_tx, + block_context, + calculate_class_info_for_testing, + create_account_tx_for_validate_test, + create_account_tx_for_validate_test_nonce_0, + l1_resource_bounds, + max_resource_bounds, + FaultyAccountTxCreatorArgs, + CALL_CONTRACT, + GET_BLOCK_HASH, + GET_BLOCK_NUMBER, + GET_BLOCK_TIMESTAMP, + GET_EXECUTION_INFO, + GET_SEQUENCER_ADDRESS, + INVALID, + VALID, }; use crate::transaction::transaction_types::TransactionType; use crate::transaction::transactions::{ExecutableTransaction, L1HandlerTransaction}; use crate::versioned_constants::VersionedConstants; use crate::{ check_transaction_execution_error_for_custom_hint, - check_transaction_execution_error_for_invalid_scenario, declare_tx_args, - deploy_account_tx_args, invoke_tx_args, nonce, retdata, + check_transaction_execution_error_for_invalid_scenario, + declare_tx_args, + deploy_account_tx_args, + invoke_tx_args, + nonce, + retdata, }; static VERSIONED_CONSTANTS: Lazy = diff --git a/crates/blockifier/src/utils_test.rs b/crates/blockifier/src/utils_test.rs index 48a6fb4695..de44312e42 100644 --- a/crates/blockifier/src/utils_test.rs +++ b/crates/blockifier/src/utils_test.rs @@ -4,7 +4,10 @@ use std::num::NonZeroU128; use pretty_assertions::assert_eq; use crate::utils::{ - strict_subtract_mappings, subtract_mappings, u128_div_ceil, STRICT_SUBTRACT_MAPPING_ERROR, + strict_subtract_mappings, + subtract_mappings, + u128_div_ceil, + STRICT_SUBTRACT_MAPPING_ERROR, }; #[test] diff --git a/crates/committer/Cargo.toml b/crates/committer/Cargo.toml index aed76d8e4b..b15a64288e 100644 --- a/crates/committer/Cargo.toml +++ b/crates/committer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "committer" -version.workspace = true +version = "0.1.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -24,8 +24,8 @@ ethnum.workspace = true hex.workspace = true log.workspace = true rand.workspace = true -serde.workspace = true -serde_json.workspace = true +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.116" starknet-types-core.workspace = true strum.workspace = true strum_macros.workspace = true diff --git a/crates/committer/src/block_committer/commit.rs b/crates/committer/src/block_committer/commit.rs index a3d2cec8aa..a80806e22d 100644 --- a/crates/committer/src/block_committer/commit.rs +++ b/crates/committer/src/block_committer/commit.rs @@ -1,19 +1,17 @@ -use log::warn; use std::collections::HashMap; +use log::warn; + use crate::block_committer::errors::BlockCommitmentError; -use crate::block_committer::input::Config; -use crate::block_committer::input::ConfigImpl; -use crate::block_committer::input::ContractAddress; -use crate::block_committer::input::Input; -use crate::block_committer::input::StateDiff; +use crate::block_committer::input::{Config, ConfigImpl, ContractAddress, Input, StateDiff}; use crate::patricia_merkle_tree::filled_tree::forest::FilledForest; use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, Nonce}; use crate::patricia_merkle_tree::node_data::leaf::ContractState; -use crate::patricia_merkle_tree::original_skeleton_tree::skeleton_forest::ForestSortedIndices; -use crate::patricia_merkle_tree::original_skeleton_tree::skeleton_forest::OriginalSkeletonForest; -use crate::patricia_merkle_tree::types::NodeIndex; -use crate::patricia_merkle_tree::types::SortedLeafIndices; +use crate::patricia_merkle_tree::original_skeleton_tree::skeleton_forest::{ + ForestSortedIndices, + OriginalSkeletonForest, +}; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; use crate::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunctionImpl; use crate::patricia_merkle_tree::updated_skeleton_tree::skeleton_forest::UpdatedSkeletonForest; use crate::storage::map_storage::MapStorage; @@ -83,10 +81,7 @@ fn check_trivial_nonce_and_class_hash_updates( .get(&NodeIndex::from_contract_address(address)) .is_some_and(|previous_contract_state| previous_contract_state.nonce == *nonce) { - warn!( - "Encountered a trivial nonce update of contract {:?}", - address - ) + warn!("Encountered a trivial nonce update of contract {:?}", address) } } @@ -97,10 +92,7 @@ fn check_trivial_nonce_and_class_hash_updates( previous_contract_state.class_hash == *class_hash }) { - warn!( - "Encountered a trivial class hash update of contract {:?}", - address - ) + warn!("Encountered a trivial class hash update of contract {:?}", address) } } } @@ -112,11 +104,7 @@ type ClassesTrieIndices = Vec; /// Returns all modified indices in the given state diff. pub(crate) fn get_all_modified_indices( state_diff: &StateDiff, -) -> ( - StorageTriesIndices, - ContractsTrieIndices, - ClassesTrieIndices, -) { +) -> (StorageTriesIndices, ContractsTrieIndices, ClassesTrieIndices) { let accessed_addresses = state_diff.accessed_addresses(); let contracts_trie_indices: Vec = accessed_addresses .iter() @@ -131,18 +119,11 @@ pub(crate) fn get_all_modified_indices( .iter() .map(|address| { let indices: Vec = match state_diff.storage_updates.get(address) { - Some(updates) => updates - .keys() - .map(NodeIndex::from_starknet_storage_key) - .collect(), + Some(updates) => updates.keys().map(NodeIndex::from_starknet_storage_key).collect(), None => Vec::new(), }; (**address, indices) }) .collect(); - ( - storage_tries_indices, - contracts_trie_indices, - classes_trie_indices, - ) + (storage_tries_indices, contracts_trie_indices, classes_trie_indices) } diff --git a/crates/committer/src/block_committer/input.rs b/crates/committer/src/block_committer/input.rs index 10f6f630fc..18023bfe45 100644 --- a/crates/committer/src/block_committer/input.rs +++ b/crates/committer/src/block_committer/input.rs @@ -1,3 +1,6 @@ +use std::collections::{HashMap, HashSet}; +use std::fmt::Debug; + use log::LevelFilter; use crate::felt::Felt; @@ -6,15 +9,14 @@ use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHas use crate::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; use crate::patricia_merkle_tree::types::NodeIndex; use crate::storage::storage_trait::{StorageKey, StorageValue}; -use std::collections::{HashMap, HashSet}; -use std::fmt::Debug; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] // TODO(Nimrod, 1/6/2025): Use the ContractAddress defined in starknet-types-core when available. pub struct ContractAddress(pub Felt); #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] -// TODO(Nimrod, 1/6/2025): Use the StarknetStorageValue defined in starknet-types-core when available. +// TODO(Nimrod, 1/6/2025): Use the StarknetStorageValue defined in starknet-types-core when +// available. pub struct StarknetStorageKey(pub Felt); #[derive(Clone, Copy, Default, Debug, Eq, PartialEq)] @@ -58,10 +60,7 @@ impl Config for ConfigImpl { impl ConfigImpl { pub fn new(warn_on_trivial_modifications: bool, log_level: LevelFilter) -> Self { - Self { - warn_on_trivial_modifications, - log_level, - } + Self { warn_on_trivial_modifications, log_level } } } @@ -96,10 +95,7 @@ impl StateDiff { Some(inner_updates) => inner_updates .iter() .map(|(key, value)| { - ( - NodeIndex::from_starknet_storage_key(key), - SkeletonLeaf::from(value.0), - ) + (NodeIndex::from_starknet_storage_key(key), SkeletonLeaf::from(value.0)) }) .collect(), None => HashMap::new(), @@ -113,10 +109,7 @@ impl StateDiff { self.class_hash_to_compiled_class_hash .iter() .map(|(class_hash, compiled_class_hash)| { - ( - NodeIndex::from_class_hash(class_hash), - SkeletonLeaf::from(compiled_class_hash.0), - ) + (NodeIndex::from_class_hash(class_hash), SkeletonLeaf::from(compiled_class_hash.0)) }) .collect() } diff --git a/crates/committer/src/felt.rs b/crates/committer/src/felt.rs index 85b9b1e970..e31e1a31e0 100644 --- a/crates/committer/src/felt.rs +++ b/crates/committer/src/felt.rs @@ -1,4 +1,5 @@ use core::fmt; + use ethnum::U256; use serde::{Deserialize, Serialize}; use starknet_types_core::felt::{Felt as StarknetTypesFelt, FromStrError}; @@ -121,10 +122,6 @@ impl Felt { // Convert to a 64-character hexadecimal string without the "0x" prefix. pub fn to_fixed_hex_string(&self) -> String { // Zero-pad the remaining string - self.0 - .to_fixed_hex_string() - .strip_prefix("0x") - .unwrap_or("0") - .to_string() + self.0.to_fixed_hex_string().strip_prefix("0x").unwrap_or("0").to_string() } } diff --git a/crates/committer/src/forest_errors.rs b/crates/committer/src/forest_errors.rs index 168ccad0ed..36549bfd53 100644 --- a/crates/committer/src/forest_errors.rs +++ b/crates/committer/src/forest_errors.rs @@ -1,13 +1,15 @@ +use thiserror::Error; +use tokio::task::JoinError; + use crate::block_committer::input::ContractAddress; use crate::patricia_merkle_tree::filled_tree::errors::{ - ClassesTrieError, ContractsTrieError, StorageTrieError, + ClassesTrieError, + ContractsTrieError, + StorageTrieError, }; use crate::patricia_merkle_tree::original_skeleton_tree::errors::OriginalSkeletonTreeError; use crate::patricia_merkle_tree::updated_skeleton_tree::errors::UpdatedSkeletonTreeError; -use thiserror::Error; -use tokio::task::JoinError; - pub(crate) type ForestResult = Result; #[derive(Debug, Error)] @@ -24,11 +26,17 @@ pub enum ForestError { ContractsTrie(#[from] ContractsTrieError), #[error("Missing input: Couldn't find the storage trie's current state of address {0:?}")] MissingContractCurrentState(ContractAddress), - #[error("Can't build storage trie's updated skeleton, because there is no original skeleton at address {0:?}")] + #[error( + "Can't build storage trie's updated skeleton, because there is no original skeleton at \ + address {0:?}" + )] MissingOriginalSkeleton(ContractAddress), #[error("Can't fill storage trie, because there is no updated skeleton at address {0:?}")] MissingUpdatedSkeleton(ContractAddress), - #[error("Can't build storage trie, because there are no sorted leaf indices of the contract at address {0:?}")] + #[error( + "Can't build storage trie, because there are no sorted leaf indices of the contract at \ + address {0:?}" + )] MissingSortedLeafIndices(ContractAddress), #[error(transparent)] JoinError(#[from] JoinError), diff --git a/crates/committer/src/hash/hash_trait.rs b/crates/committer/src/hash/hash_trait.rs index 43dc4f2ed6..c7ace47813 100644 --- a/crates/committer/src/hash/hash_trait.rs +++ b/crates/committer/src/hash/hash_trait.rs @@ -1,6 +1,7 @@ use starknet_types_core::felt::FromStrError; -use crate::{felt::Felt, impl_from_hex_for_felt_wrapper}; +use crate::felt::Felt; +use crate::impl_from_hex_for_felt_wrapper; #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] pub struct HashOutput(pub Felt); diff --git a/crates/committer/src/patricia_merkle_tree/errors.rs b/crates/committer/src/patricia_merkle_tree/errors.rs index e157db8934..334e6260d6 100644 --- a/crates/committer/src/patricia_merkle_tree/errors.rs +++ b/crates/committer/src/patricia_merkle_tree/errors.rs @@ -1,12 +1,9 @@ use std::fmt::Debug; + use thiserror::Error; #[derive(Debug, Error)] pub enum TypesError { #[error("Failed to convert type {from:?} to {to}. Reason: {reason}.")] - ConversionError { - from: T, - to: &'static str, - reason: &'static str, - }, + ConversionError { from: T, to: &'static str, reason: &'static str }, } diff --git a/crates/committer/src/patricia_merkle_tree/external_test_utils.rs b/crates/committer/src/patricia_merkle_tree/external_test_utils.rs index ca7472c324..213cdc98e0 100644 --- a/crates/committer/src/patricia_merkle_tree/external_test_utils.rs +++ b/crates/committer/src/patricia_merkle_tree/external_test_utils.rs @@ -2,14 +2,8 @@ use std::collections::HashMap; use std::sync::Arc; use ethnum::U256; -use serde_json::json; - -use crate::block_committer::input::StarknetStorageValue; -use crate::felt::Felt; -use crate::hash::hash_trait::HashOutput; -use crate::patricia_merkle_tree::errors::TypesError; -use crate::storage::map_storage::MapStorage; use rand::Rng; +use serde_json::json; use super::filled_tree::tree::{FilledTree, StorageTrie}; use super::node_data::leaf::{Leaf, LeafModifications, SkeletonLeaf}; @@ -18,6 +12,11 @@ use super::original_skeleton_tree::tree::{OriginalSkeletonTree, OriginalSkeleton use super::types::{NodeIndex, SortedLeafIndices}; use super::updated_skeleton_tree::hash_function::TreeHashFunctionImpl; use super::updated_skeleton_tree::tree::{UpdatedSkeletonTree, UpdatedSkeletonTreeImpl}; +use crate::block_committer::input::StarknetStorageValue; +use crate::felt::Felt; +use crate::hash::hash_trait::HashOutput; +use crate::patricia_merkle_tree::errors::TypesError; +use crate::storage::map_storage::MapStorage; impl TryFrom<&U256> for Felt { type Error = TypesError; @@ -55,10 +54,7 @@ pub fn get_random_u256(rng: &mut R, low: U256, high: U256) -> U256 { // 2. high_of_high == high_of_low + 1, and every possible low 128 bits value is valid either // when the high bits equal high_of_high, or when they equal high_of_low). let mut randomize = || { - U256::from_words( - rng.gen_range(*high_of_low..=*high_of_high), - rng.gen_range(0..=u128::MAX), - ) + U256::from_words(rng.gen_range(*high_of_low..=*high_of_high), rng.gen_range(0..=u128::MAX)) }; let mut result = randomize(); while result < low || result >= high { diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/errors.rs b/crates/committer/src/patricia_merkle_tree/filled_tree/errors.rs index 073a2d37b2..7bc74950c6 100644 --- a/crates/committer/src/patricia_merkle_tree/filled_tree/errors.rs +++ b/crates/committer/src/patricia_merkle_tree/filled_tree/errors.rs @@ -1,22 +1,18 @@ use tokio::task::JoinError; use crate::block_committer::input::StarknetStorageValue; -use crate::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use crate::patricia_merkle_tree::filled_tree::node::FilledNode; +use crate::patricia_merkle_tree::filled_tree::node::{CompiledClassHash, FilledNode}; use crate::patricia_merkle_tree::node_data::errors::LeafError; -use crate::patricia_merkle_tree::node_data::leaf::ContractState; +use crate::patricia_merkle_tree::node_data::leaf::{ContractState, Leaf}; +use crate::patricia_merkle_tree::types::NodeIndex; use crate::patricia_merkle_tree::updated_skeleton_tree::errors::UpdatedSkeletonTreeError; -use crate::patricia_merkle_tree::{node_data::leaf::Leaf, types::NodeIndex}; #[derive(thiserror::Error, Debug)] pub enum FilledTreeError { #[error("Deleted leaf at index {0:?} appears in the updated skeleton tree.")] DeletedLeafInSkeleton(NodeIndex), #[error("Double update at node {index:?}. Existing value: {existing_value:?}.")] - DoubleUpdate { - index: NodeIndex, - existing_value: Box>, - }, + DoubleUpdate { index: NodeIndex, existing_value: Box> }, #[error(transparent)] Leaf(#[from] LeafError), #[error("Missing node at index {0:?}.")] diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/forest.rs b/crates/committer/src/patricia_merkle_tree/filled_tree/forest.rs index cadbe2a70d..9dc41ea72b 100644 --- a/crates/committer/src/patricia_merkle_tree/filled_tree/forest.rs +++ b/crates/committer/src/patricia_merkle_tree/filled_tree/forest.rs @@ -1,11 +1,18 @@ +use std::collections::HashMap; +use std::sync::Arc; + +use tokio::task::JoinSet; + use crate::block_committer::input::{ContractAddress, StarknetStorageValue}; use crate::forest_errors::{ForestError, ForestResult}; use crate::hash::hash_trait::HashOutput; -use crate::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, Nonce}; -use crate::patricia_merkle_tree::filled_tree::tree::FilledTree; +use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}; use crate::patricia_merkle_tree::filled_tree::tree::{ - ClassesTrie, ContractsTrie, StorageTrie, StorageTrieMap, + ClassesTrie, + ContractsTrie, + FilledTree, + StorageTrie, + StorageTrieMap, }; use crate::patricia_merkle_tree::node_data::leaf::{ContractState, LeafModifications}; use crate::patricia_merkle_tree::types::NodeIndex; @@ -14,10 +21,6 @@ use crate::patricia_merkle_tree::updated_skeleton_tree::skeleton_forest::Updated use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; use crate::storage::storage_trait::Storage; -use std::collections::HashMap; -use std::sync::Arc; -use tokio::task::JoinSet; - pub struct FilledForest { pub storage_tries: StorageTrieMap, pub contracts_trie: ContractsTrie, @@ -74,9 +77,7 @@ impl FilledForest { .ok_or(ForestError::MissingContractCurrentState(address))?; contracts_state_tasks.spawn(Self::new_contract_state::( address, - *(address_to_nonce - .get(&address) - .unwrap_or(&original_contract_state.nonce)), + *(address_to_nonce.get(&address).unwrap_or(&original_contract_state.nonce)), *(address_to_class_hash .get(&address) .unwrap_or(&original_contract_state.class_hash)), @@ -87,10 +88,8 @@ impl FilledForest { while let Some(result) = contracts_state_tasks.join_next().await { let (address, new_contract_state, filled_storage_trie) = result??; - contracts_trie_modifications.insert( - NodeIndex::from_contract_address(&address), - new_contract_state, - ); + contracts_trie_modifications + .insert(NodeIndex::from_contract_address(&address), new_contract_state); filled_storage_tries.insert(address, filled_storage_trie); } diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs b/crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs index 9f631daaf7..fc7295fd7c 100644 --- a/crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs +++ b/crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs @@ -1,15 +1,20 @@ +use ethnum::U256; +use serde::{Deserialize, Serialize}; + use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::node::FilledNode; use crate::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, EdgeData, EdgePathLength, NodeData, PathToBottom, + BinaryData, + EdgeData, + EdgePathLength, + NodeData, + PathToBottom, }; use crate::patricia_merkle_tree::node_data::leaf::Leaf; use crate::storage::db_object::DBObject; use crate::storage::errors::DeserializationError; use crate::storage::storage_trait::{StarknetPrefix, StorageKey, StorageValue}; -use ethnum::U256; -use serde::{Deserialize, Serialize}; // Const describe the size of the serialized node. pub(crate) const SERIALIZE_HASH_BYTES: usize = 32; @@ -44,10 +49,7 @@ impl DBObject for FilledNode { /// - For leaf nodes: use leaf.serialize() method. fn serialize(&self) -> StorageValue { match &self.data { - NodeData::Binary(BinaryData { - left_hash, - right_hash, - }) => { + NodeData::Binary(BinaryData { left_hash, right_hash }) => { // Serialize left and right hashes to byte arrays. let left: [u8; SERIALIZE_HASH_BYTES] = left_hash.0.to_bytes_be(); let right: [u8; SERIALIZE_HASH_BYTES] = right_hash.0.to_bytes_be(); @@ -57,10 +59,7 @@ impl DBObject for FilledNode { StorageValue(serialized) } - NodeData::Edge(EdgeData { - bottom_hash, - path_to_bottom, - }) => { + NodeData::Edge(EdgeData { bottom_hash, path_to_bottom }) => { // Serialize bottom hash, path, and path length to byte arrays. let bottom: [u8; SERIALIZE_HASH_BYTES] = bottom_hash.0.to_bytes_be(); let path: [u8; SERIALIZE_HASH_BYTES] = @@ -94,10 +93,7 @@ impl FilledNode { is_leaf: bool, ) -> Result { if is_leaf { - return Ok(Self { - hash: node_hash, - data: NodeData::Leaf(L::deserialize(value)?), - }); + return Ok(Self { hash: node_hash, data: NodeData::Leaf(L::deserialize(value)?) }); } if value.0.len() == BINARY_BYTES { diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs b/crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs index 6bc032f48c..70df1a268c 100644 --- a/crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs +++ b/crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs @@ -1,28 +1,20 @@ use std::collections::HashMap; -use std::sync::Arc; -use std::sync::Mutex; +use std::sync::{Arc, Mutex}; use async_recursion::async_recursion; -use crate::block_committer::input::ContractAddress; -use crate::block_committer::input::StarknetStorageValue; +use crate::block_committer::input::{ContractAddress, StarknetStorageValue}; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::errors::FilledTreeError; -use crate::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use crate::patricia_merkle_tree::filled_tree::node::FilledNode; -use crate::patricia_merkle_tree::node_data::inner_node::BinaryData; -use crate::patricia_merkle_tree::node_data::inner_node::EdgeData; -use crate::patricia_merkle_tree::node_data::inner_node::NodeData; -use crate::patricia_merkle_tree::node_data::leaf::ContractState; -use crate::patricia_merkle_tree::node_data::leaf::Leaf; -use crate::patricia_merkle_tree::node_data::leaf::LeafModifications; +use crate::patricia_merkle_tree::filled_tree::node::{CompiledClassHash, FilledNode}; +use crate::patricia_merkle_tree::node_data::inner_node::{BinaryData, EdgeData, NodeData}; +use crate::patricia_merkle_tree::node_data::leaf::{ContractState, Leaf, LeafModifications}; use crate::patricia_merkle_tree::types::NodeIndex; use crate::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunction; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTree; use crate::storage::db_object::DBObject; -use crate::storage::storage_trait::StorageKey; -use crate::storage::storage_trait::StorageValue; +use crate::storage::storage_trait::{StorageKey, StorageValue}; #[cfg(test)] #[path = "tree_test.rs"] @@ -170,10 +162,8 @@ impl FilledTreeImpl { Arc::clone(&output_map), ) .await?; - let data = NodeData::Edge(EdgeData { - path_to_bottom: *path_to_bottom, - bottom_hash, - }); + let data = + NodeData::Edge(EdgeData { path_to_bottom: *path_to_bottom, bottom_hash }); let hash_value = TH::compute_node_hash(&data); Self::write_to_output_map(output_map, index, hash_value, data)?; Ok(hash_value) @@ -199,17 +189,11 @@ impl FilledTreeImpl { let UpdatedSkeletonNode::UnmodifiedSubTree(root_hash) = root_node else { panic!("A root of tree without modifications is expected to be a unmodified subtree.") }; - Ok(Self { - tree_map: HashMap::new(), - root_hash: *root_hash, - }) + Ok(Self { tree_map: HashMap::new(), root_hash: *root_hash }) } fn create_empty() -> Self { - Self { - tree_map: HashMap::new(), - root_hash: HashOutput::ROOT_OF_EMPTY_TREE, - } + Self { tree_map: HashMap::new(), root_hash: HashOutput::ROOT_OF_EMPTY_TREE } } } @@ -246,12 +230,9 @@ impl FilledTree for FilledTreeImpl { } fn serialize(&self) -> HashMap { - // This function iterates over each node in the tree, using the node's `db_key` as the hashmap key - // and the result of the node's `serialize` method as the value. - self.get_all_nodes() - .iter() - .map(|(_, node)| (node.db_key(), node.serialize())) - .collect() + // This function iterates over each node in the tree, using the node's `db_key` as the + // hashmap key and the result of the node's `serialize` method as the value. + self.get_all_nodes().iter().map(|(_, node)| (node.db_key(), node.serialize())).collect() } fn get_root_hash(&self) -> HashOutput { diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/tree_test.rs b/crates/committer/src/patricia_merkle_tree/filled_tree/tree_test.rs index 26f61139ca..058ca30267 100644 --- a/crates/committer/src/patricia_merkle_tree/filled_tree/tree_test.rs +++ b/crates/committer/src/patricia_merkle_tree/filled_tree/tree_test.rs @@ -7,7 +7,11 @@ use crate::patricia_merkle_tree::filled_tree::node::FilledNode; use crate::patricia_merkle_tree::filled_tree::tree::{FilledTree, FilledTreeImpl}; use crate::patricia_merkle_tree::internal_test_utils::{MockLeaf, OriginalSkeletonMockTrieConfig}; use crate::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, EdgeData, EdgePathLength, NodeData, PathToBottom, + BinaryData, + EdgeData, + EdgePathLength, + NodeData, + PathToBottom, }; use crate::patricia_merkle_tree::node_data::leaf::SkeletonLeaf; use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; @@ -15,12 +19,15 @@ use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; use crate::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunctionImpl; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; use crate::patricia_merkle_tree::updated_skeleton_tree::tree::{ - UpdatedSkeletonNodeMap, UpdatedSkeletonTree, UpdatedSkeletonTreeImpl, + UpdatedSkeletonNodeMap, + UpdatedSkeletonTree, + UpdatedSkeletonTreeImpl, }; use crate::storage::map_storage::MapStorage; #[tokio::test(flavor = "multi_thread")] -/// This test is a sanity test for computing the root hash of the patricia merkle tree with a single node that is a leaf with hash==1. +/// This test is a sanity test for computing the root hash of the patricia merkle tree with a single +/// node that is a leaf with hash==1. async fn test_filled_tree_sanity() { let mut skeleton_tree: UpdatedSkeletonNodeMap = HashMap::new(); let new_filled_leaf = MockLeaf(Felt::ONE); @@ -70,9 +77,7 @@ async fn test_small_filled_tree() { ] .into_iter() .chain( - new_leaves - .iter() - .map(|(index, _)| create_leaf_updated_skeleton_node_for_testing(*index)), + new_leaves.iter().map(|(index, _)| create_leaf_updated_skeleton_node_for_testing(*index)), ) .collect(); let skeleton_tree: UpdatedSkeletonNodeMap = nodes_in_skeleton_tree.into_iter().collect(); @@ -80,12 +85,7 @@ async fn test_small_filled_tree() { let updated_skeleton_tree = UpdatedSkeletonTreeImpl { skeleton_tree }; let modifications = new_leaves .iter() - .map(|(index, value)| { - ( - NodeIndex::from(*index), - MockLeaf(Felt::from_hex(value).unwrap()), - ) - }) + .map(|(index, value)| (NodeIndex::from(*index), MockLeaf(Felt::from_hex(value).unwrap()))) .collect(); // Compute the hash values. @@ -185,9 +185,7 @@ async fn test_delete_leaf_from_empty_tree() { let mut indices = [NodeIndex::FIRST_LEAF]; // Create an empty original skeleton tree with a single leaf modified. let mut original_skeleton_tree = OriginalSkeletonTreeImpl::create_impl( - &MapStorage { - storage: HashMap::new(), - }, + &MapStorage { storage: HashMap::new() }, HashOutput::ROOT_OF_EMPTY_TREE, SortedLeafIndices::new(&mut indices), &OriginalSkeletonMockTrieConfig::new(&storage_modifications, false), diff --git a/crates/committer/src/patricia_merkle_tree/internal_test_utils.rs b/crates/committer/src/patricia_merkle_tree/internal_test_utils.rs index 2cf06aaa03..688b3e4af5 100644 --- a/crates/committer/src/patricia_merkle_tree/internal_test_utils.rs +++ b/crates/committer/src/patricia_merkle_tree/internal_test_utils.rs @@ -1,30 +1,31 @@ use std::sync::Arc; +use ethnum::U256; +use rand::rngs::ThreadRng; +use rstest::{fixture, rstest}; + use crate::felt::Felt; use crate::generate_trie_config; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::external_test_utils::get_random_u256; use crate::patricia_merkle_tree::filled_tree::tree::FilledTreeImpl; use crate::patricia_merkle_tree::node_data::errors::LeafResult; -use crate::patricia_merkle_tree::node_data::inner_node::NodeData; -use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; -use crate::patricia_merkle_tree::node_data::leaf::SkeletonLeaf; -use crate::patricia_merkle_tree::node_data::leaf::{Leaf, LeafModifications}; +use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, NodeData, PathToBottom}; +use crate::patricia_merkle_tree::node_data::leaf::{Leaf, LeafModifications, SkeletonLeaf}; use crate::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonTreeConfig; use crate::patricia_merkle_tree::original_skeleton_tree::errors::OriginalSkeletonTreeError; use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeResult; use crate::patricia_merkle_tree::types::{NodeIndex, SubTreeHeight}; use crate::patricia_merkle_tree::updated_skeleton_tree::hash_function::{ - HashFunction, TreeHashFunction, TreeHashFunctionImpl, + HashFunction, + TreeHashFunction, + TreeHashFunctionImpl, }; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; use crate::storage::db_object::{DBObject, Deserializable}; use crate::storage::storage_trait::StorageValue; -use ethnum::U256; -use rand::rngs::ThreadRng; -use rstest::{fixture, rstest}; #[derive(Debug, PartialEq, Clone, Copy, Default, Eq)] pub(crate) struct MockLeaf(pub(crate) Felt); @@ -95,9 +96,7 @@ impl From for SkeletonLeaf { impl From<&str> for PathToBottom { fn from(value: &str) -> Self { Self::new( - U256::from_str_radix(value, 2) - .expect("Invalid binary string") - .into(), + U256::from_str_radix(value, 2).expect("Invalid binary string").into(), EdgePathLength::new( (value.len() - if value.starts_with('+') { 1 } else { 0 }) .try_into() @@ -152,16 +151,12 @@ pub(crate) fn get_initial_updated_skeleton( .iter() .filter(|(_, leaf_val)| *leaf_val != 0) .map(|(index, _)| (*index, UpdatedSkeletonNode::Leaf)) - .chain( - original_skeleton - .iter() - .filter_map(|(index, node)| match node { - OriginalSkeletonNode::UnmodifiedSubTree(hash) => { - Some((*index, UpdatedSkeletonNode::UnmodifiedSubTree(*hash))) - } - OriginalSkeletonNode::Binary | OriginalSkeletonNode::Edge(_) => None, - }), - ) + .chain(original_skeleton.iter().filter_map(|(index, node)| match node { + OriginalSkeletonNode::UnmodifiedSubTree(hash) => { + Some((*index, UpdatedSkeletonNode::UnmodifiedSubTree(*hash))) + } + OriginalSkeletonNode::Binary | OriginalSkeletonNode::Edge(_) => None, + })) .collect(), } } diff --git a/crates/committer/src/patricia_merkle_tree/node_data/errors.rs b/crates/committer/src/patricia_merkle_tree/node_data/errors.rs index 4d1a729b38..9feae4beef 100644 --- a/crates/committer/src/patricia_merkle_tree/node_data/errors.rs +++ b/crates/committer/src/patricia_merkle_tree/node_data/errors.rs @@ -1,4 +1,5 @@ use std::fmt::Debug; + use thiserror::Error; use crate::patricia_merkle_tree::node_data::inner_node::{EdgePath, EdgePathLength}; @@ -7,15 +8,9 @@ use crate::patricia_merkle_tree::types::NodeIndex; #[derive(Debug, Error)] pub enum PathToBottomError { #[error("Tried to remove {n_edges:?} edges from a {length:?} length path.")] - RemoveEdgesError { - length: EdgePathLength, - n_edges: EdgePathLength, - }, + RemoveEdgesError { length: EdgePathLength, n_edges: EdgePathLength }, #[error("EdgePath {path:?} is too long for EdgePathLength {length:?}.")] - MismatchedLengthError { - path: EdgePath, - length: EdgePathLength, - }, + MismatchedLengthError { path: EdgePath, length: EdgePathLength }, } #[derive(Debug, Error)] diff --git a/crates/committer/src/patricia_merkle_tree/node_data/inner_node.rs b/crates/committer/src/patricia_merkle_tree/node_data/inner_node.rs index 20f3357a3a..4250b0f05e 100644 --- a/crates/committer/src/patricia_merkle_tree/node_data/inner_node.rs +++ b/crates/committer/src/patricia_merkle_tree/node_data/inner_node.rs @@ -1,12 +1,12 @@ +use ethnum::U256; +use strum_macros::{EnumDiscriminants, EnumIter}; + use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::node_data::errors::{EdgePathError, PathToBottomError}; use crate::patricia_merkle_tree::node_data::leaf::Leaf; use crate::patricia_merkle_tree::types::{NodeIndex, SubTreeHeight}; -use ethnum::U256; -use strum_macros::{EnumDiscriminants, EnumIter}; - #[cfg(test)] #[path = "inner_node_tests.rs"] pub mod inner_node_test; @@ -36,10 +36,8 @@ impl EdgePath { /// [EdgePath] constant that represents the longest path (from some node) in a tree. #[allow(clippy::as_conversions)] - pub const MAX: Self = Self(U256::from_words( - u128::MAX >> (U256::BITS - Self::BITS as u32), - u128::MAX, - )); + pub const MAX: Self = + Self(U256::from_words(u128::MAX >> (U256::BITS - Self::BITS as u32), u128::MAX)); } impl From for EdgePath { @@ -115,11 +113,7 @@ impl PathToBottom { if bit_length > u8::from(length).into() { return Err(PathToBottomError::MismatchedLengthError { path, length }); } - Ok(Self { - path, - length, - _fake_field: (), - }) + Ok(Self { path, length, _fake_field: () }) } } @@ -130,17 +124,11 @@ pub struct EdgeData { } impl PathToBottom { - pub(crate) const LEFT_CHILD: Self = Self { - path: EdgePath(U256::ZERO), - length: EdgePathLength(1), - _fake_field: (), - }; - - pub(crate) const RIGHT_CHILD: Self = Self { - path: EdgePath(U256::ONE), - length: EdgePathLength(1), - _fake_field: (), - }; + pub(crate) const LEFT_CHILD: Self = + Self { path: EdgePath(U256::ZERO), length: EdgePathLength(1), _fake_field: () }; + + pub(crate) const RIGHT_CHILD: Self = + Self { path: EdgePath(U256::ONE), length: EdgePathLength(1), _fake_field: () }; pub(crate) fn bottom_index(&self, root_index: NodeIndex) -> NodeIndex { NodeIndex::compute_bottom_index(root_index, self) @@ -164,10 +152,7 @@ impl PathToBottom { /// Returns the path after removing the first steps (the edges from the path's origin node). pub(crate) fn remove_first_edges(&self, n_edges: EdgePathLength) -> PathToBottomResult { if self.length < n_edges { - return Err(PathToBottomError::RemoveEdgesError { - length: self.length, - n_edges, - }); + return Err(PathToBottomError::RemoveEdgesError { length: self.length, n_edges }); } Self::new( EdgePath(self.path.0 & ((U256::ONE << (self.length.0 - n_edges.0)) - 1)), diff --git a/crates/committer/src/patricia_merkle_tree/node_data/inner_node_tests.rs b/crates/committer/src/patricia_merkle_tree/node_data/inner_node_tests.rs index 2bbbd20475..5a8b43c352 100644 --- a/crates/committer/src/patricia_merkle_tree/node_data/inner_node_tests.rs +++ b/crates/committer/src/patricia_merkle_tree/node_data/inner_node_tests.rs @@ -16,9 +16,7 @@ fn test_remove_first_edges( #[case] expected: PathToBottom, ) { assert_eq!( - path_to_bottom - .remove_first_edges(EdgePathLength::new(n_edges).unwrap()) - .unwrap(), + path_to_bottom.remove_first_edges(EdgePathLength::new(n_edges).unwrap()).unwrap(), expected ); } diff --git a/crates/committer/src/patricia_merkle_tree/node_data/leaf.rs b/crates/committer/src/patricia_merkle_tree/node_data/leaf.rs index 7cdde637e1..2855b41020 100644 --- a/crates/committer/src/patricia_merkle_tree/node_data/leaf.rs +++ b/crates/committer/src/patricia_merkle_tree/node_data/leaf.rs @@ -102,11 +102,7 @@ impl SkeletonLeaf { impl From for SkeletonLeaf { fn from(value: Felt) -> Self { - if value == Felt::ZERO { - Self::Zero - } else { - Self::NonZero - } + if value == Felt::ZERO { Self::Zero } else { Self::NonZero } } } diff --git a/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde.rs b/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde.rs index 93ac61dc8e..654a3a8944 100644 --- a/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde.rs +++ b/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde.rs @@ -71,11 +71,9 @@ impl Deserializable for CompiledClassHash { fn deserialize(value: &StorageValue) -> Result { let json_str = std::str::from_utf8(&value.0)?; let map: HashMap = serde_json::from_str(json_str)?; - let hash_as_hex = - map.get("compiled_class_hash") - .ok_or(DeserializationError::NonExistingKey( - "compiled_class_hash".to_string(), - ))?; + let hash_as_hex = map + .get("compiled_class_hash") + .ok_or(DeserializationError::NonExistingKey("compiled_class_hash".to_string()))?; Ok(Self::from_hex(hash_as_hex)?) } @@ -97,10 +95,8 @@ impl Deserializable for ContractState { }; let class_hash_as_hex = get_leaf_key(&deserialized_map, "contract_hash")?; let nonce_as_hex = get_leaf_key(&deserialized_map, "nonce")?; - let root_hash_as_hex = get_leaf_key( - get_key_from_map(&deserialized_map, "storage_commitment_tree")?, - "root", - )?; + let root_hash_as_hex = + get_leaf_key(get_key_from_map(&deserialized_map, "storage_commitment_tree")?, "root")?; Ok(Self { nonce: Nonce::from_hex(&nonce_as_hex)?, @@ -115,6 +111,5 @@ impl Deserializable for ContractState { } fn get_key_from_map<'a>(map: &'a Value, key: &str) -> Result<&'a Value, DeserializationError> { - map.get(key) - .ok_or(DeserializationError::NonExistingKey(key.to_string())) + map.get(key).ok_or(DeserializationError::NonExistingKey(key.to_string())) } diff --git a/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde_test.rs b/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde_test.rs index 2c86c25b57..446bc0aa0e 100644 --- a/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde_test.rs +++ b/crates/committer/src/patricia_merkle_tree/node_data/leaf_serde_test.rs @@ -1,13 +1,12 @@ +use std::fmt::Debug; + +use rstest::rstest; + use crate::block_committer::input::StarknetStorageValue; use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; -use crate::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, Nonce}; -use crate::patricia_merkle_tree::node_data::leaf::ContractState; -use crate::patricia_merkle_tree::node_data::leaf::Leaf; - -use rstest::rstest; -use std::fmt::Debug; +use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}; +use crate::patricia_merkle_tree::node_data::leaf::{ContractState, Leaf}; #[rstest] #[case::zero_storage_leaf(StarknetStorageValue(Felt::ZERO))] diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/config.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/config.rs index e3d5bf3c1f..c38b138b4b 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/config.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/config.rs @@ -33,10 +33,7 @@ macro_rules! generate_trie_config { modifications: &'a LeafModifications<$leaf_type>, compare_modified_leaves: bool, ) -> Self { - Self { - modifications, - compare_modified_leaves, - } + Self { modifications, compare_modified_leaves } } } diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs index 01e6fd448b..13594f3a75 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs @@ -1,28 +1,28 @@ +use std::borrow::Borrow; +use std::collections::HashMap; +use std::fmt::Debug; + +use log::warn; + use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::node::FilledNode; -use crate::patricia_merkle_tree::node_data::inner_node::BinaryData; -use crate::patricia_merkle_tree::node_data::inner_node::EdgeData; -use crate::patricia_merkle_tree::node_data::inner_node::NodeData; -use crate::patricia_merkle_tree::node_data::inner_node::PathToBottom; +use crate::patricia_merkle_tree::node_data::inner_node::{ + BinaryData, + EdgeData, + NodeData, + PathToBottom, +}; use crate::patricia_merkle_tree::node_data::leaf::Leaf; use crate::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonTreeConfig; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeResult; -use crate::patricia_merkle_tree::original_skeleton_tree::utils::split_leaves; -use crate::patricia_merkle_tree::types::SortedLeafIndices; -use crate::patricia_merkle_tree::types::SubTreeHeight; -use crate::patricia_merkle_tree::{ - original_skeleton_tree::node::OriginalSkeletonNode, types::NodeIndex, +use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; +use crate::patricia_merkle_tree::original_skeleton_tree::tree::{ + OriginalSkeletonTreeImpl, + OriginalSkeletonTreeResult, }; +use crate::patricia_merkle_tree::original_skeleton_tree::utils::split_leaves; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; use crate::storage::errors::StorageError; -use crate::storage::storage_trait::create_db_key; -use crate::storage::storage_trait::StarknetPrefix; -use crate::storage::storage_trait::Storage; -use crate::storage::storage_trait::StorageKey; -use log::warn; -use std::borrow::Borrow; -use std::collections::HashMap; -use std::fmt::Debug; +use crate::storage::storage_trait::{create_db_key, StarknetPrefix, Storage, StorageKey}; #[cfg(test)] #[path = "create_tree_test.rs"] @@ -31,10 +31,7 @@ pub mod create_tree_test; /// Logs out a warning of a trivial modification. macro_rules! log_trivial_modification { ($index:expr, $value:expr) => { - warn!( - "Encountered a trivial modification at index {:?}, with value {:?}", - $index, $value - ); + warn!("Encountered a trivial modification at index {:?}, with value {:?}", $index, $value); }; } @@ -73,9 +70,7 @@ impl<'a> SubTree<'a> { leftmost_in_subtree - NodeIndex::ROOT + (NodeIndex::ROOT << bottom_height.into()); let leftmost_index = self.sorted_leaf_indices.bisect_left(&leftmost_in_subtree); let rightmost_index = self.sorted_leaf_indices.bisect_right(&rightmost_in_subtree); - let bottom_leaves = self - .sorted_leaf_indices - .subslice(leftmost_index, rightmost_index); + let bottom_leaves = self.sorted_leaf_indices.subslice(leftmost_index, rightmost_index); let previously_empty_leaf_indices = self.sorted_leaf_indices.get_indices() [..leftmost_index] .iter() @@ -136,10 +131,7 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { for (filled_root, subtree) in filled_roots.into_iter().zip(subtrees.iter()) { match filled_root.data { // Binary node. - NodeData::Binary(BinaryData { - left_hash, - right_hash, - }) => { + NodeData::Binary(BinaryData { left_hash, right_hash }) => { if subtree.is_unmodified() { self.nodes.insert( subtree.root_index, @@ -147,8 +139,7 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { ); continue; } - self.nodes - .insert(subtree.root_index, OriginalSkeletonNode::Binary); + self.nodes.insert(subtree.root_index, OriginalSkeletonNode::Binary); let (left_subtree, right_subtree) = subtree.get_children_subtrees(left_hash, right_hash); @@ -164,14 +155,9 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { ) } // Edge node. - NodeData::Edge(EdgeData { - bottom_hash, - path_to_bottom, - }) => { - self.nodes.insert( - subtree.root_index, - OriginalSkeletonNode::Edge(path_to_bottom), - ); + NodeData::Edge(EdgeData { bottom_hash, path_to_bottom }) => { + self.nodes + .insert(subtree.root_index, OriginalSkeletonNode::Edge(path_to_bottom)); if subtree.is_unmodified() { self.nodes.insert( path_to_bottom.bottom_index(subtree.root_index), @@ -223,7 +209,7 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { self.fetch_nodes::(next_subtrees, storage, config, previous_leaves) } - //TODO(Aviv, 17/07/2024): Split between storage prefix implementation and function logic. + // TODO(Aviv, 17/07/2024): Split between storage prefix implementation and function logic. fn calculate_subtrees_roots( subtrees: &[SubTree<'a>], storage: &impl Storage, @@ -248,11 +234,7 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { subtrees.iter().zip(db_vals.iter()).zip(db_keys.into_iter()) { let val = optional_val.ok_or(StorageError::MissingKey(db_key))?; - subtrees_roots.push(FilledNode::deserialize( - subtree.root_hash, - val, - subtree.is_leaf(), - )?) + subtrees_roots.push(FilledNode::deserialize(subtree.root_hash, val, subtree.is_leaf())?) } Ok(subtrees_roots) } @@ -273,15 +255,8 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { )?; return Ok(Self::create_empty(sorted_leaf_indices)); } - let main_subtree = SubTree { - sorted_leaf_indices, - root_index: NodeIndex::ROOT, - root_hash, - }; - let mut skeleton_tree = Self { - nodes: HashMap::new(), - sorted_leaf_indices, - }; + let main_subtree = SubTree { sorted_leaf_indices, root_index: NodeIndex::ROOT, root_hash }; + let mut skeleton_tree = Self { nodes: HashMap::new(), sorted_leaf_indices }; skeleton_tree.fetch_nodes::(vec![main_subtree], storage, config, None)?; Ok(skeleton_tree) } @@ -299,22 +274,11 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { if root_hash == HashOutput::ROOT_OF_EMPTY_TREE { return Ok(( Self::create_empty(sorted_leaf_indices), - sorted_leaf_indices - .get_indices() - .iter() - .map(|idx| (*idx, L::default())) - .collect(), + sorted_leaf_indices.get_indices().iter().map(|idx| (*idx, L::default())).collect(), )); } - let main_subtree = SubTree { - sorted_leaf_indices, - root_index: NodeIndex::ROOT, - root_hash, - }; - let mut skeleton_tree = Self { - nodes: HashMap::new(), - sorted_leaf_indices, - }; + let main_subtree = SubTree { sorted_leaf_indices, root_index: NodeIndex::ROOT, root_hash }; + let mut skeleton_tree = Self { nodes: HashMap::new(), sorted_leaf_indices }; let mut leaves = HashMap::new(); skeleton_tree.fetch_nodes::(vec![main_subtree], storage, config, Some(&mut leaves))?; Ok((skeleton_tree, leaves)) @@ -331,10 +295,7 @@ impl<'a> OriginalSkeletonTreeImpl<'a> { } fn create_empty(sorted_leaf_indices: SortedLeafIndices<'a>) -> Self { - Self { - nodes: HashMap::new(), - sorted_leaf_indices, - } + Self { nodes: HashMap::new(), sorted_leaf_indices } } /// Handles a subtree referred by an edge or a binary node. Decides whether we deserialize the diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs index bb43b99c58..4436c4bd5a 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs @@ -1,29 +1,31 @@ +use std::collections::HashMap; + +use ethnum::U256; +use pretty_assertions::assert_eq; +use rstest::rstest; + use super::OriginalSkeletonTreeImpl; use crate::block_committer::input::StarknetStorageValue; use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}; -use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig; -use crate::patricia_merkle_tree::internal_test_utils::{small_tree_index_to_full, MockLeaf}; -use crate::patricia_merkle_tree::node_data::inner_node::EdgePath; -use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; +use crate::patricia_merkle_tree::internal_test_utils::{ + small_tree_index_to_full, + MockLeaf, + OriginalSkeletonMockTrieConfig, +}; +use crate::patricia_merkle_tree::node_data::inner_node::{EdgePath, EdgePathLength, PathToBottom}; use crate::patricia_merkle_tree::node_data::leaf::{ContractState, LeafModifications}; use crate::patricia_merkle_tree::original_skeleton_tree::create_tree::SubTree; use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTree; -use crate::patricia_merkle_tree::types::SubTreeHeight; -use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; use crate::storage::db_object::DBObject; use crate::storage::map_storage::MapStorage; use crate::storage::storage_trait::{create_db_key, StarknetPrefix, StorageKey, StorageValue}; -use ethnum::U256; -use pretty_assertions::assert_eq; -use rstest::rstest; -use std::collections::HashMap; #[rstest] // This test assumes for simplicity that hash is addition (i.e hash(a,b) = a + b). -/// /// Old tree structure: /// /// 50 @@ -45,8 +47,6 @@ use std::collections::HashMap; /// B E * /// / \ \ \ /// NZ 9 11 15 -/// -/// #[case::simple_tree_of_height_3( HashMap::from([ @@ -99,7 +99,6 @@ use std::collections::HashMap; /// B E E /// / \ \ \ /// NZ 2 NZ NZ -/// #[case::another_simple_tree_of_height_3( HashMap::from([ @@ -138,7 +137,7 @@ use std::collections::HashMap; /// / \ /// 26 90 /// / / \ -/// * 25 65 +/// * 25 65 /// / \ / \ /// 24 * 6 59 /// / \ \ / / \ @@ -152,12 +151,11 @@ use std::collections::HashMap; /// / \ /// E B /// / / \ -/// * E B +/// * E B /// / \ / \ /// 24 * E B /// \ / \ /// 20 5 40 -/// #[case::tree_of_height_4_with_long_edge( HashMap::from([ create_root_edge_entry(116, SubTreeHeight::new(4)), @@ -297,7 +295,7 @@ fn test_create_tree( /// /// 1 /// / \ -/// * * +/// * * /// / \ / /// 4 5 6 /// / \ / \ / @@ -309,7 +307,6 @@ fn test_create_tree( /// 5 /// / \ /// 11 10 -/// #[rstest] #[case::single_right_child( SubTreeHeight(1), @@ -388,11 +385,7 @@ fn test_get_bottom_subtree( ); // Create the input Subtree. - let tree = SubTree { - sorted_leaf_indices, - root_index, - root_hash: HashOutput(Felt::ONE), - }; + let tree = SubTree { sorted_leaf_indices, root_index, root_hash: HashOutput(Felt::ONE) }; // Get the bottom subtree. let (subtree, previously_empty_leaf_indices) = @@ -406,10 +399,7 @@ fn test_get_bottom_subtree( root_index: expected_root_index, root_hash: HashOutput(Felt::TWO), }; - assert_eq!( - previously_empty_leaf_indices, - expected_previously_empty_leaf_indices - ); + assert_eq!(previously_empty_leaf_indices, expected_previously_empty_leaf_indices); assert_eq!(subtree, expected_subtree); } @@ -443,18 +433,12 @@ pub(crate) fn create_contract_state_leaf_entry(val: u128) -> (StorageKey, Storag } fn create_patricia_key(val: u128) -> StorageKey { - create_db_key( - StarknetPrefix::InnerNode.to_storage_prefix(), - &U256::from(val).to_be_bytes(), - ) + create_db_key(StarknetPrefix::InnerNode.to_storage_prefix(), &U256::from(val).to_be_bytes()) } fn create_binary_val(left: u128, right: u128) -> StorageValue { StorageValue( - (create_32_bytes_entry(left) - .into_iter() - .chain(create_32_bytes_entry(right))) - .collect(), + (create_32_bytes_entry(left).into_iter().chain(create_32_bytes_entry(right))).collect(), ) } @@ -478,17 +462,11 @@ fn create_mock_leaf_modifications( } pub(crate) fn create_binary_entry(left: u128, right: u128) -> (StorageKey, StorageValue) { - ( - create_patricia_key(left + right), - create_binary_val(left, right), - ) + (create_patricia_key(left + right), create_binary_val(left, right)) } pub(crate) fn create_edge_entry(hash: u128, path: u128, length: u8) -> (StorageKey, StorageValue) { - ( - create_patricia_key(hash + path + u128::from(length)), - create_edge_val(hash, path, length), - ) + (create_patricia_key(hash + path + u128::from(length)), create_edge_val(hash, path, length)) } pub(crate) fn create_expected_skeleton_nodes( @@ -498,12 +476,7 @@ pub(crate) fn create_expected_skeleton_nodes( let subtree_height = SubTreeHeight::new(height); nodes .into_iter() - .map(|(node_index, node)| { - ( - NodeIndex::from_subtree_index(node_index, subtree_height), - node, - ) - }) + .map(|(node_index, node)| (NodeIndex::from_subtree_index(node_index, subtree_height), node)) .chain([( NodeIndex::ROOT, OriginalSkeletonNode::Edge( @@ -566,8 +539,5 @@ fn create_previously_empty_leaf_indices<'a>( tree_leaf_indices: &'a [NodeIndex], subtree_leaf_indices: &'a [NodeIndex], ) -> Vec<&'a NodeIndex> { - tree_leaf_indices - .iter() - .filter(|idx| !subtree_leaf_indices.contains(idx)) - .collect() + tree_leaf_indices.iter().filter(|idx| !subtree_leaf_indices.contains(idx)).collect() } diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/errors.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/errors.rs index 27f86272e3..f760ae16cd 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/errors.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/errors.rs @@ -2,10 +2,8 @@ use std::fmt::Debug; use thiserror::Error; -use crate::{ - patricia_merkle_tree::types::NodeIndex, - storage::errors::{DeserializationError, StorageError}, -}; +use crate::patricia_merkle_tree::types::NodeIndex; +use crate::storage::errors::{DeserializationError, StorageError}; #[derive(Debug, Error)] pub enum OriginalSkeletonTreeError { @@ -14,8 +12,8 @@ pub enum OriginalSkeletonTreeError { )] Deserialization(#[from] DeserializationError), #[error( - "Unable to read from storage the storage key: {0:?} while building the \ - original skeleton tree." + "Unable to read from storage the storage key: {0:?} while building the original skeleton \ + tree." )] StorageRead(#[from] StorageError), #[error("Failed to read the modified leaf at index {0:?}")] diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest.rs index f3704c329f..8b8c09f4c1 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest.rs @@ -1,21 +1,21 @@ -use crate::block_committer::input::Config; -use crate::block_committer::input::ContractAddress; -use crate::block_committer::input::StarknetStorageValue; -use crate::forest_errors::ForestError; -use crate::forest_errors::ForestResult; +use std::collections::HashMap; + +use crate::block_committer::input::{Config, ContractAddress, StarknetStorageValue}; +use crate::forest_errors::{ForestError, ForestResult}; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use crate::patricia_merkle_tree::node_data::leaf::ContractState; -use crate::patricia_merkle_tree::node_data::leaf::LeafModifications; -use crate::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonClassesTrieConfig; -use crate::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonContractsTrieConfig; -use crate::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonStorageTrieConfig; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTree; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; -use crate::patricia_merkle_tree::types::NodeIndex; -use crate::patricia_merkle_tree::types::SortedLeafIndices; +use crate::patricia_merkle_tree::node_data::leaf::{ContractState, LeafModifications}; +use crate::patricia_merkle_tree::original_skeleton_tree::config::{ + OriginalSkeletonClassesTrieConfig, + OriginalSkeletonContractsTrieConfig, + OriginalSkeletonStorageTrieConfig, +}; +use crate::patricia_merkle_tree::original_skeleton_tree::tree::{ + OriginalSkeletonTree, + OriginalSkeletonTreeImpl, +}; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; use crate::storage::storage_trait::Storage; -use std::collections::HashMap; #[cfg(test)] #[path = "skeleton_forest_test.rs"] @@ -29,9 +29,9 @@ pub(crate) struct OriginalSkeletonForest<'a> { } impl<'a> OriginalSkeletonForest<'a> { - /// Creates an original skeleton forest that includes the storage tries of the modified contracts, - /// the classes trie and the contracts trie. Additionally, returns the original contract states that - /// are needed to compute the contract state tree. + /// Creates an original skeleton forest that includes the storage tries of the modified + /// contracts, the classes trie and the contracts trie. Additionally, returns the original + /// contract states that are needed to compute the contract state tree. pub(crate) fn create( storage: impl Storage, contracts_trie_root_hash: HashOutput, @@ -64,14 +64,7 @@ impl<'a> OriginalSkeletonForest<'a> { forest_sorted_indices.classes_trie_sorted_indices, )?; - Ok(( - Self { - classes_trie, - contracts_trie, - storage_tries, - }, - original_contracts_trie_leaves, - )) + Ok((Self { classes_trie, contracts_trie, storage_tries }, original_contracts_trie_leaves)) } /// Creates the contracts trie original skeleton. @@ -80,10 +73,7 @@ impl<'a> OriginalSkeletonForest<'a> { contracts_trie_root_hash: HashOutput, storage: &impl Storage, contracts_trie_sorted_indices: SortedLeafIndices<'a>, - ) -> ForestResult<( - OriginalSkeletonTreeImpl<'a>, - HashMap, - )> { + ) -> ForestResult<(OriginalSkeletonTreeImpl<'a>, HashMap)> { Ok(OriginalSkeletonTreeImpl::create_and_get_previous_leaves( storage, contracts_trie_root_hash, diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest_test.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest_test.rs index 3e9f019f78..c3c63ecd0f 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest_test.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest_test.rs @@ -1,31 +1,38 @@ +use std::collections::HashMap; + use pretty_assertions::assert_eq; use rstest::rstest; -use std::collections::HashMap; use super::OriginalSkeletonForest; use crate::block_committer::commit::get_all_modified_indices; use crate::block_committer::input::{ - ConfigImpl, ContractAddress, Input, StarknetStorageKey, StarknetStorageValue, StateDiff, + ConfigImpl, + ContractAddress, + Input, + StarknetStorageKey, + StarknetStorageValue, + StateDiff, }; use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}; use crate::patricia_merkle_tree::node_data::leaf::ContractState; use crate::patricia_merkle_tree::original_skeleton_tree::create_tree::create_tree_test::{ - create_32_bytes_entry, create_binary_entry, create_binary_skeleton_node, create_edge_entry, - create_edge_skeleton_node, create_expected_skeleton_nodes, - create_unmodified_subtree_skeleton_node, -}; -use crate::patricia_merkle_tree::original_skeleton_tree::create_tree::create_tree_test::{ - create_compiled_class_leaf_entry, create_contract_state_leaf_entry, create_root_edge_entry, + create_32_bytes_entry, + create_binary_entry, + create_binary_skeleton_node, + create_compiled_class_leaf_entry, + create_contract_state_leaf_entry, + create_edge_entry, + create_edge_skeleton_node, + create_expected_skeleton_nodes, + create_root_edge_entry, create_storage_leaf_entry, + create_unmodified_subtree_skeleton_node, }; -use crate::patricia_merkle_tree::types::NodeIndex; -use crate::patricia_merkle_tree::types::SubTreeHeight; -use crate::patricia_merkle_tree::{ - original_skeleton_tree::skeleton_forest::ForestSortedIndices, - original_skeleton_tree::tree::OriginalSkeletonTreeImpl, types::SortedLeafIndices, -}; +use crate::patricia_merkle_tree::original_skeleton_tree::skeleton_forest::ForestSortedIndices; +use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; use crate::storage::map_storage::MapStorage; macro_rules! compare_skeleton_tree { @@ -85,7 +92,7 @@ macro_rules! compare_skeleton_tree { /// / \ / /// E E B /// / \ / \ -/// * B B E +/// * B B E /// / / \ \ /// 303 NZ 47 UB /// @@ -99,7 +106,6 @@ macro_rules! compare_skeleton_tree { /// B E E B E * /// / \ \ \ / \ \ \ /// NZ 2 NZ NZ NZ 9 16 15 -/// #[rstest] #[case( @@ -294,10 +300,7 @@ fn test_create_original_skeleton_forest( .into_iter() .map(|(address, state)| (NodeIndex::from_contract_address(&address), state)) .collect(); - assert_eq!( - original_contracts_trie_leaves, - expected_original_contracts_trie_leaves - ); + assert_eq!(original_contracts_trie_leaves, expected_original_contracts_trie_leaves); compare_skeleton_tree!( &actual_forest.classes_trie, @@ -376,15 +379,9 @@ fn create_original_skeleton_with_sorted_indices<'a>( indices: SortedLeafIndices<'a>, skeleton: &OriginalSkeletonTreeImpl<'_>, ) -> OriginalSkeletonTreeImpl<'a> { - OriginalSkeletonTreeImpl { - nodes: skeleton.nodes.clone(), - sorted_leaf_indices: indices, - } + OriginalSkeletonTreeImpl { nodes: skeleton.nodes.clone(), sorted_leaf_indices: indices } } fn create_expected_sorted_indices(indices: &[u128]) -> Vec { - indices - .iter() - .map(|idx| NodeIndex::FIRST_LEAF + NodeIndex::from(*idx)) - .collect() + indices.iter().map(|idx| NodeIndex::FIRST_LEAF + NodeIndex::from(*idx)).collect() } diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils.rs index 09a2046773..ac15f61476 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils.rs @@ -23,8 +23,8 @@ pub(crate) fn split_leaves<'a>( let assert_descendant = |leaf_index: &NodeIndex| { if (*leaf_index >> u8::from(root_height)) != *root_index { panic!( - "Leaf {leaf_index:?} is not a descendant of the root {root_index:?} \ - (root height={root_height:?})." + "Leaf {leaf_index:?} is not a descendant of the root {root_index:?} (root \ + height={root_height:?})." ); } }; @@ -33,11 +33,7 @@ pub(crate) fn split_leaves<'a>( assert_descendant(first_leaf); if leaf_indices.len() > 1 { - assert_descendant( - leaf_indices - .last() - .expect("leaf_indices unexpectedly empty."), - ); + assert_descendant(leaf_indices.last().expect("leaf_indices unexpectedly empty.")); } let right_child_index = (*root_index << 1) + 1; diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs index 52590b4675..da55e02e75 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs @@ -1,15 +1,17 @@ -use super::split_leaves; -use crate::patricia_merkle_tree::external_test_utils::get_random_u256; -use crate::patricia_merkle_tree::internal_test_utils::as_fully_indexed; -use crate::patricia_merkle_tree::internal_test_utils::random; -use crate::patricia_merkle_tree::internal_test_utils::small_tree_index_to_full; -use crate::patricia_merkle_tree::types::SortedLeafIndices; -use crate::patricia_merkle_tree::types::{NodeIndex, SubTreeHeight}; use ethnum::{uint, U256}; use rand::rngs::ThreadRng; use rand::Rng; use rstest::rstest; +use super::split_leaves; +use crate::patricia_merkle_tree::external_test_utils::get_random_u256; +use crate::patricia_merkle_tree::internal_test_utils::{ + as_fully_indexed, + random, + small_tree_index_to_full, +}; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; + /// Creates an array of increasing random U256 numbers, with jumps of up to 'jump' between two /// consecutive numbers. fn create_increasing_random_array( @@ -62,10 +64,7 @@ fn test_split_leaves( SortedLeafIndices::new(&mut left_full_indices), SortedLeafIndices::new(&mut right_full_indices), ]; - assert_eq!( - split_leaves(&root_index, &SortedLeafIndices::new(&mut leaf_indices)), - expected - ); + assert_eq!(split_leaves(&root_index, &SortedLeafIndices::new(&mut leaf_indices)), expected); } #[rstest] @@ -86,16 +85,8 @@ fn test_split_leaves_big_tree(mut random: ThreadRng) { SubTreeHeight::ACTUAL_HEIGHT.into(), NodeIndex::ROOT.into(), [ - left_leaf_indices - .clone() - .into_iter() - .map(NodeIndex::new) - .collect::>(), - right_leaf_indices - .clone() - .into_iter() - .map(NodeIndex::new) - .collect(), + left_leaf_indices.clone().into_iter().map(NodeIndex::new).collect::>(), + right_leaf_indices.clone().into_iter().map(NodeIndex::new).collect(), ] .concat(), left_leaf_indices.as_slice(), diff --git a/crates/committer/src/patricia_merkle_tree/types.rs b/crates/committer/src/patricia_merkle_tree/types.rs index c014d3ae84..690de8e913 100644 --- a/crates/committer/src/patricia_merkle_tree/types.rs +++ b/crates/committer/src/patricia_merkle_tree/types.rs @@ -1,11 +1,11 @@ +use ethnum::U256; + use crate::block_committer::input::{ContractAddress, StarknetStorageKey}; use crate::felt::Felt; use crate::patricia_merkle_tree::errors::TypesError; use crate::patricia_merkle_tree::filled_tree::node::ClassHash; use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; -use ethnum::U256; - #[cfg(test)] #[path = "types_test.rs"] pub mod types_test; @@ -49,10 +49,8 @@ impl NodeIndex { #[allow(clippy::as_conversions)] /// [NodeIndex] constant that represents the largest index in a tree. // TODO(Tzahi, 15/6/2024): Support height < 128 bits. - pub const MAX: Self = Self(U256::from_words( - u128::MAX >> (U256::BITS - Self::BITS as u32), - u128::MAX, - )); + pub const MAX: Self = + Self(U256::from_words(u128::MAX >> (U256::BITS - Self::BITS as u32), u128::MAX)); pub fn new(index: U256) -> Self { assert!(index <= Self::MAX.0, "Index {index} is too large."); @@ -126,11 +124,8 @@ impl NodeIndex { panic!("The descendant is not a really descendant of the node."); }; - PathToBottom::new( - delta.0.into(), - EdgePathLength::new(distance).expect("Illegal length"), - ) - .expect("Illegal PathToBottom") + PathToBottom::new(delta.0.into(), EdgePathLength::new(distance).expect("Illegal length")) + .expect("Illegal PathToBottom") } pub(crate) fn from_starknet_storage_key(key: &StarknetStorageKey) -> Self { @@ -235,7 +230,8 @@ impl<'a> SortedLeafIndices<'a> { Self(indices) } - /// Returns a subslice of the indices stored at self, at the range [leftmost_idx, rightmost_idx). + /// Returns a subslice of the indices stored at self, at the range [leftmost_idx, + /// rightmost_idx). pub(crate) fn subslice(&self, leftmost_idx: usize, rightmost_idx: usize) -> Self { Self(&self.0[leftmost_idx..rightmost_idx]) } diff --git a/crates/committer/src/patricia_merkle_tree/types_test.rs b/crates/committer/src/patricia_merkle_tree/types_test.rs index 1db478d6a9..c5657d02cd 100644 --- a/crates/committer/src/patricia_merkle_tree/types_test.rs +++ b/crates/committer/src/patricia_merkle_tree/types_test.rs @@ -1,3 +1,8 @@ +use ethnum::{uint, U256}; +use rand::rngs::ThreadRng; +use rand::Rng; +use rstest::rstest; + use crate::block_committer::input::{ContractAddress, StarknetStorageKey}; use crate::felt::Felt; use crate::patricia_merkle_tree::external_test_utils::get_random_u256; @@ -5,11 +10,6 @@ use crate::patricia_merkle_tree::internal_test_utils::random; use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; use crate::patricia_merkle_tree::types::NodeIndex; -use ethnum::{uint, U256}; -use rand::rngs::ThreadRng; -use rand::Rng; -use rstest::rstest; - #[rstest] #[case(1, 1, 1, 3)] #[case(1, 0, 2, 4)] @@ -76,11 +76,8 @@ fn test_get_lca(#[case] node_index: U256, #[case] other: U256, #[case] expected: #[rstest] fn test_get_lca_big(mut random: ThreadRng) { - let lca = NodeIndex::new(get_random_u256( - &mut random, - U256::ZERO, - (NodeIndex::MAX >> 1).into(), - )); + let lca = + NodeIndex::new(get_random_u256(&mut random, U256::ZERO, (NodeIndex::MAX >> 1).into())); let left_child = lca << 1; let right_child = left_child + 1; @@ -114,10 +111,7 @@ fn test_get_path_to_descendant( let descendant = NodeIndex::new(descendant.into()); let path_to_bottom = root_index.get_path_to_descendant(descendant); assert_eq!(path_to_bottom.path, U256::from(expected_path).into()); - assert_eq!( - path_to_bottom.length, - EdgePathLength::new(expected_length).unwrap() - ); + assert_eq!(path_to_bottom.length, EdgePathLength::new(expected_length).unwrap()); } #[rstest] @@ -130,10 +124,7 @@ fn test_get_path_to_descendant_big() { let descendant = (root_index << extension_index.bit_length()) + extension_index; let path_to_bottom = root_index.get_path_to_descendant(descendant); assert_eq!(path_to_bottom.path, extension.into()); - assert_eq!( - path_to_bottom.length, - EdgePathLength::new(extension_index.bit_length()).unwrap() - ); + assert_eq!(path_to_bottom.length, EdgePathLength::new(extension_index.bit_length()).unwrap()); } #[rstest] diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs index b32b44147d..69d3a29dc7 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs @@ -1,20 +1,21 @@ use std::collections::HashMap; -use crate::patricia_merkle_tree::node_data::inner_node::EdgePathLength; -use crate::patricia_merkle_tree::node_data::inner_node::PathToBottom; -use crate::patricia_merkle_tree::node_data::leaf::LeafModifications; -use crate::patricia_merkle_tree::node_data::leaf::SkeletonLeaf; +use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; +use crate::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonNodeMap; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTree; +use crate::patricia_merkle_tree::original_skeleton_tree::tree::{ + OriginalSkeletonNodeMap, + OriginalSkeletonTree, +}; use crate::patricia_merkle_tree::original_skeleton_tree::utils::split_leaves; -use crate::patricia_merkle_tree::types::NodeIndex; -use crate::patricia_merkle_tree::types::SortedLeafIndices; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; use crate::patricia_merkle_tree::updated_skeleton_tree::errors::UpdatedSkeletonTreeError; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; -use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonNodeMap; -use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; -use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeResult; +use crate::patricia_merkle_tree::updated_skeleton_tree::tree::{ + UpdatedSkeletonNodeMap, + UpdatedSkeletonTreeImpl, + UpdatedSkeletonTreeResult, +}; #[cfg(test)] #[path = "create_tree_helper_test.rs"] @@ -63,9 +64,7 @@ fn has_leaves_on_both_sides(root_index: &NodeIndex, leaf_indices: &SortedLeafInd if leaf_indices.is_empty() { return false; } - split_leaves(root_index, leaf_indices) - .iter() - .all(|leaves_in_side| !leaves_in_side.is_empty()) + split_leaves(root_index, leaf_indices).iter().all(|leaves_in_side| !leaves_in_side.is_empty()) } impl UpdatedSkeletonTreeImpl { @@ -80,17 +79,12 @@ impl UpdatedSkeletonTreeImpl { .iter() .filter(|(_, leaf)| !leaf.is_zero()) .map(|(index, _)| (*index, UpdatedSkeletonNode::Leaf)) - .chain( - original_skeleton - .get_nodes() - .iter() - .filter_map(|(index, node)| match node { - OriginalSkeletonNode::UnmodifiedSubTree(hash) => { - Some((*index, UpdatedSkeletonNode::UnmodifiedSubTree(*hash))) - } - OriginalSkeletonNode::Binary | OriginalSkeletonNode::Edge(_) => None, - }), - ) + .chain(original_skeleton.get_nodes().iter().filter_map(|(index, node)| match node { + OriginalSkeletonNode::UnmodifiedSubTree(hash) => { + Some((*index, UpdatedSkeletonNode::UnmodifiedSubTree(*hash))) + } + OriginalSkeletonNode::Binary | OriginalSkeletonNode::Edge(_) => None, + })) .collect() } @@ -127,8 +121,9 @@ impl UpdatedSkeletonTreeImpl { "Unexpected leaf index (root_index={root_index:?}, leaf_indices={leaf_indices:?})." ); if !self.skeleton_tree.contains_key(root_index) { - // "Deletion" of an original empty leaf (as non-zero leaf modifications are finalized in `finalize_bottom_layer`). - // Supported but not expected. + // "Deletion" of an original empty leaf (as non-zero leaf modifications are + // finalized in `finalize_bottom_layer`). Supported but not + // expected. return TempSkeletonNode::Empty; } return TempSkeletonNode::Leaf; @@ -150,7 +145,8 @@ impl UpdatedSkeletonTreeImpl { self.node_from_edge_data(&path_to_lca, &bottom_index, &bottom) } - /// Updates the Patricia tree rooted at the given index, with the given leaves; returns the root. + /// Updates the Patricia tree rooted at the given index, with the given leaves; returns the + /// root. pub(crate) fn update_node_in_nonempty_tree( &mut self, root_index: &NodeIndex, @@ -288,7 +284,7 @@ impl UpdatedSkeletonTreeImpl { assert!( self.skeleton_tree.contains_key(bottom_index), "bottom {bottom_index:?} is a non-empty leaf but doesn't appear in the \ - skeleton." + skeleton." ); return TempSkeletonNode::Original(OriginalSkeletonNode::Edge(*path)); } @@ -301,8 +297,7 @@ impl UpdatedSkeletonTreeImpl { } OriginalSkeletonNode::Binary => { // Finalize bottom - a binary descendant cannot change form. - self.skeleton_tree - .insert(*bottom_index, UpdatedSkeletonNode::Binary); + self.skeleton_tree.insert(*bottom_index, UpdatedSkeletonNode::Binary); OriginalSkeletonNode::Edge(*path) } OriginalSkeletonNode::UnmodifiedSubTree(_) => OriginalSkeletonNode::Edge(*path), @@ -330,19 +325,9 @@ impl UpdatedSkeletonTreeImpl { empty_subtree_child_index, empty_subtree_leaf_indices, ) = if was_left_nonempty { - ( - left_child_index, - left_indices, - right_child_index, - right_indices, - ) + (left_child_index, left_indices, right_child_index, right_indices) } else { - ( - right_child_index, - right_indices, - left_child_index, - left_indices, - ) + (right_child_index, right_indices, left_child_index, left_indices) }; // 1. Handle the originally non-empty subtree, replacing the root with the child in the diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs index a039882fe7..520d6e54bc 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs @@ -1,31 +1,38 @@ -use crate::patricia_merkle_tree::filled_tree::tree::FilledTree; -use crate::patricia_merkle_tree::internal_test_utils::MockLeaf; -use crate::patricia_merkle_tree::internal_test_utils::MockTrie; -use crate::patricia_merkle_tree::types::SortedLeafIndices; +use std::collections::HashMap; +use std::sync::Arc; + use ethnum::{uint, U256}; use pretty_assertions::assert_eq; use rstest::{fixture, rstest}; -use std::collections::HashMap; -use std::sync::Arc; use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; -use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig; +use crate::patricia_merkle_tree::filled_tree::tree::FilledTree; use crate::patricia_merkle_tree::internal_test_utils::{ - as_fully_indexed, get_initial_updated_skeleton, small_tree_index_to_full, + as_fully_indexed, + get_initial_updated_skeleton, + small_tree_index_to_full, + MockLeaf, + MockTrie, + OriginalSkeletonMockTrieConfig, }; use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonNodeMap; -use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; -use crate::patricia_merkle_tree::types::{NodeIndex, SubTreeHeight}; +use crate::patricia_merkle_tree::original_skeleton_tree::tree::{ + OriginalSkeletonNodeMap, + OriginalSkeletonTreeImpl, +}; +use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; use crate::patricia_merkle_tree::updated_skeleton_tree::create_tree_helper::{ - get_path_to_lca, has_leaves_on_both_sides, TempSkeletonNode, + get_path_to_lca, + has_leaves_on_both_sides, + TempSkeletonNode, }; +use crate::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunctionImpl; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; -use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; -use crate::patricia_merkle_tree::updated_skeleton_tree::{ - hash_function::TreeHashFunctionImpl, tree::UpdatedSkeletonTree, +use crate::patricia_merkle_tree::updated_skeleton_tree::tree::{ + UpdatedSkeletonTree, + UpdatedSkeletonTreeImpl, }; use crate::storage::map_storage::MapStorage; @@ -220,10 +227,7 @@ fn test_node_from_binary_data( expected_skeleton_tree.extend(expected_skeleton_additions.iter().cloned()); let temp_node = initial_updated_skeleton.node_from_binary_data(root_index, left, right); assert_eq!(temp_node, expected_node); - assert_eq!( - initial_updated_skeleton.skeleton_tree, - expected_skeleton_tree - ); + assert_eq!(initial_updated_skeleton.skeleton_tree, expected_skeleton_tree); } #[rstest] @@ -290,10 +294,7 @@ fn test_node_from_edge_data( expected_skeleton_tree.extend(expected_skeleton_additions.iter().cloned()); let temp_node = initial_updated_skeleton.node_from_edge_data(path, bottom_index, bottom); assert_eq!(temp_node, expected_node); - assert_eq!( - initial_updated_skeleton.skeleton_tree, - expected_skeleton_tree - ); + assert_eq!(initial_updated_skeleton.skeleton_tree, expected_skeleton_tree); } #[rstest] @@ -337,10 +338,7 @@ fn test_update_node_in_empty_tree( let temp_node = initial_updated_skeleton .update_node_in_empty_tree(root_index, &SortedLeafIndices::new(&mut leaf_indices)); assert_eq!(temp_node, expected_node); - assert_eq!( - initial_updated_skeleton.skeleton_tree, - expected_skeleton_tree - ); + assert_eq!(initial_updated_skeleton.skeleton_tree, expected_skeleton_tree); } #[rstest] @@ -490,10 +488,7 @@ fn test_update_node_in_nonempty_tree( &SortedLeafIndices::new(&mut leaf_indices), ); assert_eq!(temp_node, expected_node); - assert_eq!( - initial_updated_skeleton.skeleton_tree, - expected_skeleton_tree - ); + assert_eq!(initial_updated_skeleton.skeleton_tree, expected_skeleton_tree); } #[rstest] diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs index ad00cd46d8..0c2d17de95 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs @@ -5,7 +5,10 @@ use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; use crate::patricia_merkle_tree::filled_tree::node::CompiledClassHash; use crate::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, EdgeData, NodeData, PathToBottom, + BinaryData, + EdgeData, + NodeData, + PathToBottom, }; use crate::patricia_merkle_tree::node_data::leaf::{ContractState, Leaf}; @@ -48,10 +51,9 @@ pub(crate) trait TreeHashFunction { node_data: &NodeData, ) -> HashOutput { match node_data { - NodeData::Binary(BinaryData { - left_hash, - right_hash, - }) => H::hash(&left_hash.0, &right_hash.0), + NodeData::Binary(BinaryData { left_hash, right_hash }) => { + H::hash(&left_hash.0, &right_hash.0) + } NodeData::Edge(EdgeData { bottom_hash: hash_output, path_to_bottom: PathToBottom { path, length, .. }, @@ -106,11 +108,8 @@ impl TreeHashFunction for TreeHashFunctionImpl { "could not parse hex string corresponding to b'CONTRACT_CLASS_LEAF_V0' to Felt", ); HashOutput( - Poseidon::hash( - &contract_class_leaf_version.into(), - &compiled_class_hash.0.into(), - ) - .into(), + Poseidon::hash(&contract_class_leaf_version.into(), &compiled_class_hash.0.into()) + .into(), ) } fn compute_node_hash(node_data: &NodeData) -> HashOutput { diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function_test.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function_test.rs index 8b80da1a31..a08b686d58 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function_test.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function_test.rs @@ -1,17 +1,22 @@ +use rstest::rstest; +use starknet_types_core::hash::{Pedersen, StarkHash}; + use crate::block_committer::input::StarknetStorageValue; use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; -use crate::patricia_merkle_tree::filled_tree::node::Nonce; -use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash}; +use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}; use crate::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, EdgeData, EdgePathLength, NodeData, PathToBottom, + BinaryData, + EdgeData, + EdgePathLength, + NodeData, + PathToBottom, }; use crate::patricia_merkle_tree::node_data::leaf::ContractState; use crate::patricia_merkle_tree::updated_skeleton_tree::hash_function::{ - TreeHashFunction, TreeHashFunctionImpl, + TreeHashFunction, + TreeHashFunctionImpl, }; -use rstest::rstest; -use starknet_types_core::hash::{Pedersen, StarkHash}; #[rstest] #[case(Felt::ONE, Felt::TWO, Felt::from_hex("0x5bb9440e27889a364bcb678b1f679ecd1347acdedcbf36e83494f857cc58026").unwrap())] @@ -22,12 +27,10 @@ fn test_tree_hash_function_impl_binary_node( #[case] right_hash: Felt, #[case] expected_hash: Felt, ) { - let hash_output = TreeHashFunctionImpl::compute_node_hash( - &NodeData::::Binary(BinaryData { - left_hash: HashOutput(left_hash), - right_hash: HashOutput(right_hash), - }), - ); + let hash_output = + TreeHashFunctionImpl::compute_node_hash(&NodeData::::Binary( + BinaryData { left_hash: HashOutput(left_hash), right_hash: HashOutput(right_hash) }, + )); assert_eq!( hash_output, HashOutput(Pedersen::hash(&left_hash.into(), &right_hash.into()).into()) diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/skeleton_forest.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/skeleton_forest.rs index 3875f99177..d3257e1d1f 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/skeleton_forest.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/skeleton_forest.rs @@ -5,12 +5,16 @@ use crate::felt::Felt; use crate::forest_errors::{ForestError, ForestResult}; use crate::patricia_merkle_tree::filled_tree::node::{ClassHash, Nonce}; use crate::patricia_merkle_tree::node_data::leaf::{ - ContractState, LeafModifications, SkeletonLeaf, + ContractState, + LeafModifications, + SkeletonLeaf, }; use crate::patricia_merkle_tree::original_skeleton_tree::skeleton_forest::OriginalSkeletonForest; use crate::patricia_merkle_tree::types::NodeIndex; -use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTree; -use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; +use crate::patricia_merkle_tree::updated_skeleton_tree::tree::{ + UpdatedSkeletonTree, + UpdatedSkeletonTreeImpl, +}; pub(crate) struct UpdatedSkeletonForest { pub(crate) classes_trie: UpdatedSkeletonTreeImpl, @@ -71,11 +75,7 @@ impl UpdatedSkeletonForest { &contracts_trie_leaves, )?; - Ok(Self { - classes_trie, - contracts_trie, - storage_tries, - }) + Ok(Self { classes_trie, contracts_trie, storage_tries }) } /// Given the previous contract state, whether the contract's storage has become empty or not, diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs index 5e41f085da..5de0475a40 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs @@ -76,9 +76,7 @@ impl<'a> UpdatedSkeletonTree<'a> for UpdatedSkeletonTreeImpl { updated_skeleton_tree .skeleton_tree .insert(NodeIndex::ROOT, new_node) - .map_or((), |_| { - panic!("Root node already exists in the updated skeleton tree") - }) + .map_or((), |_| panic!("Root node already exists in the updated skeleton tree")) } }; Ok(updated_skeleton_tree) @@ -109,8 +107,6 @@ impl<'a> UpdatedSkeletonTree<'a> for UpdatedSkeletonTreeImpl { } fn get_nodes(&self) -> impl Iterator { - self.skeleton_tree - .iter() - .map(|(index, node)| (*index, node.clone())) + self.skeleton_tree.iter().map(|(index, node)| (*index, node.clone())) } } diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs index fc2f1654db..8f9cb3d6ec 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs @@ -4,18 +4,23 @@ use rstest::{fixture, rstest}; use crate::felt::Felt; use crate::hash::hash_trait::HashOutput; -use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig; -use crate::patricia_merkle_tree::internal_test_utils::{get_initial_updated_skeleton, MockLeaf}; +use crate::patricia_merkle_tree::internal_test_utils::{ + get_initial_updated_skeleton, + MockLeaf, + OriginalSkeletonMockTrieConfig, +}; use crate::patricia_merkle_tree::node_data::inner_node::PathToBottom; use crate::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; use crate::patricia_merkle_tree::original_skeleton_tree::tree::{ - OriginalSkeletonTree, OriginalSkeletonTreeImpl, + OriginalSkeletonTree, + OriginalSkeletonTreeImpl, }; use crate::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; use crate::patricia_merkle_tree::updated_skeleton_tree::tree::{ - UpdatedSkeletonTree, UpdatedSkeletonTreeImpl, + UpdatedSkeletonTree, + UpdatedSkeletonTreeImpl, }; use crate::storage::map_storage::MapStorage; @@ -123,10 +128,8 @@ fn test_updated_skeleton_tree_impl_create( #[with(original_skeleton, leaf_modifications)] initial_updated_skeleton: UpdatedSkeletonTreeImpl, ) { - let leaf_modifications: LeafModifications = leaf_modifications - .iter() - .map(|(index, val)| (*index, (*val).into())) - .collect(); + let leaf_modifications: LeafModifications = + leaf_modifications.iter().map(|(index, val)| (*index, (*val).into())).collect(); let mut leaf_indices: Vec = leaf_modifications.keys().copied().collect(); let sorted_leaf_indices = SortedLeafIndices::new(&mut leaf_indices); let mut original_skeleton = OriginalSkeletonTreeImpl { @@ -156,10 +159,8 @@ fn test_updated_empty_tree(#[case] modifications: LeafModifications) { ) .unwrap(); - let skeleton_modifications = modifications - .into_iter() - .map(|(idx, leaf)| (idx, leaf.0.into())) - .collect(); + let skeleton_modifications = + modifications.into_iter().map(|(idx, leaf)| (idx, leaf.0.into())).collect(); let updated_skeleton_tree = UpdatedSkeletonTreeImpl::create(&mut original_skeleton, &skeleton_modifications).unwrap(); assert!(updated_skeleton_tree.is_empty()); diff --git a/crates/committer/src/storage/db_object.rs b/crates/committer/src/storage/db_object.rs index 882266b6c6..5c4d17b9b6 100644 --- a/crates/committer/src/storage/db_object.rs +++ b/crates/committer/src/storage/db_object.rs @@ -5,7 +5,7 @@ pub trait DBObject { /// Serializes the given value. fn serialize(&self) -> StorageValue; - //TODO(Aviv, 17/07/2024): Define a trait `T` for storage prefix and return `impl T` here. + // TODO(Aviv, 17/07/2024): Define a trait `T` for storage prefix and return `impl T` here. /// Returns the storage key prefix of the DB object. fn get_prefix(&self) -> Vec; @@ -19,7 +19,7 @@ pub trait Deserializable: Sized { /// Deserializes the given value. fn deserialize(value: &StorageValue) -> Result; - //TODO(Aviv, 17/07/2024): Define a trait `T` for storage prefix and return `impl T` here. + // TODO(Aviv, 17/07/2024): Define a trait `T` for storage prefix and return `impl T` here. /// The prefix used to store in DB. fn prefix() -> Vec; } diff --git a/crates/committer/src/storage/errors.rs b/crates/committer/src/storage/errors.rs index 7ab56ebcbe..2a85137d49 100644 --- a/crates/committer/src/storage/errors.rs +++ b/crates/committer/src/storage/errors.rs @@ -1,10 +1,10 @@ -use crate::patricia_merkle_tree::node_data::errors::{EdgePathError, PathToBottomError}; -use crate::storage::storage_trait::StorageKey; - use serde_json; use starknet_types_core::felt::FromStrError; use thiserror::Error; +use crate::patricia_merkle_tree::node_data::errors::{EdgePathError, PathToBottomError}; +use crate::storage::storage_trait::StorageKey; + #[derive(Debug, Error)] pub enum StorageError { #[error("The key {0:?} does not exist in storage.")] diff --git a/crates/committer/src/storage/map_storage.rs b/crates/committer/src/storage/map_storage.rs index 4c35d547b6..1fac3b3486 100644 --- a/crates/committer/src/storage/map_storage.rs +++ b/crates/committer/src/storage/map_storage.rs @@ -1,8 +1,9 @@ use std::collections::HashMap; -use crate::storage::storage_trait::{Storage, StorageKey, StorageValue}; use serde::Serialize; +use crate::storage::storage_trait::{Storage, StorageKey, StorageValue}; + #[derive(Serialize, Debug, Default)] #[cfg_attr(any(test, feature = "testing"), derive(Clone))] pub struct MapStorage { diff --git a/crates/committer/src/storage/storage_trait.rs b/crates/committer/src/storage/storage_trait.rs index 29d87a3575..190bf5f027 100644 --- a/crates/committer/src/storage/storage_trait.rs +++ b/crates/committer/src/storage/storage_trait.rs @@ -1,7 +1,8 @@ +use std::collections::HashMap; + use serde::{Serialize, Serializer}; use crate::felt::Felt; -use std::collections::HashMap; #[derive(Debug, Eq, Hash, PartialEq)] #[cfg_attr(any(test, feature = "testing"), derive(Clone))] diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index 47da4b0ed8..9fc69e8e0e 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "committer_cli" -version.workspace = true +version = "0.1.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -10,25 +10,24 @@ description = "Cli for the committer package." workspace = true [dev-dependencies] -criterion = { workspace = true, features = ["html_reports"] } +criterion = { version = "0.5.1", features = ["html_reports"] } pretty_assertions.workspace = true [dependencies] -clap.workspace = true +clap = { version = "4.5.4", features = ["cargo", "derive"] } committer = { path = "../committer", features = ["testing"] } derive_more.workspace = true ethnum.workspace = true -hex.workspace = true indexmap.workspace = true log.workspace = true rand.workspace = true rand_distr.workspace = true -serde.workspace = true -serde_json.workspace = true -serde_repr.workspace = true +serde = { version = "1.0.197", features = ["derive"] } +serde_json = "1.0.116" +serde_repr = "0.1.19" simplelog.workspace = true starknet-types-core.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} strum.workspace = true strum_macros.workspace = true thiserror.workspace = true diff --git a/crates/committer_cli/benches/committer_bench.rs b/crates/committer_cli/benches/committer_bench.rs index a83442c4c5..90796c7cb8 100644 --- a/crates/committer_cli/benches/committer_bench.rs +++ b/crates/committer_cli/benches/committer_bench.rs @@ -7,16 +7,15 @@ // Then upload the new files to GCS with this new prefix (run e.g., // gcloud storage cp LOCAL_FILE gs://committer-testing-artifacts/NEW_PREFIX/tree_flow_inputs.json). -use std::{collections::HashMap, sync::Arc}; +use std::collections::HashMap; +use std::sync::Arc; -use committer::{ - block_committer::input::StarknetStorageValue, - patricia_merkle_tree::{ - external_test_utils::tree_computation_flow, node_data::leaf::LeafModifications, - types::NodeIndex, - }, -}; -use committer_cli::{commands::parse_and_commit, tests::utils::parse_from_python::TreeFlowInput}; +use committer::block_committer::input::StarknetStorageValue; +use committer::patricia_merkle_tree::external_test_utils::tree_computation_flow; +use committer::patricia_merkle_tree::node_data::leaf::LeafModifications; +use committer::patricia_merkle_tree::types::NodeIndex; +use committer_cli::commands::parse_and_commit; +use committer_cli::tests::utils::parse_from_python::TreeFlowInput; use criterion::{criterion_group, criterion_main, Criterion}; const CONCURRENCY_MODE: bool = true; @@ -25,17 +24,12 @@ const FLOW_TEST_INPUT: &str = include_str!("committer_flow_inputs.json"); const OUTPUT_PATH: &str = "benchmark_output.txt"; pub fn single_tree_flow_benchmark(criterion: &mut Criterion) { - let TreeFlowInput { - leaf_modifications, - storage, - root_hash, - } = serde_json::from_str(SINGLE_TREE_FLOW_INPUT).unwrap(); + let TreeFlowInput { leaf_modifications, storage, root_hash } = + serde_json::from_str(SINGLE_TREE_FLOW_INPUT).unwrap(); let runtime = match CONCURRENCY_MODE { true => tokio::runtime::Builder::new_multi_thread().build().unwrap(), - false => tokio::runtime::Builder::new_current_thread() - .build() - .unwrap(), + false => tokio::runtime::Builder::new_current_thread().build().unwrap(), }; let leaf_modifications = leaf_modifications @@ -58,9 +52,7 @@ pub fn single_tree_flow_benchmark(criterion: &mut Criterion) { pub fn full_committer_flow_benchmark(criterion: &mut Criterion) { let runtime = match CONCURRENCY_MODE { true => tokio::runtime::Builder::new_multi_thread().build().unwrap(), - false => tokio::runtime::Builder::new_current_thread() - .build() - .unwrap(), + false => tokio::runtime::Builder::new_current_thread().build().unwrap(), }; // TODO(Aner, 8/7/2024): use structs for deserialization. @@ -71,17 +63,10 @@ pub fn full_committer_flow_benchmark(criterion: &mut Criterion) { // to avoid disk IO in the benchmark. criterion.bench_function("full_committer_flow", |benchmark| { benchmark.iter(|| { - runtime.block_on(parse_and_commit( - committer_input_string, - OUTPUT_PATH.to_owned(), - )); + runtime.block_on(parse_and_commit(committer_input_string, OUTPUT_PATH.to_owned())); }) }); } -criterion_group!( - benches, - single_tree_flow_benchmark, - full_committer_flow_benchmark -); +criterion_group!(benches, single_tree_flow_benchmark, full_committer_flow_benchmark); criterion_main!(benches); diff --git a/crates/committer_cli/src/block_hash.rs b/crates/committer_cli/src/block_hash.rs index ae4c4eea2f..d78f5b19da 100644 --- a/crates/committer_cli/src/block_hash.rs +++ b/crates/committer_cli/src/block_hash.rs @@ -1,10 +1,11 @@ use serde::Deserialize; -use starknet_api::{ - block::BlockHeaderWithoutHash, - block_hash::block_hash_calculator::{BlockHeaderCommitments, TransactionHashingData}, - data_availability::L1DataAvailabilityMode, - state::ThinStateDiff, +use starknet_api::block::BlockHeaderWithoutHash; +use starknet_api::block_hash::block_hash_calculator::{ + BlockHeaderCommitments, + TransactionHashingData, }; +use starknet_api::data_availability::L1DataAvailabilityMode; +use starknet_api::state::ThinStateDiff; #[derive(Clone, Debug, Deserialize, Eq, PartialEq)] pub struct BlockCommitmentsInput { diff --git a/crates/committer_cli/src/commands.rs b/crates/committer_cli/src/commands.rs index 93d9b643a7..66552325a9 100644 --- a/crates/committer_cli/src/commands.rs +++ b/crates/committer_cli/src/commands.rs @@ -1,12 +1,8 @@ -use committer::block_committer::{ - commit::commit_block, - input::{Config, ConfigImpl, Input}, -}; +use committer::block_committer::commit::commit_block; +use committer::block_committer::input::{Config, ConfigImpl, Input}; -use crate::{ - filled_tree_output::filled_forest::SerializedForest, - parse_input::read::{parse_input, write_to_file}, -}; +use crate::filled_tree_output::filled_forest::SerializedForest; +use crate::parse_input::read::{parse_input, write_to_file}; pub async fn parse_and_commit(input_string: &str, output_path: String) { let input = parse_input(input_string).expect("Failed to parse the given input."); @@ -16,11 +12,8 @@ pub async fn parse_and_commit(input_string: &str, output_path: String) { } pub async fn commit(input: Input, output_path: String) { - let serialized_filled_forest = SerializedForest( - commit_block(input) - .await - .expect("Failed to commit the given block."), - ); + let serialized_filled_forest = + SerializedForest(commit_block(input).await.expect("Failed to commit the given block.")); let output = serialized_filled_forest.forest_to_output(); write_to_file(&output_path, &output); } diff --git a/crates/committer_cli/src/filled_tree_output/errors.rs b/crates/committer_cli/src/filled_tree_output/errors.rs index c8191bfb9d..410cf07eb2 100644 --- a/crates/committer_cli/src/filled_tree_output/errors.rs +++ b/crates/committer_cli/src/filled_tree_output/errors.rs @@ -1,7 +1,10 @@ +use std::fmt::Debug; + use committer::patricia_merkle_tree::filled_tree::errors::{ - ClassesTrieError, ContractsTrieError, StorageTrieError, + ClassesTrieError, + ContractsTrieError, + StorageTrieError, }; -use std::fmt::Debug; #[derive(thiserror::Error, Debug)] pub enum FilledForestError { diff --git a/crates/committer_cli/src/main.rs b/crates/committer_cli/src/main.rs index 76cf222f17..dec0e504ca 100644 --- a/crates/committer_cli/src/main.rs +++ b/crates/committer_cli/src/main.rs @@ -5,7 +5,8 @@ use committer_cli::parse_input::read::{load_from_stdin, read_from_stdin, write_t use committer_cli::tests::python_tests::PythonTest; use simplelog::{ColorChoice, Config, LevelFilter, TermLogger, TerminalMode}; use starknet_api::block_hash::block_hash_calculator::{ - calculate_block_commitments, calculate_block_hash, + calculate_block_commitments, + calculate_block_hash, }; /// Committer CLI. @@ -75,10 +76,7 @@ async fn main() { parse_and_commit(&read_from_stdin(), output_path).await; } - Command::PythonTest { - output_path, - test_name, - } => { + Command::PythonTest { output_path, test_name } => { // Create PythonTest from test_name. let test = PythonTest::try_from(test_name) .unwrap_or_else(|error| panic!("Failed to create PythonTest: {}", error)); diff --git a/crates/committer_cli/src/parse_input/cast.rs b/crates/committer_cli/src/parse_input/cast.rs index 0afd0f60d4..730db39c7a 100644 --- a/crates/committer_cli/src/parse_input/cast.rs +++ b/crates/committer_cli/src/parse_input/cast.rs @@ -1,6 +1,12 @@ -use crate::parse_input::raw_input::RawInput; +use std::collections::HashMap; + use committer::block_committer::input::{ - ConfigImpl, ContractAddress, Input, StarknetStorageKey, StarknetStorageValue, StateDiff, + ConfigImpl, + ContractAddress, + Input, + StarknetStorageKey, + StarknetStorageValue, + StateDiff, }; use committer::felt::Felt; use committer::hash::hash_trait::HashOutput; @@ -8,7 +14,7 @@ use committer::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClas use committer::storage::errors::DeserializationError; use committer::storage::storage_trait::{StorageKey, StorageValue}; -use std::collections::HashMap; +use crate::parse_input::raw_input::RawInput; pub type InputImpl = Input; @@ -17,12 +23,7 @@ impl TryFrom for InputImpl { fn try_from(raw_input: RawInput) -> Result { let mut storage = HashMap::new(); for entry in raw_input.storage { - add_unique( - &mut storage, - "storage", - StorageKey(entry.key), - StorageValue(entry.value), - )?; + add_unique(&mut storage, "storage", StorageKey(entry.key), StorageValue(entry.value))?; } let mut address_to_class_hash = HashMap::new(); @@ -104,9 +105,7 @@ where K: std::cmp::Eq + std::hash::Hash + std::fmt::Debug, { if map.contains_key(&key) { - return Err(DeserializationError::KeyDuplicate(format!( - "{map_name}: {key:?}" - ))); + return Err(DeserializationError::KeyDuplicate(format!("{map_name}: {key:?}"))); } map.insert(key, value); Ok(()) diff --git a/crates/committer_cli/src/parse_input/read.rs b/crates/committer_cli/src/parse_input/read.rs index f8f8e4df0c..4f7ddf1f67 100644 --- a/crates/committer_cli/src/parse_input/read.rs +++ b/crates/committer_cli/src/parse_input/read.rs @@ -1,7 +1,5 @@ -use std::{ - fs::File, - io::{self, BufWriter}, -}; +use std::fs::File; +use std::io::{self, BufWriter}; use committer::storage::errors::DeserializationError; use serde::{Deserialize, Serialize}; diff --git a/crates/committer_cli/src/parse_input/read_test.rs b/crates/committer_cli/src/parse_input/read_test.rs index 8cce55c4fc..ae8d550625 100644 --- a/crates/committer_cli/src/parse_input/read_test.rs +++ b/crates/committer_cli/src/parse_input/read_test.rs @@ -1,17 +1,19 @@ -use committer::{ - block_committer::input::{ - ConfigImpl, ContractAddress, Input, StarknetStorageKey, StarknetStorageValue, StateDiff, - }, - felt::Felt, - hash::hash_trait::HashOutput, - patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}, - storage::{ - errors::DeserializationError, - storage_trait::{StorageKey, StorageValue}, - }, +use std::collections::HashMap; + +use committer::block_committer::input::{ + ConfigImpl, + ContractAddress, + Input, + StarknetStorageKey, + StarknetStorageValue, + StateDiff, }; +use committer::felt::Felt; +use committer::hash::hash_trait::HashOutput; +use committer::patricia_merkle_tree::filled_tree::node::{ClassHash, CompiledClassHash, Nonce}; +use committer::storage::errors::DeserializationError; +use committer::storage::storage_trait::{StorageKey, StorageValue}; use pretty_assertions::assert_eq; -use std::collections::HashMap; use super::parse_input; @@ -85,14 +87,8 @@ fn test_simple_input_parsing() { "#; let expected_storage = HashMap::from([ - ( - StorageKey([14, 6, 78, 90].to_vec()), - StorageValue([245, 90, 0, 0, 1].to_vec()), - ), - ( - StorageKey([14, 6, 43, 90].to_vec()), - StorageValue([9, 0, 0, 0, 1].to_vec()), - ), + (StorageKey([14, 6, 78, 90].to_vec()), StorageValue([245, 90, 0, 0, 1].to_vec())), + (StorageKey([14, 6, 43, 90].to_vec()), StorageValue([9, 0, 0, 0, 1].to_vec())), ]); let expected_address_to_class_hash = HashMap::from([ diff --git a/crates/committer_cli/src/tests/python_tests.rs b/crates/committer_cli/src/tests/python_tests.rs index 8ba1341972..f4d1a55e2e 100644 --- a/crates/committer_cli/src/tests/python_tests.rs +++ b/crates/committer_cli/src/tests/python_tests.rs @@ -1,44 +1,57 @@ -use crate::filled_tree_output::errors::FilledForestError; -use crate::filled_tree_output::filled_forest::SerializedForest; -use crate::parse_input::cast::InputImpl; -use crate::parse_input::read::parse_input; -use crate::tests::utils::parse_from_python::parse_input_single_storage_tree_flow_test; -use crate::tests::utils::random_structs::DummyRandomValue; +use std::collections::HashMap; +use std::fmt::Debug; +use std::io; + use committer::block_committer::input::{ - ContractAddress, StarknetStorageKey, StarknetStorageValue, StateDiff, + ContractAddress, + StarknetStorageKey, + StarknetStorageValue, + StateDiff, }; use committer::felt::Felt; use committer::hash::hash_trait::HashOutput; +use committer::patricia_merkle_tree::external_test_utils::single_tree_flow_test; use committer::patricia_merkle_tree::filled_tree::forest::FilledForest; -use committer::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use committer::patricia_merkle_tree::filled_tree::node::{ClassHash, FilledNode, Nonce}; +use committer::patricia_merkle_tree::filled_tree::node::{ + ClassHash, + CompiledClassHash, + FilledNode, + Nonce, +}; use committer::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, EdgeData, EdgePathLength, NodeData, PathToBottom, + BinaryData, + EdgeData, + EdgePathLength, + NodeData, + PathToBottom, }; use committer::patricia_merkle_tree::node_data::leaf::ContractState; use committer::patricia_merkle_tree::types::SubTreeHeight; -use log::error; - -use committer::patricia_merkle_tree::external_test_utils::single_tree_flow_test; use committer::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunctionImpl; use committer::storage::db_object::DBObject; use committer::storage::errors::{DeserializationError, SerializationError}; use committer::storage::map_storage::MapStorage; use committer::storage::storage_trait::{Storage, StorageKey, StorageValue}; use ethnum::U256; +use log::error; use serde_json::json; use starknet_api::block_hash::block_hash_calculator::{ - TransactionHashingData, TransactionOutputForHash, + TransactionHashingData, + TransactionOutputForHash, }; use starknet_api::state::ThinStateDiff; use starknet_api::transaction::TransactionExecutionStatus; use starknet_types_core::hash::{Pedersen, StarkHash}; -use std::fmt::Debug; -use std::{collections::HashMap, io}; use thiserror; use super::utils::objects::{get_thin_state_diff, get_transaction_output_for_hash, get_tx_data}; use super::utils::parse_from_python::TreeFlowInput; +use crate::filled_tree_output::errors::FilledForestError; +use crate::filled_tree_output::filled_forest::SerializedForest; +use crate::parse_input::cast::InputImpl; +use crate::parse_input::read::parse_input; +use crate::tests::utils::parse_from_python::parse_input_single_storage_tree_flow_test; +use crate::tests::utils::random_structs::DummyRandomValue; // Enum representing different Python tests. pub enum PythonTest { @@ -181,11 +194,8 @@ impl PythonTest { } Self::ComputeHashSingleTree => { // 1. Get and deserialize input. - let TreeFlowInput { - leaf_modifications, - storage, - root_hash, - } = serde_json::from_str(Self::non_optional_input(input)?)?; + let TreeFlowInput { leaf_modifications, storage, root_hash } = + serde_json::from_str(Self::non_optional_input(input)?)?; // 2. Run the test. let output = single_tree_flow_test(leaf_modifications, storage, root_hash).await; // 3. Serialize and return output. @@ -212,16 +222,11 @@ impl PythonTest { // Test that the fetching of the input to flow test is working. // TODO(Aner, 8/7/2024): refactor using structs for deserialization and rename the function. fn serialize_for_rust_committer_flow_test(input: HashMap) -> String { - let TreeFlowInput { - leaf_modifications, - storage, - root_hash, - } = parse_input_single_storage_tree_flow_test(&input); + let TreeFlowInput { leaf_modifications, storage, root_hash } = + parse_input_single_storage_tree_flow_test(&input); // Serialize the leaf modifications to an object that can be JSON-serialized. - let leaf_modifications_to_print: HashMap> = leaf_modifications - .into_iter() - .map(|(k, v)| (k.0.to_string(), v.serialize().0)) - .collect(); + let leaf_modifications_to_print: HashMap> = + leaf_modifications.into_iter().map(|(k, v)| (k.0.to_string(), v.serialize().0)).collect(); // Create a json string to compare with the expected string in python. serde_json::to_string(&json!( @@ -283,12 +288,8 @@ pub(crate) fn felt_serialize_test(felt: u128) -> String { pub(crate) fn test_hash_function(hash_input: HashMap) -> String { // Fetch x and y from the input. - let x = hash_input - .get("x") - .expect("Failed to get value for key 'x'"); - let y = hash_input - .get("y") - .expect("Failed to get value for key 'y'"); + let x = hash_input.get("x").expect("Failed to get value for key 'x'"); + let y = hash_input.get("y").expect("Failed to get value for key 'y'"); // Convert x and y to Felt. let x_felt = Felt::from(*x); @@ -313,12 +314,8 @@ pub(crate) fn test_hash_function(hash_input: HashMap) -> String { /// A JSON string representing the value of serialized binary data. pub(crate) fn test_binary_serialize_test(binary_input: HashMap) -> String { // Extract left and right values from the input. - let left = binary_input - .get("left") - .expect("Failed to get value for key 'left'"); - let right = binary_input - .get("right") - .expect("Failed to get value for key 'right'"); + let left = binary_input.get("left").expect("Failed to get value for key 'left'"); + let right = binary_input.get("right").expect("Failed to get value for key 'right'"); // Create a map to store the serialized binary data. let mut map: HashMap> = HashMap::new(); @@ -330,10 +327,8 @@ pub(crate) fn test_binary_serialize_test(binary_input: HashMap) -> }; // Create a filled node (irrelevant leaf type) with binary data and zero hash. - let filled_node: FilledNode = FilledNode { - data: NodeData::Binary(binary_data), - hash: HashOutput(Felt::ZERO), - }; + let filled_node: FilledNode = + FilledNode { data: NodeData::Binary(binary_data), hash: HashOutput(Felt::ZERO) }; // Serialize the binary node and insert it into the map under the key "value". let value = filled_node.serialize(); @@ -369,10 +364,7 @@ fn create_output_to_python(actual_input: InputImpl) -> String { actual_input.storage.len(), actual_input.state_diff.address_to_class_hash.len(), actual_input.state_diff.address_to_nonce.len(), - actual_input - .state_diff - .class_hash_to_compiled_class_hash - .len(), + actual_input.state_diff.class_hash_to_compiled_class_hash.len(), actual_input.state_diff.storage_updates.len(), actual_input.contracts_trie_root_hash.0.to_bytes_be(), actual_input.classes_trie_root_hash.0.to_bytes_be(), @@ -396,23 +388,15 @@ fn hash_state_diff(state_diff: &StateDiff) -> (Vec, Vec) { ) = hash_class_hash_to_compiled_class_hash(&state_diff.class_hash_to_compiled_class_hash); let (storage_updates_keys_hash, storage_updates_values_hash) = hash_storage_updates(&state_diff.storage_updates); - let mut state_diff_keys_hash = xor_hash( - &address_to_class_hash_keys_hash, - &address_to_nonce_keys_hash, - ); - state_diff_keys_hash = xor_hash( - &state_diff_keys_hash, - &class_hash_to_compiled_class_hash_keys_hash, - ); + let mut state_diff_keys_hash = + xor_hash(&address_to_class_hash_keys_hash, &address_to_nonce_keys_hash); + state_diff_keys_hash = + xor_hash(&state_diff_keys_hash, &class_hash_to_compiled_class_hash_keys_hash); state_diff_keys_hash = xor_hash(&state_diff_keys_hash, &storage_updates_keys_hash); - let mut state_diff_values_hash = xor_hash( - &address_to_class_hash_values_hash, - &address_to_nonce_values_hash, - ); - state_diff_values_hash = xor_hash( - &state_diff_values_hash, - &class_hash_to_compiled_class_hash_values_hash, - ); + let mut state_diff_values_hash = + xor_hash(&address_to_class_hash_values_hash, &address_to_nonce_values_hash); + state_diff_values_hash = + xor_hash(&state_diff_values_hash, &class_hash_to_compiled_class_hash_values_hash); state_diff_values_hash = xor_hash(&state_diff_values_hash, &storage_updates_values_hash); (state_diff_keys_hash, state_diff_values_hash) } @@ -474,14 +458,13 @@ fn xor_hash(x: &[u8], y: &[u8]) -> Vec { /// Creates and serializes storage keys for different node types. /// -/// This function generates and serializes storage keys for various node types, including binary nodes, -/// edge nodes, storage leaf nodes, state tree leaf nodes, and compiled class leaf nodes. The resulting -/// keys are stored in a `HashMap` and serialized into a JSON string. +/// This function generates and serializes storage keys for various node types, including binary +/// nodes, edge nodes, storage leaf nodes, state tree leaf nodes, and compiled class leaf nodes. The +/// resulting keys are stored in a `HashMap` and serialized into a JSON string. /// /// # Returns /// /// A JSON string representing the serialized storage keys for different node types. -/// pub(crate) fn test_node_db_key() -> String { let zero = Felt::ZERO; @@ -489,28 +472,19 @@ pub(crate) fn test_node_db_key() -> String { let hash = HashOutput(zero); let binary_node: FilledNode = FilledNode { - data: NodeData::Binary(BinaryData { - left_hash: hash, - right_hash: hash, - }), + data: NodeData::Binary(BinaryData { left_hash: hash, right_hash: hash }), hash, }; let binary_node_key = binary_node.db_key().0; let edge_node: FilledNode = FilledNode { - data: NodeData::Edge(EdgeData { - bottom_hash: hash, - path_to_bottom: Default::default(), - }), + data: NodeData::Edge(EdgeData { bottom_hash: hash, path_to_bottom: Default::default() }), hash, }; let edge_node_key = edge_node.db_key().0; - let storage_leaf = FilledNode { - data: NodeData::Leaf(StarknetStorageValue(zero)), - hash, - }; + let storage_leaf = FilledNode { data: NodeData::Leaf(StarknetStorageValue(zero)), hash }; let storage_leaf_key = storage_leaf.db_key().0; let state_tree_leaf = FilledNode { @@ -523,10 +497,7 @@ pub(crate) fn test_node_db_key() -> String { }; let state_tree_leaf_key = state_tree_leaf.db_key().0; - let compiled_class_leaf = FilledNode { - data: NodeData::Leaf(CompiledClassHash(zero)), - hash, - }; + let compiled_class_leaf = FilledNode { data: NodeData::Leaf(CompiledClassHash(zero)), hash }; let compiled_class_leaf_key = compiled_class_leaf.db_key().0; // Store keys in a HashMap. @@ -536,24 +507,19 @@ pub(crate) fn test_node_db_key() -> String { map.insert("edge_node_key".to_string(), edge_node_key); map.insert("storage_leaf_key".to_string(), storage_leaf_key); map.insert("state_tree_leaf_key".to_string(), state_tree_leaf_key); - map.insert( - "compiled_class_leaf_key".to_string(), - compiled_class_leaf_key, - ); + map.insert("compiled_class_leaf_key".to_string(), compiled_class_leaf_key); // Serialize the map to a JSON string and handle serialization errors. serde_json::to_string(&map) .unwrap_or_else(|error| panic!("Failed to serialize storage prefix: {}", error)) } -/// This function storage_serialize_test generates a MapStorage containing StorageKey and StorageValue -/// pairs for u128 values in the range 0..=1000, +/// This function storage_serialize_test generates a MapStorage containing StorageKey and +/// StorageValue pairs for u128 values in the range 0..=1000, /// serializes it to a JSON string using Serde, /// and returns the serialized JSON string or panics with an error message if serialization fails. pub(crate) fn storage_serialize_test() -> Result { - let mut storage = MapStorage { - storage: HashMap::new(), - }; + let mut storage = MapStorage { storage: HashMap::new() }; for i in 0..=99_u128 { let key = StorageKey(Felt::from(i).to_bytes_be().to_vec()); let value = StorageValue(Felt::from(i).to_bytes_be().to_vec()); @@ -574,7 +540,8 @@ fn python_hash_constants_compare() -> String { } /// Processes a map containing JSON strings for different node data. -/// Creates `NodeData` objects for each node type, stores them in a storage, and serializes the map to a JSON string. +/// Creates `NodeData` objects for each node type, stores them in a storage, and serializes the map +/// to a JSON string. /// /// # Arguments /// * `data` - A map containing JSON strings for different node data: @@ -585,12 +552,11 @@ fn python_hash_constants_compare() -> String { /// - `"contract_class_leaf"`: Compiled class leaf data. /// /// # Returns -/// A `Result` containing a serialized map of all nodes on success, or an error if keys are missing or parsing fails. +/// A `Result` containing a serialized map of all nodes on success, or an +/// error if keys are missing or parsing fails. fn test_storage_node(data: HashMap) -> Result { // Create a storage to store the nodes. - let mut rust_fact_storage = MapStorage { - storage: HashMap::new(), - }; + let mut rust_fact_storage = MapStorage { storage: HashMap::new() }; // Parse the binary node data from the input. let binary_json = get_or_key_not_found(&data, "binary")?; @@ -639,10 +605,7 @@ fn test_storage_node(data: HashMap) -> Result) -> Result) -> Result Deserialize<'de> for FactMap { where D: Deserializer<'de>, { - Ok(Self( - serde_json::from_str(&String::deserialize(deserializer)?).unwrap(), - )) + Ok(Self(serde_json::from_str(&String::deserialize(deserializer)?).unwrap())) } } @@ -45,9 +40,7 @@ impl<'de> Deserialize<'de> for CommitterInput { where D: Deserializer<'de>, { - Ok(Self( - parse_input(&String::deserialize(deserializer)?).unwrap(), - )) + Ok(Self(parse_input(&String::deserialize(deserializer)?).unwrap())) } } @@ -83,7 +76,8 @@ struct TreeRegressionInput { expected_storage_changes: Map, } -// TODO(Aner, 9/8/24): remove this impl and use the Deserialize derive, by changing the input format. +// TODO(Aner, 9/8/24): remove this impl and use the Deserialize derive, by changing the input +// format. impl<'de> Deserialize<'de> for TreeRegressionInput { fn deserialize(deserializer: D) -> Result where @@ -105,12 +99,7 @@ impl<'de> Deserialize<'de> for TreeRegressionInput { #[tokio::test(flavor = "multi_thread")] pub async fn test_regression_single_tree() { let TreeRegressionInput { - tree_flow_input: - TreeFlowInput { - leaf_modifications, - storage, - root_hash, - }, + tree_flow_input: TreeFlowInput { leaf_modifications, storage, root_hash }, expected_hash, expected_storage_changes, } = serde_json::from_str(SINGLE_TREE_FLOW_INPUT).unwrap(); @@ -121,10 +110,8 @@ pub async fn test_regression_single_tree() { let execution_time = std::time::Instant::now() - start; // Assert correctness of the output of the single tree flow test. - let TreeRegressionOutput { - root_hash, - storage_changes: Value::Object(actual_storage_changes), - } = serde_json::from_str(&output).unwrap() + let TreeRegressionOutput { root_hash, storage_changes: Value::Object(actual_storage_changes) } = + serde_json::from_str(&output).unwrap() else { panic!("Expected storage changes object to be an object."); }; @@ -153,9 +140,7 @@ pub async fn test_single_committer_flow(input: &str, output_path: &str) { let CommitterRegressionOutput { contract_storage_root_hash, compiled_class_root_hash, - storage: StorageObject { - storage: Value::Object(storage_changes), - }, + storage: StorageObject { storage: Value::Object(storage_changes) }, } = serde_json::from_str(&std::fs::read_to_string(output_path).unwrap()).unwrap() else { panic!("Expected the storage to be an object."); diff --git a/crates/committer_cli/src/tests/utils/objects.rs b/crates/committer_cli/src/tests/utils/objects.rs index 7a8273c110..c75d6c1dc1 100644 --- a/crates/committer_cli/src/tests/utils/objects.rs +++ b/crates/committer_cli/src/tests/utils/objects.rs @@ -1,13 +1,30 @@ use indexmap::indexmap; -use starknet_api::{ - block_hash::block_hash_calculator::{TransactionHashingData, TransactionOutputForHash}, - core::{ClassHash, CompiledClassHash, ContractAddress, EthAddress, Nonce, PatriciaKey}, - state::{StorageKey, ThinStateDiff}, - transaction::{ - Event, EventContent, EventData, EventKey, Fee, GasVector, L2ToL1Payload, MessageToL1, - RevertedTransactionExecutionStatus, TransactionExecutionStatus, TransactionHash, - TransactionSignature, - }, +use starknet_api::block_hash::block_hash_calculator::{ + TransactionHashingData, + TransactionOutputForHash, +}; +use starknet_api::core::{ + ClassHash, + CompiledClassHash, + ContractAddress, + EthAddress, + Nonce, + PatriciaKey, +}; +use starknet_api::state::{StorageKey, ThinStateDiff}; +use starknet_api::transaction::{ + Event, + EventContent, + EventData, + EventKey, + Fee, + GasVector, + L2ToL1Payload, + MessageToL1, + RevertedTransactionExecutionStatus, + TransactionExecutionStatus, + TransactionHash, + TransactionSignature, }; use starknet_types_core::felt::Felt; @@ -32,10 +49,7 @@ pub(crate) fn get_transaction_output_for_hash( }, }], execution_status: expected_execution_status, - gas_consumed: GasVector { - l1_gas: 0, - l1_data_gas: 64, - }, + gas_consumed: GasVector { l1_gas: 0, l1_data_gas: 64 }, messages_sent: vec![MessageToL1 { from_address: ContractAddress(PatriciaKey::from(2_u128)), to_address: EthAddress::try_from(Felt::from_bytes_be_slice(&[1_u8])) diff --git a/crates/committer_cli/src/tests/utils/parse_from_python.rs b/crates/committer_cli/src/tests/utils/parse_from_python.rs index 3c574b6eb6..78ace87dac 100644 --- a/crates/committer_cli/src/tests/utils/parse_from_python.rs +++ b/crates/committer_cli/src/tests/utils/parse_from_python.rs @@ -1,17 +1,17 @@ -use crate::parse_input::cast::add_unique; -use crate::parse_input::raw_input::RawStorageEntry; +use std::collections::HashMap; + use committer::block_committer::input::StarknetStorageValue; use committer::felt::Felt; use committer::hash::hash_trait::HashOutput; use committer::patricia_merkle_tree::node_data::leaf::LeafModifications; use committer::patricia_merkle_tree::types::NodeIndex; use committer::storage::map_storage::MapStorage; -use committer::storage::storage_trait::StorageKey; -use committer::storage::storage_trait::StorageValue; +use committer::storage::storage_trait::{StorageKey, StorageValue}; use ethnum::U256; -use serde::Deserialize; -use serde::Deserializer; -use std::collections::HashMap; +use serde::{Deserialize, Deserializer}; + +use crate::parse_input::cast::add_unique; +use crate::parse_input::raw_input::RawStorageEntry; pub struct TreeFlowInput { pub leaf_modifications: LeafModifications, @@ -53,13 +53,8 @@ pub fn parse_input_single_storage_tree_flow_test(input: &HashMap let mut storage = HashMap::new(); for entry in raw_storage { - add_unique( - &mut storage, - "storage", - StorageKey(entry.key), - StorageValue(entry.value), - ) - .unwrap(); + add_unique(&mut storage, "storage", StorageKey(entry.key), StorageValue(entry.value)) + .unwrap(); } let map_storage = MapStorage { storage }; @@ -67,9 +62,5 @@ pub fn parse_input_single_storage_tree_flow_test(input: &HashMap // Fetch root_hash. let root_hash = HashOutput(Felt::from_hex(input.get("root_hash").unwrap()).unwrap()); - TreeFlowInput { - leaf_modifications, - storage: map_storage, - root_hash, - } + TreeFlowInput { leaf_modifications, storage: map_storage, root_hash } } diff --git a/crates/committer_cli/src/tests/utils/random_structs.rs b/crates/committer_cli/src/tests/utils/random_structs.rs index e9f777b102..caf0995b8c 100644 --- a/crates/committer_cli/src/tests/utils/random_structs.rs +++ b/crates/committer_cli/src/tests/utils/random_structs.rs @@ -1,22 +1,31 @@ -use committer::block_committer::input::ContractAddress; -use committer::block_committer::input::StarknetStorageValue; +use std::cmp::min; +use std::collections::HashMap; + +use committer::block_committer::input::{ContractAddress, StarknetStorageValue}; use committer::felt::Felt; use committer::hash::hash_trait::HashOutput; use committer::patricia_merkle_tree::external_test_utils::get_random_u256; use committer::patricia_merkle_tree::filled_tree::forest::FilledForest; -use committer::patricia_merkle_tree::filled_tree::node::ClassHash; -use committer::patricia_merkle_tree::filled_tree::node::CompiledClassHash; -use committer::patricia_merkle_tree::filled_tree::node::FilledNode; -use committer::patricia_merkle_tree::filled_tree::node::Nonce; -use committer::patricia_merkle_tree::filled_tree::tree::ClassesTrie; -use committer::patricia_merkle_tree::filled_tree::tree::ContractsTrie; -use committer::patricia_merkle_tree::filled_tree::tree::StorageTrie; -use committer::patricia_merkle_tree::filled_tree::tree::StorageTrieMap; -use committer::patricia_merkle_tree::node_data::inner_node::BinaryData; -use committer::patricia_merkle_tree::node_data::inner_node::EdgeData; -use committer::patricia_merkle_tree::node_data::inner_node::NodeDataDiscriminants as NodeDataVariants; +use committer::patricia_merkle_tree::filled_tree::node::{ + ClassHash, + CompiledClassHash, + FilledNode, + Nonce, +}; +use committer::patricia_merkle_tree::filled_tree::tree::{ + ClassesTrie, + ContractsTrie, + StorageTrie, + StorageTrieMap, +}; use committer::patricia_merkle_tree::node_data::inner_node::{ - EdgePath, EdgePathLength, NodeData, PathToBottom, + BinaryData, + EdgeData, + EdgePath, + EdgePathLength, + NodeData, + NodeDataDiscriminants as NodeDataVariants, + PathToBottom, }; use committer::patricia_merkle_tree::node_data::leaf::ContractState; use committer::patricia_merkle_tree::types::NodeIndex; @@ -25,8 +34,6 @@ use rand::prelude::IteratorRandom; use rand::Rng; use rand_distr::num_traits::ToPrimitive; use rand_distr::{Distribution, Geometric}; -use std::cmp::min; -use std::collections::HashMap; use strum::IntoEnumIterator; pub trait RandomValue { @@ -74,10 +81,7 @@ impl RandomValue for ContractState { impl RandomValue for BinaryData { fn random(rng: &mut R, max: Option) -> Self { - Self { - left_hash: HashOutput::random(rng, max), - right_hash: HashOutput::random(rng, max), - } + Self { left_hash: HashOutput::random(rng, max), right_hash: HashOutput::random(rng, max) } } } @@ -85,9 +89,10 @@ impl RandomValue for PathToBottom { fn random(rng: &mut R, max: Option) -> Self { // Crate a random path and than calculate the length of the path. let path = EdgePath::random(rng, max); - // TODO(Aviv, 27/6/2024): use a built in function once we migrate to a better big-integer library - // Randomly choose the number of real leading zeros in the path (up to the maximum possible). - // Real leading zero is a zero that refer to a left node, and not a padding zero. + // TODO(Aviv, 27/6/2024): use a built in function once we migrate to a better big-integer + // library Randomly choose the number of real leading zeros in the path (up to the + // maximum possible). Real leading zero is a zero that refer to a left node, and not + // a padding zero. let max_real_leading_zeros = path.0.leading_zeros() - EdgePath::MAX.0.leading_zeros(); let real_leading_zeros = std::cmp::min( Geometric::new(0.5) @@ -164,10 +169,7 @@ macro_rules! random_filled_node { ($leaf:ty) => { impl RandomValue for FilledNode<$leaf> { fn random(rng: &mut R, max: Option) -> Self { - Self { - data: NodeData::random(rng, max), - hash: HashOutput::random(rng, max), - } + Self { data: NodeData::random(rng, max), hash: HashOutput::random(rng, max) } } } }; @@ -195,12 +197,7 @@ macro_rules! random_filled_tree { .as_usize(); let mut nodes: Vec<(NodeIndex, FilledNode<$leaf>)> = (0..max_node_number) - .map(|_| { - ( - NodeIndex::random(rng, max_size), - FilledNode::random(rng, max_size), - ) - }) + .map(|_| (NodeIndex::random(rng, max_size), FilledNode::random(rng, max_size))) .collect(); nodes.push((NodeIndex::ROOT, FilledNode::random(rng, max_size))); @@ -234,20 +231,13 @@ impl DummyRandomValue for FilledForest { let storage_tries: StorageTrieMap = (0..max_trees_number) .map(|_| { - ( - ContractAddress::random(rng, max_size), - StorageTrie::dummy_random(rng, max_size), - ) + (ContractAddress::random(rng, max_size), StorageTrie::dummy_random(rng, max_size)) }) .collect::>(); let contracts_trie = ContractsTrie::dummy_random(rng, max_size); let classes_trie = ClassesTrie::dummy_random(rng, max_size); - Self { - storage_tries, - contracts_trie, - classes_trie, - } + Self { storage_tries, contracts_trie, classes_trie } } } diff --git a/crates/gateway/Cargo.toml b/crates/gateway/Cargo.toml index 0d93cbfdb0..6098c9fb0f 100644 --- a/crates/gateway/Cargo.toml +++ b/crates/gateway/Cargo.toml @@ -3,7 +3,7 @@ edition.workspace = true license.workspace = true name = "starknet_gateway" repository.workspace = true -version.workspace = true +version = "0.0.0" [lints] workspace = true @@ -14,17 +14,17 @@ testing = [] [dependencies] async-trait.workspace = true axum.workspace = true -blockifier= { workspace = true, features = ["testing"] } +blockifier = { path = "../blockifier", version = "0.8.0-rc.0", features = ["testing"] } cairo-lang-starknet-classes.workspace = true cairo-vm.workspace = true hyper.workspace = true num-traits.workspace = true -papyrus_config.workspace = true -papyrus_rpc.workspace = true +papyrus_config = { path = "../papyrus_config", version = "0.4.0-rc.0"} +papyrus_rpc = { path = "../papyrus_rpc", version = "0.4.0-rc.0"} reqwest.workspace = true serde.workspace = true serde_json.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet_mempool_infra = { path = "../mempool_infra", version = "0.0" } starknet_mempool_types = { path = "../mempool_types", version = "0.0" } starknet_sierra_compile = { path = "../starknet_sierra_compile", version = "0.0" } @@ -37,8 +37,8 @@ validator.workspace = true [dev-dependencies] assert_matches.workspace = true +mockito = "1.4.0" mockall.workspace = true -mockito.workspace = true num-bigint.workspace = true pretty_assertions.workspace = true rstest.workspace = true diff --git a/crates/gateway/src/communication.rs b/crates/gateway/src/communication.rs index c3e7b192d8..693bed2399 100644 --- a/crates/gateway/src/communication.rs +++ b/crates/gateway/src/communication.rs @@ -1,5 +1,6 @@ use starknet_mempool_infra::component_server::empty_component_server::{ - create_empty_server, EmptyServer, + create_empty_server, + EmptyServer, }; use crate::gateway::Gateway; diff --git a/crates/gateway/src/compilation.rs b/crates/gateway/src/compilation.rs index e1c4ea2131..6ecec18fe2 100644 --- a/crates/gateway/src/compilation.rs +++ b/crates/gateway/src/compilation.rs @@ -3,11 +3,12 @@ use std::sync::OnceLock; use blockifier::execution::contract_class::{ClassInfo, ContractClass, ContractClassV1}; use cairo_lang_starknet_classes::casm_contract_class::{ - CasmContractClass, CasmContractEntryPoints, + CasmContractClass, + CasmContractEntryPoints, }; use cairo_lang_starknet_classes::contract_class::ContractClass as CairoLangContractClass; use starknet_api::core::CompiledClassHash; -use starknet_api::rpc_transaction::RPCDeclareTransaction; +use starknet_api::rpc_transaction::RpcDeclareTransaction; use starknet_sierra_compile::compile::compile_sierra_to_casm; use starknet_sierra_compile::errors::CompilationUtilError; use starknet_sierra_compile::utils::into_contract_class_for_compilation; @@ -33,9 +34,9 @@ impl GatewayCompiler { /// Assumes the contract class is of a Sierra program which is compiled to Casm. pub fn process_declare_tx( &self, - declare_tx: &RPCDeclareTransaction, + declare_tx: &RpcDeclareTransaction, ) -> GatewayResult { - let RPCDeclareTransaction::V3(tx) = declare_tx; + let RpcDeclareTransaction::V3(tx) = declare_tx; let rpc_contract_class = &tx.contract_class; let cairo_lang_contract_class = into_contract_class_for_compilation(rpc_contract_class); diff --git a/crates/gateway/src/compilation_test.rs b/crates/gateway/src/compilation_test.rs index 913f71857c..9ebe4ab4e4 100644 --- a/crates/gateway/src/compilation_test.rs +++ b/crates/gateway/src/compilation_test.rs @@ -4,7 +4,7 @@ use cairo_lang_starknet_classes::allowed_libfuncs::AllowedLibfuncsError; use mempool_test_utils::starknet_api_test_utils::declare_tx; use rstest::{fixture, rstest}; use starknet_api::core::CompiledClassHash; -use starknet_api::rpc_transaction::{RPCDeclareTransaction, RPCTransaction}; +use starknet_api::rpc_transaction::{RpcDeclareTransaction, RpcTransaction}; use starknet_sierra_compile::errors::CompilationUtilError; use crate::compilation::GatewayCompiler; @@ -20,12 +20,12 @@ fn gateway_compiler() -> GatewayCompiler { fn test_compile_contract_class_compiled_class_hash_mismatch(gateway_compiler: GatewayCompiler) { let mut tx = assert_matches!( declare_tx(), - RPCTransaction::Declare(RPCDeclareTransaction::V3(tx)) => tx + RpcTransaction::Declare(RpcDeclareTransaction::V3(tx)) => tx ); let expected_hash = tx.compiled_class_hash; let wrong_supplied_hash = CompiledClassHash::default(); tx.compiled_class_hash = wrong_supplied_hash; - let declare_tx = RPCDeclareTransaction::V3(tx); + let declare_tx = RpcDeclareTransaction::V3(tx); let result = gateway_compiler.process_declare_tx(&declare_tx); assert_matches!( @@ -39,11 +39,11 @@ fn test_compile_contract_class_compiled_class_hash_mismatch(gateway_compiler: Ga fn test_compile_contract_class_bad_sierra(gateway_compiler: GatewayCompiler) { let mut tx = assert_matches!( declare_tx(), - RPCTransaction::Declare(RPCDeclareTransaction::V3(tx)) => tx + RpcTransaction::Declare(RpcDeclareTransaction::V3(tx)) => tx ); // Truncate the sierra program to trigger an error. tx.contract_class.sierra_program = tx.contract_class.sierra_program[..100].to_vec(); - let declare_tx = RPCDeclareTransaction::V3(tx); + let declare_tx = RpcDeclareTransaction::V3(tx); let result = gateway_compiler.process_declare_tx(&declare_tx); assert_matches!( @@ -58,9 +58,9 @@ fn test_compile_contract_class_bad_sierra(gateway_compiler: GatewayCompiler) { fn test_process_declare_tx_success(gateway_compiler: GatewayCompiler) { let declare_tx = assert_matches!( declare_tx(), - RPCTransaction::Declare(declare_tx) => declare_tx + RpcTransaction::Declare(declare_tx) => declare_tx ); - let RPCDeclareTransaction::V3(declare_tx_v3) = &declare_tx; + let RpcDeclareTransaction::V3(declare_tx_v3) = &declare_tx; let contract_class = &declare_tx_v3.contract_class; let class_info = gateway_compiler.process_declare_tx(&declare_tx).unwrap(); diff --git a/crates/gateway/src/gateway.rs b/crates/gateway/src/gateway.rs index 61c1b4764e..0c4c01596d 100644 --- a/crates/gateway/src/gateway.rs +++ b/crates/gateway/src/gateway.rs @@ -6,7 +6,7 @@ use async_trait::async_trait; use axum::extract::State; use axum::routing::{get, post}; use axum::{Json, Router}; -use starknet_api::rpc_transaction::RPCTransaction; +use starknet_api::rpc_transaction::RpcTransaction; use starknet_api::transaction::TransactionHash; use starknet_mempool_infra::component_runner::{ComponentStartError, ComponentStarter}; use starknet_mempool_types::communication::SharedMempoolClient; @@ -89,7 +89,7 @@ async fn is_alive() -> GatewayResult { #[instrument(skip(app_state))] async fn add_tx( State(app_state): State, - Json(tx): Json, + Json(tx): Json, ) -> GatewayResult> { let mempool_input = tokio::task::spawn_blocking(move || { process_tx( @@ -118,7 +118,7 @@ fn process_tx( stateful_tx_validator: &StatefulTransactionValidator, state_reader_factory: &dyn StateReaderFactory, gateway_compiler: GatewayCompiler, - tx: RPCTransaction, + tx: RpcTransaction, ) -> GatewayResult { // TODO(Arni, 1/5/2024): Perform congestion control. @@ -127,7 +127,7 @@ fn process_tx( // Compile Sierra to Casm. let optional_class_info = match &tx { - RPCTransaction::Declare(declare_tx) => { + RpcTransaction::Declare(declare_tx) => { Some(gateway_compiler.process_declare_tx(declare_tx)?) } _ => None, diff --git a/crates/gateway/src/gateway_test.rs b/crates/gateway/src/gateway_test.rs index d88d55cbb4..8c3b5603da 100644 --- a/crates/gateway/src/gateway_test.rs +++ b/crates/gateway/src/gateway_test.rs @@ -9,14 +9,16 @@ use blockifier::test_utils::CairoVersion; use mempool_test_utils::starknet_api_test_utils::invoke_tx; use mockall::predicate::eq; use starknet_api::core::ContractAddress; -use starknet_api::rpc_transaction::RPCTransaction; +use starknet_api::rpc_transaction::RpcTransaction; use starknet_api::transaction::TransactionHash; use starknet_mempool_types::communication::MockMempoolClient; use starknet_mempool_types::mempool_types::{Account, AccountState, MempoolInput, ThinTransaction}; use crate::compilation::GatewayCompiler; use crate::config::{ - GatewayCompilerConfig, StatefulTransactionValidatorConfig, StatelessTransactionValidatorConfig, + GatewayCompilerConfig, + StatefulTransactionValidatorConfig, + StatelessTransactionValidatorConfig, }; use crate::gateway::{add_tx, AppState, SharedMempoolClient}; use crate::state_reader_test_utils::{local_test_state_reader_factory, TestStateReaderFactory}; @@ -50,10 +52,10 @@ pub fn app_state( type SenderAddress = ContractAddress; -fn create_tx() -> (RPCTransaction, SenderAddress) { +fn create_tx() -> (RpcTransaction, SenderAddress) { let tx = invoke_tx(CairoVersion::Cairo1); let sender_address = match &tx { - RPCTransaction::Invoke(starknet_api::rpc_transaction::RPCInvokeTransaction::V3( + RpcTransaction::Invoke(starknet_api::rpc_transaction::RpcInvokeTransaction::V3( invoke_tx, )) => invoke_tx.sender_address, _ => panic!("Unexpected transaction type"), @@ -91,9 +93,9 @@ async fn to_bytes(res: Response) -> Bytes { res.into_body().collect().await.unwrap().to_bytes() } -fn calculate_hash(external_tx: &RPCTransaction) -> TransactionHash { +fn calculate_hash(external_tx: &RpcTransaction) -> TransactionHash { let optional_class_info = match &external_tx { - RPCTransaction::Declare(_declare_tx) => { + RpcTransaction::Declare(_declare_tx) => { panic!("Declare transactions are not supported in this test") } _ => None, diff --git a/crates/gateway/src/rpc_state_reader.rs b/crates/gateway/src/rpc_state_reader.rs index a5af4fe6df..60fec240bd 100644 --- a/crates/gateway/src/rpc_state_reader.rs +++ b/crates/gateway/src/rpc_state_reader.rs @@ -14,9 +14,17 @@ use starknet_types_core::felt::Felt; use crate::config::RpcStateReaderConfig; use crate::errors::{serde_err_to_state_err, RPCStateReaderError, RPCStateReaderResult}; use crate::rpc_objects::{ - BlockHeader, BlockId, GetBlockWithTxHashesParams, GetClassHashAtParams, - GetCompiledContractClassParams, GetNonceParams, GetStorageAtParams, RpcResponse, - RPC_CLASS_HASH_NOT_FOUND, RPC_ERROR_BLOCK_NOT_FOUND, RPC_ERROR_CONTRACT_ADDRESS_NOT_FOUND, + BlockHeader, + BlockId, + GetBlockWithTxHashesParams, + GetClassHashAtParams, + GetCompiledContractClassParams, + GetNonceParams, + GetStorageAtParams, + RpcResponse, + RPC_CLASS_HASH_NOT_FOUND, + RPC_ERROR_BLOCK_NOT_FOUND, + RPC_ERROR_CONTRACT_ADDRESS_NOT_FOUND, }; use crate::state_reader::{MempoolStateReader, StateReaderFactory}; diff --git a/crates/gateway/src/rpc_state_reader_test.rs b/crates/gateway/src/rpc_state_reader_test.rs index 3596d484d1..af344104a0 100644 --- a/crates/gateway/src/rpc_state_reader_test.rs +++ b/crates/gateway/src/rpc_state_reader_test.rs @@ -10,8 +10,15 @@ use starknet_api::{class_hash, contract_address, felt, patricia_key}; use crate::config::RpcStateReaderConfig; use crate::rpc_objects::{ - BlockHeader, BlockId, GetBlockWithTxHashesParams, GetClassHashAtParams, - GetCompiledContractClassParams, GetNonceParams, GetStorageAtParams, ResourcePrice, RpcResponse, + BlockHeader, + BlockId, + GetBlockWithTxHashesParams, + GetClassHashAtParams, + GetCompiledContractClassParams, + GetNonceParams, + GetStorageAtParams, + ResourcePrice, + RpcResponse, RpcSuccessResponse, }; use crate::rpc_state_reader::RpcStateReader; diff --git a/crates/gateway/src/stateful_transaction_validator.rs b/crates/gateway/src/stateful_transaction_validator.rs index 0d8c06929c..155b2c8e8f 100644 --- a/crates/gateway/src/stateful_transaction_validator.rs +++ b/crates/gateway/src/stateful_transaction_validator.rs @@ -9,7 +9,7 @@ use blockifier::versioned_constants::VersionedConstants; #[cfg(test)] use mockall::automock; use starknet_api::core::{ContractAddress, Nonce}; -use starknet_api::rpc_transaction::{RPCInvokeTransaction, RPCTransaction}; +use starknet_api::rpc_transaction::{RpcInvokeTransaction, RpcTransaction}; use starknet_api::transaction::TransactionHash; use starknet_types_core::felt::Felt; @@ -57,7 +57,7 @@ impl StatefulTransactionValidatorTrait for BlockifierStatefulValidator { impl StatefulTransactionValidator { pub fn run_validate( &self, - external_tx: &RPCTransaction, + external_tx: &RpcTransaction, optional_class_info: Option, mut validator: V, ) -> StatefulTransactionValidatorResult { @@ -104,15 +104,15 @@ impl StatefulTransactionValidator { // Check if validation of an invoke transaction should be skipped due to deploy_account not being // proccessed yet. This feature is used to improve UX for users sending deploy_account + invoke at // once. -fn skip_stateful_validations(tx: &RPCTransaction, account_nonce: Nonce) -> bool { +fn skip_stateful_validations(tx: &RpcTransaction, account_nonce: Nonce) -> bool { match tx { - RPCTransaction::Invoke(RPCInvokeTransaction::V3(tx)) => { + RpcTransaction::Invoke(RpcInvokeTransaction::V3(tx)) => { // check if the transaction nonce is 1, meaning it is post deploy_account, and the // account nonce is zero, meaning the account was not deployed yet. The mempool also // verifies that the deploy_account transaction exists. tx.nonce == Nonce(Felt::ONE) && account_nonce == Nonce(Felt::ZERO) } - RPCTransaction::DeployAccount(_) | RPCTransaction::Declare(_) => false, + RpcTransaction::DeployAccount(_) | RpcTransaction::Declare(_) => false, } } diff --git a/crates/gateway/src/stateful_transaction_validator_test.rs b/crates/gateway/src/stateful_transaction_validator_test.rs index 4dc509fbf6..b8f5e1f4cd 100644 --- a/crates/gateway/src/stateful_transaction_validator_test.rs +++ b/crates/gateway/src/stateful_transaction_validator_test.rs @@ -6,7 +6,11 @@ use blockifier::test_utils::CairoVersion; use blockifier::transaction::errors::{TransactionFeeError, TransactionPreValidationError}; use mempool_test_utils::invoke_tx_args; use mempool_test_utils::starknet_api_test_utils::{ - deploy_account_tx, external_invoke_tx, invoke_tx, TEST_SENDER_ADDRESS, VALID_L1_GAS_MAX_AMOUNT, + deploy_account_tx, + external_invoke_tx, + invoke_tx, + TEST_SENDER_ADDRESS, + VALID_L1_GAS_MAX_AMOUNT, VALID_L1_GAS_MAX_PRICE_PER_UNIT, }; use mockall::predicate::eq; @@ -15,7 +19,7 @@ use pretty_assertions::assert_eq; use rstest::{fixture, rstest}; use starknet_api::core::{ContractAddress, Nonce}; use starknet_api::felt; -use starknet_api::rpc_transaction::RPCTransaction; +use starknet_api::rpc_transaction::RpcTransaction; use starknet_api::transaction::TransactionHash; use starknet_types_core::felt::Felt; @@ -24,10 +28,13 @@ use crate::config::{GatewayCompilerConfig, StatefulTransactionValidatorConfig}; use crate::errors::{StatefulTransactionValidatorError, StatefulTransactionValidatorResult}; use crate::state_reader::{MockStateReaderFactory, StateReaderFactory}; use crate::state_reader_test_utils::{ - local_test_state_reader_factory, TestStateReader, TestStateReaderFactory, + local_test_state_reader_factory, + TestStateReader, + TestStateReaderFactory, }; use crate::stateful_transaction_validator::{ - MockStatefulTransactionValidatorTrait, StatefulTransactionValidator, + MockStatefulTransactionValidatorTrait, + StatefulTransactionValidator, }; #[fixture] @@ -69,12 +76,12 @@ fn stateful_validator(block_context: BlockContext) -> StatefulTransactionValidat )) )] fn test_stateful_tx_validator( - #[case] external_tx: RPCTransaction, + #[case] external_tx: RpcTransaction, #[case] expected_result: StatefulTransactionValidatorResult, stateful_validator: StatefulTransactionValidator, ) { let optional_class_info = match &external_tx { - RPCTransaction::Declare(declare_tx) => Some( + RpcTransaction::Declare(declare_tx) => Some( GatewayCompiler { config: GatewayCompilerConfig {} } .process_declare_tx(declare_tx) .unwrap(), @@ -149,7 +156,7 @@ fn test_instantiate_validator() { )] // TODO(yael 10/7/2024): use mock validator in this test once ready. fn test_skip_stateful_validation( - #[case] external_tx: RPCTransaction, + #[case] external_tx: RpcTransaction, #[case] state_reader_factory: TestStateReaderFactory, #[case] should_pass_validation: bool, stateful_validator: StatefulTransactionValidator, diff --git a/crates/gateway/src/stateless_transaction_validator.rs b/crates/gateway/src/stateless_transaction_validator.rs index 70805ab5eb..3a0b77676b 100644 --- a/crates/gateway/src/stateless_transaction_validator.rs +++ b/crates/gateway/src/stateless_transaction_validator.rs @@ -1,6 +1,9 @@ use starknet_api::rpc_transaction::{ - RPCDeclareTransaction, RPCDeployAccountTransaction, RPCInvokeTransaction, RPCTransaction, ResourceBoundsMapping, + RpcDeclareTransaction, + RpcDeployAccountTransaction, + RpcInvokeTransaction, + RpcTransaction, }; use starknet_api::state::EntryPoint; use starknet_api::transaction::Resource; @@ -20,14 +23,14 @@ pub struct StatelessTransactionValidator { } impl StatelessTransactionValidator { - pub fn validate(&self, tx: &RPCTransaction) -> StatelessTransactionValidatorResult<()> { + pub fn validate(&self, tx: &RpcTransaction) -> StatelessTransactionValidatorResult<()> { // TODO(Arni, 1/5/2024): Add a mechanism that validate the sender address is not blocked. // TODO(Arni, 1/5/2024): Validate transaction version. self.validate_resource_bounds(tx)?; self.validate_tx_size(tx)?; - if let RPCTransaction::Declare(declare_tx) = tx { + if let RpcTransaction::Declare(declare_tx) = tx { self.validate_declare_tx(declare_tx)?; } Ok(()) @@ -35,7 +38,7 @@ impl StatelessTransactionValidator { fn validate_resource_bounds( &self, - tx: &RPCTransaction, + tx: &RpcTransaction, ) -> StatelessTransactionValidatorResult<()> { let resource_bounds_mapping = tx.resource_bounds(); @@ -49,7 +52,7 @@ impl StatelessTransactionValidator { Ok(()) } - fn validate_tx_size(&self, tx: &RPCTransaction) -> StatelessTransactionValidatorResult<()> { + fn validate_tx_size(&self, tx: &RpcTransaction) -> StatelessTransactionValidatorResult<()> { self.validate_tx_calldata_size(tx)?; self.validate_tx_signature_size(tx)?; @@ -58,17 +61,17 @@ impl StatelessTransactionValidator { fn validate_tx_calldata_size( &self, - tx: &RPCTransaction, + tx: &RpcTransaction, ) -> StatelessTransactionValidatorResult<()> { let calldata = match tx { - RPCTransaction::Declare(_) => { + RpcTransaction::Declare(_) => { // Declare transaction has no calldata. return Ok(()); } - RPCTransaction::DeployAccount(RPCDeployAccountTransaction::V3(tx)) => { + RpcTransaction::DeployAccount(RpcDeployAccountTransaction::V3(tx)) => { &tx.constructor_calldata } - RPCTransaction::Invoke(RPCInvokeTransaction::V3(tx)) => &tx.calldata, + RpcTransaction::Invoke(RpcInvokeTransaction::V3(tx)) => &tx.calldata, }; let calldata_length = calldata.0.len(); @@ -84,7 +87,7 @@ impl StatelessTransactionValidator { fn validate_tx_signature_size( &self, - tx: &RPCTransaction, + tx: &RpcTransaction, ) -> StatelessTransactionValidatorResult<()> { let signature = tx.signature(); @@ -101,10 +104,10 @@ impl StatelessTransactionValidator { fn validate_declare_tx( &self, - declare_tx: &RPCDeclareTransaction, + declare_tx: &RpcDeclareTransaction, ) -> StatelessTransactionValidatorResult<()> { let contract_class = match declare_tx { - RPCDeclareTransaction::V3(tx) => &tx.contract_class, + RpcDeclareTransaction::V3(tx) => &tx.contract_class, }; self.validate_sierra_version(&contract_class.sierra_program)?; self.validate_class_length(contract_class)?; diff --git a/crates/gateway/src/stateless_transaction_validator_test.rs b/crates/gateway/src/stateless_transaction_validator_test.rs index 0d14f63213..7839914453 100644 --- a/crates/gateway/src/stateless_transaction_validator_test.rs +++ b/crates/gateway/src/stateless_transaction_validator_test.rs @@ -3,8 +3,12 @@ use std::vec; use assert_matches::assert_matches; use mempool_test_utils::declare_tx_args; use mempool_test_utils::starknet_api_test_utils::{ - create_resource_bounds_mapping, external_declare_tx, external_tx_for_testing, - zero_resource_bounds_mapping, TransactionType, NON_EMPTY_RESOURCE_BOUNDS, + create_resource_bounds_mapping, + external_declare_tx, + external_tx_for_testing, + zero_resource_bounds_mapping, + TransactionType, + NON_EMPTY_RESOURCE_BOUNDS, }; use rstest::rstest; use starknet_api::core::EntryPointSelector; @@ -18,7 +22,8 @@ use crate::compiler_version::{VersionId, VersionIdError}; use crate::config::StatelessTransactionValidatorConfig; use crate::errors::StatelessTransactionValidatorResult; use crate::stateless_transaction_validator::{ - StatelessTransactionValidator, StatelessTransactionValidatorError, + StatelessTransactionValidator, + StatelessTransactionValidatorError, }; use crate::test_utils::create_sierra_program; diff --git a/crates/gateway/src/utils.rs b/crates/gateway/src/utils.rs index 10af934066..bc3c99de0e 100644 --- a/crates/gateway/src/utils.rs +++ b/crates/gateway/src/utils.rs @@ -7,11 +7,21 @@ use blockifier::transaction::transactions::{ }; use starknet_api::core::{calculate_contract_address, ChainId, ClassHash, ContractAddress, Nonce}; use starknet_api::rpc_transaction::{ - RPCDeclareTransaction, RPCDeployAccountTransaction, RPCInvokeTransaction, RPCTransaction, + RpcDeclareTransaction, + RpcDeployAccountTransaction, + RpcInvokeTransaction, + RpcTransaction, }; use starknet_api::transaction::{ - DeclareTransaction, DeclareTransactionV3, DeployAccountTransaction, DeployAccountTransactionV3, - InvokeTransaction, InvokeTransactionV3, Tip, TransactionHash, TransactionHasher, + DeclareTransaction, + DeclareTransactionV3, + DeployAccountTransaction, + DeployAccountTransactionV3, + InvokeTransaction, + InvokeTransactionV3, + Tip, + TransactionHash, + TransactionHasher, }; use starknet_mempool_types::mempool_types::ThinTransaction; @@ -25,21 +35,21 @@ macro_rules! implement_ref_getters { ($(($member_name:ident, $member_type:ty));* $(;)?) => { $(fn $member_name(&self) -> &$member_type { match self { - starknet_api::rpc_transaction::RPCTransaction::Declare( - starknet_api::rpc_transaction::RPCDeclareTransaction::V3(tx) + starknet_api::rpc_transaction::RpcTransaction::Declare( + starknet_api::rpc_transaction::RpcDeclareTransaction::V3(tx) ) => &tx.$member_name, - starknet_api::rpc_transaction::RPCTransaction::DeployAccount( - starknet_api::rpc_transaction::RPCDeployAccountTransaction::V3(tx) + starknet_api::rpc_transaction::RpcTransaction::DeployAccount( + starknet_api::rpc_transaction::RpcDeployAccountTransaction::V3(tx) ) => &tx.$member_name, - starknet_api::rpc_transaction::RPCTransaction::Invoke( - starknet_api::rpc_transaction::RPCInvokeTransaction::V3(tx) + starknet_api::rpc_transaction::RpcTransaction::Invoke( + starknet_api::rpc_transaction::RpcInvokeTransaction::V3(tx) ) => &tx.$member_name, } })* }; } -impl RPCTransactionExt for RPCTransaction { +impl RpcTransactionExt for RpcTransaction { implement_ref_getters!( (nonce, Nonce); (tip, Tip) @@ -47,7 +57,7 @@ impl RPCTransactionExt for RPCTransaction { } pub fn external_tx_to_thin_tx( - external_tx: &RPCTransaction, + external_tx: &RpcTransaction, tx_hash: TransactionHash, ) -> ThinTransaction { ThinTransaction { @@ -58,32 +68,32 @@ pub fn external_tx_to_thin_tx( } } -pub fn get_sender_address(tx: &RPCTransaction) -> ContractAddress { +pub fn get_sender_address(tx: &RpcTransaction) -> ContractAddress { match tx { - RPCTransaction::Declare(RPCDeclareTransaction::V3(tx)) => tx.sender_address, + RpcTransaction::Declare(RpcDeclareTransaction::V3(tx)) => tx.sender_address, // TODO(Mohammad): Add support for deploy account. - RPCTransaction::DeployAccount(RPCDeployAccountTransaction::V3(_)) => { + RpcTransaction::DeployAccount(RpcDeployAccountTransaction::V3(_)) => { ContractAddress::default() } - RPCTransaction::Invoke(RPCInvokeTransaction::V3(tx)) => tx.sender_address, + RpcTransaction::Invoke(RpcInvokeTransaction::V3(tx)) => tx.sender_address, } } // TODO(Mohammad): Remove this trait once it is implemented in StarkNet API. #[allow(dead_code)] -pub trait RPCTransactionExt { +pub trait RpcTransactionExt { fn nonce(&self) -> &Nonce; fn tip(&self) -> &Tip; } pub fn external_tx_to_account_tx( - external_tx: &RPCTransaction, + external_tx: &RpcTransaction, // FIXME(yael 15/4/24): calculate class_info inside the function once compilation code is ready optional_class_info: Option, chain_id: &ChainId, ) -> StatefulTransactionValidatorResult { match external_tx { - RPCTransaction::Declare(RPCDeclareTransaction::V3(tx)) => { + RpcTransaction::Declare(RpcDeclareTransaction::V3(tx)) => { let declare_tx = DeclareTransaction::V3(DeclareTransactionV3 { class_hash: ClassHash::default(), /* FIXME(yael 15/4/24): call the starknet-api * function once ready */ @@ -104,7 +114,7 @@ pub fn external_tx_to_account_tx( let declare_tx = BlockifierDeclareTransaction::new(declare_tx, tx_hash, class_info)?; Ok(AccountTransaction::Declare(declare_tx)) } - RPCTransaction::DeployAccount(RPCDeployAccountTransaction::V3(tx)) => { + RpcTransaction::DeployAccount(RpcDeployAccountTransaction::V3(tx)) => { let deploy_account_tx = DeployAccountTransaction::V3(DeployAccountTransactionV3 { resource_bounds: tx.resource_bounds.clone().into(), tip: tx.tip, @@ -132,7 +142,7 @@ pub fn external_tx_to_account_tx( ); Ok(AccountTransaction::DeployAccount(deploy_account_tx)) } - RPCTransaction::Invoke(RPCInvokeTransaction::V3(tx)) => { + RpcTransaction::Invoke(RpcInvokeTransaction::V3(tx)) => { let invoke_tx = InvokeTransaction::V3(InvokeTransactionV3 { resource_bounds: tx.resource_bounds.clone().into(), tip: tx.tip, diff --git a/crates/mempool/Cargo.toml b/crates/mempool/Cargo.toml index 3c79703cff..93ae59475e 100644 --- a/crates/mempool/Cargo.toml +++ b/crates/mempool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true @@ -12,7 +12,7 @@ workspace = true async-trait.workspace = true derive_more.workspace = true starknet_mempool_infra = { path = "../mempool_infra", version = "0.0" } -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet_mempool_types = { path = "../mempool_types", version = "0.0" } tokio.workspace = true @@ -22,5 +22,5 @@ itertools.workspace = true pretty_assertions.workspace = true rstest.workspace = true starknet-types-core.workspace = true -starknet_api = { workspace = true, features = ["testing"] } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } tokio.workspace = true diff --git a/crates/mempool/src/communication.rs b/crates/mempool/src/communication.rs index 225498700d..3da9a07094 100644 --- a/crates/mempool/src/communication.rs +++ b/crates/mempool/src/communication.rs @@ -3,7 +3,9 @@ use starknet_mempool_infra::component_definitions::ComponentRequestHandler; use starknet_mempool_infra::component_runner::ComponentStarter; use starknet_mempool_infra::component_server::local_component_server::LocalComponentServer; use starknet_mempool_types::communication::{ - MempoolRequest, MempoolRequestAndResponseSender, MempoolResponse, + MempoolRequest, + MempoolRequestAndResponseSender, + MempoolResponse, }; use starknet_mempool_types::mempool_types::{MempoolInput, MempoolResult, ThinTransaction}; use tokio::sync::mpsc::Receiver; diff --git a/crates/mempool/src/mempool.rs b/crates/mempool/src/mempool.rs index d6ee638272..744571ef72 100644 --- a/crates/mempool/src/mempool.rs +++ b/crates/mempool/src/mempool.rs @@ -4,7 +4,11 @@ use starknet_api::core::{ContractAddress, Nonce}; use starknet_api::transaction::{Tip, TransactionHash}; use starknet_mempool_types::errors::MempoolError; use starknet_mempool_types::mempool_types::{ - Account, AccountState, MempoolInput, MempoolResult, ThinTransaction, + Account, + AccountState, + MempoolInput, + MempoolResult, + ThinTransaction, }; use crate::transaction_pool::TransactionPool; diff --git a/crates/mempool_infra/Cargo.toml b/crates/mempool_infra/Cargo.toml index c65396a3cd..e6afcb6cb5 100644 --- a/crates/mempool_infra/Cargo.toml +++ b/crates/mempool_infra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool_infra" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/mempool_infra/src/component_server/remote_component_server.rs b/crates/mempool_infra/src/component_server/remote_component_server.rs index 3146b9d1eb..0a3b1bd3d2 100644 --- a/crates/mempool_infra/src/component_server/remote_component_server.rs +++ b/crates/mempool_infra/src/component_server/remote_component_server.rs @@ -13,7 +13,9 @@ use tokio::sync::Mutex; use super::definitions::ComponentServerStarter; use crate::component_definitions::{ - ComponentRequestHandler, ServerError, APPLICATION_OCTET_STREAM, + ComponentRequestHandler, + ServerError, + APPLICATION_OCTET_STREAM, }; pub struct RemoteComponentServer diff --git a/crates/mempool_infra/tests/component_server_client_http_test.rs b/crates/mempool_infra/tests/component_server_client_http_test.rs index 657039793a..f7a791e882 100644 --- a/crates/mempool_infra/tests/component_server_client_http_test.rs +++ b/crates/mempool_infra/tests/component_server_client_http_test.rs @@ -5,8 +5,14 @@ use std::net::{IpAddr, Ipv6Addr, SocketAddr}; use async_trait::async_trait; use bincode::{deserialize, serialize}; use common::{ - ComponentAClientTrait, ComponentARequest, ComponentAResponse, ComponentBClientTrait, - ComponentBRequest, ComponentBResponse, ResultA, ResultB, + ComponentAClientTrait, + ComponentARequest, + ComponentAResponse, + ComponentBClientTrait, + ComponentBRequest, + ComponentBResponse, + ResultA, + ResultB, }; use hyper::body::to_bytes; use hyper::header::CONTENT_TYPE; @@ -17,7 +23,9 @@ use serde::Serialize; use starknet_mempool_infra::component_client::definitions::{ClientError, ClientResult}; use starknet_mempool_infra::component_client::remote_component_client::RemoteComponentClient; use starknet_mempool_infra::component_definitions::{ - ComponentRequestHandler, ServerError, APPLICATION_OCTET_STREAM, + ComponentRequestHandler, + ServerError, + APPLICATION_OCTET_STREAM, }; use starknet_mempool_infra::component_server::definitions::ComponentServerStarter; use starknet_mempool_infra::component_server::remote_component_server::RemoteComponentServer; diff --git a/crates/mempool_infra/tests/component_server_client_test.rs b/crates/mempool_infra/tests/component_server_client_test.rs index 38334c9737..f50418278f 100644 --- a/crates/mempool_infra/tests/component_server_client_test.rs +++ b/crates/mempool_infra/tests/component_server_client_test.rs @@ -2,13 +2,20 @@ mod common; use async_trait::async_trait; use common::{ - ComponentAClientTrait, ComponentARequest, ComponentAResponse, ComponentBClientTrait, - ComponentBRequest, ComponentBResponse, ResultA, ResultB, + ComponentAClientTrait, + ComponentARequest, + ComponentAResponse, + ComponentBClientTrait, + ComponentBRequest, + ComponentBResponse, + ResultA, + ResultB, }; use starknet_mempool_infra::component_client::definitions::{ClientError, ClientResult}; use starknet_mempool_infra::component_client::local_component_client::LocalComponentClient; use starknet_mempool_infra::component_definitions::{ - ComponentRequestAndResponseSender, ComponentRequestHandler, + ComponentRequestAndResponseSender, + ComponentRequestHandler, }; use starknet_mempool_infra::component_server::definitions::ComponentServerStarter; use starknet_mempool_infra::component_server::local_component_server::LocalComponentServer; diff --git a/crates/mempool_node/Cargo.toml b/crates/mempool_node/Cargo.toml index a4b5626280..5a0bca6baa 100644 --- a/crates/mempool_node/Cargo.toml +++ b/crates/mempool_node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool_node" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true @@ -13,7 +13,7 @@ anyhow.workspace = true clap.workspace = true const_format.workspace = true futures.workspace = true -papyrus_config.workspace = true +papyrus_config = { path = "../papyrus_config", version = "0.4.0-rc.0"} serde.workspace = true starknet_gateway = { path = "../gateway", version = "0.0" } starknet_mempool = { path = "../mempool", version = "0.0" } diff --git a/crates/mempool_node/src/bin/dump_config.rs b/crates/mempool_node/src/bin/mempool_dump_config.rs similarity index 87% rename from crates/mempool_node/src/bin/dump_config.rs rename to crates/mempool_node/src/bin/mempool_dump_config.rs index 83ce80d970..9eaebbcb69 100644 --- a/crates/mempool_node/src/bin/dump_config.rs +++ b/crates/mempool_node/src/bin/mempool_dump_config.rs @@ -2,7 +2,7 @@ use papyrus_config::dumping::SerializeConfig; use starknet_mempool_node::config::{MempoolNodeConfig, DEFAULT_CONFIG_PATH}; /// Updates the default config file by: -/// cargo run --bin dump_config -q +/// cargo run --bin mempool_dump_config -q fn main() { MempoolNodeConfig::default() .dump_to_file(&vec![], DEFAULT_CONFIG_PATH) diff --git a/crates/mempool_node/src/communication.rs b/crates/mempool_node/src/communication.rs index ea532e0079..f8dfbb4fdf 100644 --- a/crates/mempool_node/src/communication.rs +++ b/crates/mempool_node/src/communication.rs @@ -2,7 +2,9 @@ use std::sync::Arc; use starknet_mempool_infra::component_definitions::ComponentCommunication; use starknet_mempool_types::communication::{ - MempoolClientImpl, MempoolRequestAndResponseSender, SharedMempoolClient, + MempoolClientImpl, + MempoolRequestAndResponseSender, + SharedMempoolClient, }; use tokio::sync::mpsc::{channel, Receiver, Sender}; diff --git a/crates/mempool_node/src/config/config_test.rs b/crates/mempool_node/src/config/config_test.rs index a6a15da976..34c2f44d46 100644 --- a/crates/mempool_node/src/config/config_test.rs +++ b/crates/mempool_node/src/config/config_test.rs @@ -10,7 +10,10 @@ use papyrus_config::validators::{ParsedValidationError, ParsedValidationErrors}; use validator::Validate; use crate::config::{ - ComponentConfig, ComponentExecutionConfig, MempoolNodeConfig, DEFAULT_CONFIG_PATH, + ComponentConfig, + ComponentExecutionConfig, + MempoolNodeConfig, + DEFAULT_CONFIG_PATH, }; /// Test the validation of the struct ComponentConfig. @@ -52,7 +55,7 @@ fn test_components_config_validation() { /// Test the validation of the struct MempoolNodeConfig and that the default config file is up to /// date. To update the default config file, run: -/// cargo run --bin dump_config -q +/// cargo run --bin mempool_dump_config -q #[test] fn default_config_file_is_up_to_date() { let default_config = MempoolNodeConfig::default(); @@ -66,7 +69,7 @@ fn default_config_file_is_up_to_date() { println!( "{}", "Default config file doesn't match the default NodeConfig implementation. Please update \ - it using the dump_config binary." + it using the mempool_dump_config binary." .purple() .bold() ); diff --git a/crates/mempool_node/src/config/mod.rs b/crates/mempool_node/src/config/mod.rs index 3533d6a81c..3fa5c715c7 100644 --- a/crates/mempool_node/src/config/mod.rs +++ b/crates/mempool_node/src/config/mod.rs @@ -16,7 +16,7 @@ use validator::{Validate, ValidationError}; use crate::version::VERSION_FULL; // The path of the default configuration file, provided as part of the crate. -pub const DEFAULT_CONFIG_PATH: &str = "config/mempool_default_config.json"; +pub const DEFAULT_CONFIG_PATH: &str = "config/mempool/default_config.json"; /// The single crate configuration. #[derive(Clone, Debug, Serialize, Deserialize, Validate, PartialEq)] diff --git a/crates/mempool_test_utils/Cargo.toml b/crates/mempool_test_utils/Cargo.toml index 4385ec6cdc..9e6f31d4f8 100644 --- a/crates/mempool_test_utils/Cargo.toml +++ b/crates/mempool_test_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mempool_test_utils" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true @@ -9,9 +9,9 @@ license.workspace = true [dependencies] assert_matches.workspace = true -blockifier = { workspace = true, features = ["testing"] } +blockifier = { path = "../blockifier", version = "0.8.0-rc.0", features = ["testing"]} starknet-types-core.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} serde_json.workspace = true diff --git a/crates/mempool_test_utils/src/starknet_api_test_utils.rs b/crates/mempool_test_utils/src/starknet_api_test_utils.rs index 4f5cbce211..42132b5af2 100644 --- a/crates/mempool_test_utils/src/starknet_api_test_utils.rs +++ b/crates/mempool_test_utils/src/starknet_api_test_utils.rs @@ -10,23 +10,43 @@ use blockifier::test_utils::contracts::FeatureContract; use blockifier::test_utils::{create_trivial_calldata, CairoVersion, NonceManager}; use serde_json::to_string_pretty; use starknet_api::core::{ - calculate_contract_address, ClassHash, CompiledClassHash, ContractAddress, Nonce, + calculate_contract_address, + ClassHash, + CompiledClassHash, + ContractAddress, + Nonce, }; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::rpc_transaction::{ - ContractClass, RPCDeclareTransactionV3, RPCDeployAccountTransaction, - RPCDeployAccountTransactionV3, RPCInvokeTransactionV3, RPCTransaction, ResourceBoundsMapping, + ContractClass, + ResourceBoundsMapping, + RpcDeclareTransactionV3, + RpcDeployAccountTransaction, + RpcDeployAccountTransactionV3, + RpcInvokeTransactionV3, + RpcTransaction, }; use starknet_api::transaction::{ - AccountDeploymentData, Calldata, ContractAddressSalt, PaymasterData, ResourceBounds, Tip, - TransactionSignature, TransactionVersion, + AccountDeploymentData, + Calldata, + ContractAddressSalt, + PaymasterData, + ResourceBounds, + Tip, + TransactionSignature, + TransactionVersion, }; use starknet_api::{calldata, felt}; use starknet_types_core::felt::Felt; use crate::{ - declare_tx_args, deploy_account_tx_args, get_absolute_path, invoke_tx_args, - COMPILED_CLASS_HASH_OF_CONTRACT_CLASS, CONTRACT_CLASS_FILE, TEST_FILES_FOLDER, + declare_tx_args, + deploy_account_tx_args, + get_absolute_path, + invoke_tx_args, + COMPILED_CLASS_HASH_OF_CONTRACT_CLASS, + CONTRACT_CLASS_FILE, + TEST_FILES_FOLDER, }; pub const VALID_L1_GAS_MAX_AMOUNT: u64 = 203484; @@ -45,7 +65,7 @@ pub fn external_tx_for_testing( resource_bounds: ResourceBoundsMapping, calldata: Calldata, signature: TransactionSignature, -) -> RPCTransaction { +) -> RpcTransaction { match tx_type { TransactionType::Declare => { // Minimal contract class. @@ -102,7 +122,7 @@ pub fn compiled_class_hash() -> CompiledClassHash { CompiledClassHash(felt!(COMPILED_CLASS_HASH_OF_CONTRACT_CLASS)) } -pub fn declare_tx() -> RPCTransaction { +pub fn declare_tx() -> RpcTransaction { let contract_class = contract_class(); let compiled_class_hash = compiled_class_hash(); @@ -123,7 +143,7 @@ pub fn declare_tx() -> RPCTransaction { // Convenience method for generating a single invoke transaction with trivial fields. // For multiple, nonce-incrementing transactions, use the transaction generator directly. -pub fn invoke_tx(cairo_version: CairoVersion) -> RPCTransaction { +pub fn invoke_tx(cairo_version: CairoVersion) -> RpcTransaction { let default_account = FeatureContract::AccountWithoutValidations(cairo_version); MultiAccountTransactionGenerator::new_for_account_contracts([default_account]) @@ -132,7 +152,7 @@ pub fn invoke_tx(cairo_version: CairoVersion) -> RPCTransaction { } // TODO(Yael 18/6/2024): Get a final decision from product whether to support Cairo0. -pub fn deploy_account_tx() -> RPCTransaction { +pub fn deploy_account_tx() -> RpcTransaction { let default_account = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1); MultiAccountTransactionGenerator::new_for_account_contracts([default_account]) @@ -228,8 +248,8 @@ pub struct AccountTransactionGenerator { } impl AccountTransactionGenerator { - /// Generate a valid `RPCTransaction` with default parameters. - pub fn generate_default_invoke(&mut self) -> RPCTransaction { + /// Generate a valid `RpcTransaction` with default parameters. + pub fn generate_default_invoke(&mut self) -> RpcTransaction { let invoke_args = invoke_tx_args!( sender_address: self.sender_address(), resource_bounds: executable_resource_bounds_mapping(), @@ -239,7 +259,7 @@ impl AccountTransactionGenerator { external_invoke_tx(invoke_args) } - pub fn generate_default_deploy_account(&mut self) -> RPCTransaction { + pub fn generate_default_deploy_account(&mut self) -> RpcTransaction { let nonce = self.next_nonce(); assert_eq!(nonce, Nonce(Felt::ZERO)); @@ -257,15 +277,16 @@ impl AccountTransactionGenerator { FeatureContract::TestContract(cairo_version).get_instance_address(0) } - /// Generates an `RPCTransaction` with fully custom parameters. + /// Generates an `RpcTransaction` with fully custom parameters. /// /// Caller must manually handle bumping nonce and fetching the correct sender address via - /// [AccountTransactionGenerator::nonce] and [AccountTransactionGenerator::sender_address]. - /// See [AccountTransactionGenerator::generate_default] to have these filled up by default. + /// [AccountTransactionGenerator::next_nonce] and [AccountTransactionGenerator::sender_address]. + /// See [AccountTransactionGenerator::generate_default_invoke] to have these filled up by + /// default. /// /// Note: This is a best effort attempt to make the API more useful; amend or add new methods /// as needed. - pub fn generate_raw(&mut self, invoke_tx_args: InvokeTxArgs) -> RPCTransaction { + pub fn generate_raw(&mut self, invoke_tx_args: InvokeTxArgs) -> RpcTransaction { external_invoke_tx(invoke_tx_args) } @@ -431,13 +452,13 @@ impl Default for DeclareTxArgs { } } -pub fn external_invoke_tx(invoke_args: InvokeTxArgs) -> RPCTransaction { +pub fn external_invoke_tx(invoke_args: InvokeTxArgs) -> RpcTransaction { if invoke_args.version != TransactionVersion::THREE { panic!("Unsupported transaction version: {:?}.", invoke_args.version); } - starknet_api::rpc_transaction::RPCTransaction::Invoke( - starknet_api::rpc_transaction::RPCInvokeTransaction::V3(RPCInvokeTransactionV3 { + starknet_api::rpc_transaction::RpcTransaction::Invoke( + starknet_api::rpc_transaction::RpcInvokeTransaction::V3(RpcInvokeTransactionV3 { resource_bounds: invoke_args.resource_bounds, tip: invoke_args.tip, calldata: invoke_args.calldata, @@ -452,14 +473,14 @@ pub fn external_invoke_tx(invoke_args: InvokeTxArgs) -> RPCTransaction { ) } -pub fn external_deploy_account_tx(deploy_tx_args: DeployAccountTxArgs) -> RPCTransaction { +pub fn external_deploy_account_tx(deploy_tx_args: DeployAccountTxArgs) -> RpcTransaction { if deploy_tx_args.version != TransactionVersion::THREE { panic!("Unsupported transaction version: {:?}.", deploy_tx_args.version); } - starknet_api::rpc_transaction::RPCTransaction::DeployAccount( - starknet_api::rpc_transaction::RPCDeployAccountTransaction::V3( - RPCDeployAccountTransactionV3 { + starknet_api::rpc_transaction::RpcTransaction::DeployAccount( + starknet_api::rpc_transaction::RpcDeployAccountTransaction::V3( + RpcDeployAccountTransactionV3 { resource_bounds: deploy_tx_args.resource_bounds, tip: deploy_tx_args.tip, contract_address_salt: deploy_tx_args.contract_address_salt, @@ -475,13 +496,13 @@ pub fn external_deploy_account_tx(deploy_tx_args: DeployAccountTxArgs) -> RPCTra ) } -pub fn external_declare_tx(declare_tx_args: DeclareTxArgs) -> RPCTransaction { +pub fn external_declare_tx(declare_tx_args: DeclareTxArgs) -> RpcTransaction { if declare_tx_args.version != TransactionVersion::THREE { panic!("Unsupported transaction version: {:?}.", declare_tx_args.version); } - starknet_api::rpc_transaction::RPCTransaction::Declare( - starknet_api::rpc_transaction::RPCDeclareTransaction::V3(RPCDeclareTransactionV3 { + starknet_api::rpc_transaction::RpcTransaction::Declare( + starknet_api::rpc_transaction::RpcDeclareTransaction::V3(RpcDeclareTransactionV3 { contract_class: declare_tx_args.contract_class, signature: declare_tx_args.signature, sender_address: declare_tx_args.sender_address, @@ -497,15 +518,15 @@ pub fn external_declare_tx(declare_tx_args: DeclareTxArgs) -> RPCTransaction { ) } -pub fn external_tx_to_json(tx: &RPCTransaction) -> String { +pub fn external_tx_to_json(tx: &RpcTransaction) -> String { let mut tx_json = serde_json::to_value(tx) .unwrap_or_else(|tx| panic!("Failed to serialize transaction: {tx:?}")); // Add type and version manually let type_string = match tx { - RPCTransaction::Declare(_) => "DECLARE", - RPCTransaction::DeployAccount(_) => "DEPLOY_ACCOUNT", - RPCTransaction::Invoke(_) => "INVOKE", + RpcTransaction::Declare(_) => "DECLARE", + RpcTransaction::DeployAccount(_) => "DEPLOY_ACCOUNT", + RpcTransaction::Invoke(_) => "INVOKE", }; tx_json @@ -517,10 +538,10 @@ pub fn external_tx_to_json(tx: &RPCTransaction) -> String { to_string_pretty(&tx_json).expect("Failed to serialize transaction") } -pub fn deployed_account_contract_address(deploy_tx: &RPCTransaction) -> ContractAddress { +pub fn deployed_account_contract_address(deploy_tx: &RpcTransaction) -> ContractAddress { let tx = assert_matches!( deploy_tx, - RPCTransaction::DeployAccount(RPCDeployAccountTransaction::V3(tx)) => tx + RpcTransaction::DeployAccount(RpcDeployAccountTransaction::V3(tx)) => tx ); calculate_contract_address( tx.contract_address_salt, diff --git a/crates/mempool_types/Cargo.toml b/crates/mempool_types/Cargo.toml index 3bad738b07..17671d9519 100644 --- a/crates/mempool_types/Cargo.toml +++ b/crates/mempool_types/Cargo.toml @@ -3,14 +3,14 @@ name = "starknet_mempool_types" edition.workspace = true license.workspace = true repository.workspace = true -version.workspace = true +version = "0.0.0" [lints] workspace = true [dependencies] async-trait.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} mockall.workspace = true -starknet_api.workspace = true starknet_mempool_infra = { path = "../mempool_infra" } thiserror.workspace = true diff --git a/crates/native_blockifier/Cargo.toml b/crates/native_blockifier/Cargo.toml index b6085a5dee..46c7a8528b 100644 --- a/crates/native_blockifier/Cargo.toml +++ b/crates/native_blockifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "native_blockifier" -version.workspace = true +version = "0.8.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -33,13 +33,13 @@ cairo-vm.workspace = true indexmap.workspace = true log.workspace = true num-bigint.workspace = true -papyrus_storage = { workspace = true, features = ["testing"] } +papyrus_storage = { path = "../papyrus_storage", version = "0.4.0-rc.0", features = ["testing"] } pyo3 = { workspace = true, features = ["hashbrown", "num-bigint"] } pyo3-log.workspace = true serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } starknet-types-core.workspace = true -starknet_api = { workspace = true, features = ["testing"] } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } thiserror.workspace = true [dev-dependencies] diff --git a/crates/native_blockifier/src/errors.rs b/crates/native_blockifier/src/errors.rs index 38149fc271..8baaf272fe 100644 --- a/crates/native_blockifier/src/errors.rs +++ b/crates/native_blockifier/src/errors.rs @@ -4,7 +4,9 @@ use blockifier::bouncer::BuiltinCount; use blockifier::execution::errors::ContractClassError; use blockifier::state::errors::StateError; use blockifier::transaction::errors::{ - ParseError, TransactionExecutionError, TransactionPreValidationError, + ParseError, + TransactionExecutionError, + TransactionPreValidationError, }; use blockifier::transaction::transaction_types::TransactionType; use cairo_vm::types::errors::program_errors::ProgramError; diff --git a/crates/native_blockifier/src/lib.rs b/crates/native_blockifier/src/lib.rs index 1ae8dd5464..539b13673f 100644 --- a/crates/native_blockifier/src/lib.rs +++ b/crates/native_blockifier/src/lib.rs @@ -36,7 +36,8 @@ use crate::py_objects::PyVersionedConstantsOverrides; use crate::py_state_diff::PyStateDiff; use crate::py_testing_wrappers::{ estimate_casm_hash_computation_resources_for_testing_list, - estimate_casm_hash_computation_resources_for_testing_single, raise_error_for_testing, + estimate_casm_hash_computation_resources_for_testing_single, + raise_error_for_testing, }; #[pymodule] diff --git a/crates/native_blockifier/src/py_declare.rs b/crates/native_blockifier/src/py_declare.rs index ff62737aab..eb0988a3c8 100644 --- a/crates/native_blockifier/src/py_declare.rs +++ b/crates/native_blockifier/src/py_declare.rs @@ -6,8 +6,16 @@ use pyo3::prelude::*; use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - AccountDeploymentData, DeclareTransactionV0V1, DeclareTransactionV2, DeclareTransactionV3, Fee, - PaymasterData, ResourceBoundsMapping, Tip, TransactionHash, TransactionSignature, + AccountDeploymentData, + DeclareTransactionV0V1, + DeclareTransactionV2, + DeclareTransactionV3, + Fee, + PaymasterData, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionSignature, }; use starknet_types_core::felt::Felt; diff --git a/crates/native_blockifier/src/py_deploy_account.rs b/crates/native_blockifier/src/py_deploy_account.rs index 06cad45d3f..2b2833472a 100644 --- a/crates/native_blockifier/src/py_deploy_account.rs +++ b/crates/native_blockifier/src/py_deploy_account.rs @@ -6,8 +6,16 @@ use pyo3::prelude::*; use starknet_api::core::{ClassHash, ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, DeployAccountTransactionV1, DeployAccountTransactionV3, Fee, - PaymasterData, ResourceBoundsMapping, Tip, TransactionHash, TransactionSignature, + Calldata, + ContractAddressSalt, + DeployAccountTransactionV1, + DeployAccountTransactionV3, + Fee, + PaymasterData, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionSignature, }; use starknet_types_core::felt::Felt; diff --git a/crates/native_blockifier/src/py_invoke_function.rs b/crates/native_blockifier/src/py_invoke_function.rs index 9e5a781ed7..9735435394 100644 --- a/crates/native_blockifier/src/py_invoke_function.rs +++ b/crates/native_blockifier/src/py_invoke_function.rs @@ -7,8 +7,16 @@ use pyo3::prelude::*; use starknet_api::core::{ContractAddress, EntryPointSelector, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::transaction::{ - AccountDeploymentData, Calldata, Fee, InvokeTransactionV0, InvokeTransactionV1, - InvokeTransactionV3, PaymasterData, ResourceBoundsMapping, Tip, TransactionHash, + AccountDeploymentData, + Calldata, + Fee, + InvokeTransactionV0, + InvokeTransactionV1, + InvokeTransactionV3, + PaymasterData, + ResourceBoundsMapping, + Tip, + TransactionHash, TransactionSignature, }; use starknet_types_core::felt::Felt; diff --git a/crates/native_blockifier/src/py_objects.rs b/crates/native_blockifier/src/py_objects.rs index e0f50467ab..4cb6716015 100644 --- a/crates/native_blockifier/src/py_objects.rs +++ b/crates/native_blockifier/src/py_objects.rs @@ -10,7 +10,9 @@ use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use crate::errors::{ - InvalidNativeBlockifierInputError, NativeBlockifierError, NativeBlockifierInputError, + InvalidNativeBlockifierInputError, + NativeBlockifierError, + NativeBlockifierInputError, NativeBlockifierResult, }; diff --git a/crates/native_blockifier/src/py_state_diff.rs b/crates/native_blockifier/src/py_state_diff.rs index 5fc23409e8..e312c8581b 100644 --- a/crates/native_blockifier/src/py_state_diff.rs +++ b/crates/native_blockifier/src/py_state_diff.rs @@ -4,7 +4,9 @@ use std::convert::TryFrom; use blockifier::blockifier::block::{BlockInfo, GasPrices}; use blockifier::state::cached_state::CommitmentStateDiff; use blockifier::test_utils::{ - DEFAULT_ETH_L1_DATA_GAS_PRICE, DEFAULT_ETH_L1_GAS_PRICE, DEFAULT_STRK_L1_DATA_GAS_PRICE, + DEFAULT_ETH_L1_DATA_GAS_PRICE, + DEFAULT_ETH_L1_GAS_PRICE, + DEFAULT_STRK_L1_DATA_GAS_PRICE, DEFAULT_STRK_L1_GAS_PRICE, }; use indexmap::IndexMap; @@ -15,7 +17,9 @@ use starknet_api::core::{ClassHash, ContractAddress, Nonce}; use starknet_api::state::{StateDiff, StorageKey}; use crate::errors::{ - InvalidNativeBlockifierInputError, NativeBlockifierError, NativeBlockifierInputError, + InvalidNativeBlockifierInputError, + NativeBlockifierError, + NativeBlockifierInputError, NativeBlockifierResult, }; use crate::py_utils::PyFelt; diff --git a/crates/native_blockifier/src/py_transaction.rs b/crates/native_blockifier/src/py_transaction.rs index e793cd5144..7b84d89d71 100644 --- a/crates/native_blockifier/src/py_transaction.rs +++ b/crates/native_blockifier/src/py_transaction.rs @@ -1,7 +1,10 @@ use std::collections::BTreeMap; use blockifier::execution::contract_class::{ - ClassInfo, ContractClass, ContractClassV0, ContractClassV1, + ClassInfo, + ContractClass, + ContractClassV0, + ContractClassV1, }; use blockifier::transaction::account_transaction::AccountTransaction; use blockifier::transaction::transaction_execution::Transaction; diff --git a/crates/native_blockifier/src/state_readers/py_state_reader.rs b/crates/native_blockifier/src/state_readers/py_state_reader.rs index 61c7ba3213..35d78eea15 100644 --- a/crates/native_blockifier/src/state_readers/py_state_reader.rs +++ b/crates/native_blockifier/src/state_readers/py_state_reader.rs @@ -7,7 +7,9 @@ use starknet_api::state::StorageKey; use starknet_types_core::felt::Felt; use crate::errors::{ - NativeBlockifierError, NativeBlockifierInputError, NativeBlockifierResult, + NativeBlockifierError, + NativeBlockifierInputError, + NativeBlockifierResult, UndeclaredClassHashError, }; use crate::py_utils::PyFelt; diff --git a/crates/papyrus_base_layer/Cargo.toml b/crates/papyrus_base_layer/Cargo.toml index b5bfba2b21..a274b7386d 100644 --- a/crates/papyrus_base_layer/Cargo.toml +++ b/crates/papyrus_base_layer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_base_layer" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -12,7 +12,7 @@ papyrus_config = { path = "../papyrus_config", version = "0.4.0-rc.0" } rustc-hex.workspace = true serde.workspace = true serde_json.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} thiserror.workspace = true tokio = { workspace = true, features = ["full", "sync"] } url.workspace = true @@ -20,7 +20,7 @@ url.workspace = true [dev-dependencies] ethers-core = { version = "2.0.3" } pretty_assertions.workspace = true -starknet_api = { workspace = true, features = ["testing"] } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } starknet-types-core.workspace = true tar = { version = "0.4.38" } tempfile.workspace = true diff --git a/crates/papyrus_common/Cargo.toml b/crates/papyrus_common/Cargo.toml index 601987082a..09510a0b2f 100644 --- a/crates/papyrus_common/Cargo.toml +++ b/crates/papyrus_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_common" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -14,7 +14,7 @@ lazy_static.workspace = true serde.workspace = true serde_json.workspace = true sha3.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core = { workspace = true, features = ["hash"] } thiserror.workspace = true rand.workspace = true @@ -24,4 +24,4 @@ indexmap.workspace = true assert_matches.workspace = true pretty_assertions.workspace = true serde_json = { workspace = true, features = ["arbitrary_precision"]} -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } diff --git a/crates/papyrus_common/src/block_hash_test.rs b/crates/papyrus_common/src/block_hash_test.rs index 676eedfa43..6ab92e63aa 100644 --- a/crates/papyrus_common/src/block_hash_test.rs +++ b/crates/papyrus_common/src/block_hash_test.rs @@ -1,7 +1,7 @@ use assert_matches::assert_matches; +use papyrus_test_utils::read_json_file; use starknet_api::block::Block; use starknet_api::core::ChainId; -use test_utils::read_json_file; use crate::block_hash::{ calculate_block_hash_by_version, diff --git a/crates/papyrus_common/src/class_hash_test.rs b/crates/papyrus_common/src/class_hash_test.rs index 0e905ec861..4551cc2897 100644 --- a/crates/papyrus_common/src/class_hash_test.rs +++ b/crates/papyrus_common/src/class_hash_test.rs @@ -1,7 +1,7 @@ +use papyrus_test_utils::read_json_file; use starknet_api::core::ClassHash; use starknet_api::state::ContractClass; use starknet_api::{class_hash, felt}; -use test_utils::read_json_file; use crate::class_hash::calculate_class_hash; diff --git a/crates/papyrus_common/src/transaction_hash_test.rs b/crates/papyrus_common/src/transaction_hash_test.rs index 95e19b0218..c79cd6f03b 100644 --- a/crates/papyrus_common/src/transaction_hash_test.rs +++ b/crates/papyrus_common/src/transaction_hash_test.rs @@ -1,3 +1,4 @@ +use papyrus_test_utils::read_json_file; use pretty_assertions::assert_eq; use serde::{Deserialize, Serialize}; use sha3::{Digest, Keccak256}; @@ -5,7 +6,6 @@ use starknet_api::block::BlockNumber; use starknet_api::core::ChainId; use starknet_api::transaction::{Transaction, TransactionHash}; use starknet_types_core::felt::Felt; -use test_utils::read_json_file; use super::{ ascii_as_felt, diff --git a/crates/papyrus_config/Cargo.toml b/crates/papyrus_config/Cargo.toml index 13054840b7..4027dee8e1 100644 --- a/crates/papyrus_config/Cargo.toml +++ b/crates/papyrus_config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_config" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -23,4 +23,4 @@ assert_matches.workspace = true itertools.workspace = true lazy_static.workspace = true tempfile.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } diff --git a/crates/papyrus_config/src/config_test.rs b/crates/papyrus_config/src/config_test.rs index 4fdff4a888..505ac571b1 100644 --- a/crates/papyrus_config/src/config_test.rs +++ b/crates/papyrus_config/src/config_test.rs @@ -8,10 +8,10 @@ use assert_matches::assert_matches; use clap::Command; use itertools::chain; use lazy_static::lazy_static; +use papyrus_test_utils::get_absolute_path; use serde::{Deserialize, Serialize}; use serde_json::json; use tempfile::TempDir; -use test_utils::get_absolute_path; use validator::Validate; use crate::command::{get_command_matches, update_config_map_by_command_args}; diff --git a/crates/papyrus_execution/Cargo.toml b/crates/papyrus_execution/Cargo.toml index 0035f071ce..5aaba14ddf 100644 --- a/crates/papyrus_execution/Cargo.toml +++ b/crates/papyrus_execution/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "papyrus_execution" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true description = "Transaction and entry point execution functionality for a Papyrus node." [features] -testing = ["rand", "rand_chacha", "test_utils"] +testing = ["rand", "rand_chacha", "papyrus_test_utils"] [dependencies] anyhow.workspace = true -blockifier.workspace = true +blockifier = { path = "../blockifier", version = "0.8.0-rc.0"} cairo-lang-starknet-classes.workspace = true cairo-vm.workspace = true indexmap.workspace = true @@ -25,9 +25,9 @@ rand = { workspace = true, optional = true } rand_chacha = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core.workspace = true -test_utils = { path = "../test_utils", optional = true } +papyrus_test_utils = { path = "../papyrus_test_utils", optional = true } thiserror.workspace = true tracing.workspace = true @@ -40,7 +40,7 @@ papyrus_storage = { path = "../papyrus_storage", features = ["testing"] } pretty_assertions.workspace = true rand.workspace = true rand_chacha.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } [package.metadata.cargo-machete] # The `rand` crate is used in the `testing` feature, which is optional. diff --git a/crates/papyrus_execution/src/test_utils.rs b/crates/papyrus_execution/src/test_utils.rs index 7ce4ec2fc7..51c0259bb6 100644 --- a/crates/papyrus_execution/src/test_utils.rs +++ b/crates/papyrus_execution/src/test_utils.rs @@ -10,6 +10,7 @@ use papyrus_storage::compiled_class::CasmStorageWriter; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::{StorageReader, StorageWriter}; +use papyrus_test_utils::read_json_file; use serde::de::DeserializeOwned; use starknet_api::block::{ BlockBody, @@ -44,7 +45,6 @@ use starknet_api::transaction::{ }; use starknet_api::{calldata, class_hash, contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; -use test_utils::read_json_file; use crate::execution_utils::selector_from_name; use crate::objects::{PendingData, TransactionSimulationOutput}; diff --git a/crates/papyrus_execution/src/testing_instances.rs b/crates/papyrus_execution/src/testing_instances.rs index 389806de1f..963b3a7f3c 100644 --- a/crates/papyrus_execution/src/testing_instances.rs +++ b/crates/papyrus_execution/src/testing_instances.rs @@ -3,13 +3,13 @@ /// Returns the storage key of a storage variable. pub use blockifier::abi::abi_utils::get_storage_var_address; +use papyrus_test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use starknet_api::block::GasPrice; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, PatriciaKey}; use starknet_api::deprecated_contract_class::EntryPointType; use starknet_api::transaction::{Calldata, EventContent, ExecutionResources, Fee, MessageToL1}; use starknet_api::{contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use crate::objects::{ CallType, diff --git a/crates/papyrus_load_test/Cargo.toml b/crates/papyrus_load_test/Cargo.toml index d3a0d5781f..b98e7286c1 100644 --- a/crates/papyrus_load_test/Cargo.toml +++ b/crates/papyrus_load_test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_load_test" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -21,4 +21,4 @@ reqwest.workspace = true [dev-dependencies] lazy_static.workspace = true -pretty_assertions.workspace = true \ No newline at end of file +pretty_assertions.workspace = true diff --git a/crates/papyrus_monitoring_gateway/Cargo.toml b/crates/papyrus_monitoring_gateway/Cargo.toml index ee6684649b..5d276b4864 100644 --- a/crates/papyrus_monitoring_gateway/Cargo.toml +++ b/crates/papyrus_monitoring_gateway/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_monitoring_gateway" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_network/Cargo.toml b/crates/papyrus_network/Cargo.toml index d0aabc1d50..aa3b18d7b5 100644 --- a/crates/papyrus_network/Cargo.toml +++ b/crates/papyrus_network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_network" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_node/Cargo.toml b/crates/papyrus_node/Cargo.toml index 1b0593cf4e..a83ca963c2 100644 --- a/crates/papyrus_node/Cargo.toml +++ b/crates/papyrus_node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_node" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -39,7 +39,7 @@ papyrus_sync = { path = "../papyrus_sync", version = "0.4.0-rc.0" } reqwest = { workspace = true, features = ["json", "blocking"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } -starknet_api = { workspace = true, features = ["testing"] } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } starknet_client = { path = "../starknet_client" } strum.workspace = true tokio = { workspace = true, features = ["full", "sync"] } @@ -59,4 +59,4 @@ metrics-exporter-prometheus.workspace = true pretty_assertions.workspace = true insta = { workspace = true, features = ["json"] } tempfile.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } diff --git a/crates/papyrus_node/examples/get_transaction_hash.rs b/crates/papyrus_node/examples/get_transaction_hash.rs index 3222610dba..6db09ac171 100644 --- a/crates/papyrus_node/examples/get_transaction_hash.rs +++ b/crates/papyrus_node/examples/get_transaction_hash.rs @@ -93,7 +93,7 @@ fn get_cli_params() -> CliParams { CliParams { node_url, iteration_increments, file_path, deprecated, concurrent_requests } } -// Define a tuple struct to hold transaction type and version +// Define a tuple struct to hold transaction type and version. #[derive(Eq, PartialEq, Hash, Debug)] struct TransactionInfo { pub transaction_type: TransactionType, diff --git a/crates/papyrus_node/src/bin/dump_config.rs b/crates/papyrus_node/src/bin/papyrus_dump_config.rs similarity index 95% rename from crates/papyrus_node/src/bin/dump_config.rs rename to crates/papyrus_node/src/bin/papyrus_dump_config.rs index 6f2012ffba..8ae2050317 100644 --- a/crates/papyrus_node/src/bin/dump_config.rs +++ b/crates/papyrus_node/src/bin/papyrus_dump_config.rs @@ -10,7 +10,7 @@ use papyrus_node::config::pointers::CONFIG_POINTERS; use papyrus_node::config::{NodeConfig, DEFAULT_CONFIG_PATH}; /// Updates the default config file by: -/// cargo run --bin dump_config -q +/// cargo run --bin papyrus_dump_config -q #[cfg_attr(coverage_nightly, coverage_attribute)] fn main() { #[cfg(feature = "rpc")] diff --git a/crates/papyrus_node/src/config/config_test.rs b/crates/papyrus_node/src/config/config_test.rs index da6e6bb3fe..652a65d675 100644 --- a/crates/papyrus_node/src/config/config_test.rs +++ b/crates/papyrus_node/src/config/config_test.rs @@ -15,19 +15,19 @@ use papyrus_config::dumping::SerializeConfig; use papyrus_config::presentation::get_config_presentation; use papyrus_config::{SerializationType, SerializedContent, SerializedParam}; use papyrus_monitoring_gateway::MonitoringGatewayConfig; +use papyrus_test_utils::get_absolute_path; use pretty_assertions::assert_eq; use serde_json::{json, Map, Value}; use starknet_api::core::ChainId; use tempfile::NamedTempFile; -use test_utils::get_absolute_path; use validator::Validate; #[cfg(feature = "rpc")] use crate::config::pointers::CONFIG_POINTERS; use crate::config::{node_command, NodeConfig, DEFAULT_CONFIG_PATH}; -// Returns the required and generated params in default_config.json with the default value from the -// config presentation. +// Returns the required and generated params in config/papyrus/default_config.json with the default +// value from the config presentation. fn required_args() -> Vec { let default_config = NodeConfig::default(); let mut args = Vec::new(); @@ -146,7 +146,7 @@ fn default_config_file_is_up_to_date() { println!( "{}", "Default config file doesn't match the default NodeConfig implementation. Please update \ - it using the dump_config binary." + it using the papyrus_dump_config binary." .purple() .bold() ); diff --git a/crates/papyrus_node/src/config/mod.rs b/crates/papyrus_node/src/config/mod.rs index 8932acfc9f..e185710e53 100644 --- a/crates/papyrus_node/src/config/mod.rs +++ b/crates/papyrus_node/src/config/mod.rs @@ -44,7 +44,7 @@ use validator::Validate; use crate::version::VERSION_FULL; // The path of the default configuration file, provided as part of the crate. -pub const DEFAULT_CONFIG_PATH: &str = "config/default_config.json"; +pub const DEFAULT_CONFIG_PATH: &str = "config/papyrus/default_config.json"; /// The configurations of the various components of the node. #[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Validate)] diff --git a/crates/papyrus_node/src/main_test.rs b/crates/papyrus_node/src/main_test.rs index 7b4864e2e4..80a07421e9 100644 --- a/crates/papyrus_node/src/main_test.rs +++ b/crates/papyrus_node/src/main_test.rs @@ -3,8 +3,8 @@ use std::time::Duration; use metrics_exporter_prometheus::PrometheusBuilder; use papyrus_node::config::NodeConfig; use papyrus_storage::{open_storage, StorageConfig}; +use papyrus_test_utils::prometheus_is_contained; use tempfile::TempDir; -use test_utils::prometheus_is_contained; use crate::{run_threads, spawn_storage_metrics_collector}; diff --git a/crates/papyrus_p2p_sync/Cargo.toml b/crates/papyrus_p2p_sync/Cargo.toml index e2e2bdef45..5f092a19b8 100644 --- a/crates/papyrus_p2p_sync/Cargo.toml +++ b/crates/papyrus_p2p_sync/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_p2p_sync" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -19,7 +19,7 @@ papyrus_proc_macros = { path = "../papyrus_proc_macros", version = "0.4.0-rc.0" papyrus_protobuf = { path = "../papyrus_protobuf", version = "0.4.0-rc.0" } papyrus_storage = { path = "../papyrus_storage", version = "0.4.0-rc.0" } serde.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core.workspace = true thiserror.workspace = true tokio.workspace = true @@ -33,7 +33,7 @@ papyrus_storage = { path = "../papyrus_storage", features = ["testing"] } static_assertions.workspace = true rand.workspace = true rand_chacha.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } papyrus_protobuf = { path = "../papyrus_protobuf", features = ["testing"]} # The `metrics` crate is used by `latency_histogram` proc macro, which is used in this crate. diff --git a/crates/papyrus_p2p_sync/src/client/state_diff_test.rs b/crates/papyrus_p2p_sync/src/client/state_diff_test.rs index 1f720fbfd4..2a3edea6d7 100644 --- a/crates/papyrus_p2p_sync/src/client/state_diff_test.rs +++ b/crates/papyrus_p2p_sync/src/client/state_diff_test.rs @@ -16,6 +16,7 @@ use papyrus_protobuf::sync::{ StateDiffChunk, }; use papyrus_storage::state::StateStorageReader; +use papyrus_test_utils::{get_rng, GetTestInstance}; use rand::RngCore; use rand_chacha::ChaCha8Rng; use starknet_api::block::{BlockHeader, BlockNumber}; @@ -23,7 +24,6 @@ use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use starknet_api::state::{StorageKey, ThinStateDiff}; use starknet_types_core::felt::Felt; use static_assertions::const_assert; -use test_utils::{get_rng, GetTestInstance}; use super::test_utils::{ create_block_hashes_and_signatures, diff --git a/crates/papyrus_p2p_sync/src/server/test.rs b/crates/papyrus_p2p_sync/src/server/test.rs index 9eee0bc03c..349caeba11 100644 --- a/crates/papyrus_p2p_sync/src/server/test.rs +++ b/crates/papyrus_p2p_sync/src/server/test.rs @@ -23,12 +23,12 @@ use papyrus_storage::header::{HeaderStorageReader, HeaderStorageWriter}; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::test_utils::get_test_storage; use papyrus_storage::{StorageReader, StorageWriter}; +use papyrus_test_utils::{get_rng, get_test_body, GetTestInstance}; use rand::random; use starknet_api::block::{BlockBody, BlockHash, BlockHeader, BlockNumber, BlockSignature}; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; use starknet_api::state::ContractClass; use starknet_api::transaction::{Event, Transaction, TransactionHash, TransactionOutput}; -use test_utils::{get_rng, get_test_body, GetTestInstance}; use super::{split_thin_state_diff, FetchBlockDataFromDb, P2PSyncServer}; const BUFFER_SIZE: usize = 10; diff --git a/crates/papyrus_proc_macros/Cargo.toml b/crates/papyrus_proc_macros/Cargo.toml index b625328baf..5d2a030af3 100644 --- a/crates/papyrus_proc_macros/Cargo.toml +++ b/crates/papyrus_proc_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_proc_macros" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -15,7 +15,7 @@ metrics.workspace = true metrics-exporter-prometheus.workspace = true papyrus_common = { path = "../papyrus_common", version = "0.4.0-dev.1" } prometheus-parse.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } [lib] proc-macro = true diff --git a/crates/papyrus_proc_macros/tests/latency_histogram.rs b/crates/papyrus_proc_macros/tests/latency_histogram.rs index 1af5f17078..f4415c2b59 100644 --- a/crates/papyrus_proc_macros/tests/latency_histogram.rs +++ b/crates/papyrus_proc_macros/tests/latency_histogram.rs @@ -1,8 +1,8 @@ use metrics_exporter_prometheus::PrometheusBuilder; use papyrus_common::metrics::COLLECT_PROFILING_METRICS; use papyrus_proc_macros::latency_histogram; +use papyrus_test_utils::prometheus_is_contained; use prometheus_parse::Value::Untyped; -use test_utils::prometheus_is_contained; #[test] fn latency_histogram_test() { diff --git a/crates/papyrus_protobuf/Cargo.toml b/crates/papyrus_protobuf/Cargo.toml index 64659b1165..894df504ed 100644 --- a/crates/papyrus_protobuf/Cargo.toml +++ b/crates/papyrus_protobuf/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "papyrus_protobuf" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true [features] -testing = ["rand", "rand_chacha", "test_utils"] +testing = ["rand", "rand_chacha", "papyrus_test_utils"] [dependencies] indexmap.workspace = true @@ -15,16 +15,16 @@ primitive-types.workspace = true prost.workspace = true rand = { workspace = true, optional = true } rand_chacha = { workspace = true, optional = true } -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core.workspace = true -test_utils = { path = "../test_utils", optional = true } +papyrus_test_utils = { path = "../papyrus_test_utils", optional = true } thiserror.workspace = true papyrus_common = { path = "../papyrus_common", version = "0.4.0-dev.2" } [dev-dependencies] rand.workspace = true rand_chacha.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } [build-dependencies] prost-build.workspace = true diff --git a/crates/papyrus_protobuf/src/converters/event_test.rs b/crates/papyrus_protobuf/src/converters/event_test.rs index 1345ae4b3a..4a0a3cce58 100644 --- a/crates/papyrus_protobuf/src/converters/event_test.rs +++ b/crates/papyrus_protobuf/src/converters/event_test.rs @@ -1,5 +1,5 @@ +use papyrus_test_utils::{get_rng, GetTestInstance}; use starknet_api::transaction::{Event, TransactionHash}; -use test_utils::{get_rng, GetTestInstance}; use crate::sync::DataOrFin; diff --git a/crates/papyrus_protobuf/src/converters/header_test.rs b/crates/papyrus_protobuf/src/converters/header_test.rs index e412fd94e1..48048c67eb 100644 --- a/crates/papyrus_protobuf/src/converters/header_test.rs +++ b/crates/papyrus_protobuf/src/converters/header_test.rs @@ -1,4 +1,4 @@ -use test_utils::{get_rng, GetTestInstance}; +use papyrus_test_utils::{get_rng, GetTestInstance}; use crate::sync::{DataOrFin, HeaderQuery, SignedBlockHeader}; diff --git a/crates/papyrus_protobuf/src/converters/state_diff_test.rs b/crates/papyrus_protobuf/src/converters/state_diff_test.rs index 5af6876741..3cc84b420b 100644 --- a/crates/papyrus_protobuf/src/converters/state_diff_test.rs +++ b/crates/papyrus_protobuf/src/converters/state_diff_test.rs @@ -1,4 +1,4 @@ -use test_utils::{get_rng, GetTestInstance}; +use papyrus_test_utils::{get_rng, GetTestInstance}; use crate::sync::{ ContractDiff, diff --git a/crates/papyrus_protobuf/src/converters/transaction_test.rs b/crates/papyrus_protobuf/src/converters/transaction_test.rs index 848295d0c0..60df8e4b4b 100644 --- a/crates/papyrus_protobuf/src/converters/transaction_test.rs +++ b/crates/papyrus_protobuf/src/converters/transaction_test.rs @@ -1,4 +1,5 @@ use lazy_static::lazy_static; +use papyrus_test_utils::{get_rng, GetTestInstance}; use starknet_api::transaction::{ Builtin, DeclareTransaction, @@ -17,7 +18,6 @@ use starknet_api::transaction::{ Transaction as StarknetApiTransaction, TransactionOutput, }; -use test_utils::{get_rng, GetTestInstance}; use crate::sync::DataOrFin; diff --git a/crates/papyrus_protobuf/src/sync.rs b/crates/papyrus_protobuf/src/sync.rs index d995d44eac..01c05de799 100644 --- a/crates/papyrus_protobuf/src/sync.rs +++ b/crates/papyrus_protobuf/src/sync.rs @@ -1,12 +1,12 @@ use std::fmt::Debug; use indexmap::IndexMap; +#[cfg(any(feature = "testing", test))] +use papyrus_test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use starknet_api::block::{BlockHash, BlockHeader, BlockNumber, BlockSignature}; use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use starknet_api::state::StorageKey; use starknet_types_core::felt::Felt; -#[cfg(any(feature = "testing", test))] -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; #[derive(Debug, PartialEq, Eq, Clone, Copy, Default, Hash)] pub enum Direction { diff --git a/crates/papyrus_rpc/Cargo.toml b/crates/papyrus_rpc/Cargo.toml index 604f66a41c..49cae5f47c 100644 --- a/crates/papyrus_rpc/Cargo.toml +++ b/crates/papyrus_rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_rpc" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -27,7 +27,7 @@ starknet_client = { path = "../starknet_client", version = "0.4.0-rc.0" } regex = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core.workspace = true tokio = { workspace = true, features = ["full", "sync"] } tower = { workspace = true, features = ["full"] } @@ -53,8 +53,8 @@ pretty_assertions.workspace = true prometheus-parse.workspace = true rand_chacha.workspace = true reqwest.workspace = true -test_utils = { path = "../test_utils" } -starknet_api = { workspace = true, features = ["testing"] } +papyrus_test_utils = { path = "../papyrus_test_utils" } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } starknet_client = { path = "../starknet_client", features = ["testing"] } starknet-core.workspace = true strum.workspace = true diff --git a/crates/papyrus_rpc/src/compression_utils_test.rs b/crates/papyrus_rpc/src/compression_utils_test.rs index 881b4a36e3..462817c9db 100644 --- a/crates/papyrus_rpc/src/compression_utils_test.rs +++ b/crates/papyrus_rpc/src/compression_utils_test.rs @@ -1,5 +1,5 @@ +use papyrus_test_utils::read_json_file; use pretty_assertions::assert_eq; -use test_utils::read_json_file; use super::compress_and_encode; diff --git a/crates/papyrus_rpc/src/rpc_metrics/rpc_metrics_test.rs b/crates/papyrus_rpc/src/rpc_metrics/rpc_metrics_test.rs index a14fb8b44e..caa153af0b 100644 --- a/crates/papyrus_rpc/src/rpc_metrics/rpc_metrics_test.rs +++ b/crates/papyrus_rpc/src/rpc_metrics/rpc_metrics_test.rs @@ -9,11 +9,11 @@ use papyrus_storage::class::ClassStorageWriter; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::test_utils::get_test_storage; +use papyrus_test_utils::{prometheus_is_contained, send_request}; use pretty_assertions::assert_eq; use prometheus_parse::Value::Counter; use starknet_api::block::{BlockBody, BlockHeader, BlockNumber}; use starknet_api::state::ThinStateDiff; -use test_utils::{prometheus_is_contained, send_request}; use crate::rpc_metrics::{ get_method_and_version, diff --git a/crates/papyrus_rpc/src/rpc_test.rs b/crates/papyrus_rpc/src/rpc_test.rs index 0ad5255657..a4249a956e 100644 --- a/crates/papyrus_rpc/src/rpc_test.rs +++ b/crates/papyrus_rpc/src/rpc_test.rs @@ -12,10 +12,10 @@ use jsonrpsee::types::ErrorObjectOwned; use papyrus_storage::base_layer::BaseLayerStorageWriter; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::test_utils::get_test_storage; +use papyrus_test_utils::get_rng; use pretty_assertions::assert_eq; use rand::seq::SliceRandom; use starknet_api::block::{BlockHash, BlockHeader, BlockNumber, BlockStatus}; -use test_utils::get_rng; use tower::BoxError; use crate::middleware::proxy_rpc_request; diff --git a/crates/papyrus_rpc/src/v0_6/api/test.rs b/crates/papyrus_rpc/src/v0_6/api/test.rs index ddd51778b3..94f4ae69e0 100644 --- a/crates/papyrus_rpc/src/v0_6/api/test.rs +++ b/crates/papyrus_rpc/src/v0_6/api/test.rs @@ -23,6 +23,16 @@ use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::test_utils::get_test_storage; use papyrus_storage::StorageScope; +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + get_test_block, + get_test_body, + get_test_state_diff, + send_request, + GetTestInstance, +}; use pretty_assertions::assert_eq; use rand::{random, RngCore}; use rand_chacha::ChaCha8Rng; @@ -96,16 +106,6 @@ use starknet_client::writer::objects::transaction::{ use starknet_client::writer::{MockStarknetWriter, WriterClientError, WriterClientResult}; use starknet_client::ClientError; use starknet_types_core::felt::Felt; -use test_utils::{ - auto_impl_get_test_instance, - get_number_of_variants, - get_rng, - get_test_block, - get_test_body, - get_test_state_diff, - send_request, - GetTestInstance, -}; use super::super::api::EventsChunk; use super::super::block::{Block, GeneralBlockHeader, PendingBlockHeader, ResourcePrice}; diff --git a/crates/papyrus_rpc/src/v0_6/broadcasted_transaction_test.rs b/crates/papyrus_rpc/src/v0_6/broadcasted_transaction_test.rs index 726caffbdb..7780dfdb5b 100644 --- a/crates/papyrus_rpc/src/v0_6/broadcasted_transaction_test.rs +++ b/crates/papyrus_rpc/src/v0_6/broadcasted_transaction_test.rs @@ -2,6 +2,12 @@ use std::collections::HashMap; use jsonschema::JSONSchema; use lazy_static::lazy_static; +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + GetTestInstance, +}; use starknet_api::core::{CompiledClassHash, ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::deprecated_contract_class::{ @@ -23,7 +29,6 @@ use starknet_api::transaction::{ }; use starknet_client::writer::objects::transaction::DeprecatedContractClass; use starknet_types_core::felt::Felt; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, get_rng, GetTestInstance}; use super::super::state::{ContractClass, EntryPointByType}; use super::{ diff --git a/crates/papyrus_rpc/src/v0_6/execution_test.rs b/crates/papyrus_rpc/src/v0_6/execution_test.rs index cfb37c55a8..5129d2d866 100644 --- a/crates/papyrus_rpc/src/v0_6/execution_test.rs +++ b/crates/papyrus_rpc/src/v0_6/execution_test.rs @@ -30,6 +30,13 @@ use papyrus_storage::compiled_class::CasmStorageWriter; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::StorageWriter; +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + read_json_file, + GetTestInstance, +}; use pretty_assertions::assert_eq; use starknet_api::block::{ BlockBody, @@ -79,13 +86,6 @@ use starknet_client::reader::objects::transaction::{ }; use starknet_client::reader::PendingData; use starknet_types_core::felt::Felt; -use test_utils::{ - auto_impl_get_test_instance, - get_number_of_variants, - get_rng, - read_json_file, - GetTestInstance, -}; use tokio::sync::RwLock; use super::api::api_impl::JsonRpcServerImpl; diff --git a/crates/papyrus_rpc/src/v0_6/transaction_test.rs b/crates/papyrus_rpc/src/v0_6/transaction_test.rs index 9b60a11804..5bd9f0d709 100644 --- a/crates/papyrus_rpc/src/v0_6/transaction_test.rs +++ b/crates/papyrus_rpc/src/v0_6/transaction_test.rs @@ -1,3 +1,9 @@ +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + GetTestInstance, +}; use pretty_assertions::assert_eq; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce, PatriciaKey}; use starknet_api::data_availability::DataAvailabilityMode; @@ -15,7 +21,6 @@ use starknet_api::transaction::{ }; use starknet_api::{calldata, contract_address, felt, patricia_key}; use starknet_client::writer::objects::transaction as client_transaction; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, get_rng, GetTestInstance}; use super::super::transaction::{L1HandlerMsgHash, L1L2MsgHash}; use super::{ diff --git a/crates/papyrus_rpc/src/v0_6/write_api_result_test.rs b/crates/papyrus_rpc/src/v0_6/write_api_result_test.rs index 3f82d3d9d0..1cd5dc863b 100644 --- a/crates/papyrus_rpc/src/v0_6/write_api_result_test.rs +++ b/crates/papyrus_rpc/src/v0_6/write_api_result_test.rs @@ -1,3 +1,4 @@ +use papyrus_test_utils::{auto_impl_get_test_instance, get_rng, GetTestInstance}; use serde::Serialize; use starknet_api::core::{ClassHash, ContractAddress, PatriciaKey}; use starknet_api::felt; @@ -8,7 +9,6 @@ use starknet_client::writer::objects::response::{ InvokeResponse, SuccessfulStarknetErrorCode, }; -use test_utils::{auto_impl_get_test_instance, get_rng, GetTestInstance}; use super::{AddDeclareOkResult, AddDeployAccountOkResult, AddInvokeOkResult}; use crate::test_utils::{get_starknet_spec_api_schema_for_method_results, SpecFile}; diff --git a/crates/papyrus_rpc/src/v0_7/api/test.rs b/crates/papyrus_rpc/src/v0_7/api/test.rs index 73a41cc064..4da2add3a4 100644 --- a/crates/papyrus_rpc/src/v0_7/api/test.rs +++ b/crates/papyrus_rpc/src/v0_7/api/test.rs @@ -25,6 +25,16 @@ use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::test_utils::get_test_storage; use papyrus_storage::StorageScope; +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + get_test_block, + get_test_body, + get_test_state_diff, + send_request, + GetTestInstance, +}; use pretty_assertions::assert_eq; use rand::{random, RngCore}; use rand_chacha::ChaCha8Rng; @@ -101,16 +111,6 @@ use starknet_client::writer::objects::transaction::{ use starknet_client::writer::{MockStarknetWriter, WriterClientError, WriterClientResult}; use starknet_client::ClientError; use starknet_types_core::felt::Felt; -use test_utils::{ - auto_impl_get_test_instance, - get_number_of_variants, - get_rng, - get_test_block, - get_test_body, - get_test_state_diff, - send_request, - GetTestInstance, -}; use super::super::api::EventsChunk; use super::super::block::{Block, GeneralBlockHeader, PendingBlockHeader, ResourcePrice}; diff --git a/crates/papyrus_rpc/src/v0_7/broadcasted_transaction_test.rs b/crates/papyrus_rpc/src/v0_7/broadcasted_transaction_test.rs index 3d6d4404fc..134ae838cb 100644 --- a/crates/papyrus_rpc/src/v0_7/broadcasted_transaction_test.rs +++ b/crates/papyrus_rpc/src/v0_7/broadcasted_transaction_test.rs @@ -2,6 +2,12 @@ use std::collections::HashMap; use jsonschema::JSONSchema; use lazy_static::lazy_static; +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + GetTestInstance, +}; use starknet_api::core::{CompiledClassHash, ContractAddress, Nonce}; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::deprecated_contract_class::{ @@ -23,7 +29,6 @@ use starknet_api::transaction::{ }; use starknet_client::writer::objects::transaction::DeprecatedContractClass; use starknet_types_core::felt::Felt; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, get_rng, GetTestInstance}; use super::super::state::{ContractClass, EntryPointByType}; use super::{ diff --git a/crates/papyrus_rpc/src/v0_7/execution_test.rs b/crates/papyrus_rpc/src/v0_7/execution_test.rs index d184501dae..52ab15aaf1 100644 --- a/crates/papyrus_rpc/src/v0_7/execution_test.rs +++ b/crates/papyrus_rpc/src/v0_7/execution_test.rs @@ -34,6 +34,13 @@ use papyrus_storage::compiled_class::CasmStorageWriter; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::StorageWriter; +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + read_json_file, + GetTestInstance, +}; use pretty_assertions::assert_eq; use starknet_api::block::{ BlockBody, @@ -83,13 +90,6 @@ use starknet_client::reader::objects::transaction::{ }; use starknet_client::reader::PendingData; use starknet_types_core::felt::Felt; -use test_utils::{ - auto_impl_get_test_instance, - get_number_of_variants, - get_rng, - read_json_file, - GetTestInstance, -}; use tokio::sync::RwLock; use super::api::api_impl::JsonRpcServerImpl; diff --git a/crates/papyrus_rpc/src/v0_7/transaction_test.rs b/crates/papyrus_rpc/src/v0_7/transaction_test.rs index 9b60a11804..5bd9f0d709 100644 --- a/crates/papyrus_rpc/src/v0_7/transaction_test.rs +++ b/crates/papyrus_rpc/src/v0_7/transaction_test.rs @@ -1,3 +1,9 @@ +use papyrus_test_utils::{ + auto_impl_get_test_instance, + get_number_of_variants, + get_rng, + GetTestInstance, +}; use pretty_assertions::assert_eq; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce, PatriciaKey}; use starknet_api::data_availability::DataAvailabilityMode; @@ -15,7 +21,6 @@ use starknet_api::transaction::{ }; use starknet_api::{calldata, contract_address, felt, patricia_key}; use starknet_client::writer::objects::transaction as client_transaction; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, get_rng, GetTestInstance}; use super::super::transaction::{L1HandlerMsgHash, L1L2MsgHash}; use super::{ diff --git a/crates/papyrus_rpc/src/v0_7/write_api_result_test.rs b/crates/papyrus_rpc/src/v0_7/write_api_result_test.rs index cf85cc0ee6..0c8d30351b 100644 --- a/crates/papyrus_rpc/src/v0_7/write_api_result_test.rs +++ b/crates/papyrus_rpc/src/v0_7/write_api_result_test.rs @@ -1,3 +1,4 @@ +use papyrus_test_utils::{auto_impl_get_test_instance, get_rng, GetTestInstance}; use serde::Serialize; use starknet_api::core::{ClassHash, ContractAddress, PatriciaKey}; use starknet_api::felt; @@ -8,7 +9,6 @@ use starknet_client::writer::objects::response::{ InvokeResponse, SuccessfulStarknetErrorCode, }; -use test_utils::{auto_impl_get_test_instance, get_rng, GetTestInstance}; use super::{AddDeclareOkResult, AddDeployAccountOkResult, AddInvokeOkResult}; use crate::test_utils::{get_starknet_spec_api_schema_for_method_results, SpecFile}; diff --git a/crates/papyrus_storage/Cargo.toml b/crates/papyrus_storage/Cargo.toml index 69b17151b8..37b46ae80c 100644 --- a/crates/papyrus_storage/Cargo.toml +++ b/crates/papyrus_storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_storage" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -41,7 +41,7 @@ parity-scale-codec.workspace = true primitive-types.workspace = true serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core = { workspace = true, features = ["papyrus-serialization"] } tempfile = { workspace = true, optional = true } thiserror.workspace = true @@ -74,5 +74,5 @@ simple_logger.workspace = true tempfile = { workspace = true } test-case.workspace = true test-log.workspace = true -test_utils = { path = "../test_utils" } +papyrus_test_utils = { path = "../papyrus_test_utils" } tokio = { workspace = true, features = ["full", "sync"] } diff --git a/crates/papyrus_storage/src/body/body_test.rs b/crates/papyrus_storage/src/body/body_test.rs index fc0b2ac342..052d549b12 100644 --- a/crates/papyrus_storage/src/body/body_test.rs +++ b/crates/papyrus_storage/src/body/body_test.rs @@ -1,9 +1,9 @@ use assert_matches::assert_matches; +use papyrus_test_utils::{get_test_block, get_test_body}; use pretty_assertions::assert_eq; use starknet_api::block::{BlockBody, BlockNumber}; use starknet_api::transaction::TransactionOffsetInBlock; use test_case::test_case; -use test_utils::{get_test_block, get_test_body}; use crate::body::{BodyStorageReader, BodyStorageWriter, TransactionIndex}; use crate::db::table_types::Table; diff --git a/crates/papyrus_storage/src/body/events_test.rs b/crates/papyrus_storage/src/body/events_test.rs index d3f6f22c38..3765b96cde 100644 --- a/crates/papyrus_storage/src/body/events_test.rs +++ b/crates/papyrus_storage/src/body/events_test.rs @@ -1,6 +1,7 @@ use std::vec; use assert_matches::assert_matches; +use papyrus_test_utils::get_test_block; use pretty_assertions::assert_eq; use starknet_api::block::BlockNumber; use starknet_api::transaction::{ @@ -10,7 +11,6 @@ use starknet_api::transaction::{ EventIndexInTransactionOutput, TransactionOffsetInBlock, }; -use test_utils::get_test_block; use crate::body::events::{get_events_from_tx, EventIndex, EventsReader}; use crate::body::{BodyStorageWriter, TransactionIndex}; diff --git a/crates/papyrus_storage/src/class_test.rs b/crates/papyrus_storage/src/class_test.rs index 5ba2c19468..72392da987 100644 --- a/crates/papyrus_storage/src/class_test.rs +++ b/crates/papyrus_storage/src/class_test.rs @@ -1,12 +1,12 @@ use assert_matches::assert_matches; use indexmap::indexmap; +use papyrus_test_utils::read_json_file; use pretty_assertions::assert_eq; use starknet_api::block::BlockNumber; use starknet_api::core::{ClassHash, CompiledClassHash}; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; use starknet_api::hash::StarkHash; use starknet_api::state::{ContractClass, StateNumber, ThinStateDiff}; -use test_utils::read_json_file; use super::{ClassStorageReader, ClassStorageWriter}; use crate::state::{StateStorageReader, StateStorageWriter}; diff --git a/crates/papyrus_storage/src/compiled_class_test.rs b/crates/papyrus_storage/src/compiled_class_test.rs index 6ca0439402..f3c1229402 100644 --- a/crates/papyrus_storage/src/compiled_class_test.rs +++ b/crates/papyrus_storage/src/compiled_class_test.rs @@ -1,8 +1,8 @@ use assert_matches::assert_matches; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; +use papyrus_test_utils::read_json_file; use pretty_assertions::assert_eq; use starknet_api::core::ClassHash; -use test_utils::read_json_file; use crate::compiled_class::{CasmStorageReader, CasmStorageWriter}; use crate::db::{DbError, KeyAlreadyExistsError}; diff --git a/crates/papyrus_storage/src/compression_utils_test.rs b/crates/papyrus_storage/src/compression_utils_test.rs index 7951cdcc97..fe37f1d641 100644 --- a/crates/papyrus_storage/src/compression_utils_test.rs +++ b/crates/papyrus_storage/src/compression_utils_test.rs @@ -1,6 +1,6 @@ +use papyrus_test_utils::read_json_file; use pretty_assertions::assert_eq; use starknet_api::deprecated_contract_class::Program; -use test_utils::read_json_file; use super::{compress, decompress, decompress_from_reader, serialize_and_compress}; use crate::db::serialization::StorageSerde; diff --git a/crates/papyrus_storage/src/mmap_file/mmap_file_test.rs b/crates/papyrus_storage/src/mmap_file/mmap_file_test.rs index cae470419d..01cc34f5fc 100644 --- a/crates/papyrus_storage/src/mmap_file/mmap_file_test.rs +++ b/crates/papyrus_storage/src/mmap_file/mmap_file_test.rs @@ -1,9 +1,9 @@ use std::sync::Arc; +use papyrus_test_utils::get_rng; use pretty_assertions::assert_eq; use rand::Rng; use tempfile::tempdir; -use test_utils::get_rng; use tokio::sync::{Barrier, RwLock}; use super::*; diff --git a/crates/papyrus_storage/src/mmap_file/mod.rs b/crates/papyrus_storage/src/mmap_file/mod.rs index 568dd3827b..6928895122 100644 --- a/crates/papyrus_storage/src/mmap_file/mod.rs +++ b/crates/papyrus_storage/src/mmap_file/mod.rs @@ -19,10 +19,10 @@ use memmap2::{MmapMut, MmapOptions}; use papyrus_config::dumping::{ser_param, SerializeConfig}; use papyrus_config::{ParamPath, ParamPrivacyInput, SerializedParam}; #[cfg(test)] +use papyrus_test_utils::GetTestInstance; +#[cfg(test)] use rand_chacha::ChaCha8Rng; use serde::{Deserialize, Serialize}; -#[cfg(test)] -use test_utils::GetTestInstance; use thiserror::Error; use tracing::{debug, instrument, trace}; use validator::{Validate, ValidationError}; diff --git a/crates/papyrus_storage/src/serialization/serializers_test.rs b/crates/papyrus_storage/src/serialization/serializers_test.rs index 82804dda60..39ff93de2e 100644 --- a/crates/papyrus_storage/src/serialization/serializers_test.rs +++ b/crates/papyrus_storage/src/serialization/serializers_test.rs @@ -2,13 +2,13 @@ use std::fmt::Debug; use cairo_lang_casm::hints::CoreHintBase; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; +use papyrus_test_utils::{get_rng, read_json_file, GetTestInstance}; use pretty_assertions::assert_eq; use starknet_api::block::BlockNumber; use starknet_api::core::ContractAddress; use starknet_api::hash::StarkHash; use starknet_api::state::StorageKey; use starknet_api::transaction::TransactionOffsetInBlock; -use test_utils::{get_rng, read_json_file, GetTestInstance}; use crate::db::serialization::StorageSerde; diff --git a/crates/papyrus_storage/src/state/state_test.rs b/crates/papyrus_storage/src/state/state_test.rs index 90a5208a77..09cd1e787e 100644 --- a/crates/papyrus_storage/src/state/state_test.rs +++ b/crates/papyrus_storage/src/state/state_test.rs @@ -1,6 +1,7 @@ use assert_matches::assert_matches; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use indexmap::{indexmap, IndexMap}; +use papyrus_test_utils::get_test_state_diff; use pretty_assertions::assert_eq; use starknet_api::block::BlockNumber; use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce, PatriciaKey}; @@ -9,7 +10,6 @@ use starknet_api::hash::StarkHash; use starknet_api::state::{ContractClass, StateNumber, StorageKey, ThinStateDiff}; use starknet_api::{felt, patricia_key}; use starknet_types_core::felt::Felt; -use test_utils::get_test_state_diff; use crate::class::{ClassStorageReader, ClassStorageWriter}; use crate::compiled_class::{CasmStorageReader, CasmStorageWriter}; diff --git a/crates/papyrus_storage/src/test_instances.rs b/crates/papyrus_storage/src/test_instances.rs index 4f64166a6f..70edfec51e 100644 --- a/crates/papyrus_storage/src/test_instances.rs +++ b/crates/papyrus_storage/src/test_instances.rs @@ -1,3 +1,4 @@ +use papyrus_test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use starknet_api::block::{BlockHash, BlockNumber, BlockTimestamp, GasPricePerToken}; use starknet_api::core::{ EventCommitment, @@ -13,7 +14,6 @@ use starknet_api::transaction::{ TransactionHash, TransactionOffsetInBlock, }; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use crate::body::TransactionIndex; use crate::compression_utils::IsCompressed; diff --git a/crates/papyrus_storage/src/utils_test.rs b/crates/papyrus_storage/src/utils_test.rs index ce281e697e..9d201440c3 100644 --- a/crates/papyrus_storage/src/utils_test.rs +++ b/crates/papyrus_storage/src/utils_test.rs @@ -3,6 +3,7 @@ use std::fs; use indexmap::indexmap; use metrics_exporter_prometheus::PrometheusBuilder; +use papyrus_test_utils::prometheus_is_contained; use pretty_assertions::assert_eq; use prometheus_parse::Value::{Counter, Gauge}; use starknet_api::block::BlockNumber; @@ -10,7 +11,6 @@ use starknet_api::core::{ClassHash, CompiledClassHash}; use starknet_api::hash::StarkHash; use starknet_api::state::{ContractClass, ThinStateDiff}; use starknet_types_core::felt::Felt; -use test_utils::prometheus_is_contained; use super::update_storage_metrics; use crate::class::ClassStorageWriter; diff --git a/crates/papyrus_sync/Cargo.toml b/crates/papyrus_sync/Cargo.toml index 3f7a66b324..66011e9ca8 100644 --- a/crates/papyrus_sync/Cargo.toml +++ b/crates/papyrus_sync/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_sync" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -23,7 +23,7 @@ papyrus_config = { path = "../papyrus_config", version = "0.4.0-rc.0" } papyrus_proc_macros = { path = "../papyrus_proc_macros", version = "0.4.0-rc.0" } reqwest = { workspace = true, features = ["json", "blocking"] } serde = { workspace = true, features = ["derive"] } -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet_client = { path = "../starknet_client" } starknet-types-core.workspace = true thiserror.workspace = true @@ -37,6 +37,6 @@ mockall.workspace = true papyrus_storage = { path = "../papyrus_storage", features = ["testing"] } pretty_assertions.workspace = true starknet_client = { path = "../starknet_client", features = ["testing"] } -starknet_api = { workspace = true, features = ["testing"] } -test_utils = { path = "../test_utils" } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } +papyrus_test_utils = { path = "../papyrus_test_utils" } tokio-stream.workspace = true diff --git a/crates/papyrus_sync/src/sync_test.rs b/crates/papyrus_sync/src/sync_test.rs index 6b3191f75a..1210117c2c 100644 --- a/crates/papyrus_sync/src/sync_test.rs +++ b/crates/papyrus_sync/src/sync_test.rs @@ -10,6 +10,7 @@ use papyrus_storage::base_layer::BaseLayerStorageReader; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::test_utils::get_test_storage; use papyrus_storage::{StorageReader, StorageWriter}; +use papyrus_test_utils::{get_rng, GetTestInstance}; use pretty_assertions::assert_eq; use starknet_api::block::{BlockHash, BlockHeader, BlockNumber}; use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce, PatriciaKey}; @@ -26,7 +27,6 @@ use starknet_client::reader::objects::pending_data::{ use starknet_client::reader::objects::state::StateDiff as ClientStateDiff; use starknet_client::reader::objects::transaction::Transaction as ClientTransaction; use starknet_client::reader::{DeclaredClassHashEntry, PendingData}; -use test_utils::{get_rng, GetTestInstance}; use tokio::sync::RwLock; use crate::sources::base_layer::MockBaseLayerSourceTrait; diff --git a/crates/test_utils/Cargo.toml b/crates/papyrus_test_utils/Cargo.toml similarity index 83% rename from crates/test_utils/Cargo.toml rename to crates/papyrus_test_utils/Cargo.toml index 06784baf9b..b66e0ee246 100644 --- a/crates/test_utils/Cargo.toml +++ b/crates/papyrus_test_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "test_utils" -version.workspace = true +name = "papyrus_test_utils" +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -20,7 +20,7 @@ rand_chacha.workspace = true reqwest = { workspace = true, features = ["json"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"]} -starknet_api = { workspace = true, features = ["testing"] } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } starknet-types-core = { workspace = true, features = ["hash"] } [dev-dependencies] diff --git a/crates/test_utils/src/lib.rs b/crates/papyrus_test_utils/src/lib.rs similarity index 100% rename from crates/test_utils/src/lib.rs rename to crates/papyrus_test_utils/src/lib.rs diff --git a/crates/test_utils/src/precision_test.rs b/crates/papyrus_test_utils/src/precision_test.rs similarity index 100% rename from crates/test_utils/src/precision_test.rs rename to crates/papyrus_test_utils/src/precision_test.rs diff --git a/crates/sequencing/papyrus_block_builder/Cargo.toml b/crates/sequencing/papyrus_block_builder/Cargo.toml index a0c57f7dd6..bd32c581f7 100644 --- a/crates/sequencing/papyrus_block_builder/Cargo.toml +++ b/crates/sequencing/papyrus_block_builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_block_builder" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -8,10 +8,10 @@ description = "A block-builder for Starknet blocks" [dependencies] papyrus_storage = { path = "../../papyrus_storage", version = "0.4.0-rc.0", features = ["testing"] } -starknet_api.workspace = true +starknet_api = { path = "../../starknet_api", version = "0.13.0-rc.0"} thiserror.workspace = true tracing.workspace = true [dev-dependencies] pretty_assertions.workspace = true -test_utils = { path = "../../test_utils" } +papyrus_test_utils = { path = "../../papyrus_test_utils" } diff --git a/crates/sequencing/papyrus_block_builder/src/test.rs b/crates/sequencing/papyrus_block_builder/src/test.rs index 3033e8a685..b4319778e4 100644 --- a/crates/sequencing/papyrus_block_builder/src/test.rs +++ b/crates/sequencing/papyrus_block_builder/src/test.rs @@ -1,9 +1,9 @@ use papyrus_storage::body::BodyStorageWriter; use papyrus_storage::test_utils::get_test_storage_by_scope; use papyrus_storage::StorageScope; +use papyrus_test_utils::get_test_block; use pretty_assertions::assert_eq; use starknet_api::block::BlockNumber; -use test_utils::get_test_block; use crate::{BlockBuilder, BlockBuilderTrait}; diff --git a/crates/sequencing/papyrus_consensus/Cargo.toml b/crates/sequencing/papyrus_consensus/Cargo.toml index d91e455524..6e5c4ddba5 100644 --- a/crates/sequencing/papyrus_consensus/Cargo.toml +++ b/crates/sequencing/papyrus_consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_consensus" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true @@ -16,7 +16,7 @@ papyrus_config = { path = "../../papyrus_config", version = "0.4.0-dev.2" } papyrus_protobuf = { path = "../../papyrus_protobuf", version = "0.4.0-dev.2" } papyrus_storage = { path = "../../papyrus_storage", version = "0.4.0-dev.2" } serde = { workspace = true, features = ["derive"] } -starknet_api.workspace = true +starknet_api = { path = "../../starknet_api", version = "0.13.0-rc.0"} starknet-types-core.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["full"] } @@ -26,5 +26,5 @@ tracing.workspace = true mockall.workspace = true papyrus_network = { path = "../../papyrus_network", version = "0.4.0-dev.2", features = ["testing"] } papyrus_storage = { path = "../../papyrus_storage", features = ["testing"] } -test_utils = { path = "../../test_utils" } -test-case.workspace = true \ No newline at end of file +papyrus_test_utils = { path = "../../papyrus_test_utils" } +test-case.workspace = true diff --git a/crates/sequencing/papyrus_consensus/src/papyrus_consensus_context_test.rs b/crates/sequencing/papyrus_consensus/src/papyrus_consensus_context_test.rs index 9f1f25d857..570b10f8f7 100644 --- a/crates/sequencing/papyrus_consensus/src/papyrus_consensus_context_test.rs +++ b/crates/sequencing/papyrus_consensus/src/papyrus_consensus_context_test.rs @@ -5,10 +5,10 @@ use papyrus_protobuf::consensus::{ConsensusMessage, Proposal}; use papyrus_storage::body::BodyStorageWriter; use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::test_utils::get_test_storage; +use papyrus_test_utils::get_test_block; use starknet_api::block::Block; use starknet_api::core::ContractAddress; use starknet_api::transaction::Transaction; -use test_utils::get_test_block; use crate::papyrus_consensus_context::PapyrusConsensusContext; use crate::types::{ConsensusBlock, ConsensusContext, ProposalInit}; diff --git a/crates/starknet_api/Cargo.toml b/crates/starknet_api/Cargo.toml index d7047ff5f3..bda96cb576 100644 --- a/crates/starknet_api/Cargo.toml +++ b/crates/starknet_api/Cargo.toml @@ -1,10 +1,9 @@ [package] name = "starknet_api" version = "0.13.0-rc.0" -edition = "2021" -repository = "https://github.com/starkware-libs/starknet-api" -license = "Apache-2.0" -license-file = "LICENSE" +edition.workspace = true +repository.workspace = true +license-file.workspace = true description = "Starknet Rust types related to computation and execution." [features] @@ -31,3 +30,4 @@ thiserror = "1.0.31" [dev-dependencies] assert_matches = "1.5.0" rstest = "0.17.0" + diff --git a/crates/starknet_api/src/block.rs b/crates/starknet_api/src/block.rs index e38aa490b5..26729420fc 100644 --- a/crates/starknet_api/src/block.rs +++ b/crates/starknet_api/src/block.rs @@ -9,8 +9,13 @@ use serde::{Deserialize, Serialize}; use starknet_types_core::hash::{Poseidon, StarkHash as CoreStarkHash}; use crate::core::{ - EventCommitment, GlobalRoot, ReceiptCommitment, SequencerContractAddress, SequencerPublicKey, - StateDiffCommitment, TransactionCommitment, + EventCommitment, + GlobalRoot, + ReceiptCommitment, + SequencerContractAddress, + SequencerPublicKey, + StateDiffCommitment, + TransactionCommitment, }; use crate::crypto::utils::{verify_message_hash_signature, CryptoError, Signature}; use crate::data_availability::L1DataAvailabilityMode; diff --git a/crates/starknet_api/src/block_hash/block_hash_calculator.rs b/crates/starknet_api/src/block_hash/block_hash_calculator.rs index 72a4bdb633..4b8d5c008c 100644 --- a/crates/starknet_api/src/block_hash/block_hash_calculator.rs +++ b/crates/starknet_api/src/block_hash/block_hash_calculator.rs @@ -13,7 +13,12 @@ use crate::crypto::utils::HashChain; use crate::data_availability::L1DataAvailabilityMode; use crate::state::ThinStateDiff; use crate::transaction::{ - Event, Fee, GasVector, MessageToL1, TransactionExecutionStatus, TransactionHash, + Event, + Fee, + GasVector, + MessageToL1, + TransactionExecutionStatus, + TransactionHash, TransactionSignature, }; use crate::transaction_hash::ascii_as_felt; diff --git a/crates/starknet_api/src/block_hash/block_hash_calculator_test.rs b/crates/starknet_api/src/block_hash/block_hash_calculator_test.rs index 60ddcff5fd..258c793b19 100644 --- a/crates/starknet_api/src/block_hash/block_hash_calculator_test.rs +++ b/crates/starknet_api/src/block_hash/block_hash_calculator_test.rs @@ -2,17 +2,30 @@ use starknet_types_core::felt::Felt; use super::concat_counts; use crate::block::{ - BlockHash, BlockHeaderWithoutHash, BlockNumber, BlockTimestamp, GasPrice, GasPricePerToken, + BlockHash, + BlockHeaderWithoutHash, + BlockNumber, + BlockTimestamp, + GasPrice, + GasPricePerToken, StarknetVersion, }; use crate::block_hash::block_hash_calculator::{ - calculate_block_commitments, calculate_block_hash, BlockHeaderCommitments, + calculate_block_commitments, + calculate_block_hash, + BlockHeaderCommitments, TransactionHashingData, }; use crate::block_hash::test_utils::{get_state_diff, get_transaction_output}; use crate::core::{ - ContractAddress, EventCommitment, GlobalRoot, PatriciaKey, ReceiptCommitment, - SequencerContractAddress, StateDiffCommitment, TransactionCommitment, + ContractAddress, + EventCommitment, + GlobalRoot, + PatriciaKey, + ReceiptCommitment, + SequencerContractAddress, + StateDiffCommitment, + TransactionCommitment, }; use crate::data_availability::L1DataAvailabilityMode; use crate::felt; diff --git a/crates/starknet_api/src/block_hash/receipt_commitment_test.rs b/crates/starknet_api/src/block_hash/receipt_commitment_test.rs index 3e443c557d..53dc119f78 100644 --- a/crates/starknet_api/src/block_hash/receipt_commitment_test.rs +++ b/crates/starknet_api/src/block_hash/receipt_commitment_test.rs @@ -3,13 +3,18 @@ use starknet_types_core::hash::Poseidon; use super::calculate_messages_sent_hash; use crate::block_hash::receipt_commitment::{ - calculate_receipt_commitment, calculate_receipt_hash, get_revert_reason_hash, ReceiptElement, + calculate_receipt_commitment, + calculate_receipt_hash, + get_revert_reason_hash, + ReceiptElement, }; use crate::block_hash::test_utils::{generate_message_to_l1, get_transaction_output}; use crate::core::ReceiptCommitment; use crate::felt; use crate::transaction::{ - RevertedTransactionExecutionStatus, TransactionExecutionStatus, TransactionHash, + RevertedTransactionExecutionStatus, + TransactionExecutionStatus, + TransactionHash, }; #[test] diff --git a/crates/starknet_api/src/block_hash/state_diff_hash_test.rs b/crates/starknet_api/src/block_hash/state_diff_hash_test.rs index ef11443742..c0cadf2ef2 100644 --- a/crates/starknet_api/src/block_hash/state_diff_hash_test.rs +++ b/crates/starknet_api/src/block_hash/state_diff_hash_test.rs @@ -1,8 +1,12 @@ use indexmap::indexmap; use crate::block_hash::state_diff_hash::{ - calculate_state_diff_hash, chain_declared_classes, chain_deprecated_declared_classes, - chain_nonces, chain_storage_diffs, chain_updated_contracts, + calculate_state_diff_hash, + chain_declared_classes, + chain_deprecated_declared_classes, + chain_nonces, + chain_storage_diffs, + chain_updated_contracts, }; use crate::block_hash::test_utils::get_state_diff; use crate::core::{ClassHash, CompiledClassHash, Nonce, StateDiffCommitment}; diff --git a/crates/starknet_api/src/block_hash/test_utils.rs b/crates/starknet_api/src/block_hash/test_utils.rs index cc3b24b3bc..47af4ea6c4 100644 --- a/crates/starknet_api/src/block_hash/test_utils.rs +++ b/crates/starknet_api/src/block_hash/test_utils.rs @@ -6,7 +6,11 @@ use super::block_hash_calculator::TransactionOutputForHash; use crate::core::{ClassHash, CompiledClassHash, ContractAddress, EthAddress, Nonce}; use crate::state::ThinStateDiff; use crate::transaction::{ - Fee, GasVector, L2ToL1Payload, MessageToL1, RevertedTransactionExecutionStatus, + Fee, + GasVector, + L2ToL1Payload, + MessageToL1, + RevertedTransactionExecutionStatus, TransactionExecutionStatus, }; diff --git a/crates/starknet_api/src/block_hash/transaction_commitment_test.rs b/crates/starknet_api/src/block_hash/transaction_commitment_test.rs index 4e949ea921..13407c1935 100644 --- a/crates/starknet_api/src/block_hash/transaction_commitment_test.rs +++ b/crates/starknet_api/src/block_hash/transaction_commitment_test.rs @@ -3,7 +3,8 @@ use starknet_types_core::hash::Poseidon; use super::TransactionLeafElement; use crate::block_hash::transaction_commitment::{ - calculate_transaction_commitment, calculate_transaction_leaf, + calculate_transaction_commitment, + calculate_transaction_leaf, }; use crate::core::TransactionCommitment; use crate::felt; diff --git a/crates/starknet_api/src/core_test.rs b/crates/starknet_api/src/core_test.rs index 543d137445..eed3b3900a 100644 --- a/crates/starknet_api/src/core_test.rs +++ b/crates/starknet_api/src/core_test.rs @@ -3,8 +3,15 @@ use starknet_types_core::felt::Felt; use starknet_types_core::hash::{Pedersen, StarkHash as CoreStarkHash}; use crate::core::{ - calculate_contract_address, ClassHash, ContractAddress, EthAddress, Nonce, PatriciaKey, - StarknetApiError, CONTRACT_ADDRESS_PREFIX, L2_ADDRESS_UPPER_BOUND, + calculate_contract_address, + ClassHash, + ContractAddress, + EthAddress, + Nonce, + PatriciaKey, + StarknetApiError, + CONTRACT_ADDRESS_PREFIX, + L2_ADDRESS_UPPER_BOUND, }; use crate::hash::StarkHash; use crate::transaction::{Calldata, ContractAddressSalt}; diff --git a/crates/starknet_api/src/internal_transaction.rs b/crates/starknet_api/src/internal_transaction.rs index 12572b356d..a4ca71471c 100644 --- a/crates/starknet_api/src/internal_transaction.rs +++ b/crates/starknet_api/src/internal_transaction.rs @@ -1,7 +1,11 @@ use crate::core::{ContractAddress, Nonce}; use crate::state::ContractClass; use crate::transaction::{ - DeclareTransaction, DeployAccountTransaction, InvokeTransaction, Tip, TransactionHash, + DeclareTransaction, + DeployAccountTransaction, + InvokeTransaction, + Tip, + TransactionHash, }; /// Represents a paid Starknet transaction. diff --git a/crates/starknet_api/src/rpc_transaction.rs b/crates/starknet_api/src/rpc_transaction.rs index dd9892ec0b..dfa31c1b0f 100644 --- a/crates/starknet_api/src/rpc_transaction.rs +++ b/crates/starknet_api/src/rpc_transaction.rs @@ -11,8 +11,14 @@ use crate::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce}; use crate::data_availability::DataAvailabilityMode; use crate::state::EntryPoint; use crate::transaction::{ - AccountDeploymentData, Calldata, ContractAddressSalt, PaymasterData, Resource, ResourceBounds, - Tip, TransactionSignature, + AccountDeploymentData, + Calldata, + ContractAddressSalt, + PaymasterData, + Resource, + ResourceBounds, + Tip, + TransactionSignature, }; /// Transactions that are ready to be broadcasted to the network through RPC and are not included in diff --git a/crates/starknet_api/src/rpc_transaction_test.rs b/crates/starknet_api/src/rpc_transaction_test.rs index d288a5d063..e2fc6de4d9 100644 --- a/crates/starknet_api/src/rpc_transaction_test.rs +++ b/crates/starknet_api/src/rpc_transaction_test.rs @@ -5,12 +5,24 @@ use starknet_types_core::felt::Felt; use crate::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce, PatriciaKey}; use crate::rpc_transaction::{ - ContractClass, DataAvailabilityMode, ResourceBoundsMapping, RpcDeclareTransaction, - RpcDeclareTransactionV3, RpcDeployAccountTransaction, RpcDeployAccountTransactionV3, - RpcInvokeTransaction, RpcInvokeTransactionV3, RpcTransaction, + ContractClass, + DataAvailabilityMode, + ResourceBoundsMapping, + RpcDeclareTransaction, + RpcDeclareTransactionV3, + RpcDeployAccountTransaction, + RpcDeployAccountTransactionV3, + RpcInvokeTransaction, + RpcInvokeTransactionV3, + RpcTransaction, }; use crate::transaction::{ - AccountDeploymentData, Calldata, ContractAddressSalt, PaymasterData, ResourceBounds, Tip, + AccountDeploymentData, + Calldata, + ContractAddressSalt, + PaymasterData, + ResourceBounds, + Tip, TransactionSignature, }; use crate::{contract_address, felt, patricia_key}; diff --git a/crates/starknet_api/src/serde_utils_test.rs b/crates/starknet_api/src/serde_utils_test.rs index 711de14621..2a94ae6379 100644 --- a/crates/starknet_api/src/serde_utils_test.rs +++ b/crates/starknet_api/src/serde_utils_test.rs @@ -2,11 +2,17 @@ use assert_matches::assert_matches; use serde::Deserialize; use crate::deprecated_contract_class::{ - ConstructorType, ContractClassAbiEntry, FunctionAbiEntry, TypedParameter, + ConstructorType, + ContractClassAbiEntry, + FunctionAbiEntry, + TypedParameter, }; use crate::serde_utils::{ - bytes_from_hex_str, deserialize_optional_contract_class_abi_entry_vector, hex_str_from_bytes, - BytesAsHex, InnerDeserializationError, + bytes_from_hex_str, + deserialize_optional_contract_class_abi_entry_vector, + hex_str_from_bytes, + BytesAsHex, + InnerDeserializationError, }; #[test] diff --git a/crates/starknet_api/src/state.rs b/crates/starknet_api/src/state.rs index 599b654136..ed6dd2ef70 100644 --- a/crates/starknet_api/src/state.rs +++ b/crates/starknet_api/src/state.rs @@ -11,7 +11,12 @@ use starknet_types_core::felt::Felt; use crate::block::{BlockHash, BlockNumber}; use crate::core::{ - ClassHash, CompiledClassHash, ContractAddress, EntryPointSelector, GlobalRoot, Nonce, + ClassHash, + CompiledClassHash, + ContractAddress, + EntryPointSelector, + GlobalRoot, + Nonce, PatriciaKey, }; use crate::deprecated_contract_class::ContractClass as DeprecatedContractClass; diff --git a/crates/starknet_api/src/transaction.rs b/crates/starknet_api/src/transaction.rs index dde4b3dc75..d3d6f45b37 100644 --- a/crates/starknet_api/src/transaction.rs +++ b/crates/starknet_api/src/transaction.rs @@ -10,17 +10,29 @@ use strum_macros::EnumIter; use crate::block::{BlockHash, BlockNumber}; use crate::core::{ - ChainId, ClassHash, CompiledClassHash, ContractAddress, EntryPointSelector, EthAddress, Nonce, + ChainId, + ClassHash, + CompiledClassHash, + ContractAddress, + EntryPointSelector, + EthAddress, + Nonce, }; use crate::data_availability::DataAvailabilityMode; use crate::hash::StarkHash; use crate::serde_utils::PrefixedBytesAsHex; use crate::transaction_hash::{ - get_declare_transaction_v0_hash, get_declare_transaction_v1_hash, - get_declare_transaction_v2_hash, get_declare_transaction_v3_hash, - get_deploy_account_transaction_v1_hash, get_deploy_account_transaction_v3_hash, - get_deploy_transaction_hash, get_invoke_transaction_v0_hash, get_invoke_transaction_v1_hash, - get_invoke_transaction_v3_hash, get_l1_handler_transaction_hash, + get_declare_transaction_v0_hash, + get_declare_transaction_v1_hash, + get_declare_transaction_v2_hash, + get_declare_transaction_v3_hash, + get_deploy_account_transaction_v1_hash, + get_deploy_account_transaction_v3_hash, + get_deploy_transaction_hash, + get_invoke_transaction_v0_hash, + get_invoke_transaction_v1_hash, + get_invoke_transaction_v3_hash, + get_l1_handler_transaction_hash, }; use crate::StarknetApiError; diff --git a/crates/starknet_api/src/transaction_hash.rs b/crates/starknet_api/src/transaction_hash.rs index 7b00c49227..b7daf1fd97 100644 --- a/crates/starknet_api/src/transaction_hash.rs +++ b/crates/starknet_api/src/transaction_hash.rs @@ -6,11 +6,26 @@ use crate::core::{calculate_contract_address, ChainId, ContractAddress}; use crate::crypto::utils::HashChain; use crate::data_availability::DataAvailabilityMode; use crate::transaction::{ - DeclareTransaction, DeclareTransactionV0V1, DeclareTransactionV2, DeclareTransactionV3, - DeployAccountTransaction, DeployAccountTransactionV1, DeployAccountTransactionV3, - DeployTransaction, InvokeTransaction, InvokeTransactionV0, InvokeTransactionV1, - InvokeTransactionV3, L1HandlerTransaction, Resource, ResourceBounds, ResourceBoundsMapping, - Tip, Transaction, TransactionHash, TransactionVersion, + DeclareTransaction, + DeclareTransactionV0V1, + DeclareTransactionV2, + DeclareTransactionV3, + DeployAccountTransaction, + DeployAccountTransactionV1, + DeployAccountTransactionV3, + DeployTransaction, + InvokeTransaction, + InvokeTransactionV0, + InvokeTransactionV1, + InvokeTransactionV3, + L1HandlerTransaction, + Resource, + ResourceBounds, + ResourceBoundsMapping, + Tip, + Transaction, + TransactionHash, + TransactionVersion, }; use crate::StarknetApiError; diff --git a/crates/starknet_client/Cargo.toml b/crates/starknet_client/Cargo.toml index ed8ec389f5..6bfc284bd8 100644 --- a/crates/starknet_client/Cargo.toml +++ b/crates/starknet_client/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "starknet_client" -version.workspace = true +version = "0.4.0-rc.0" edition.workspace = true repository.workspace = true license-file.workspace = true description = "A client implementation that can communicate with Starknet." [features] -testing = ["enum-iterator", "mockall", "rand", "rand_chacha", "test_utils"] +testing = ["enum-iterator", "mockall", "rand", "rand_chacha", "papyrus_test_utils"] [dependencies] async-trait.workspace = true @@ -25,11 +25,11 @@ reqwest = { workspace = true, features = ["json", "blocking"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["arbitrary_precision"] } serde_repr.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core = {workspace = true, features = ["serde"]} strum.workspace = true strum_macros.workspace = true -test_utils = { path = "../test_utils", optional = true } +papyrus_test_utils = { path = "../papyrus_test_utils", optional = true } thiserror.workspace = true tokio = { workspace = true, features = ["full", "sync"] } tokio-retry.workspace = true @@ -40,13 +40,13 @@ url.workspace = true assert_matches.workspace = true enum-iterator.workspace = true mockall.workspace = true -mockito.workspace = true +mockito = "0.31.0" rand.workspace = true rand_chacha.workspace = true pretty_assertions.workspace = true simple_logger.workspace = true -starknet_api = { workspace = true, features = ["testing"] } -test_utils = { path = "../test_utils" } +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0", features = ["testing"] } +papyrus_test_utils = { path = "../papyrus_test_utils" } [package.metadata.cargo-machete] # The `rand` and `rand_chacha` crates are used in the `testing` feature, which is optional. diff --git a/crates/starknet_client/src/reader/objects/test_utils.rs b/crates/starknet_client/src/reader/objects/test_utils.rs index facf3e5032..c00a73e52a 100644 --- a/crates/starknet_client/src/reader/objects/test_utils.rs +++ b/crates/starknet_client/src/reader/objects/test_utils.rs @@ -1,5 +1,6 @@ use std::collections::HashMap; +use papyrus_test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use starknet_api::core::{ ClassHash, CompiledClassHash, @@ -28,7 +29,6 @@ use starknet_api::transaction::{ TransactionVersion, }; use starknet_types_core::felt::Felt; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use crate::reader::objects::state::ContractClass; use crate::reader::objects::transaction::{ diff --git a/crates/starknet_client/src/writer/objects/response_test.rs b/crates/starknet_client/src/writer/objects/response_test.rs index 15d2231f2c..5914356978 100644 --- a/crates/starknet_client/src/writer/objects/response_test.rs +++ b/crates/starknet_client/src/writer/objects/response_test.rs @@ -1,4 +1,4 @@ -use test_utils::validate_load_and_dump; +use papyrus_test_utils::validate_load_and_dump; use super::{DeclareResponse, DeployAccountResponse, InvokeResponse}; diff --git a/crates/starknet_client/src/writer/objects/test_utils.rs b/crates/starknet_client/src/writer/objects/test_utils.rs index ddc3dd8589..e13e17ccea 100644 --- a/crates/starknet_client/src/writer/objects/test_utils.rs +++ b/crates/starknet_client/src/writer/objects/test_utils.rs @@ -1,5 +1,6 @@ use std::collections::HashMap; +use papyrus_test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use starknet_api::core::{ClassHash, ContractAddress}; use starknet_api::deprecated_contract_class::{ ContractClassAbiEntry as DeprecatedContractClassAbiEntry, @@ -7,7 +8,6 @@ use starknet_api::deprecated_contract_class::{ EntryPointType as DeprecatedEntryPointType, }; use starknet_api::transaction::TransactionHash; -use test_utils::{auto_impl_get_test_instance, get_number_of_variants, GetTestInstance}; use crate::writer::objects::response::{ DeclareResponse, diff --git a/crates/starknet_client/src/writer/objects/transaction_test.rs b/crates/starknet_client/src/writer/objects/transaction_test.rs index af12e7d0ca..61054f3cd7 100644 --- a/crates/starknet_client/src/writer/objects/transaction_test.rs +++ b/crates/starknet_client/src/writer/objects/transaction_test.rs @@ -1,4 +1,4 @@ -use test_utils::validate_load_and_dump; +use papyrus_test_utils::validate_load_and_dump; use super::{ DeclareV1Transaction, diff --git a/crates/starknet_client/src/writer/starknet_gateway_client_test.rs b/crates/starknet_client/src/writer/starknet_gateway_client_test.rs index 37f3e4e7b4..d08538518d 100644 --- a/crates/starknet_client/src/writer/starknet_gateway_client_test.rs +++ b/crates/starknet_client/src/writer/starknet_gateway_client_test.rs @@ -2,8 +2,8 @@ use std::fmt::Debug; use std::future::Future; use mockito::{mock, Matcher}; +use papyrus_test_utils::read_json_file; use serde::{Deserialize, Serialize}; -use test_utils::read_json_file; use crate::test_utils::retry::get_test_config; use crate::writer::{StarknetGatewayClient, StarknetWriter, WriterClientError, WriterClientResult}; diff --git a/crates/starknet_sierra_compile/Cargo.toml b/crates/starknet_sierra_compile/Cargo.toml index 51f253868b..7addf9cee2 100644 --- a/crates/starknet_sierra_compile/Cargo.toml +++ b/crates/starknet_sierra_compile/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_sierra_compile" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true @@ -14,7 +14,7 @@ cairo-lang-starknet-classes.workspace = true cairo-lang-utils.workspace = true serde_json.workspace = true serde.workspace = true -starknet_api.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} starknet-types-core.workspace = true thiserror.workspace = true diff --git a/crates/starknet_sierra_compile/src/utils.rs b/crates/starknet_sierra_compile/src/utils.rs index 5ccdcf9faf..0a73f3cfd8 100644 --- a/crates/starknet_sierra_compile/src/utils.rs +++ b/crates/starknet_sierra_compile/src/utils.rs @@ -1,12 +1,14 @@ use std::clone::Clone; use cairo_lang_starknet_classes::contract_class::{ - ContractClass as CairoLangContractClass, ContractEntryPoint as CairoLangContractEntryPoint, + ContractClass as CairoLangContractClass, + ContractEntryPoint as CairoLangContractEntryPoint, ContractEntryPoints as CairoLangContractEntryPoints, }; use cairo_lang_utils::bigint::BigUintAsHex; use starknet_api::rpc_transaction::{ - ContractClass as RpcContractClass, EntryPointByType as StarknetApiEntryPointByType, + ContractClass as RpcContractClass, + EntryPointByType as StarknetApiEntryPointByType, }; use starknet_api::state::EntryPoint as StarknetApiEntryPoint; use starknet_types_core::felt::Felt; diff --git a/crates/task_executor/Cargo.toml b/crates/task_executor/Cargo.toml index f622c6f95c..3deace0db3 100644 --- a/crates/task_executor/Cargo.toml +++ b/crates/task_executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_task_executor" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/tests-integration/Cargo.toml b/crates/tests-integration/Cargo.toml index fbebb917b6..0ae365efc4 100644 --- a/crates/tests-integration/Cargo.toml +++ b/crates/tests-integration/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool_integration_tests" -version.workspace = true +version = "0.0.0" edition.workspace = true repository.workspace = true license.workspace = true @@ -10,19 +10,19 @@ workspace = true [dependencies] axum.workspace = true -blockifier.workspace = true +blockifier = { path = "../blockifier", version = "0.8.0-rc.0"} cairo-lang-starknet-classes.workspace = true indexmap.workspace = true -itertools.workspace = true +papyrus_common = { path = "../papyrus_common", version = "0.4.0-rc.0"} +papyrus_rpc = { path = "../papyrus_rpc", version = "0.4.0-rc.0"} +papyrus_storage = { path = "../papyrus_storage", version = "0.4.0-rc.0"} mempool_test_utils = { path = "../mempool_test_utils", version = "0.0" } -papyrus_common.workspace = true -papyrus_rpc.workspace = true -papyrus_storage.workspace = true +itertools.workspace = true reqwest.workspace = true serde_json.workspace = true +starknet_api = { path = "../starknet_api", version = "0.13.0-rc.0"} +starknet_client = { path = "../starknet_client", version = "0.4.0-rc.0"} starknet-types-core.workspace = true -starknet_api.workspace = true -starknet_client.workspace = true starknet_gateway = { path = "../gateway", version = "0.0", features = ["testing"] } starknet_mempool_infra = { path = "../mempool_infra", version = "0.0" } starknet_mempool_node = { path = "../mempool_node", version = "0.0" } diff --git a/crates/tests-integration/src/integration_test_setup.rs b/crates/tests-integration/src/integration_test_setup.rs index 3edc8fe25e..dd3e3bd99d 100644 --- a/crates/tests-integration/src/integration_test_setup.rs +++ b/crates/tests-integration/src/integration_test_setup.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use blockifier::test_utils::contracts::FeatureContract; use blockifier::test_utils::CairoVersion; -use starknet_api::rpc_transaction::RPCTransaction; +use starknet_api::rpc_transaction::RpcTransaction; use starknet_api::transaction::TransactionHash; use starknet_gateway::config::GatewayNetworkConfig; use starknet_gateway::errors::GatewayError; @@ -83,11 +83,11 @@ impl IntegrationTestSetup { Self { task_executor, gateway_client, batcher, gateway_handle, mempool_handle } } - pub async fn assert_add_tx_success(&self, tx: &RPCTransaction) -> TransactionHash { + pub async fn assert_add_tx_success(&self, tx: &RpcTransaction) -> TransactionHash { self.gateway_client.assert_add_tx_success(tx).await } - pub async fn assert_add_tx_error(&self, tx: &RPCTransaction) -> GatewayError { + pub async fn assert_add_tx_error(&self, tx: &RpcTransaction) -> GatewayError { self.gateway_client.assert_add_tx_error(tx).await } diff --git a/crates/tests-integration/src/integration_test_utils.rs b/crates/tests-integration/src/integration_test_utils.rs index b9ebcbdb41..52bf4b1b31 100644 --- a/crates/tests-integration/src/integration_test_utils.rs +++ b/crates/tests-integration/src/integration_test_utils.rs @@ -3,13 +3,17 @@ use std::net::SocketAddr; use axum::body::Body; use blockifier::test_utils::contracts::FeatureContract; use mempool_test_utils::starknet_api_test_utils::{ - external_tx_to_json, MultiAccountTransactionGenerator, + external_tx_to_json, + MultiAccountTransactionGenerator, }; use reqwest::{Client, Response}; -use starknet_api::rpc_transaction::RPCTransaction; +use starknet_api::rpc_transaction::RpcTransaction; use starknet_api::transaction::TransactionHash; use starknet_gateway::config::{ - GatewayConfig, GatewayNetworkConfig, RpcStateReaderConfig, StatefulTransactionValidatorConfig, + GatewayConfig, + GatewayNetworkConfig, + RpcStateReaderConfig, + StatefulTransactionValidatorConfig, StatelessTransactionValidatorConfig, }; use starknet_gateway::errors::GatewayError; @@ -57,7 +61,7 @@ impl GatewayClient { Self { socket, client } } - pub async fn assert_add_tx_success(&self, tx: &RPCTransaction) -> TransactionHash { + pub async fn assert_add_tx_success(&self, tx: &RpcTransaction) -> TransactionHash { let response = self.add_tx(tx).await; assert!(response.status().is_success()); @@ -65,13 +69,13 @@ impl GatewayClient { } // TODO: implement when usage eventually arises. - pub async fn assert_add_tx_error(&self, _tx: &RPCTransaction) -> GatewayError { + pub async fn assert_add_tx_error(&self, _tx: &RpcTransaction) -> GatewayError { todo!() } // Prefer using assert_add_tx_success or other higher level methods of this client, to ensure // tests are boilerplate and implementation-detail free. - pub async fn add_tx(&self, tx: &RPCTransaction) -> Response { + pub async fn add_tx(&self, tx: &RpcTransaction) -> Response { let tx_json = external_tx_to_json(tx); self.client .post(format!("http://{}/add_tx", self.socket)) diff --git a/crates/tests-integration/src/state_reader.rs b/crates/tests-integration/src/state_reader.rs index b2526c38ea..1d12a1bfbe 100644 --- a/crates/tests-integration/src/state_reader.rs +++ b/crates/tests-integration/src/state_reader.rs @@ -5,15 +5,20 @@ use blockifier::abi::abi_utils::get_fee_token_var_address; use blockifier::context::{BlockContext, ChainInfo}; use blockifier::test_utils::contracts::FeatureContract; use blockifier::test_utils::{ - CairoVersion, BALANCE, CURRENT_BLOCK_TIMESTAMP, DEFAULT_ETH_L1_GAS_PRICE, - DEFAULT_STRK_L1_GAS_PRICE, TEST_SEQUENCER_ADDRESS, + CairoVersion, + BALANCE, + CURRENT_BLOCK_TIMESTAMP, + DEFAULT_ETH_L1_GAS_PRICE, + DEFAULT_STRK_L1_GAS_PRICE, + TEST_SEQUENCER_ADDRESS, }; use blockifier::transaction::objects::FeeType; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use indexmap::{indexmap, IndexMap}; use itertools::Itertools; use mempool_test_utils::starknet_api_test_utils::{ - deploy_account_tx, deployed_account_contract_address, + deploy_account_tx, + deployed_account_contract_address, }; use papyrus_common::pending_classes::PendingClasses; use papyrus_rpc::{run_server, RpcConfig}; @@ -24,7 +29,12 @@ use papyrus_storage::header::HeaderStorageWriter; use papyrus_storage::state::StateStorageWriter; use papyrus_storage::{open_storage, StorageConfig, StorageReader}; use starknet_api::block::{ - BlockBody, BlockHeader, BlockNumber, BlockTimestamp, GasPrice, GasPricePerToken, + BlockBody, + BlockHeader, + BlockNumber, + BlockTimestamp, + GasPrice, + GasPricePerToken, }; use starknet_api::core::{ClassHash, ContractAddress, PatriciaKey, SequencerContractAddress}; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; diff --git a/deployments/papyrus/helm/templates/p2p-service.yaml b/deployments/papyrus/helm/templates/p2p-service.yaml deleted file mode 100644 index f8435115fa..0000000000 --- a/deployments/papyrus/helm/templates/p2p-service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and ( not .Values.backup.enabled ) .Values.p2p.service.enabled }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "papyrus.name" . }}-p2p - labels: - {{- include "papyrus.labels" . | nindent 4 }} -spec: - selector: - {{- include "papyrus.selectorLabels" . | nindent 6 }} - type: {{ .Values.p2p.service.type }} - ports: - - name: p2p - port: {{ .Values.p2p.service.port }} - protocol: {{ .Values.p2p.service.protocol }} - targetPort: p2p -{{- end }} \ No newline at end of file diff --git a/deployments/papyrus/helm/templates/service.yaml b/deployments/papyrus/helm/templates/service.yaml deleted file mode 100644 index 1b073cf3f0..0000000000 --- a/deployments/papyrus/helm/templates/service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if not .Values.backup.enabled }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "papyrus.name" . }} - labels: - {{- include "papyrus.labels" . | nindent 4 }} -spec: - selector: - {{- include "papyrus.selectorLabels" . | nindent 6 }} - type: {{ .Values.service.type }} - ports: - {{- if and .Values.service.ports.rpc .Values.service.ports.rpc.enabled }} - - name: rpc - port: {{ .Values.service.ports.rpc.port }} - protocol: {{ .Values.service.ports.rpc.protocol }} - targetPort: rpc - {{- end }} - {{- if and .Values.service.ports.monitoring .Values.service.ports.monitoring.enabled }} - - name: monitoring - port: {{ .Values.service.ports.monitoring.port }} - protocol: {{ .Values.service.ports.monitoring.protocol }} - targetPort: monitoring - {{- end }} -{{- end }} \ No newline at end of file diff --git a/deployments/papyrus/helm/templates/svc.yaml b/deployments/papyrus/helm/templates/svc.yaml new file mode 100644 index 0000000000..83890adb6a --- /dev/null +++ b/deployments/papyrus/helm/templates/svc.yaml @@ -0,0 +1,20 @@ +{{- if not .Values.backup.enabled }} +{{- range $k, $v := .Values.services }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ template "papyrus.name" $ }}-{{ $k }} + labels: + {{- include "papyrus.labels" $ | nindent 4 }} +spec: + selector: + {{- include "papyrus.selectorLabels" $ | nindent 6 }} + type: {{ $v.type }} + ports: + - name: {{ template "papyrus.name" $ }}-port + protocol: "{{ $v.protocol }}" + port: {{ $v.port }} + targetPort: {{ $v.port }} +{{- end }} +{{- end }} diff --git a/docs/blockifier/README.md b/docs/blockifier/README.md new file mode 100644 index 0000000000..110fa3be73 --- /dev/null +++ b/docs/blockifier/README.md @@ -0,0 +1,66 @@ +
+

Blockifier

+
+ Report a Bug + Ā· + Request a Feature + Ā· + Ask a Question +
+ +
+
+ +[![GitHub Workflow Status](https://github.com/starkware-libs/blockifier/actions/workflows/post-merge.yml/badge.svg)](https://github.com/starkware-libs/blockifier/actions/workflows/post-merge.yml) +[![codecov](https://codecov.io/gh/starkware-libs/blockifier/branch/main/graph/badge.svg?token=Z5MXY45MR5)](https://codecov.io/gh/starkware-libs/blockifier) + +
+ +
+Table of Contents + +- [About](#about) +- [Roadmap](#roadmap) +- [Support](#support) +- [Security](#security) +- [License](#license) + +
+ +--- + +## About + +Blockifier is a Rust implementation of the component in the Starknet sequencer that executes transactions, and is in charge of creating state diffs and blocks. + +## Roadmap + +The Blockifier is a step towards a decentralized sequencer client for Starknet, allowing anyone to run one. +We'll add more milestones to this table once we finish the first one, where we blockify transactions sequentially, including all existing functionality. + +| name | status | +| -------------------------------------------------------------------------------------------------------------------------------------- | :----: | +| Add the ability to execute a block and output a state diff. | āœ… | +| Integrate with the existing Starknet Sequencer by replacing its current transaction-blockifying component, which is written in Python. | ā³ | +| Implement optimistic concurrency of transaction execution. | | +| Extend the Blockifier into a full Starknet sequencer, written in Rust, replacing the one currently in use. | | + +## Support + +Reach out to the maintainer at one of the following places: + +- [GitHub Discussions](https://github.com/starkware-libs/blockifier/discussions) +- Contact options listed on [this GitHub profile](https://github.com/starkware-libs) + +## Security + +Blockifier follows good security practices, but 100% security cannot be assured. +Blockifier is provided **"as is"** without any **warranty**. Use at your own risk. + +_For more information and to report security issues, please refer to our [security documentation](docs/SECURITY.md)._ + +## License + +This project is licensed under the **Apache 2.0 license**. + +See [LICENSE](LICENSE) for more information. diff --git a/docs/blockifier/SECURITY.md b/docs/blockifier/SECURITY.md new file mode 100644 index 0000000000..c297afd72e --- /dev/null +++ b/docs/blockifier/SECURITY.md @@ -0,0 +1,16 @@ +# Security policy + +## Reporting a vulnerability + +If there are any vulnerabilities in **Blockifier**, don't hesitate to _report them_. + +1. Use any of the [private contact addresses](https://github.com/starkware-libs/blockifier#support). +2. Describe the vulnerability. + + If you have a fix, that is most welcome -- please attach or summarize it in your message! + +3. We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report. + + Please **do not disclose the vulnerability publicly** until a fix is released! + +4. Once we have either a) published a fix, or b) declined to address the vulnerability for whatever reason, you are free to publicly disclose it. diff --git a/docs/mempool/README.md b/docs/mempool/README.md new file mode 100644 index 0000000000..34776785c9 --- /dev/null +++ b/docs/mempool/README.md @@ -0,0 +1,17 @@ +
+

Mempool

+
+ Report a Bug + Ā· + Request a Feature + Ā· + Ask a Question +
+ +
+
+ +[![GitHub Workflow Status](https://github.com/starkware-libs/mempool/actions/workflows/post-merge.yml/badge.svg)](https://github.com/starkware-libs/mempool/actions/workflows/post-merge.yml) +[![codecov](https://codecov.io/gh/starkware-libs/mempool/branch/main/graph/badge.svg?token=Z5MXY45MR5)](https://codecov.io/gh/starkware-libs/mempool) + +
diff --git a/docs/papyrus/CODE_OF_CONDUCT.md b/docs/papyrus/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..dac7fe5c80 --- /dev/null +++ b/docs/papyrus/CODE_OF_CONDUCT.md @@ -0,0 +1,68 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers +pledge to make participation in our project and our community a harassment-free experience for +everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity +and expression, level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit +permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are +expected to take appropriate and fair corrective action in response to any instances of unacceptable +behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, +code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, +or to ban temporarily or permanently any contributor for other behaviors that they deem +inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when an individual is +representing the project or its community in public spaces. Examples of representing a project or +community include using an official project email address, posting via an official social media +account, or acting as an appointed representative at an online or offline event. +Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting +the project maintainer using any of the +[private contact addresses](https://github.com/starkware-libs/papyrus#support). All complaints will +be reviewed and investigated and will result in a response that is deemed necessary and appropriate +to the circumstances. The project team is obligated to maintain confidentiality with regard to the +reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face +temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the +[Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at +. + +For answers to common questions about this code of conduct, see +. diff --git a/docs/papyrus/CONTRIBUTING.md b/docs/papyrus/CONTRIBUTING.md new file mode 100644 index 0000000000..42c0d66b95 --- /dev/null +++ b/docs/papyrus/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. +Please note we have a [code of conduct](CODE_OF_CONDUCT.md), +please follow it in all your interactions with the project. + +## Issues and feature requests + +You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new +feature? Take a look at [GitHub Discussions](https://github.com/starkware-libs/papyrus/discussions) +to see if it's already being discussed. You can help us by +[submitting an issue on GitHub](https://github.com/starkware-libs/papyrus/issues). Before you create +an issue, make sure to search the issue archive -- your issue may have already been addressed! + +Please try to create bug reports that are: + +- _Reproducible._ Include steps to reproduce the problem. +- _Specific._ Include as much detail as possible: which version, what environment, etc. +- _Unique._ Do not duplicate existing opened issues. +- _Scoped to a Single Bug._ One bug per report. + +**Even better: Submit a pull request with a fix or new feature!** + +## How to submit a Pull Request + +1. Search our repository for open or closed + [Pull Requests](https://github.com/starkware-libs/papyrus/pulls) + that relate to your submission. You don't want to duplicate effort. +2. Fork the project +3. Create your feature branch (`git checkout -b feat/amazing_feature`) +4. Commit your changes (`git commit -m 'feat: add amazing_feature'`) +5. Push to the branch (`git push origin feat/amazing_feature`) +6. [Open a Pull Request](https://github.com/starkware-libs/papyrus/compare?expand=1) + + +## Development environment setup + +In order to set up a development environment, First clone the repository: +```sh +git clone https://github.com/starkware-libs/papyrus +``` + +Then, you will need to install +- [Rust](https://www.rust-lang.org/tools/install) (1.73 or higher) +- [Rust nightly toolchain 2022-07-27](https://rust-lang.github.io/rustup/installation/index.html#installing-nightly) +- [Ganache 7.4.3](https://www.npmjs.com/package/ganache) + - You'll need to install 7.4.3 and not a version above it. We'll relax this in the future. + - You'll need Ganache only for the tests of the [papyrus_base_layer](../crates/papyrus_base_layer/) crate. +- [Protoc](https://grpc.io/docs/protoc-installation) + - You'll need Protoc only for compiling the [papyrus_network](../crates/papyrus_network/) crate. + - Make sure you have version 15 or higher installed. If not: + 1. Remove your current Protoc installation: + ```sh + sudo apt remove protoc/protobuf-compiler + ``` + 2. Install version 15 or higher: + ```sh + DIR="$HOME/.local" + curl -L "https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip" -o protoc.zip + unzip ./protoc.zip -d $DIR + rm ./protoc.zip + ``` + Replace DIR with your preferred installation directory. + + 3. Add DIR to your PATH if it's not already there: + ```sh + export PATH=$PATH:$DIR/bin + ``` + +### CI +Your code will need to pass [CI](../.github/workflows/ci.yml) before it can be merged. This means your code will need to: +- Pass all local tests and all integration tests. +- Be formatted according to [rustfmt](https://github.com/rust-lang/rustfmt). +- Be linted according to [clippy](https://github.com/rust-lang/rust-clippy) +- Not include unused dependencies (Checked by [udeps](https://github.com/est31/cargo-udeps)). diff --git a/docs/papyrus/README.adoc b/docs/papyrus/README.adoc new file mode 100644 index 0000000000..b86ca7407d --- /dev/null +++ b/docs/papyrus/README.adoc @@ -0,0 +1,428 @@ +:toc: +:toclevels: 4 +[pass] +++++ +
+++++ += Papyrus +A Starknet full node + +image::./resources/img/papyrus-logo-square.png[Papyrus logo,200,200, align="center"] + +link:https://github.com/starkware-libs/papyrus/issues/new?assignees=&labels=bug&template=01_BUG_REPORT.md&title=bug%3A+[Report a Bug] Ā· link:https://github.com/starkware-libs/papyrus/issues/new?assignees=&labels=enhancement&template=02_FEATURE_REQUEST.md&title=feat%3A+"[Request a Feature] Ā· link:https://github.com/starkware-libs/papyrus/discussions"[Ask a Question] + +image:https://img.shields.io/github/actions/workflow/status/starkware-libs/papyrus/ci.yml?branch=main[Github workflow status] +image:https://img.shields.io/github/license/starkware-libs/papyrus.svg?style=flat-square[#LICENSE,title=Project license] +image:https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square[PRs welcome,link=https://github.com/starkware-libs/papyrus/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22] +image:https://codecov.io/gh/starkware-libs/papyrus/branch/main/graph/badge.svg?token=YZA9IPDHRM[codecov,link=https://codecov.io/gh/starkware-libs/papyrus] +[pass] +++++ +
+++++ + +== About + +Papyrus is a Starknet full node implemented in Rust. Papyrus tracks Starknetā€™s state as it evolves over time, and enables you to query this state and to execute transactions via Starknetā€™s JSON-RPC. + +=== Supported Starknet versions + +This Papyrus version supports the following starknet versions: + +* v0.13.0 + +== Disclaimer + +Papyrus is a work in progress. + +Use it at your own risk. + +== Getting started + +[#compiling-and-running-papyrus] +=== Building and running Papyrus locally + +[discrete] +==== Prerequisites + +* https://www.rust-lang.org/tools/install[Rust] must be installed. Minimum supported version is `1.76`. +* You must have access to an Ethereum node. For example, you can use a node provider such as Infura. + +[discrete] +==== Procedure + +. Fork and clone the Github repo. +. Build and run a Papyrus node with the default configuration by running the following commands: ++ +[source,bash] +----- +mkdir data +cargo run --release --package papyrus_node --bin papyrus_node -- --base_layer.node_url +----- ++ +[NOTE] +==== +Papyrus uses the `data` directory for the node's storage, as follows: + +`./data/` + +You can configure the directory name using the `storage.db_config.path_prefix` configuration parameter. +==== +. See the version of Papyrus by running the following command: ++ +[source,bash] +---- +cargo run --release --package papyrus_node --bin papyrus_node -- --version +---- + +=== Local node configuration + +The configuration is stored in one or more configuration files in `.json` format. + +The default Papyrus configuration file, link:https://github.com/starkware-libs/papyrus/blob/main/config/default_config.json[`default_config.json`], includes descriptions of all available parameters. + +// , including pointers to common values and #is_none flags for optional parameters. + +=== Customizing your configuration + +You can override the default configuration in the following ways: + +* Refer to one or more custom configuration files, using the same format as the default configuration file, `default_config.json`. For example, see any of the preset configuration files in this repository at `/config/presets/`. You can use configuration files when running a local node only, not a Docker image. +* Include configuration options in the command line when you run Papyrus. +* Set environment variables in the command line when you run Papyrus. + +==== Configuration files (local node only) + +The following rules apply: + +* You do not need to specify the default configuration file. +* There is no limit on the number of custom configuration files you use. +* If the same configuration parameter appears in multiple configuration files, the last file in the list determines the value. + +You can create separate configuration files to override specific configuration parameters. + +To create a custom configuration file, create a `.json` file using the same format as the default configuration file. + +To specify custom configuration files, include the `--config_file` command-line option when you run the full node locally, as follows: + +[source,bash,subs="verbatim,quotes"] +---- +cargo run --release --package papyrus_node --bin papyrus_node -- --base_layer.node_url --config-file +---- + +For example, preset `.json` files for several Starknet networks are located in this repository at https://github.com/starkware-libs/papyrus/blob/main/config/presets[`/config/presets`]. To use Sepolia testnet, you need to override the default values by using the file `/config/presets/sepolia_testnet.json`, as follows: + +[source,bash,subs="verbatim,quotes"] +---- +cargo run --release --package papyrus_node --bin papyrus_node -- --base_layer.node_url --config-file /config/presets/sepolia_testnet.json +---- + +==== Configuration via the command-line (local node and Docker image) + +You can specify configuration parameters as command-line options. To see all available configuration parameters, enter the following command: + +[source,bash] +---- +cargo run --release --package papyrus_node --bin papyrus_node -- --help +---- + +For example, to use Sepolia testnet, run the following command: + +[source,base,subs="verbatim,quotes"] +---- +cargo run --release --package papyrus_node --bin papyrus_node -- --base_layer.node_url \ +--chain_id SN_SEPOLIA \ +--starknet_url https://alpha-sepolia.starknet.io/ \ +--base_layer.starknet_contract_address 0xe2bb56ee936fd6433dc0f6e7e3b8365c906aa057 +---- + +For more information, see the papyrus-config https://github.com/starkware-libs/papyrus/blob/main/crates/papyrus_config/README.md[README]. + +=== Running Papyrus with Docker + +[discrete] +==== Prerequisites + +* https://docs.docker.com/get-docker/[Docker] should be installed. + +[discrete] +==== Procedure + +. Make a local directory to use for the containerā€™s data. You only need to complete this step the first time you run Papyrus. ++ +[source,bash] +---- +mkdir +---- +. Run a Papyrus node with the default configuration. You must explicitly give the container write access to the `` directory by adding `--user "$(id -u):$(id -g)"` to the `docker run` command. ++ +Enter the following command: ++ +[source,bash] +---- +docker run --rm --name papyrus\ + -p 8080-8081:8080-8081 \ + -v /:/app/data \ + ghcr.io/starkware-libs/papyrus:dev \ + --base_layer.node_url \ + --user "$(id -u):$(id -g)" +---- ++ +[NOTE] +==== +You must include the `dev`, tag which tracks the development branch and contains the most up-to-date code. When an official release is available, you can use the `latest` tag for the latest release. +==== + +==== Upgrading the Docker container + +Currently, there is no automatic upgrade mechanism. Make sure to periodically pull the latest image and re-run the node. + +==== Docker container memory usage + +The Papyrus node uses all available RAM in order to cache the storage. + +If no other applications are running on your machine, this is the recommended configuration. + +Otherwise, you can limit the node's memory usage by adding the `--memory` flag to run the node in a container with limited memory. Be aware that limiting the memory usage might make the node less efficient, as doing so decreases storage caching. + +For example, to limit memory usage to 1GB, run the container with the following command: + +[source,bash] +---- +docker run --rm --name papyrus\ + -p 8080-8081:8080-8081 \ + -v /:/app/data \ + --memory 1g + ghcr.io/starkware-libs/papyrus:dev \ + --base_layer.node_url \ + --user "$(id -u):$(id -g)" +---- + +For more information, see https://docs.docker.com/config/containers/resource_constraints/#limit-a-containers-access-to-memory[Limit a container's access to memory] in the Docker documentation. + +== Sending API requests to the node + +When sending API requests, send them to the path `/rpc/`. + +Where `` is one of the following strings: + +* `v0_6` +* `v0_7` + +See the API specification at the https://github.com/starkware-libs/starknet-specs/[Starknet specifications repository] on Github. You can send API requests using the following command: + +[source,bash] +---- +curl --location '/rpc/' --header 'Content-Type: application/json'\ + --data '{"jsonrpc":"2.0","id":0,"method":"", "params": ""}' +---- + +For example, to send a request calling the `starknet_getBlockTransactionCount` method, on block number 100000, using the 0.4.0 version of the API where `` is `localhost:8080`, use the following command: + +[source,bash] +---- +curl --location 'localhost:8080/rpc/v0_7_0' --header 'Content-Type: application/json'\ + --data '{"jsonrpc":"2.0","id":0,"method":"starknet_getBlockTransactionCount", "params": [{"block_number": 100000}] }' +---- + +== JSON RPC API endpoints + +[cols=",,",] +|=== +|Endpoint |V0.6 |V0.7 + +|`starknet_addDeclareTransaction` |image:https://lh7-us.googleusercontent.com/g1om8QyIrLsSpgSiQ32w-Uk4ICU03_JeFYNwz8N9BfTviIMCN0DwKGGP_bDpX7pv_StNK9yWMQ39lZdNHn1o7xzcrBu1s0WHLAaBD2-nPqhMDGf2l9K6c67oIRV0kmIAQk580wcKhRSGpbj9qF1SVoQ[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/g1om8QyIrLsSpgSiQ32w-Uk4ICU03_JeFYNwz8N9BfTviIMCN0DwKGGP_bDpX7pv_StNK9yWMQ39lZdNHn1o7xzcrBu1s0WHLAaBD2-nPqhMDGf2l9K6c67oIRV0kmIAQk580wcKhRSGpbj9qF1SVoQ[image,width=15,height=14] +|`starknet_addDeployAccountTransaction` |image:https://lh7-us.googleusercontent.com/B8OBZj3cblLUKbV6nRAmqPjzo86hmhw5XFBxYI8Xj1ZOpY6YoA3l-jiD2INst0aVVu7vsw3XBooNWfy-KulRi2ugDDG2XZpllKizcWDOqCC5uObph-RZWe4JGXbGu110oYtOoKYnRMtMOrl6I3Wz47s[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/g1om8QyIrLsSpgSiQ32w-Uk4ICU03_JeFYNwz8N9BfTviIMCN0DwKGGP_bDpX7pv_StNK9yWMQ39lZdNHn1o7xzcrBu1s0WHLAaBD2-nPqhMDGf2l9K6c67oIRV0kmIAQk580wcKhRSGpbj9qF1SVoQ[image,width=15,height=14] +|`starknet_addInvokeTransaction` |image:https://lh7-us.googleusercontent.com/-nCpIHRsN1sdvLKLMnROTpIVe47WJVzvriYawbDkMq_vEU_9-4LMkDE50du4Kt3ldKsoo0dQ75vEiS6vdRCNZKZEMFfpMNL3kwEalFIr6xTuunGecGT5uixtyQPXKKV60fbgihWsM8UWJ9o6U214XyQ[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/-nCpIHRsN1sdvLKLMnROTpIVe47WJVzvriYawbDkMq_vEU_9-4LMkDE50du4Kt3ldKsoo0dQ75vEiS6vdRCNZKZEMFfpMNL3kwEalFIr6xTuunGecGT5uixtyQPXKKV60fbgihWsM8UWJ9o6U214XyQ[image,width=15,height=14] +|`starknet_blockHashAndNumber` |image:https://lh7-us.googleusercontent.com/EoO9RVXThPQiY_jembL_X79RNAbVBKS8uPFm3B6825BtCaH8OGjUtQoaLHXFsNWPAgDL3LW3qqPzCY8PBpx4FYxP2CeEA1-d5xR1zFnC4l4xEdWX3iyvLDANfD4jrpixnlWJJnLCINUYf_aOOx4rKi8[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/EoO9RVXThPQiY_jembL_X79RNAbVBKS8uPFm3B6825BtCaH8OGjUtQoaLHXFsNWPAgDL3LW3qqPzCY8PBpx4FYxP2CeEA1-d5xR1zFnC4l4xEdWX3iyvLDANfD4jrpixnlWJJnLCINUYf_aOOx4rKi8[image,width=15,height=14] +|`starknet_blockNumber` |image:https://lh7-us.googleusercontent.com/lRvXpP6e55IY8f_ABJgiWIl7KXw8tSmscatVsdr-mJmUjYdb1EnPTRCL6Nzf9Z3B2HKJRAYALr1Ky3sT94UaTdDeOOBoU2S78hx7XssJTx1tfmsYFjy1X4eugRr7UkewcL5cEkvlM0wBaIweobOzqwM[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/lRvXpP6e55IY8f_ABJgiWIl7KXw8tSmscatVsdr-mJmUjYdb1EnPTRCL6Nzf9Z3B2HKJRAYALr1Ky3sT94UaTdDeOOBoU2S78hx7XssJTx1tfmsYFjy1X4eugRr7UkewcL5cEkvlM0wBaIweobOzqwM[image,width=15,height=14] +|`starknet_call` |image:https://lh7-us.googleusercontent.com/AMJELrIrqfmtu1peFMSAp_8fwbEq0ii2oQ8WmCQCsashQtXBXzjB_xX0_ULCAkub-pyuXhgzESbuFo4MBp_TAL7jOdls16wT5iPvAY66z64dC41eY2RsgpfU75W9FbSaoWW02OgKwR74mb9w0oOyhfI[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/AMJELrIrqfmtu1peFMSAp_8fwbEq0ii2oQ8WmCQCsashQtXBXzjB_xX0_ULCAkub-pyuXhgzESbuFo4MBp_TAL7jOdls16wT5iPvAY66z64dC41eY2RsgpfU75W9FbSaoWW02OgKwR74mb9w0oOyhfI[image,width=15,height=14] +|`starknet_chainId` |image:https://lh7-us.googleusercontent.com/XAAffcKlc1YqokxRhj5IP9omLNCXVlZu__OeF1sMpD2Am4FHcqF6kZgxw3nd7VAl5dtoRAdqpFqZl49VID6FPZF5dYwYUxGALu4cFE5IhlErvEwvbygrLBmbS3LlCeoAXVc7tznIiBh3qIEDj38cMOU[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/XAAffcKlc1YqokxRhj5IP9omLNCXVlZu__OeF1sMpD2Am4FHcqF6kZgxw3nd7VAl5dtoRAdqpFqZl49VID6FPZF5dYwYUxGALu4cFE5IhlErvEwvbygrLBmbS3LlCeoAXVc7tznIiBh3qIEDj38cMOU[image,width=15,height=14] +|`starknet_estimateFee` |image:https://lh7-us.googleusercontent.com/M0LxIZ_Hc3i586qUusRF1ajKBJy7pfGkFjyXPoJJjkqo3ZuDQSoeg5Xeq2hZmEf8i3cQIryS-QutIYh91yrX096YMKFhtXLpUxNha1oMAlXqDdYZsWYAsIaQr413Ckwzt3xdS4XqG7wpFCMwNLHsyC0[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/M0LxIZ_Hc3i586qUusRF1ajKBJy7pfGkFjyXPoJJjkqo3ZuDQSoeg5Xeq2hZmEf8i3cQIryS-QutIYh91yrX096YMKFhtXLpUxNha1oMAlXqDdYZsWYAsIaQr413Ckwzt3xdS4XqG7wpFCMwNLHsyC0[image,width=15,height=14] +|`starknet_estimateMessageFee` |image:https://lh7-us.googleusercontent.com/M0LxIZ_Hc3i586qUusRF1ajKBJy7pfGkFjyXPoJJjkqo3ZuDQSoeg5Xeq2hZmEf8i3cQIryS-QutIYh91yrX096YMKFhtXLpUxNha1oMAlXqDdYZsWYAsIaQr413Ckwzt3xdS4XqG7wpFCMwNLHsyC0[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/M0LxIZ_Hc3i586qUusRF1ajKBJy7pfGkFjyXPoJJjkqo3ZuDQSoeg5Xeq2hZmEf8i3cQIryS-QutIYh91yrX096YMKFhtXLpUxNha1oMAlXqDdYZsWYAsIaQr413Ckwzt3xdS4XqG7wpFCMwNLHsyC0[image,width=15,height=14] +|`starknet_getBlockTransactionCount` |image:https://lh7-us.googleusercontent.com/Il18PreRk3nlngA_130hPf-R8hzEAYpKAMkGOHJ3n1cH85L_0xa3YMrBMW8YisJmOfypRz_JKxwAYAr4ecg2SxnWfwO4QU7lNdj9qvna8y3zVf2tdr1p2YobgOWMgjzOfIqk3lUoxm4HkcXM6-5Ypeo[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/Il18PreRk3nlngA_130hPf-R8hzEAYpKAMkGOHJ3n1cH85L_0xa3YMrBMW8YisJmOfypRz_JKxwAYAr4ecg2SxnWfwO4QU7lNdj9qvna8y3zVf2tdr1p2YobgOWMgjzOfIqk3lUoxm4HkcXM6-5Ypeo[image,width=15,height=14] +|`starknet_getBlockWithTxHashes` |image:https://lh7-us.googleusercontent.com/sMIa3FRJlsY44FxGMxPeg_Q2L_ZkLlT70YWQiUkmAx9MNgbroWfKecSbOB0Av8zFRGlJgXgq7aqUO2vlbeRZPVCnTSgvBq4VJ5Q5qY6wctp0v31YTtfR0swzUQG9cywGaSwRGK2pTGZ2OYgEpnyert0[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/sMIa3FRJlsY44FxGMxPeg_Q2L_ZkLlT70YWQiUkmAx9MNgbroWfKecSbOB0Av8zFRGlJgXgq7aqUO2vlbeRZPVCnTSgvBq4VJ5Q5qY6wctp0v31YTtfR0swzUQG9cywGaSwRGK2pTGZ2OYgEpnyert0[image,width=15,height=14] +|`starknet_getBlockWithTxs` |image:https://lh7-us.googleusercontent.com/CdJSJ7lBUFFxh9YRlqjytjaYIU377ptXJbaR5y2nPkOPDrzrMglNRFa0tx7D9QqsuKL6kg0H7QhunQ5jqCfneivgsUE0cGXgpFOcGUiEc3gMCnks_nDCHArqROTXCZNQ1jP1AL3pVXkBWAw9fWhP8pY[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/CdJSJ7lBUFFxh9YRlqjytjaYIU377ptXJbaR5y2nPkOPDrzrMglNRFa0tx7D9QqsuKL6kg0H7QhunQ5jqCfneivgsUE0cGXgpFOcGUiEc3gMCnks_nDCHArqROTXCZNQ1jP1AL3pVXkBWAw9fWhP8pY[image,width=15,height=14] +|`starknet_getBlockWithReceipts` |image:https://lh7-us.googleusercontent.com/jaJgkNwvqZFGCyP5w-CcCbZlblXBnBonzRKxk9Y4WYPe6s205sHC3zGn-Ki_9ZvSNwxO-af1ZmihUGvlPfdGwho2GYcbPWfj93WtbzoRnESV1Oijz6JuB_c95O6YDtdcnnqPkOv0CKGYqMovs9SciRA[image,width=15,height=15] +|image:https://lh7-us.googleusercontent.com/CdJSJ7lBUFFxh9YRlqjytjaYIU377ptXJbaR5y2nPkOPDrzrMglNRFa0tx7D9QqsuKL6kg0H7QhunQ5jqCfneivgsUE0cGXgpFOcGUiEc3gMCnks_nDCHArqROTXCZNQ1jP1AL3pVXkBWAw9fWhP8pY[image,width=15,height=14] +|`starknet_getClass` |image:https://lh7-us.googleusercontent.com/b2BV-hTooxxqooQv3OHOPsuLNnUP6ct1cD42QCjcEdTdlEb6AcODsbwV-UkQeNOcD4K4vf8_H9QsbWg8K2Ruofqn5mh6Bhd8N7X2Un_xgE1DUM1AcMUn9ZYtq8sNCvxcU6Dpix6_4qTvdSb-4RgogM4[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/b2BV-hTooxxqooQv3OHOPsuLNnUP6ct1cD42QCjcEdTdlEb6AcODsbwV-UkQeNOcD4K4vf8_H9QsbWg8K2Ruofqn5mh6Bhd8N7X2Un_xgE1DUM1AcMUn9ZYtq8sNCvxcU6Dpix6_4qTvdSb-4RgogM4[image,width=15,height=14] +|`starknet_getClassAt` |image:https://lh7-us.googleusercontent.com/VhcZNCbRWBMAanu1b8XSIV9pFPYS2ngcfuZs2x-83kWGV9FJJnZ7rfaw_9BV0_OPFsikPRsVnftW0r6m3KGKsGOwGfWksqPmernCaZMmXNaGAX2PeA0tfe_CcLjQLHmutXoTZDpWGKr0vue478bcs9g[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/VhcZNCbRWBMAanu1b8XSIV9pFPYS2ngcfuZs2x-83kWGV9FJJnZ7rfaw_9BV0_OPFsikPRsVnftW0r6m3KGKsGOwGfWksqPmernCaZMmXNaGAX2PeA0tfe_CcLjQLHmutXoTZDpWGKr0vue478bcs9g[image,width=15,height=14] +|`starknet_getClassHashAt` |image:https://lh7-us.googleusercontent.com/LMl0fT2HvMIWHgrKlQOeyqJHjUtj3Y4Z6OuljCngyOYVd8UPvqiUOiy4cMyWLVdAXlZo0mB3r_H4NKr7jmjA5zxvjZraaZhqMEM9IrGpbQhI-xhqe2MzmneK9zsqNLFNSJYS6lrWTU68vUoLBzEDB8k[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/LMl0fT2HvMIWHgrKlQOeyqJHjUtj3Y4Z6OuljCngyOYVd8UPvqiUOiy4cMyWLVdAXlZo0mB3r_H4NKr7jmjA5zxvjZraaZhqMEM9IrGpbQhI-xhqe2MzmneK9zsqNLFNSJYS6lrWTU68vUoLBzEDB8k[image,width=15,height=14] +|`starknet_getEvents` |image:https://lh7-us.googleusercontent.com/IGyszI0PQbJdMxcngAs8N9MDo3MjxFHPbFfM5IWmwRbU6isYXZRY7JrtcPXnWSLPqsKweU7f96YcEDHfTSu6leRyyhd3g4rPAmxwArokqrtkUkQraMw3IRi02Uja7aeH45teyrRaj-2VWmqQUl7V3Yw[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/IGyszI0PQbJdMxcngAs8N9MDo3MjxFHPbFfM5IWmwRbU6isYXZRY7JrtcPXnWSLPqsKweU7f96YcEDHfTSu6leRyyhd3g4rPAmxwArokqrtkUkQraMw3IRi02Uja7aeH45teyrRaj-2VWmqQUl7V3Yw[image,width=15,height=14] +|`starknet_getNonce` |image:https://lh7-us.googleusercontent.com/ru-XjFrOJ00S5N_X3fqbX-sTb9WzrLJux42cX4MSi4fbYIK7g5mRz99MdkvwKoq4aJyxqv-Ytn-SS_HK-c7YVv5sJe6dF7TBuTW28meUeB91Ulmbm693D1GCIAG515y7mSeQuincRv-VDzCafl1FqZk[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/ru-XjFrOJ00S5N_X3fqbX-sTb9WzrLJux42cX4MSi4fbYIK7g5mRz99MdkvwKoq4aJyxqv-Ytn-SS_HK-c7YVv5sJe6dF7TBuTW28meUeB91Ulmbm693D1GCIAG515y7mSeQuincRv-VDzCafl1FqZk[image,width=15,height=14] +|`starknet_getStateUpdate` |image:https://lh7-us.googleusercontent.com/z2Iinm_IgpvefYJTFfrKxgXBxVZ9PwSxPRdUfTeFCfY_MRewFBMIxCTaz_Jov38VlNA1tEsqIvAgqY_OBlKvNhG6JIaFMli_bxarAXPh8Ro2wu0DBdl9_hafLueUmB3gaFVi_1bY7XqIy3LOGIHgdpY[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/z2Iinm_IgpvefYJTFfrKxgXBxVZ9PwSxPRdUfTeFCfY_MRewFBMIxCTaz_Jov38VlNA1tEsqIvAgqY_OBlKvNhG6JIaFMli_bxarAXPh8Ro2wu0DBdl9_hafLueUmB3gaFVi_1bY7XqIy3LOGIHgdpY[image,width=15,height=14] +|`starknet_getStorageAt` |image:https://lh7-us.googleusercontent.com/Q0n2aBJM-uIWrG1kosFu2MhQKg4cksWcvDi9KQp5L-utvsMZAud0LqQUdlHEnI7pCsBFLYEtBNmLM9VhqxhWlhAa_24M6RdLX5qex5o34w2jc4ARL55DFBDYIfGBhSUasx_NyAWJft_4HOajJnkWeGA[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/Q0n2aBJM-uIWrG1kosFu2MhQKg4cksWcvDi9KQp5L-utvsMZAud0LqQUdlHEnI7pCsBFLYEtBNmLM9VhqxhWlhAa_24M6RdLX5qex5o34w2jc4ARL55DFBDYIfGBhSUasx_NyAWJft_4HOajJnkWeGA[image,width=15,height=14] +|`starknet_getTransactionByBlockIdAndIndex` |image:https://lh7-us.googleusercontent.com/2nPt3GGNY9upWAjl55qAweT8bAHwNvgnMzbuV3e_1aM0i3AFGEOjBJeupMC5Ik2ogBXJKipLMyrJ9qceWy6k-b-odz5g30Z1WvyO5zdCPFu5tre3qvoWqh0Ye1METBLvzztPki1eQHZXwr-bn2yrJsQ[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/2nPt3GGNY9upWAjl55qAweT8bAHwNvgnMzbuV3e_1aM0i3AFGEOjBJeupMC5Ik2ogBXJKipLMyrJ9qceWy6k-b-odz5g30Z1WvyO5zdCPFu5tre3qvoWqh0Ye1METBLvzztPki1eQHZXwr-bn2yrJsQ[image,width=15,height=14] +|`starknet_getTransactionByHash` |image:https://lh7-us.googleusercontent.com/k9qvKyttKSe8_AW4EvmGfCPnQi4R9g514n9uEbsKs5ZMXI7fkrCR5jMOk4KCo7pEn0JyCtJDRRGOuJf-OL5cP9-7P9rU2mN9R6wU90-js5YcDAwyrrZ4TD_i9h-TXkdFt5D40V1hgAwA1czHRgf_YVo[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/k9qvKyttKSe8_AW4EvmGfCPnQi4R9g514n9uEbsKs5ZMXI7fkrCR5jMOk4KCo7pEn0JyCtJDRRGOuJf-OL5cP9-7P9rU2mN9R6wU90-js5YcDAwyrrZ4TD_i9h-TXkdFt5D40V1hgAwA1czHRgf_YVo[image,width=15,height=14] +|`starknet_getTransactionReceipt` |image:https://lh7-us.googleusercontent.com/031uVAYby7m12Je0ZuWbebnjvKzCK0lII05KItL6cOmZH_xUFz_yGV6E4xvjjt1aDD8y-6skH2mbSkfYEZQx64CzJRpd7G5uSoEAhsG2P3r51HqYXX-G7vafHmEPgD-O4mfp9diQSvEOiieEFPAW0yc[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/031uVAYby7m12Je0ZuWbebnjvKzCK0lII05KItL6cOmZH_xUFz_yGV6E4xvjjt1aDD8y-6skH2mbSkfYEZQx64CzJRpd7G5uSoEAhsG2P3r51HqYXX-G7vafHmEPgD-O4mfp9diQSvEOiieEFPAW0yc[image,width=15,height=14] +|`starknet_getTransactionStatus` |image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|`starknet_simulateTransactions` |image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|`starknet_specVersion` |image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|`starknet_syncing` |image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|`starknet_traceBlockTransactions` |image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|`starknet_traceTransaction` |image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|image:https://lh7-us.googleusercontent.com/w8n4EgH6kPlyU55MMLJYjm2v3bOD_5MfsYJnpcvXqkM4Zsj0Eu2JekM9ZwztTydhqfUW_gtYGvSg2P5NF7Zib5heFonOYRhya18tdGQebkUXCQKxoSgFoicqpdHNgyU9Cf-Iuak1nSibbJWKN6H_Bbg[image,width=15,height=14] +|=== + +== Papyrus monitoring API + +Endpoints for retrieving monitoring information for the running node are available at the path `monitoring`. + +You can send API requests using the following `curl` command: + +[source,bash] +---- +curl -X GET https:///monitoring/ +---- + +For example, when the node monitoring gateway is exposed at `localhost:8081`, send a request to view the liveliness endpoint using the following `curl` command: + +[source,bash] +---- +curl -X GET http://localhost:8081/monitoring/alive +---- + +=== Papyrus monitoring API endpoints + +[horizontal,labelwidth="15"] +`alive`:: +Liveliness endpoint. Returns status code `200` if the node is alive. +`nodeVersion`:: +Gets the node version. +`nodeConfig`:: +Gets the current nodeā€™s configuration. +`dbTablesStats`:: +Gets statistics for each table in the libmdbx database. For more information, see https://docs.rs/libmdbx/latest/libmdbx/struct.Stat.html[libmdbx::Stat] in the libmdbx documentation. +`metrics`:: +Gets metrics of the nodeā€™s activity. For more information, see xref:#collecting-metrics[]. +`peer_id`:: +Gets the P2P peer ID of the node (if the network component is inactive returns an empty string). + +== Collecting metrics + +Papyrus can collect the following types of metrics: + +* JSON-RPC metrics +* synchronization metrics +* process metrics +* p2p network metrics + +By default, the node does not collect metrics and the metric path returns the following error code: + +[source, bash] +---- +405 - Method Not Allowed. +---- + +*To collect metrics*, set the configuration value `collect_metrics` in the default configuration file to `true`. + +== Viewing metrics + +Papyrus collects the following types of metrics: + +* `rpc_incoming_requests` counter +* `rpc_failed_requests` counter +* `rpc_request_latency_seconds` histogram +* `process` #Are these process metrics?# +* `papyrus` #Are these sync metrics?# + +You can see information for each metric by entering the following command: + +[source,bash] +---- +\{method="", version=""} +---- + +Where: + +[horizontal,labelwidth="15"] +``:: is the JSON-RPC metric. +``:: is the name of the JSON RPC API method endpoint, not including `starknet_`. +``:: is the JSON-RPC API version. + +For example, to get all the incoming requests to the method `starknet_chainId` in JSON-RPC version 0.4, use `method="chainId"` in the following command: + +[source,bash] +---- +curl -X GET https://localhost:8081/monitoring/metrics/rpc_incoming_requests\{method="chainId", version="V0_4"} +---- + +[TIP] +==== +To get the number of requests with an illegal method name, such as those resulting from a typo, like `starknet_chainIddd`, use `illegal_method` for ``. +==== + +== Deployment + +See a helm chart for deploying the node to a Kubernetes cluster in the https://github.com/starkware-libs/papyrus/blob/main/deployments/helm/README.md[deployments folder]. + +== Roadmap + +See the https://github.com/starkware-libs/papyrus/issues[open issues] for proposed features and known issues: + +* https://github.com/starkware-libs/papyrus/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc[Top Feature Requests] (Add your votes using the šŸ‘ reaction) +* https://github.com/starkware-libs/papyrus/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc[Top Bugs] (Add your votes using the šŸ‘ reaction) +* https://github.com/starkware-libs/papyrus/issues?q=is%3Aopen+is%3Aissue+label%3Abug[Newest Bugs] + +== Getting help + +Reach out to the maintainer at any of the following: + +* https://github.com/starkware-libs/papyrus/discussions[GitHub Discussions] +* Contact options listed on https://github.com/starkware-libs[this GitHub profile] + +== Help make Papyrus better! + +If you want to say thank you or support the active development of Papyrus: + +* Add a https://github.com/starkware-libs/papyrus[GitHub Star] to the project. +* Tweet about Papyrus. +* Write interesting articles about the project on link:https://dev.to/[Dev.to], link:https://medium.com/[Medium], or your personal blog. + +== Contributing + +Thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make benefit everybody else and are greatly appreciated. + +Please read link:https://github.com/starkware-libs/papyrus/blob/main/docs/CONTRIBUTING.md[our contribution guidelines], and thank you for being involved! + +== Authors and contributors + +For a full list of all authors and contributors, see link:https://github.com/starkware-libs/papyrus/contributors[the contributors page]. + +== Security + +Papyrus follows good practices of security, but 100% security cannot be assured. Papyrus is provided "as is" without any warranty. Use at your own risk. + +For more information and to report security issues, please refer to our link:https://github.com/starkware-libs/papyrus/blob/main/docs/SECURITY.md[security documentation]. + +== License + +This project is licensed under the Apache 2.0 license. + +For more information, see link:https://github.com/starkware-libs/papyrus/blob/main/LICENSE[LICENSE]. diff --git a/docs/papyrus/SECURITY.md b/docs/papyrus/SECURITY.md new file mode 100644 index 0000000000..701e487ca0 --- /dev/null +++ b/docs/papyrus/SECURITY.md @@ -0,0 +1,16 @@ +# Security Policy + +## Reporting a Vulnerability + +If there are any vulnerabilities in **Papyrus**, don't hesitate to _report them_. + +1. Use any of the [private contact addresses](https://github.com/starkware-libs/papyrus#support). +2. Describe the vulnerability. + + If you have a fix, that is most welcome -- please attach or summarize it in your message! + +3. We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report. + + Please **do not disclose the vulnerability publicly** until a fix is released! + +4. Once we have either a) published a fix, or b) declined to address the vulnerability for whatever reason, you are free to publicly disclose it. diff --git a/docs/starknet_api/README.md b/docs/starknet_api/README.md new file mode 100644 index 0000000000..3ad23a62d5 --- /dev/null +++ b/docs/starknet_api/README.md @@ -0,0 +1,10 @@ +# starknet-api + +## About + +`starknet-api` contains general type definitions in Rust for starknet. + +## License + +This project is licensed under the **Apache 2.0 license**. +See [LICENSE](LICENSE) for more information. \ No newline at end of file diff --git a/papyrus_utilities.Dockerfile b/papyrus_utilities.Dockerfile new file mode 100644 index 0000000000..f6a36f7963 --- /dev/null +++ b/papyrus_utilities.Dockerfile @@ -0,0 +1,50 @@ +# syntax = devthefuture/dockerfile-x + +# The first line and the "INCLUDE Dockerfile" enable us to use the builder stage from the main Dockerfile. +# The DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 in the image creation command is to be able to use the dockerfile-x syntax. + +# To build the papyrus utilities image, run from the root of the project: +# DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker build -f papyrus_utilities.Dockerfile . + +INCLUDE Dockerfile + +# Build papyrus utilities. +FROM builder AS utilities_builder + +# Build papyrus_load_test and copy its resources. +RUN cargo build --target x86_64-unknown-linux-musl --release --package papyrus_load_test --bin papyrus_load_test + +# Build dump_declared_classes. +RUN cargo build --target x86_64-unknown-linux-musl --release --package papyrus_storage --features "clap" \ + --bin dump_declared_classes + +# Build storage_benchmark. +RUN cargo build --target x86_64-unknown-linux-musl --release --package papyrus_storage \ + --features "clap statistical" --bin storage_benchmark + +# Starting a new stage so that the final image will contain only the executables. +FROM alpine:3.17.0 AS papyrus_utilities + +# Set the working directory to '/app', to match the main docker file. +WORKDIR /app + +# Copy the load test executable and its resources. +COPY --from=utilities_builder /app/target/x86_64-unknown-linux-musl/release/papyrus_load_test /app/target/release/papyrus_load_test +COPY crates/papyrus_load_test/resources/ /app/crates/papyrus_load_test/resources + +# Copy the dump_declared_classes executable. +COPY --from=utilities_builder /app/target/x86_64-unknown-linux-musl/release/dump_declared_classes /app/target/release/dump_declared_classes + +# Copy the storage_benchmark executable. +COPY --from=utilities_builder /app/target/x86_64-unknown-linux-musl/release/storage_benchmark /app/target/release/storage_benchmark + +# Set the PATH environment variable to enable running an executable only with its name. +ENV PATH="/app/target/release:${PATH}" + +ENTRYPOINT echo -e \ + "There is no default executable for this image. Run an executable using its name or path to it.\n\ + The available executables are:\n\ + - papyrus_load_test, performs a stress test on a node RPC gateway.\n\ + - dump_declared_classes, dumps the declared_classes table from the storage to a file.\n\ + - storage_benchmark, performs a benchmark on the storage.\n\ + For example, in a docker runtime: docker run --entrypoint papyrus_load_test " diff --git a/resources/papyrus/img/check.png b/resources/papyrus/img/check.png new file mode 100644 index 0000000000..5daa19f278 Binary files /dev/null and b/resources/papyrus/img/check.png differ diff --git a/resources/papyrus/img/cross.png b/resources/papyrus/img/cross.png new file mode 100644 index 0000000000..bcdd572544 Binary files /dev/null and b/resources/papyrus/img/cross.png differ diff --git a/resources/papyrus/img/papyrus-logo-square.png b/resources/papyrus/img/papyrus-logo-square.png new file mode 100644 index 0000000000..09bf61fc71 Binary files /dev/null and b/resources/papyrus/img/papyrus-logo-square.png differ diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000000..1cb6623287 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,34 @@ +edition = "2021" +newline_style = "Unix" +use_field_init_shorthand = true +use_small_heuristics = "Max" +use_try_shorthand = true +max_width = 100 + +# Unstable features below +unstable_features = true +version = "Two" +comment_width = 100 +format_code_in_doc_comments = true +format_macro_bodies = true +format_macro_matchers = true +format_strings = true +imports_granularity = "Module" +imports_layout = "HorizontalVertical" +group_imports = "StdExternalCrate" +normalize_comments = true +normalize_doc_attributes = true +wrap_comments = true + +# To use these settings in vscode, add the following line to your settings: +# "rust-analyzer.rustfmt.overrideCommand": [ +# "rustup", +# "run", +# "nightly-2023-10-19", +# "--", +# "rustfmt", +# "--edition", +# "2018", +# "--" +# ] +# and run "rustup toolchain install nightly-2023-10-19". diff --git a/scripts/clippy.sh b/scripts/clippy.sh index 63cfd37126..7ca2f22768 100755 --- a/scripts/clippy.sh +++ b/scripts/clippy.sh @@ -1,4 +1,10 @@ #!/bin/bash -cargo clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \ - -D nonstandard-style -D rust-2018-idioms -D unused +# TODO: Revert clippy::unwrap_used to -D after fixing all the unwraps. +cargo clippy --workspace --all-targets --all-features -- \ + -D future-incompatible \ + -D nonstandard-style \ + -D rust-2018-idioms \ + -D unused \ + -A clippy::unwrap_used \ + -A clippy::blocks_in_conditions # This is because of a bug in tracing: https://github.com/tokio-rs/tracing/issues/2876 diff --git a/scripts/merge_paths.json b/scripts/merge_paths.json index 5fa5c408d2..d2f2c3cb3e 100644 --- a/scripts/merge_paths.json +++ b/scripts/merge_paths.json @@ -1,4 +1,3 @@ { - "main-v0.13.1": "main-v0.13.2", "main-v0.13.2": "main" } diff --git a/scripts/requirements.txt b/scripts/requirements.txt new file mode 100644 index 0000000000..64b1adaeeb --- /dev/null +++ b/scripts/requirements.txt @@ -0,0 +1 @@ +GitPython diff --git a/scripts/run_tests.py b/scripts/run_tests.py new file mode 100755 index 0000000000..9bbe0ed2d1 --- /dev/null +++ b/scripts/run_tests.py @@ -0,0 +1,114 @@ +#!/bin/env python3 + +import argparse +from calendar import c +import re +import subprocess +import os +from typing import Dict, List, Set, Optional +from git import Repo + +PATTERN = r"(\w+)\s*v([\d.]*.*)\((.*?)\)" + +# Pattern to match the dependency tree output (`cargo tree -i` output). +# First match group is the dependent crate name; second match group is the local path to the +# dependant crate. +# '([a-zA-Z0-9_]+)' is the crate name. +# ' [^(]* ' is anything between the crate name and the path (path is in parens). +# '\(([^)]+)\)' should match the path to the crate. No closing paren in the path. +DEPENDENCY_PATTERN = r"([a-zA-Z0-9_]+) [^(]* \(([^)]+)\)" + + +def get_workspace_tree() -> Dict[str, str]: + tree = dict() + res = subprocess.check_output("cargo tree --depth 0".split()).decode("utf-8").splitlines() + for l in res: + m = re.match(PATTERN, l) + if m is not None: + tree.update({m.group(1): m.group(3)}) + return tree + + +def get_local_changes(repo_path, commit_id: Optional[str]) -> List[str]: + os.environ["GIT_PYTHON_REFRESH"] = "quiet" # noqa + repo = Repo(repo_path) + try: + repo.head.object # Check if local_repo is a git repo. + except ValueError: + print(f"unable to validate {repo_path} as a git repo.") + raise + + return [c.a_path for c in repo.head.commit.diff(commit_id)] + + +def get_modified_packages(files: List[str]) -> Set[str]: + tree = get_workspace_tree() + packages = set() + for file in files: + for p_name, p_path in tree.items(): + if os.path.abspath(file).startswith(p_path): + packages.add(p_name) + return packages + + +def get_package_dependencies(package_name: str) -> Set[str]: + res = ( + subprocess.check_output(f"cargo tree -i {package_name} --prefix none".split()) + .decode("utf-8") + .splitlines() + ) + deps = set() + for l in res: + m = re.match(DEPENDENCY_PATTERN, l) + if m is not None: + deps.add(m.group(1)) + return deps + + +def run_test(changes_only: bool, commit_id: Optional[str], concurrency: bool): + local_changes = get_local_changes(".", commit_id=commit_id) + modified_packages = get_modified_packages(local_changes) + args = [] + tested_packages = set() + if changes_only: + for p in modified_packages: + deps = get_package_dependencies(p) + print(f"Running tests for {deps}") + tested_packages.update(deps) + if len(args) == 0: + print("No changes detected.") + return + + for package in tested_packages: + args.extend(["--package", package]) + + cmd = ["cargo", "test"] + args + + if concurrency and "blockifier" in tested_packages: + cmd.extend(["--features", "concurrency"]) + + print("Running tests...") + print(cmd, flush=True) + subprocess.run(cmd, check=True) + print("Tests complete.") + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="Presubmit script.") + parser.add_argument("--changes_only", action="store_true") + parser.add_argument( + "--concurrency", + action="store_true", + help="If blockifier is to be tested, add the concurrency flag.", + ) + parser.add_argument("--commit_id", type=str, help="GIT commit ID to compare against.") + return parser.parse_args() + + +def main(): + args = parse_args() + run_test(changes_only=args.changes_only, commit_id=args.commit_id, concurrency=args.concurrency) + + +if __name__ == "__main__": + main() diff --git a/scripts/taplo.sh b/scripts/taplo.sh new file mode 100755 index 0000000000..ab969e1a55 --- /dev/null +++ b/scripts/taplo.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# To auto-fix formatting install taplo (`cargo install taplo-cli`) and run `taplo format`. +# Formatting options can be configured in the root `taplo.toml` file. + +taplo format --check --diff 1>&2 diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 0000000000..a64174e938 --- /dev/null +++ b/taplo.toml @@ -0,0 +1,11 @@ +[formatting] +column_width = 100 +reorder_arrays = true +reorder_keys = true + +# Don't reorder the "package" section(s). +[[rule]] +formatting = { reorder_keys = false } +keys = ["package", "workspace.package"] + +# Other configs from here: https://taplo.tamasfe.dev/configuration/formatter-options.html.