Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tree History #13

Merged
merged 27 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
19c6fcb
add test
dcbuild3r Oct 25, 2023
e071b00
added deserialization for InclusionProof
0xKitsune Oct 26, 2023
c869dd2
updated tree history structure to only store derived tree after a seq…
0xKitsune Oct 26, 2023
535bf27
fix tests in tree_data
0xKitsune Oct 27, 2023
ba1cb73
updated tree_data tests
0xKitsune Oct 27, 2023
aae9015
fix: tree_data tests
0xKitsune Oct 27, 2023
bede5a8
patched tree syncing, updated tests to include proofs from historical…
0xKitsune Oct 27, 2023
bcc5863
updated test utilities
0xKitsune Oct 27, 2023
98efd4b
added ci
0xKitsune Oct 27, 2023
2601f09
cargo clippy
0xKitsune Oct 27, 2023
a7d3901
Merge pull request #12 from worldcoin/0xkitsune/ci
0xKitsune Oct 27, 2023
cd7c2de
updated ci
0xKitsune Oct 27, 2023
627b84d
updated ci
0xKitsune Oct 27, 2023
d7c9209
patched tree data tests
0xKitsune Oct 27, 2023
7b0db93
removed unused imports
0xKitsune Oct 27, 2023
540d97f
cargo fmt
0xKitsune Oct 27, 2023
7f944a1
cargo clippy
0xKitsune Oct 27, 2023
788e563
added tree history size to inclusion proof test
0xKitsune Oct 27, 2023
87b017c
cargo sort
0xKitsune Oct 27, 2023
62a6470
cargo vet init
0xKitsune Oct 27, 2023
73f1246
updated logic if logs is empty in sync to head
0xKitsune Oct 27, 2023
67f78ba
removed redundant last synced block
0xKitsune Oct 27, 2023
a5b4f55
updated to use selector from abigen
0xKitsune Oct 27, 2023
cd854eb
fmt
0xKitsune Oct 27, 2023
6252acc
updated audits.toml
0xKitsune Oct 27, 2023
a4e8303
updated cargo vet
0xKitsune Oct 27, 2023
5645cf3
updated todos
0xKitsune Oct 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG-FORM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Bug report
description: File a bug report
labels: ["bug"]
title: "[Bug] "
body:
- type: markdown
attributes:
value: |
Please ensure that the bug has not already been filed in the issue tracker.

Thanks for taking the time to report this bug!
- type: textarea
attributes:
label: Describe the bug
description: Please include code snippets as well if relevant.
validations:
required: true
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE-FORM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Feature request
description: Suggest a feature
labels: ["enhancement"]
title: "[Feature] "
body:
- type: markdown
attributes:
value: |
Please ensure that the feature has not already been requested in the issue tracker.
- type: textarea
attributes:
label: Describe the feature you would like
description:
Please also describe your goals for the feature. What problems it solves, how it would
be used, etc.
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context to the feature (screenshots, resources, etc.)
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Bug fixes and new features should include tests.

Contributors guide: https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md

The contributors guide includes instructions for running rustfmt and building the
documentation.
-->

<!-- ** Please select "Allow edits from maintainers" in the PR Options ** -->

## Motivation

<!--
Explain the context and why you're making that change. What is the problem
you're trying to solve? In some cases there is not a problem and this can be
thought of as being the motivation for your change.
-->

## Solution

<!--
Summarize the solution and provide any necessary context needed to understand
the code change.
-->

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
129 changes: 129 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: CI

on:
push:
branches:
- main
pull_request:
types: [opened,synchronize,reopened]
branches:
- main

env:
RUST_VERSION: "1.74"
NIGHTLY_VERSION: nightly-2023-08-29
CARGO_TERM_COLOR: always
# Skip incremental build and debug info generation in CI
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.NIGHTLY_VERSION }}
override: true
components: rustfmt, clippy
- name: Install protobuf-compiler
run: sudo apt-get install -y protobuf-compiler
- name: Cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ env.RUST_VERSION }}-${{ env.NIGHTLY_VERSION }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ env.RUST_VERSION }}-${{ env.NIGHTLY_VERSION }}-cargo-lint-
- name: Install cargo-sort
uses: actions-rs/[email protected]
with:
crate: cargo-sort
version: latest
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check Cargo.toml formatting
run: cargo sort --check --check-format
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --locked --all-targets
- name: Check docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --locked --no-deps --document-private-items

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.NIGHTLY_VERSION }}
override: true
- name: Install protobuf-compiler
run: sudo apt-get install -y protobuf-compiler
- name: Cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ env.RUST_VERSION }}-${{ env.NIGHTLY_VERSION }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ env.RUST_VERSION }}-${{ env.NIGHTLY_VERSION }}-cargo-test-
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Build tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --workspace --no-run
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --workspace

cargo-vet:
name: Vet Dependencies
runs-on: ubuntu-latest
env:
CARGO_VET_VERSION: 0.8.0
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
- uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/cargo-vet
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }}
- name: Add the tool cache directory to the search path
run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
- name: Ensure that the tool cache is populated with the cargo-vet binary
run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
- name: Invoke cargo-vet
run: cargo vet --locked
100 changes: 65 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading