-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
201 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Conventional Commits | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: webiny/action-conventional-commits@v1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# This workflow is borrowed from reth: https://github.com/paradigmxyz/reth/blob/e04292247fff14ea93b4b0f6cf427bc9e4365c75/.github/workflows/dependencies.yml | ||
# Automatically run `cargo update` periodically | ||
|
||
name: Update Dependencies | ||
|
||
on: | ||
schedule: | ||
# Run weekly | ||
- cron: '0 0 * * SUN' | ||
workflow_dispatch: | ||
# Needed so we can run it manually | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: cargo-update | ||
TITLE: 'chore(deps): weekly `cargo update`' | ||
BODY: | | ||
Automation to keep dependencies in `Cargo.lock` current. | ||
<details><summary><strong>cargo update log</strong></summary> | ||
<p> | ||
```log | ||
$cargo_update_log | ||
``` | ||
</p> | ||
</details> | ||
jobs: | ||
update: | ||
name: Update | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: cargo update | ||
# Remove first line that always just says "Updating crates.io index" | ||
run: cargo update --color never 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log | ||
|
||
- name: craft commit message and PR body | ||
id: msg | ||
run: | | ||
export cargo_update_log="$(cat cargo_update.log)" | ||
echo "commit_message<<EOF" >> $GITHUB_OUTPUT | ||
printf "$TITLE\n\n$cargo_update_log\n" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
echo "body<<EOF" >> $GITHUB_OUTPUT | ||
echo "$BODY" | envsubst >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
add-paths: ./Cargo.lock | ||
commit-message: ${{ steps.msg.outputs.commit_message }} | ||
title: ${{ env.TITLE }} | ||
body: ${{ steps.msg.outputs.body }} | ||
branch: ${{ env.BRANCH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Rust | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
fmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt | ||
- name: Cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Cargo check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --workspace | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
- name: Cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all --all-targets --all-features --no-deps -- -D warnings | ||
|
||
build: | ||
name: Build Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Cargo build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --workspace --release | ||
|
||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ Cargo.lock | |
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[workspace] | ||
members = [ "portal-verkle-trie" ] | ||
resolver = "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# portal-verkle | ||
The implementation of the Portal Network version of Verkle Trie | ||
# Verkle trie in Portal Network | ||
|
||
This repository contains Rust implementation of the Verkle trie for usage inside Portal Network. | ||
|
||
**This code has not been reviewed and is not safe to use in non-research capacities.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "portal-verkle-trie" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "Implementation of the Portal Network version of the Verkle trie." | ||
license = "MIT" | ||
readme = "README.md" | ||
keywords = ["ethereum", "portal-network", "verkle"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# The Portal Network implementation of the Verkle trie | ||
|
||
This crate implements the Portal Network version of the Verkle trie, whose specification can be found [here](https://github.com/ethereum/portal-network-specs/blob/master/state-verkle-network.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
imports_granularity = "Crate" | ||
comment_width = 100 | ||
wrap_comments = true | ||
format_code_in_doc_comments = true | ||
doc_comment_code_block_width = 100 | ||
use_field_init_shorthand = true |