diff --git a/.github/workflows/gwos-evm-fuzz.yml b/.github/workflows/gwos-evm-fuzz.yml index b63f560c5..0f96fd748 100644 --- a/.github/workflows/gwos-evm-fuzz.yml +++ b/.github/workflows/gwos-evm-fuzz.yml @@ -31,9 +31,9 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} - name: Install moleculec run: | - export MOLC_VERSION=$(cat deps/godwoken-scripts/c/Makefile | egrep "MOLC_VERSION :=" | awk '{print $3}') + export MOLC_VERSION=$(cat ../gwos/c/Makefile | egrep "MOLC_VERSION :=" | awk '{print $3}') test "$(moleculec --version)" = "Moleculec $MOLC_VERSION" \ - || CARGO_TARGET_DIR=target/ cargo install moleculec --version $MOLC_VERSION --force + || CARGO_TARGET_DIR=target/ cargo install moleculec --version $MOLC_VERSION - name: Cache LLVM and Clang id: cache-llvm uses: actions/cache@v3 @@ -47,7 +47,7 @@ jobs: uses: actions/cache@v3 with: path: | - polyjuice-tests/fuzz/corpus-cache + gwos-evm/polyjuice-tests/fuzz/corpus-cache key: corpus-${{ env.DATETIME }} restore-keys: | corpus @@ -58,13 +58,6 @@ jobs: version: "11.0" cached: ${{ steps.cache-llvm.outputs.cache-hit }} - - name: test_rlp on x86 with sanitizers - working-directory: ./gwos-evm/polyjuice-tests/fuzz - run: make build/test_rlp && ./build/test_rlp - - name: test_contracts on x86 with sanitizers - working-directory: ./gwos-evm/polyjuice-tests/fuzz - run: make build/test_contracts && ./build/test_contracts - - name: Set MAX_FUZZ_TIME for different branches run: | if [[ ${{ github.event_name == 'pull_request' }} ]]; then @@ -80,8 +73,8 @@ jobs: run: | mkdir -p corpus-cache ls corpus-cache - make build/polyjuice_generator_fuzzer && \ - ./build/polyjuice_generator_fuzzer corpus corpus-cache \ + make build/fuzzer && \ + ./build/fuzzer corpus corpus-cache \ -max_total_time=$MAX_FUZZ_TIME -timeout=120 \ -max_len=25000 -rss_limit_mb=0 # Max data buffer size: 24KB < 25000 bytes @@ -90,7 +83,7 @@ jobs: working-directory: gwos-evm/polyjuice-tests/fuzz run: | mkdir -p corpus-new - ./build/polyjuice_generator_fuzzer -merge=1 corpus-new corpus-cache corpus + ./build/fuzzer -merge=1 corpus-new corpus-cache corpus rm -rf corpus-cache mv corpus-new corpus-cache diff --git a/Cargo.toml b/Cargo.toml index 77617a314..0fd1e7e41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ exclude = [ # working on godwoken. "crates/autorocks", "gwos-evm/polyjuice-tests", + "gwos-evm/polyjuice-tests/fuzz2", "gwos/contracts", ] diff --git a/crates/generator/src/syscalls/mod.rs b/crates/generator/src/syscalls/mod.rs index bbafea088..323cb5853 100644 --- a/crates/generator/src/syscalls/mod.rs +++ b/crates/generator/src/syscalls/mod.rs @@ -35,7 +35,7 @@ use self::error_codes::{ GW_SUDT_ERROR_UNPERMITTED_ADDRESS, SUCCESS, }; -mod bn; +pub mod bn; pub mod error_codes; /// Max buffer size: 4MB diff --git a/gwos-evm/c/polyjuice.h b/gwos-evm/c/polyjuice.h index 99e90229f..b1bc112f2 100644 --- a/gwos-evm/c/polyjuice.h +++ b/gwos-evm/c/polyjuice.h @@ -996,6 +996,7 @@ int create_new_account(gw_context_t* ctx, uint8_t script_hash[32]; blake2b_hash(script_hash, new_script_seg.ptr, new_script_seg.size); ret = ctx->sys_create(ctx, new_script_seg.ptr, new_script_seg.size, &new_account_id); + free(new_script_seg.ptr); if (ret != 0) { debug_print_int("sys_create error", ret); @@ -1005,7 +1006,6 @@ int create_new_account(gw_context_t* ctx, return ret; } } - free(new_script_seg.ptr); *to_id = new_account_id; memcpy((uint8_t *)msg->destination.bytes, eth_addr, 20); debug_print_int(">> new to id", *to_id); @@ -1152,6 +1152,7 @@ int handle_native_token_transfer(gw_context_t* ctx, uint32_t from_id, uint32_t new_account_id; ret = ctx->sys_create(ctx, new_script_seg.ptr, new_script_seg.size, &new_account_id); + free(new_script_seg.ptr); if (ret != 0) { ckb_debug("[handle_native_token_transfer] create new account failed."); return ret; diff --git a/gwos-evm/polyjuice-tests/fuzz/.gitignore b/gwos-evm/polyjuice-tests/fuzz/.gitignore deleted file mode 100644 index 1fab0f908..000000000 --- a/gwos-evm/polyjuice-tests/fuzz/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -/build*/ - -target/ -artifacts/ - -coverage/ -/corpus/* -!/corpus/regression/ -!/corpus/merged/ - -/*CORPUS* diff --git a/gwos-evm/polyjuice-tests/fuzz/Makefile b/gwos-evm/polyjuice-tests/fuzz/Makefile index a4ac10d02..cd4c0abe1 100644 --- a/gwos-evm/polyjuice-tests/fuzz/Makefile +++ b/gwos-evm/polyjuice-tests/fuzz/Makefile @@ -10,36 +10,40 @@ ifeq ($(OS),Unknown) endif NPROC?=4 -CC=clang CXX=clang++ +CC=clang LLVM_PROFDATA=llvm-profdata LLVM_COV=llvm-cov DEPS := ../../deps +GW_SCRIPTS := ../../../gwos/c BUILD := build SECP_DIR := $(DEPS)/secp256k1-fix SECP256K1_SRC := $(SECP_DIR)/src/ecmult_static_pre_context.h CFLAGS_SECP := -isystem $(SECP_DIR)/src -isystem $(SECP_DIR) -CFLAGS_CKB_STD = -I./ -I$(DEPS)/ckb-c-stdlib -I$(DEPS)/ckb-c-stdlib/molecule +CFLAGS_CKB_STD = -I./ -I$(DEPS)/ckb-c-stdlib -I$(DEPS)/ckb-c-stdlib/molecule -Wno-incompatible-pointer-types CFLAGS_ETHASH := -I$(DEPS)/ethash/include -I$(DEPS)/ethash/lib/ethash -I$(DEPS)/ethash/lib/keccak -I$(DEPS)/ethash/lib/support CFLAGS_EVMONE := -I$(DEPS)/evmone/lib/evmone -I$(DEPS)/evmone/include -I$(DEPS)/evmone/evmc/include -I$(DEPS)/evmone/evmc/tools/ -CFLAGS_SMT := -I$(DEPS)/godwoken-scripts/c/deps/sparse-merkle-tree/c -CFLAGS_GODWOKEN := -I$(DEPS)/godwoken-scripts/c +CFLAGS_SMT := -I$(GW_SCRIPTS)/deps/sparse-merkle-tree/c +CFLAGS_GODWOKEN := -I$(GW_SCRIPTS) CFLAGS_MBEDTLS := -I$(DEPS)/mbedtls/include CFLAGS_CRYPTO_ALGORITHMS := -I$(DEPS)/crypto-algorithms CFLAGS_INTX := -I$(DEPS)/intx/lib/intx -I$(DEPS)/intx/include -CFLAGS := -Wall -O2 -I../../c -I../../c/ripemd160 $(CFLAGS_CKB_STD) $(CFLAGS_ETHASH) $(CFLAGS_EVMONE) $(CFLAGS_SMT) $(CFLAGS_GODWOKEN) $(CFLAGS_SECP) $(CFLAGS_MBEDTLS) $(CFLAGS_CRYPTO_ALGORITHMS) $(CFLAGS_INTX) -CXXFLAGS := $(CFLAGS) -std=c++1z -LDFLAGS := -Wl,--gc-sections -SANITIZER_FLAGS := -g -O1 -fsanitize=address,undefined -Wno-incompatible-pointer-types -LIMIT_ERROR := -ferror-limit=1 +CFLAGS_BN128 := -I$(DEPS)/bn128/include +CFLAGS_GW_SIM := -Igw-syscall-simulator/include +CFLAGS := -Wall -O3 -I../../c -I../../c/ripemd160 $(CFLAGS_CKB_STD) $(CFLAGS_ETHASH) $(CFLAGS_EVMONE) $(CFLAGS_SMT) $(CFLAGS_GODWOKEN) $(CFLAGS_SECP) $(CFLAGS_MBEDTLS) $(CFLAGS_CRYPTO_ALGORITHMS) $(CFLAGS_INTX) $(CFLAGS_BN128) $(CFLAGS_GW_SIM) +CXXFLAGS := $(CFLAGS) -std=c++1z +LDFLAGS := -Wl,--gc-sections,-rpath,./gw-syscall-simulator/target/debug +SANITIZER_FLAGS := -g -O1 -fsanitize=fuzzer,address,undefined,leak -Wno-incompatible-pointer-types +LIMIT_ERROR := -ferror-limit=10 # TODO: read PROTOCOL_VERSION from deps/godwoken-scripts/c/Makefile MOLC := moleculec -MOLC_VERSION := $(shell cat $(DEPS)/godwoken-scripts/c/Makefile | egrep "MOLC_VERSION :=" | awk '{print $$3}') -PROTOCOL_VERSION := $(shell cat $(DEPS)/godwoken-scripts/c/Makefile | egrep "PROTOCOL_VERSION :=" | awk '{print $$3}') + +MOLC_VERSION := $(shell cat $(GW_SCRIPTS)/Makefile | egrep "MOLC_VERSION :=" | awk '{print $$3}') +PROTOCOL_VERSION := $(shell cat $(GW_SCRIPTS)/Makefile | egrep "PROTOCOL_VERSION :=" | awk '{print $$3}') PROTOCOL_SCHEMA_URL := https://raw.githubusercontent.com/nervosnetwork/godwoken/${PROTOCOL_VERSION}/crates/types/schemas ALL_OBJS := $(BUILD)/keccak.o $(BUILD)/keccakf800.o \ @@ -57,38 +61,19 @@ ifeq ($(OS),MacOS) COVERAGE_FLAGS+=-Wl,-U,_LLVMFuzzerCustomMutator -Wl,-U,_LLVMFuzzerInitialize endif -EXTERNAL_HEADERS := $(DEPS)/ckb-c-stdlib-simulator-only/ckb_consts.h - -#TODO: coverage -all: generate-protocol build/polyjuice_generator_fuzzer - -build/polyjuice_generator_fuzzer: generate-protocol $(GENERATOR_DEPS) - $(CXX) $(CFLAGS) $(LDFLAGS) $(SANITIZER_FLAGS) $(LIMIT_ERROR) -fsanitize=fuzzer -Ibuild -o $@ polyjuice_generator_fuzzer.cc $(ALL_OBJS) -build/polyjuice_generator_fuzzer_log: generate-protocol $(GENERATOR_DEPS) - $(CXX) $(CFLAGS) $(LDFLAGS) $(SANITIZER_FLAGS) $(LIMIT_ERROR) -fsanitize=fuzzer -Ibuild -o $@ polyjuice_generator_fuzzer.cc $(ALL_OBJS) -DPOLYJUICE_DEBUG_LOG - -### -# TODO: -show: $(COVERAGE_DIR)/fuzzer.profdata - $(LLVM_COV) show --instr-profile=$(COVERAGE_DIR)/fuzzer.profdata smt_coverage -# TODO: report -report: $(COVERAGE_DIR)/fuzzer.profdata coverage $(EXTERNAL_HEADERS) - $(LLVM_COV) report --show-functions --instr-profile=$(COVERAGE_DIR)/fuzzer.profdata smt_coverage $(EXTERNAL_HEADERS) -# TODO: -coverage: $(EXTERNAL_HEADERS) - clang $(COVERAGE_FLAGS) smt_coverage.c smt_fuzzer.c -o smt_coverage +EXTERNAL_HEADERS := $(DEPS)/ckb-c-stdlib-simulator/ckb_consts.hckb-c-stdlib-simulator-only -# start-fuzzer: fuzzer -# ./smt_fuzzer -max_len=800000 -workers=$(NPROC) -jobs=$(NPROC) corpus +build-gw-syscall-simulator: + cd gw-syscall-simulator/ && cargo build -# start-fuzzer2: fuzzer -# ./smt_fuzzer -max_len=800000 corpus +build/fuzzer: generate-protocol $(GENERATOR_DEPS) build-gw-syscall-simulator + $(CXX) $(CFLAGS) $(LDFLAGS) $(SANITIZER_FLAGS) $(LIMIT_ERROR) -fprofile-instr-generate -fcoverage-mapping -L ./gw-syscall-simulator/target/debug -l gw_syscall_simulator -Ibuild -o $@ polyjuice_fuzzer.cc $(ALL_OBJS) +build/fuzzer_log: generate-protocol $(GENERATOR_DEPS) build-gw-syscall-simulator + $(CXX) $(CFLAGS) $(LDFLAGS) $(SANITIZER_FLAGS) $(LIMIT_ERROR) -L ./gw-syscall-simulator/target/debug -l gw_syscall_simulator -Ibuild -o $@ polyjuice_fuzzer.cc $(ALL_OBJS) -DPOLYJUICE_DEBUG_LOG clean: rm -rf $(BUILD)/* -### - build/generator: ../../c/generator.c $(GENERATOR_DEPS) cd $(SECP_DIR) && (git apply workaround-fix-g++-linking.patch || true) && cd - # apply patch $(CXX) $(SANITIZER_FLAGS) $(CFLAGS) $(LDFLAGS) -Ibuild -o $@ ../../c/generator.c $(ALL_OBJS) @@ -170,7 +155,7 @@ build/platform_util.o: $(DEPS)/mbedtls/library/platform_util.c $(CC) $(CFLAGS) $(LDFLAGS) -c -o $@ $< build/bignum.o: $(DEPS)/mbedtls/library/bignum.c $(CC) $(CFLAGS) $(LDFLAGS) -c -o $@ $< - + build/sha256.o: $(DEPS)/crypto-algorithms/sha256.c $(CXX) $(CFLAGS) $(LDFLAGS) -c -o $@ $< @@ -178,8 +163,8 @@ build/sha256.o: $(DEPS)/crypto-algorithms/sha256.c build/secp256k1_data_info.h: build/dump_secp256k1_data $< build/dump_secp256k1_data: ../../c/dump_secp256k1_data.c $(SECP256K1_SRC) - mkdir -p build - gcc $(CFLAGS) -o $@ $< + #mkdir -p build + $(CC) $(CFLAGS) -o $@ $< $(SECP256K1_SRC): cd $(SECP_DIR) && (git apply -R workaround-fix-g++-linking.patch || true) && \ chmod +x autogen.sh && ./autogen.sh && \ @@ -196,22 +181,8 @@ build/godwoken.h: build/godwoken.mol ${MOLC} --language c --schema-file $< > $@ build/blockchain.mol: mkdir -p build - curl -L -o $@ ${PROTOCOL_SCHEMA_URL}/blockchain.mol + cp ../../../gwos/crates/types/schemas/blockchain.mol $@ build/godwoken.mol: mkdir -p build - curl -L -o $@ ${PROTOCOL_SCHEMA_URL}/godwoken.mol - - -#TODO: -#%.h: -# ln -s $(CURDIR)/../$@ $(CURDIR)/$@ - -# %.profraw: coverage -# LLVM_PROFILE_FILE=$@ ./smt_coverage $(CORPUS_DIR)/* - -%.profdata: %.profraw - $(LLVM_PROFDATA) merge --sparse $< -o $@ - -.PHONY: all fuzzer coverage report + cp ../../../gwos/crates/types/schemas/godwoken.mol $@ -.PRECIOUS: $(COVERAGE_DIR)/fuzzer.profraw $(COVERAGE_DIR)/fuzzer.profdata diff --git a/gwos-evm/polyjuice-tests/fuzz/README.md b/gwos-evm/polyjuice-tests/fuzz/README.md index 6040b114c..ba1e567ab 100644 --- a/gwos-evm/polyjuice-tests/fuzz/README.md +++ b/gwos-evm/polyjuice-tests/fuzz/README.md @@ -1,56 +1,62 @@ -# Polyjuice Fuzz Test - -[![FuzzTest](https://github.com/Flouse/godwoken-polyjuice/actions/workflows/fuzz.yml/badge.svg?branch=fuzz-v2)](https://github.com/Flouse/godwoken-polyjuice/actions/workflows/fuzz.yml) - -These two file were created to simulate `gw_syscalls`: -- polyjuice-tests/fuzz/ckb_syscalls.h -- polyjuice-tests/fuzz/mock_godwoken.hpp - -## Polyjuice Generator Fuzzer -```bash -make build/polyjuice_generator_fuzzer -./build/polyjuice_generator_fuzzer corpus -max_total_time=6 - -# or fuzzing in debug mode -make build/polyjuice_generator_fuzzer_log -./build/polyjuice_generator_fuzzer_log corpus -max_total_time=2 -``` - -### General Algorithm -```pseudo code -// pseudo code -Instrument program for code coverage -load pre-defined transactions such as contracts deploying and then execute run_polyjuice() -while(true) { - Choose random input from corpus - Mutate/populate input into transactions - Execute run_polyjuice() and collect coverage - If new coverage/paths are hit add it to corpus (corpus - directory with test-cases) -} -``` - -## test_contracts on x86 with [sanitizers](https://github.com/google/sanitizers) -```bash -make build/test_contracts -./build/test_contracts - -make build/test_rlp -./build/test_rlp -``` - -## How to debug Polyjuice generator on x86? -1. Compile Polyjuice generator on x86 - ```bash - cd fuzz - make build/polyjuice_generator_fuzzer - ``` -2. Construct `pre_defined_test_case` in [polyjuice_generator_fuzzer.cc](./polyjuice_generator_fuzzer.cc) -3. Run `build/polyjuice_generator_fuzzer_log` with GDB debugger, see: [launch.json](../../.vscode/launch.json) - -## Coverage Report[WIP] -TBD - -### Related materials -- https://llvm.org/docs/LibFuzzer.html -- [What makes a good fuzz target](https://github.com/google/fuzzing/blob/master/docs/good-fuzz-target.md) -- [Clang's source-based code coverage](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) +# Polyjuice fuzz testing + +## Build + +### 1. normal build + +```sh +make build/fuzzer +``` + +### 2. or build with debug log + +```sh +make build/fuzzer_log +``` + +## Run + +Simply just run with: +```sh +build/fuzzer +``` + +Or run `fuzzer_log`: +```sh +build/fuzzer_log +``` + +### Corpus and Seed + +Feeding fuzz testing with some predefined testcases: Seed. (Optional) +And save to `corpus` folder if any good cases are generated during running. + +```sh +build/fuzzer corpus seed +``` + +## Coverage Profile + +To genreate a coverage profile, we need to set `LLVM_PROFILE_FILE` and `max_total_time` first. + +```sh +LLVM_PROFILE_FILE="build/fuzzer.profraw" build/fuzzer corpus -max_total_time=10 +``` + +### Generate .profdata + +```sh +llvm-profdata merge -sparse build/fuzzer.profraw -o build/fuzzer.profdata +``` + +### Show coverage in detail (Optional) + +```sh +llvm-cov show build/fuzzer -instr-profile=build/fuzzer.profdata --show-branches=count --show-expansions > log +``` + +### Report + +```sh +llvm-cov report ./build/fuzzer -instr-profile=build/fuzzer.profdata +``` diff --git a/gwos-evm/polyjuice-tests/fuzz/ckb_syscalls.h b/gwos-evm/polyjuice-tests/fuzz/ckb_syscalls.h index 366bdb145..9e099801d 100644 --- a/gwos-evm/polyjuice-tests/fuzz/ckb_syscalls.h +++ b/gwos-evm/polyjuice-tests/fuzz/ckb_syscalls.h @@ -5,150 +5,97 @@ #include #include #include - -#include "ckb_consts.h" -#include "secp256k1_data_info.h" - -size_t s_INPUT_SIZE = 0; -uint8_t* s_INPUT_DATA = NULL; - -extern "C" int ckb_debug(const char*); -static char debug_buf[64 * 1024]; -void dbg_print(const char* fmt, ...) { - va_list args; - va_start(args, fmt); - vsnprintf(debug_buf, sizeof(debug_buf), fmt, args); - va_end(args); - ckb_debug(debug_buf); -} -void dbg_print_h256(const uint8_t* h256_ptr) { - int offset = sprintf(debug_buf, "H256["); - for (size_t i = 0; i < 31; i++) { - offset += sprintf(debug_buf + offset, "%d, ", *(h256_ptr + i)); - } - sprintf(debug_buf + offset, "%d]", *(h256_ptr + 31)); - ckb_debug(debug_buf); -} -void dbg_print_hex(const uint8_t* ptr, size_t size) { - printf("0x"); - for (size_t i = 0; i < size; i++) { - printf("%02x", ptr[i]); - } - printf("\n"); -} - -#ifndef POLYJUICE_DEBUG_LOG -#undef dbg_print -#undef dbg_print_h256 -#undef dbg_print_hex -#define dbg_print(...) do {} while (0) -#define dbg_print_h256(p) do {} while (0) -#define dbg_print_hex(p) do {} while (0) -#endif - -#define MOCK_SUCCESS 0 - -int ckb_exit(int8_t code) { - printf("ckb_exit, code=%d\n", code); - exit(0); - return MOCK_SUCCESS; -} +#include + +#include "api.h" + +/* syscalls */ +/* Syscall account store / load / create */ +#define GW_SYS_CREATE 3100 +#define GW_SYS_STORE 3101 +#define GW_SYS_LOAD 3102 +#define GW_SYS_LOAD_ACCOUNT_SCRIPT 3105 +/* Syscall call / return */ +#define GW_SYS_SET_RETURN_DATA 3201 +/* Syscall data store / load */ +#define GW_SYS_STORE_DATA 3301 +#define GW_SYS_LOAD_DATA 3302 +/* Syscall load metadata structures */ +#define GW_SYS_LOAD_ROLLUP_CONFIG 3401 +#define GW_SYS_LOAD_TRANSACTION 3402 +#define GW_SYS_LOAD_BLOCKINFO 3403 +#define GW_SYS_GET_BLOCK_HASH 3404 +/* Syscall builtins */ +#define GW_SYS_PAY_FEE 3501 +#define GW_SYS_LOG 3502 +#define GW_SYS_RECOVER_ACCOUNT 3503 +/* Syscall for make use the Barreto-Naehrig (BN) curve construction */ +#define GW_SYS_BN_ADD 3601 +#define GW_SYS_BN_MUL 3602 +#define GW_SYS_BN_PAIRING 3603 +/* Syscall state */ +#define GW_SYS_SNAPSHOT 3701 +#define GW_SYS_REVERT 3702 +/* Syscall permissions */ +#define GW_SYS_CHECK_SUDT_ADDR_PERMISSION 3801 + +#define GW_ERROR_NOT_FOUND 83 // Mock implementation for the SYS_ckb_load_cell_data_as_code syscall in // _ckb_load_cell_code. #define syscall(n, a0, a1, a2, a3, a4, a5) \ __internal_syscall(n, (long)(a0), (long)(a1), (long)(a2), (long)(a3), \ - (long)(a4), (long)(a5)) + (long)(a4), (long)(a5)) static int inline __internal_syscall(long n, long _a0, long _a1, long _a2, - long _a3, long _a4, long _a5); + long _a3, long _a4, long _a5); #ifdef GW_GENERATOR #include "generator_utils.h" -#include "mock_godwoken.hpp" #endif -static int inline __internal_syscall(long n, long _a0, long _a1, long _a2, - long _a3, long _a4, long _a5) { +static int inline __internal_syscall(long n, long a0, long a1, long a2, + long a3, long a4, long a5) { switch (n) { - // mock syscall(GW_SYS_LOAD_TRANSACTION, addr, &inner_len, 0, 0, 0, 0) - case GW_SYS_LOAD_TRANSACTION: // Load Layer2 Transaction - return gw_load_transaction_from_raw_tx((uint8_t *)_a0, (uint64_t *)_a1); - - // mock syscall(GW_SYS_LOAD, raw_key, value, 0, 0, 0, 0) - case GW_SYS_LOAD: - dbg_print("====== mock syscall(GW_SYS_LOAD) ======"); - dbg_print("raw_key:"); - dbg_print_h256((uint8_t*)_a0); - gw_sys_load((uint8_t *)_a0, (uint8_t *)_a1); - // always return 0, even the key(_a0) is not found - return MOCK_SUCCESS; - - // mock syscall(GW_SYS_LOAD_DATA, data, &inner_len, offset, data_hash, 0, 0) - case GW_SYS_LOAD_DATA: - /* match ckb_secp256k1_data_hash, load secp256k1_data */ - // TODO: move this to fuzz_init() step - if (0 == memcmp((uint8_t *)_a3, ckb_secp256k1_data_hash, 32)) { - FILE* stream = fopen("./build/secp256k1_data", "rb"); - int ret = fread((uint8_t *)_a0, CKB_SECP256K1_DATA_SIZE, 1, stream); - fclose(stream); - stream = NULL; - if (ret != 1) { // ret = The total number of elements successfully read - return GW_ERROR_NOT_FOUND; - } - *(uint64_t *)_a1 = CKB_SECP256K1_DATA_SIZE; - return MOCK_SUCCESS; - } - return gw_sys_load_data((uint8_t *)_a0, (uint64_t *)_a1, _a2, (uint8_t *)_a3); - - // mock syscall(GW_SYS_STORE_DATA, data_len, data, 0, 0, 0, 0) - case GW_SYS_STORE_DATA: - return gw_store_data(_a0, (uint8_t *)_a1); - - // mock syscall(GW_SYS_SET_RETURN_DATA, *data, len, 0, 0, 0, 0) - case GW_SYS_SET_RETURN_DATA: - dbg_print("mock syscall(GW_SYS_SET_RETURN_DATA)"); - gw_sys_set_return_data((uint8_t *)_a0, _a1); - return MOCK_SUCCESS; - - // mock syscall(GW_SYS_GET_BLOCK_HASH, block_hash, number, 0, 0, 0, 0) - case GW_SYS_GET_BLOCK_HASH: - dbg_print("mock syscall(GW_SYS_GET_BLOCK_HASH"); - gw_sys_get_block_hash((uint8_t *)_a0, _a1); - return MOCK_SUCCESS; - - // mock syscall(GW_SYS_STORE, raw_key, value, 0, 0, 0, 0) + case GW_SYS_CREATE: + return gw_create((uint8_t*)a0, (uint64_t)a1, (uint32_t*)a2); case GW_SYS_STORE: - gw_update_raw((uint8_t *)_a0, (uint8_t *)_a1); - return MOCK_SUCCESS; - - // mock syscall(GW_SYS_LOAD_BLOCKINFO, addr, &inner_len, 0, 0, 0, 0) - case GW_SYS_LOAD_BLOCKINFO: - return gw_sys_load_blockinfo((uint8_t *)_a0, (uint64_t *)_a1); - - // mock syscall(GW_SYS_LOAD_ACCOUNT_SCRIPT, script, &inner_len, offset, account_id, 0, 0) + return gw_store((uint8_t*)a0, (uint8_t*)a1); + case GW_SYS_LOAD: + return gw_load((uint8_t*)a0, (uint8_t*)a1); case GW_SYS_LOAD_ACCOUNT_SCRIPT: - return gw_sys_load_account_script((uint8_t *)_a0, (uint64_t *)_a1, _a2, _a3); - - // mock syscall(GW_SYS_LOAD_ROLLUP_CONFIG, addr, &inner_len, 0, 0, 0, 0) + return gw_load_account_script((void*)a0, (uint64_t*)a1, (uint64_t)a2, (uint32_t)a3); + case GW_SYS_SET_RETURN_DATA: + return gw_set_return_data((uint8_t*)a0, (uint64_t)a1); + case GW_SYS_STORE_DATA: + return gw_store_data((uint8_t*)a0, (uint64_t)a1); + case GW_SYS_LOAD_DATA: + return gw_load_data((void*)a0, (uint64_t*)a1, (uint64_t)a2, (uint8_t*)a3); case GW_SYS_LOAD_ROLLUP_CONFIG: - return gw_sys_load_rollup_config((uint8_t *)_a0, (uint64_t *)_a1); - - // mock syscall(GW_SYS_CREATE, script, script_len, account_id, 0, 0, 0) - case GW_SYS_CREATE: - return gw_sys_create((uint8_t *)_a0, _a1, (uint32_t *)_a2); - - // mock syscall(GW_SYS_LOG, account_id, service_flag, data_length, data, 0, 0) - case GW_SYS_LOG: // TODO: @see emit_evm_result_log - dbg_print("[GW_SYS_LOG] service_flag[%d] account[%d] ", (uint8_t)_a1, _a1); - return 0; - - // mock syscall(GW_SYS_PAY_FEE, payer_addr, short_addr_len, sudt_id, &amount, 0, 0) + return gw_load_rollup_config((uint8_t*)a0, (uint64_t*)a1); + case GW_SYS_LOAD_TRANSACTION: + return gw_load_tx((void*)a0, (uint64_t*)a1); + case GW_SYS_LOAD_BLOCKINFO: + return gw_load_block_info((void*)a0, (uint64_t*)a1); + case GW_SYS_GET_BLOCK_HASH: + return gw_get_block_hash((uint8_t*)a0, (uint64_t)a1); case GW_SYS_PAY_FEE: - // TODO: payer: payer_addr[short_addr_len] - dbg_print("[mock SYS_PAY_FEE] sudt_id: %d, amount: %ld", - (uint32_t)_a2, *(uint128_t *)_a3); return 0; - + case GW_SYS_LOG: + return gw_log((uint32_t)a0, (uint8_t)a1, (uint64_t)a2, (uint8_t*)a3); + case GW_SYS_BN_ADD: + return gw_bn_add((uint8_t*)a0, (uint64_t)a1, (uint64_t)a2, (uint8_t*)a3, (uint64_t)a4); + case GW_SYS_BN_MUL: + return gw_bn_mul((uint8_t*)a0, (uint64_t)a1, (uint64_t)a2, (uint8_t*)a3, (uint64_t)a4); + case GW_SYS_BN_PAIRING: + return gw_bn_pairing((uint8_t*)a0, (uint64_t)a1, (uint64_t)a2, (uint8_t*)a3, (uint64_t)a4); + case GW_SYS_SNAPSHOT: + return gw_snapshot((uint32_t*)a0); + case GW_SYS_REVERT: + return gw_revert((uint32_t)a0); + case GW_SYS_CHECK_SUDT_ADDR_PERMISSION: + return gw_check_sudt_addr_permission((uint8_t*)a0); + case GW_SYS_RECOVER_ACCOUNT: + return 0; default: return GW_ERROR_NOT_FOUND; } diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/ASAN-Deadlysignal-crash-6f3702a66330ed540a7d42305dbd4bd4d17a71ed b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/ASAN-Deadlysignal-crash-6f3702a66330ed540a7d42305dbd4bd4d17a71ed deleted file mode 100644 index 68fb19e55..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/ASAN-Deadlysignal-crash-6f3702a66330ed540a7d42305dbd4bd4d17a71ed and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/crash-invalid_evmc_call_kind-bacf98820dec04240e7cd642d82caee2d101d340 b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/crash-invalid_evmc_call_kind-bacf98820dec04240e7cd642d82caee2d101d340 deleted file mode 100644 index cde2d6e81..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/crash-invalid_evmc_call_kind-bacf98820dec04240e7cd642d82caee2d101d340 and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/data_len_0-bbc41c6f36ffa2427d747c699157eda798918b1f b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/data_len_0-bbc41c6f36ffa2427d747c699157eda798918b1f deleted file mode 100644 index 0adc4ff8b..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/data_len_0-bbc41c6f36ffa2427d747c699157eda798918b1f and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/get_code_size-timeout b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/get_code_size-timeout deleted file mode 100644 index 553a5ef02..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/get_code_size-timeout and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/global-buffer-overflow-e21cb854facce1ea3475dc37d6aba45f2e4e5fef b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/global-buffer-overflow-e21cb854facce1ea3475dc37d6aba45f2e4e5fef deleted file mode 100644 index acaae50ed..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/global-buffer-overflow-e21cb854facce1ea3475dc37d6aba45f2e4e5fef and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/invalid_evmc_status_code b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/invalid_evmc_status_code deleted file mode 100644 index 7fec782e3..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/invalid_evmc_status_code and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/raw_tx_call_getChainId b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/raw_tx_call_getChainId deleted file mode 100644 index f6f9a56fc..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/raw_tx_call_getChainId and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/raw_tx_deploy_getChainId_contract b/gwos-evm/polyjuice-tests/fuzz/corpus/regression/raw_tx_deploy_getChainId_contract deleted file mode 100644 index e75974fbb..000000000 Binary files a/gwos-evm/polyjuice-tests/fuzz/corpus/regression/raw_tx_deploy_getChainId_contract and /dev/null differ diff --git a/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.lock b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.lock new file mode 100644 index 000000000..1e1ca22a0 --- /dev/null +++ b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.lock @@ -0,0 +1,3039 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" + +[[package]] +name = "aquamarine" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a941c39708478e8eea39243b5983f1c42d2717b3620ee91f4a52115fd02ac43f" +dependencies = [ + "itertools 0.9.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "async-trait" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "autocxx" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c1247c5ebeff4a8e025b176ed94d23137f1d4bc85ba5b44650a5c70d57000b" +dependencies = [ + "aquamarine", + "autocxx-macro", + "cxx", + "moveit", +] + +[[package]] +name = "autocxx-bindgen" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8678622fb7e728ec752c0e04f2d03cf2c8bfe5e79f7015f756354744b287b478" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.10.5", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "autocxx-build" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b81bfc8d2e40788066c20fb459860524cfcdb15ed8db60c0c55053678cb27847" +dependencies = [ + "autocxx-engine", + "env_logger", + "indexmap", + "syn", +] + +[[package]] +name = "autocxx-engine" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f2a66dd72e1fb461c6bd0531db955267a16900c4c4299552c02c2122f392920" +dependencies = [ + "aquamarine", + "autocxx-bindgen", + "autocxx-parser", + "cc", + "cxx-gen", + "indexmap", + "indoc", + "itertools 0.10.5", + "log", + "miette", + "once_cell", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustversion", + "serde_json", + "strum_macros", + "syn", + "tempfile", + "thiserror", + "version_check", +] + +[[package]] +name = "autocxx-macro" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cfce5f5701828ca8ee9b25879cba9b8574ceed01dd145faca9635a4e1c67c8a" +dependencies = [ + "autocxx-parser", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocxx-parser" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d318636f39435b66072c9d4e80d86eadc494d79ba3654a69081aae7748d3d4b" +dependencies = [ + "indexmap", + "itertools 0.10.5", + "log", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", + "thiserror", +] + +[[package]] +name = "autorocks" +version = "0.1.0" +dependencies = [ + "autocxx", + "autorocks-sys", + "moveit", +] + +[[package]] +name = "autorocks-sys" +version = "0.1.0" +dependencies = [ + "autocxx", + "autocxx-build", + "cc", + "cxx", + "cxx-build", + "libc", + "miette", +] + +[[package]] +name = "axum" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1304eab461cf02bd70b083ed8273388f9724c549b316ba3d1e213ce0e9e7fb7e" +dependencies = [ + "async-trait", + "axum-core", + "base64 0.20.0", + "bitflags", + "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", + "sha1", + "sync_wrapper", + "tokio", + "tokio-tungstenite", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f487e40dc9daee24d8a1779df88522f159a54a980f99cfbe43db0be0bd3444a8" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" + +[[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 = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[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 = "blake2b-ref" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95916998c798756098a4eb1b3f2cd510659705a9817bf203d61abd30fbec3e7b" + +[[package]] +name = "blake2b-ref" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "294d17c72e0ba59fad763caa112368d0672083779cdebbb97164f4bb4c1e339a" + +[[package]] +name = "blake2b-rs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89a8565807f21b913288968e391819e7f9b2f0f46c7b89549c051cccf3a2771" +dependencies = [ + "cc", + "cty", +] + +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +dependencies = [ + "jobserver", +] + +[[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 = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "ckb-channel" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0da1f4e474de48b05e30ad603da4da3b410344b619c7cf35d444e406c0bb6e" +dependencies = [ + "crossbeam-channel", +] + +[[package]] +name = "ckb-crypto" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1650275e0f5a59e8ebbd747d835e10b9179d8ab4941b96100d5b7e48fada695e" +dependencies = [ + "ckb-fixed-hash", + "faster-hex 0.6.1", + "lazy_static", + "rand 0.7.3", + "secp256k1", + "thiserror", +] + +[[package]] +name = "ckb-error" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51748ac5e08dce6c685cf4b43e27dcbcfc98e21442c4001c9f06509a04a400ed" +dependencies = [ + "anyhow", + "ckb-occupied-capacity", + "derive_more", + "thiserror", +] + +[[package]] +name = "ckb-fixed-hash" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d665013dbb8ff2df8e67c4add67db703ae3b642679f1a2962f76399703eee1" +dependencies = [ + "ckb-fixed-hash-core", + "ckb-fixed-hash-macros", +] + +[[package]] +name = "ckb-fixed-hash-core" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd92b9d691bbfd11a900ee17ad1010a553ae0b5d3a120e0c8094afcd30f9b15e" +dependencies = [ + "faster-hex 0.6.1", + "serde", + "thiserror", +] + +[[package]] +name = "ckb-fixed-hash-macros" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f24e42b82da4d891ac8b5b19de2807cae360c5377138a7cde377b60edc6ec953" +dependencies = [ + "ckb-fixed-hash-core", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ckb-hash" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6b64eff869839aff45741515540e81a0447926d79262a439b5e9d0a5c98ac95" +dependencies = [ + "blake2b-ref 0.2.1", + "blake2b-rs", +] + +[[package]] +name = "ckb-jsonrpc-types" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82268ddea09f95324496d6def1b37d6bdc3a4841fecc185388e7a2bb6451687f" +dependencies = [ + "ckb-types", + "faster-hex 0.6.1", + "serde", + "serde_json", +] + +[[package]] +name = "ckb-merkle-mountain-range" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "ckb-occupied-capacity" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a11e010c034a98b734074a79655c738c40501e9113426173132856a35c6e71c6" +dependencies = [ + "ckb-occupied-capacity-core", + "ckb-occupied-capacity-macros", +] + +[[package]] +name = "ckb-occupied-capacity-core" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e48f0306a3fe072711e0342b71335898ac6d0a82b897ca3ae13e43770ce0e0" +dependencies = [ + "serde", +] + +[[package]] +name = "ckb-occupied-capacity-macros" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "656db5615c791b8d7b31a38e024f98fb497be5e2cb120b38be48eb4d9d1d0f6d" +dependencies = [ + "ckb-occupied-capacity-core", + "quote", + "syn", +] + +[[package]] +name = "ckb-rational" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444926bc5a9ad789b2b98e75f90330bcfe741bab517ca45d8f084449fe35efd8" +dependencies = [ + "numext-fixed-uint", + "serde", +] + +[[package]] +name = "ckb-types" +version = "0.105.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f06812497491fa58cea1c93dda2de074e0c5d51cf7d70d93dd50c862c661494c" +dependencies = [ + "bit-vec", + "bytes", + "ckb-channel", + "ckb-error", + "ckb-fixed-hash", + "ckb-hash", + "ckb-merkle-mountain-range", + "ckb-occupied-capacity", + "ckb-rational", + "derive_more", + "merkle-cbt", + "molecule", + "numext-fixed-uint", + "once_cell", +] + +[[package]] +name = "ckb-vm" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f1126bf0240d100234bc06efa7020f0d50ca35fe90e5ac7cac1b7721e1bacb7" +dependencies = [ + "byteorder", + "bytes", + "cc", + "ckb-vm-definitions", + "derive_more", + "goblin 0.2.3", + "goblin 0.4.0", + "rand 0.7.3", + "scroll", + "serde", +] + +[[package]] +name = "ckb-vm-aot" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d90662540a6a3b0d71e58d789016efe817d2cd0c4ec6b26bcaf7f9b18fe7cf" +dependencies = [ + "cc", + "ckb-vm", + "ckb-vm-definitions", + "derive_more", + "goblin 0.2.3", + "goblin 0.4.0", + "libc", + "memmap2", + "scroll", +] + +[[package]] +name = "ckb-vm-definitions" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14739bf59648c169de9257ec7dd6aba1aeb6a41725d636005f1c91853df58fcc" + +[[package]] +name = "clang-sys" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cty" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + +[[package]] +name = "cxx" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxx-gen" +version = "0.7.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9165c9bac193c3243e70ae51a73964dd53585234b304b5448dfde4ed85008fc" +dependencies = [ + "codespan-reporting", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "serde", + "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", + "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", + "primitive-types", + "uint", +] + +[[package]] +name = "faster-hex" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348138dd23e03bb0018caef99647fb1a5befec5ff4b501991de88f09854d4c28" + +[[package]] +name = "faster-hex" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[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 = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[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.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-macro" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "goblin" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "goblin" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532a09cd3df2c6bbfc795fb0434bff8f22255d1d07328180e918a2e6ce122d4d" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "gw-builtin-binaries" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "ckb-fixed-hash", + "includedir", + "includedir_codegen", + "phf", + "serde", + "sha2", +] + +[[package]] +name = "gw-common" +version = "1.8.0-rc3" +dependencies = [ + "cfg-if 0.1.10", + "gw-hash", + "gw-types", + "merkle-cbt", + "thiserror", +] + +[[package]] +name = "gw-config" +version = "1.8.0-rc3" +dependencies = [ + "ckb-fixed-hash", + "gw-builtin-binaries", + "gw-jsonrpc-types", + "hex", + "lazy_static", + "serde", + "toml", +] + +[[package]] +name = "gw-generator" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "arc-swap", + "blake2b-rs", + "ckb-vm", + "ckb-vm-aot", + "ethabi", + "gw-common", + "gw-config", + "gw-smt", + "gw-store", + "gw-traits", + "gw-types", + "gw-utils", + "hex", + "lazy_static", + "log", + "rlp", + "secp256k1", + "sha3", + "substrate-bn", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "gw-hash" +version = "1.8.0-rc3" +dependencies = [ + "blake2b-ref 0.3.1", +] + +[[package]] +name = "gw-jsonrpc-types" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "ckb-fixed-hash", + "ckb-jsonrpc-types", + "faster-hex 0.4.1", + "gw-common", + "gw-types", + "serde", + "serde_repr", +] + +[[package]] +name = "gw-rpc-client" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "arc-swap", + "async-trait", + "ckb-fixed-hash", + "ckb-types", + "gw-common", + "gw-config", + "gw-jsonrpc-types", + "gw-types", + "jsonrpc-core", + "jsonrpc-utils", + "log", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "gw-smt" +version = "1.8.0-rc3" +dependencies = [ + "cfg-if 0.1.10", + "gw-hash", + "gw-types", + "sparse-merkle-tree", +] + +[[package]] +name = "gw-store" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "arc-swap", + "autorocks", + "gw-common", + "gw-config", + "gw-smt", + "gw-traits", + "gw-types", + "im", + "log", + "serde", + "tempfile", +] + +[[package]] +name = "gw-syscall-simulator" +version = "0.1.0" +dependencies = [ + "anyhow", + "ckb-vm", + "ckb-vm-aot", + "gw-common", + "gw-config", + "gw-generator", + "gw-smt", + "gw-store", + "gw-traits", + "gw-types", + "gw-utils", + "hex", + "once_cell", +] + +[[package]] +name = "gw-traits" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "gw-common", + "gw-types", +] + +[[package]] +name = "gw-types" +version = "1.8.0-rc3" +dependencies = [ + "cfg-if 0.1.10", + "ckb-fixed-hash", + "ckb-types", + "gw-hash", + "molecule", + "primitive-types", +] + +[[package]] +name = "gw-utils" +version = "1.8.0-rc3" +dependencies = [ + "anyhow", + "ckb-crypto", + "ckb-types", + "ethabi", + "faster-hex 0.4.1", + "gw-common", + "gw-config", + "gw-jsonrpc-types", + "gw-rpc-client", + "gw-smt", + "gw-store", + "gw-types", + "hex-literal", + "log", + "rand 0.8.5", + "secp256k1", + "sha2", + "sha3", + "tokio", + "zstd", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "heapsize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" +dependencies = [ + "winapi", +] + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[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 = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "sized-chunks", + "typenum", + "version_check", +] + +[[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", +] + +[[package]] +name = "includedir" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afd126bd778c00c43a9dc76d1609a0894bf4222088088b2217ccc0ce9e816db7" +dependencies = [ + "flate2", + "phf", +] + +[[package]] +name = "includedir_codegen" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ac1500c9780957c9808c4ec3b94002f35aab01483833f5a8bce7dfb243e3148" +dependencies = [ + "flate2", + "phf_codegen", + "walkdir", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown", + "serde", +] + +[[package]] +name = "indoc" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2d6f23ffea9d7e76c53eee25dfb67bcd8fde7f1198b0855350698c9f07c780" + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "ipnet" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" + +[[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "jsonrpc-utils" +version = "0.2.0-preview.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54dd93f34cfc767ad3680d69b8a3e62c9e92e3163f2d65a5bc83fa7f57b4db7b" +dependencies = [ + "anyhow", + "axum", + "futures-core", + "futures-util", + "hex", + "jsonrpc-core", + "jsonrpc-utils-macros", + "pin-project-lite", + "rand 0.8.5", + "reqwest", + "serde_json", + "tokio", +] + +[[package]] +name = "jsonrpc-utils-macros" +version = "0.2.0-preview.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d4da84a65ec88023b2cebc0f08273bb4db8affcf187eec7c078b560e58a630d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "keccak" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] + +[[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.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +dependencies = [ + "libc", +] + +[[package]] +name = "merkle-cbt" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "171d2f700835121c3b04ccf0880882987a050fd5c7ae88148abf537d33dd3a56" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "miette" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28d6092d7e94a90bb9ea8e6c26c99d5d112d49dda2afdb4f7ea8cf09e1a5a6d" +dependencies = [ + "miette-derive", + "once_cell", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2485ed7d1fe80704928e3eb86387439609bd0c6bb96db8208daa364cfd1e09" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[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.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "molecule" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc8276c02a006bddad7d1c28c1a88f30421e1b5f0ba0ca96ceb8077c7d20c01" +dependencies = [ + "bytes", + "cfg-if 1.0.0", + "faster-hex 0.6.1", +] + +[[package]] +name = "moveit" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d756ffe4e38013507d35bf726a93fcdae2cae043ab5ce477f13857a335030d" +dependencies = [ + "cxx", +] + +[[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 = "numext-constructor" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "621fe0f044729f810c6815cdd77e8f5e0cd803ce4f6a38380ebfc1322af98661" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "numext-fixed-uint" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c68c76f96d589d1009a666c5072f37f3114d682696505f2cf445f27766c7d70" +dependencies = [ + "numext-fixed-uint-core", + "numext-fixed-uint-hack", +] + +[[package]] +name = "numext-fixed-uint-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aab1d6457b97b49482f22a92f0f58a2f39bdd7f3b2f977eae67e8bc206aa980" +dependencies = [ + "heapsize", + "numext-constructor", + "rand 0.7.3", + "serde", + "thiserror", +] + +[[package]] +name = "numext-fixed-uint-hack" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200f8d55c36ec1b6a8cf810115be85d4814f045e0097dfd50033ba25adb4c9e" +dependencies = [ + "numext-fixed-uint-core", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "once_cell" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" + +[[package]] +name = "parity-scale-codec" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ab01d0f889e957861bc65888d5ccbe82c158d0270136ba46820d43837cdf72" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +dependencies = [ + "phf_shared", + "rand 0.7.3", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "primitive-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +dependencies = [ + "once_cell", + "thiserror", + "toml", +] + +[[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", + "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.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", +] + +[[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.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.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.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.8", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "reqwest" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +dependencies = [ + "base64 0.13.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[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 = "rustversion" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" + +[[package]] +name = "ryu" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" + +[[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 = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + +[[package]] +name = "scroll" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "secp256k1" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +dependencies = [ + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +dependencies = [ + "cc", +] + +[[package]] +name = "semver" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" + +[[package]] +name = "serde" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b04f22b563c91331a10074bda3dd5492e3cc39d56bd557e91c0af42b6c7341" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[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 = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "sparse-merkle-tree" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8851f6c92491ebe5528eabc1244292175a739eb0162974f9f9670a7dc748748b" +dependencies = [ + "blake2b-rs", + "cc", + "cfg-if 0.1.10", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "git+https://github.com/paritytech/bn.git?rev=63f8c58#63f8c587356a67b33c7396af98e065b66fca5dda" +dependencies = [ + "byteorder", + "crunchy", + "lazy_static", + "rand 0.8.5", + "rustc-hex", +] + +[[package]] +name = "syn" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +dependencies = [ + "serde", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[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.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if 1.0.0", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "tungstenite" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[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 = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +dependencies = [ + "either", + "libc", + "once_cell", +] + +[[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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[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-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[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", +] + +[[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-sys" +version = "2.0.5+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.toml b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.toml new file mode 100644 index 000000000..44e38267d --- /dev/null +++ b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "gw-syscall-simulator" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["lib", "staticlib", "cdylib"] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +gw-common = { path = "../../../../gwos/crates/common/" } +gw-types = { path = "../../../../gwos/crates/types/" } +gw-generator = { path = "../../../../crates/generator/" } +gw-smt = { path = "../../../../crates/smt/" } +gw-store = { path = "../../../../crates/store/" } +gw-utils = { path = "../../../../crates/utils/" } +gw-config = { path = "../../../../crates/config/", features = ["no-builtin"] } +gw-traits = { path = "../../../../crates/traits/" } + +ckb-vm = { version = "=0.22.0", default-features = false } +ckb-vm-aot = { version = "=0.22.0" } +once_cell = "1.14.0" +anyhow = "1.0" +hex = "0.4" diff --git a/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/include/api.h b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/include/api.h new file mode 100644 index 000000000..e31d55cc0 --- /dev/null +++ b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/include/api.h @@ -0,0 +1,52 @@ +#ifndef GW_SYSCALL_SIMULATOR_API_H_ +#define GW_SYSCALL_SIMULATOR_API_H_ +#include +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include + +/*=====ckb syscalls====*/ +int ckb_exit(int8_t code); +int ckb_debug(const char* s); +/*=====ckb syscalls====*/ + +/*=====gw syscalls====*/ +int gw_load_rollup_config(uint8_t *addr, uint64_t *len); +int gw_store(void *key, void *value); +int gw_load(const uint8_t *key, uint8_t *value); +int gw_set_return_data(const uint8_t *addr, uint64_t len); +int gw_create(const uint8_t *script_addr, uint64_t script_len, uint32_t *account_id); +int gw_load_tx(void *addr, uint64_t *len); +int gw_load_block_info(void *addr, uint64_t *len); +int gw_get_block_hash(uint8_t *addr, uint64_t number); +int gw_store_data(const uint8_t *addr, uint64_t len); +int gw_load_data(void *data, uint64_t *len, uint64_t offset, const uint8_t *data_hash); +int gw_load_account_script(void *script, uint64_t *len, uint64_t offset, uint32_t account_id); +int gw_pay_fee(uint8_t *reg_addr_buf, uint64_t len, uint32_t sudi_id, const uint8_t *amount); +int gw_log(uint32_t account_id, uint8_t service_flag, uint64_t len, const uint8_t *data); +int gw_bn_add(uint8_t *data, uint64_t len, uint64_t offset, const uint8_t *input, uint64_t input_size); +int gw_bn_mul(uint8_t *data, uint64_t len, uint64_t offset, const uint8_t *input, uint64_t input_size); +int gw_bn_pairing(uint8_t *data, uint64_t len, uint64_t offset, const uint8_t *input, uint64_t input_size); +int gw_snapshot(uint32_t *snapshot); +int gw_revert(uint32_t snapshot); +int gw_check_sudt_addr_permission(const uint8_t* sudt_proxy_addr); +/*=====gw syscalls====*/ + +/*=====utils====*/ +int gw_reset(); +int gw_set_tx(const uint8_t *addr, uint64_t len); +int gw_create_contract_account(const uint8_t *eth_addr, + const uint8_t *mint_addr, + const uint8_t *code_addr, + uint64_t code_size, + uint32_t *account_id); +int gw_create_eoa_account(const uint8_t *eth_addr, const uint8_t *mint_addr, uint32_t *account_id); + + +#ifdef __cplusplus +} +#endif +#endif diff --git a/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/src/constants.rs b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/src/constants.rs new file mode 100644 index 000000000..448f432fa --- /dev/null +++ b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/src/constants.rs @@ -0,0 +1,55 @@ +pub const CREATOR_ACCOUNT_ID: u32 = 1; +pub const CHAIN_ID: u64 = 1; + +pub const META_VALIDATOR_SCRIPT_TYPE_HASH: [u8; 32] = [0xa1u8; 32]; +pub const SUDT_VALIDATOR_SCRIPT_TYPE_HASH: [u8; 32] = [0xa2u8; 32]; +pub const ROLLUP_SCRIPT_HASH: [u8; 32] = [0xa9u8; 32]; +pub const ETH_ACCOUNT_LOCK_CODE_HASH: [u8; 32] = [0xaau8; 32]; +pub const SECP_LOCK_CODE_HASH: [u8; 32] = [0xbbu8; 32]; +pub const POLYJUICE_PROGRAM_CODE_HASH: [u8; 32] = [0xb1u8; 32]; +pub const ETH_ADDRESS_REGISTRY_PROGRAM_CODE_HASH: [u8; 32] = [0xb2u8; 32]; +pub const BLOCK_HASH: [u8; 32] = [0xc1; 32]; +pub const BLOCK_PRODUCER_ETH_ADDRESSS: &str = "a1ad227Ad369f593B5f3d0Cc934A681a50811CB2"; + +pub const GW_LOG_SUDT_TRANSFER: u8 = 0x0; +pub const GW_LOG_SUDT_PAY_FEE: u8 = 0x1; +pub const GW_LOG_POLYJUICE_SYSTEM: u8 = 0x2; +pub const GW_LOG_POLYJUICE_USER: u8 = 0x3; + +pub const SUCCESS: i32 = 0; +pub const ERROR: i32 = -9; +/* Data Fatals */ +pub const GW_FATAL_BUFFER_OVERFLOW: i8 = 50; +pub const GW_FATAL_INVALID_CONTEXT: i8 = 51; +pub const GW_FATAL_INVALID_DATA: i8 = 52; +pub const GW_FATAL_MISMATCH_RETURN_DATA: i8 = 53; +pub const GW_FATAL_UNKNOWN_ARGS: i8 = 54; +pub const GW_FATAL_INVALID_SUDT_SCRIPT: i8 = 55; + +/* Notfound Fatals */ +pub const GW_FATAL_DATA_CELL_NOT_FOUND: i8 = 60; +pub const GW_FATAL_STATE_KEY_NOT_FOUND: i8 = 61; +pub const GW_FATAL_SIGNATURE_CELL_NOT_FOUND: i8 = 62; +pub const GW_FATAL_SCRIPT_NOT_FOUND: i8 = 63; + +/* Merkle Fatals */ +pub const GW_FATAL_INVALID_PROOF: i8 = 70; +pub const GW_FATAL_INVALID_STACK: i8 = 71; +pub const GW_FATAL_INVALID_SIBLING: i8 = 72; + +/* User Errors */ +pub const GW_ERROR_DUPLICATED_SCRIPT_HASH: i8 = 80; +pub const GW_ERROR_UNKNOWN_SCRIPT_CODE_HASH: i8 = 81; +pub const GW_ERROR_INVALID_ACCOUNT_SCRIPT: i8 = 82; +pub const GW_ERROR_NOT_FOUND: i8 = 83; +pub const GW_ERROR_RECOVER: i8 = 84; +pub const GW_ERROR_ACCOUNT_NOT_FOUND: i8 = 85; + +/* SUDT */ +pub const GW_SUDT_ERROR_INSUFFICIENT_BALANCE: i8 = 92i8; +pub const GW_SUDT_ERROR_AMOUNT_OVERFLOW: i8 = 93i8; + +pub const GW_ITEM_MISSING: i32 = 1; + +// 25KB is max ethereum contract code size +const MAX_SET_RETURN_DATA_SIZE: u64 = 1024 * 25; diff --git a/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/src/lib.rs b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/src/lib.rs new file mode 100644 index 000000000..39fa8c155 --- /dev/null +++ b/gwos-evm/polyjuice-tests/fuzz/gw-syscall-simulator/src/lib.rs @@ -0,0 +1,711 @@ +#[allow(dead_code)] +pub mod constants; +use anyhow::{anyhow, Result}; +use constants::{ + BLOCK_HASH, BLOCK_PRODUCER_ETH_ADDRESSS, CHAIN_ID, CREATOR_ACCOUNT_ID, + ETH_ACCOUNT_LOCK_CODE_HASH, ETH_ADDRESS_REGISTRY_PROGRAM_CODE_HASH, GW_ERROR_ACCOUNT_NOT_FOUND, + GW_ERROR_DUPLICATED_SCRIPT_HASH, GW_ERROR_INVALID_ACCOUNT_SCRIPT, GW_ERROR_NOT_FOUND, + GW_ITEM_MISSING, META_VALIDATOR_SCRIPT_TYPE_HASH, POLYJUICE_PROGRAM_CODE_HASH, + ROLLUP_SCRIPT_HASH, SUCCESS, SUDT_VALIDATOR_SCRIPT_TYPE_HASH, +}; +use gw_common::blake2b::new_blake2b; +use gw_common::builtins::{CKB_SUDT_ACCOUNT_ID, ETH_REGISTRY_ACCOUNT_ID}; +use gw_common::registry_address::RegistryAddress; +use gw_common::state::{ + build_account_field_key, build_account_key, build_data_hash_key, + build_script_hash_to_account_id_key, State, GW_ACCOUNT_NONCE_TYPE, GW_ACCOUNT_SCRIPT_HASH_TYPE, +}; +use gw_common::CKB_SUDT_SCRIPT_ARGS; +use gw_generator::syscalls::bn; +use gw_generator::traits::StateExt; +use gw_store::Store; +use gw_traits::CodeStore; +use gw_types::U256; +use gw_types::{ + bytes::Bytes, + core::{AllowedContractType, AllowedEoaType, ScriptHashType}, + offchain::RunResult, + packed::*, + prelude::*, +}; +use gwstore::state::traits::JournalDB; +use once_cell::sync::Lazy; +use std::os::raw::{c_char, c_int, c_void}; +use std::u128; +use std::{ffi::CStr, sync::Mutex}; + +use crate::constants::ERROR; +use gw_smt::smt::SMT; +pub use gw_store as gwstore; +pub use gw_types; +use gw_types::h256::*; +use gwstore::{ + smt::smt_store::SMTStateStore, + snapshot::StoreSnapshot, + state::{ + overlay::{mem_state::MemStateTree, mem_store::MemStore}, + MemStateDB, + }, +}; + +type DummyState = MemStateDB; +pub fn new_dummy_state(store: StoreSnapshot) -> MemStateDB { + let smt = SMT::new( + H256::zero().into(), + SMTStateStore::new(MemStore::new(store)), + ); + let inner = MemStateTree::new(smt, 0); + MemStateDB::new(inner) +} + +struct GodwokenHost { + rollup_config: RollupConfig, + block_info: BlockInfo, + tx: Option>, + run_result: RunResult, + state: DummyState, +} + +impl GodwokenHost { + fn new() -> Self { + let rollup_config = RollupConfig::new_builder() + .chain_id(CHAIN_ID.pack()) + .l2_sudt_validator_script_type_hash(SUDT_VALIDATOR_SCRIPT_TYPE_HASH.pack()) + .allowed_contract_type_hashes( + vec![ + AllowedTypeHash::new( + AllowedContractType::Meta, + META_VALIDATOR_SCRIPT_TYPE_HASH, + ), + AllowedTypeHash::new( + AllowedContractType::Sudt, + SUDT_VALIDATOR_SCRIPT_TYPE_HASH, + ), + AllowedTypeHash::new( + AllowedContractType::Polyjuice, + POLYJUICE_PROGRAM_CODE_HASH, + ), + AllowedTypeHash::new( + AllowedContractType::EthAddrReg, + ETH_ADDRESS_REGISTRY_PROGRAM_CODE_HASH, + ), + ] + .pack(), + ) + .allowed_eoa_type_hashes( + vec![AllowedTypeHash::new( + AllowedEoaType::Eth, + ETH_ACCOUNT_LOCK_CODE_HASH, + )] + .pack(), + ) + .build(); + let store = Store::open_tmp().expect("open store"); + let snapshot = store.get_snapshot(); + let state = new_dummy_state(snapshot); // will be reset + let eth_address: [u8; 20] = hex::decode(BLOCK_PRODUCER_ETH_ADDRESSS) + .expect("decode hex eth_address") + .try_into() + .unwrap(); + let address = RegistryAddress::new(ETH_REGISTRY_ACCOUNT_ID, eth_address.to_vec()); + let block_info = BlockInfo::new_builder() + .number(1.pack()) + .timestamp(1.pack()) + .block_producer(Bytes::from(address.to_bytes()).pack()) + .build(); + GodwokenHost { + rollup_config, + block_info, + tx: None, + run_result: RunResult::default(), + state, + } + } + fn get_raw(&mut self, key: &H256) -> Result { + let tree_value = self + .state + .get_raw(key) + .map_err(|err| anyhow!(err.to_string()))?; + self.run_result.read_data_hashes.insert(*key); + Ok(tree_value) + } + fn get_account_id_by_script_hash(&mut self, script_hash: &H256) -> Result> { + let value = self + .get_raw(&build_script_hash_to_account_id_key(script_hash.as_slice())) + .map_err(|err| anyhow!("syscall error: get account id by script hash : {:?}", err))?; + if value.is_zero() { + return Ok(None); + } + let id = value.to_u32(); + Ok(Some(id)) + } + + fn get_account_count(&self) -> Result { + let count = self + .state + .get_account_count() + .map_err(|err| anyhow!("syscall error: get account count : {:?}", err))?; + Ok(count) + } + + fn get_script_hash(&mut self, id: u32) -> Result { + let value = self + .get_raw(&build_account_field_key(id, GW_ACCOUNT_SCRIPT_HASH_TYPE)) + .map_err(|err| anyhow!("syscall error: get script hash by account id : {:?}", err))?; + Ok(value) + } + + fn get_script(&mut self, script_hash: &H256) -> Option