-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: custom rpc
- Loading branch information
Showing
10 changed files
with
175 additions
and
8 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,79 @@ | ||
name: Cargo Build & Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
RUST_LOG: info | ||
|
||
jobs: | ||
build_and_test: | ||
name: Rust project - latest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
|
||
env: | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_USER: root | ||
POSTGRES_DB: state | ||
|
||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- name: Cargo test | ||
run: cargo test --release --verbose | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- name: Install Dependencies | ||
run: sudo apt install protobuf-compiler | ||
- run: rustup component add clippy | ||
- run: cargo clippy --all-targets -- -D warnings |
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,24 @@ | ||
CARGO = cargo | ||
|
||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Darwin) | ||
CARGO += --config 'build.rustdocflags = ["-C", "link-args=-framework CoreFoundation -framework Security"]' | ||
endif | ||
|
||
help: ## Display this help screen | ||
@grep -h \ | ||
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ | ||
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
clippy: ## Run clippy checks over all workspace members and formatted correctly | ||
@cargo check | ||
@cargo fmt --all -- --check | ||
@cargo clippy --all-targets -- -D warnings --no-deps | ||
|
||
fix: ## Automatically apply lint suggestions. This flag implies `--no-deps` and `--all-targets` | ||
@cargo clippy --fix | ||
|
||
test: ## Run tests for all the workspace members | ||
@cargo test --release --all | ||
|
||
.PHONY: clippy fmt test |
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
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 @@ | ||
large-error-threshold = 1000 |
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
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 @@ | ||
//! The Client of Eigen Proof Network | ||
//! A standalone process is needed to finish: | ||
//! 1) Get the Latest block that not proved, check if current node need to prove it. If so, submit | ||
//! the proof generation request to proof network; | ||
//! 2) Keep polling if the task is finished. | ||
//! 3) If the task is finished, update the status into proof database, hence the extended RPC module will fetch this and return it to SDK. |
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
1 change: 1 addition & 0 deletions
1
testdata/account1.keystore/0x540ea708597d8e46CB33BE43139452d8c9583686
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 @@ | ||
{"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"360f77a557873d91241bf912fcc25d84"},"ciphertext":"38fd05917cfb90e60a275bde426dac36b92428124b9a38d2801b52e38873bb31","kdf":"scrypt","kdfparams":{"dklen":32,"n":8192,"p":1,"r":8,"salt":"610187a40bfc915fe3b7890905f74667d8b399e7db21fac0b93161cbd27cc479"},"mac":"80221f1794b86b3430a5a98fc58a20e1dced667472c9771d2a531554bf4de6be"},"id":"78f3c32e-a270-47a1-8180-0a7b607c28b6","version":3} |
1 change: 1 addition & 0 deletions
1
testdata/account2.keystore/0x6831Fb06762332dCa543C0F2b5795692d896E3D4
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 @@ | ||
{"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"04bfb66fce1bb39650f34a717364805e"},"ciphertext":"f8a53136b7e3e0933f1908c5e527efccc13acd18a6bb8bd7225107e8f2af41bc","kdf":"scrypt","kdfparams":{"dklen":32,"n":8192,"p":1,"r":8,"salt":"ac9a154a193f7c91470ff4347332041e6dc325d1ec9c9e64c90e017064cb58fe"},"mac":"9fa479c5157f0ec2291922f9be6b70b0825eb6dff5bc708231c94b734fdc7eb3"},"id":"e0f3ae90-75ec-428e-a938-a25deeb3a665","version":3} |
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,37 @@ | ||
{ | ||
"nonce": "0x42", | ||
"timestamp": "0x0", | ||
"extraData": "0x5343", | ||
"gasLimit": "0x1388", | ||
"difficulty": "0x400000000", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"alloc": { | ||
"0x540ea708597d8e46CB33BE43139452d8c9583686": { | ||
"balance": "0x4a47e3c12448f4ad000000" | ||
}, | ||
"0x6831Fb06762332dCa543C0F2b5795692d896E3D4": { | ||
"balance": "0x4a47e3c12448f4ad000000" | ||
} | ||
}, | ||
"number": "0x0", | ||
"gasUsed": "0x0", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"config": { | ||
"ethash": {}, | ||
"chainId": 12345, | ||
"homesteadBlock": 0, | ||
"eip150Block": 0, | ||
"eip155Block": 0, | ||
"eip158Block": 0, | ||
"byzantiumBlock": 0, | ||
"constantinopleBlock": 0, | ||
"petersburgBlock": 0, | ||
"istanbulBlock": 0, | ||
"berlinBlock": 0, | ||
"londonBlock": 0, | ||
"terminalTotalDifficulty": 0, | ||
"terminalTotalDifficultyPassed": true, | ||
"shanghaiTime": 0 | ||
} | ||
} |