{"id":22941807,"url":"https://github.com/zacksleo/substrate-ocw","last_synced_at":"2025-04-01T20:49:53.224Z","repository":{"id":75725079,"uuid":"405156459","full_name":"zacksleo/substrate-ocw","owner":"zacksleo","description":"substrate offchain worker","archived":false,"fork":false,"pushed_at":"2021-09-19T12:34:40.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T13:47:46.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zacksleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-10T17:09:49.000Z","updated_at":"2021-09-19T12:34:42.000Z","dependencies_parsed_at":"2023-06-07T11:45:19.745Z","dependency_job_id":null,"html_url":"https://github.com/zacksleo/substrate-ocw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fsubstrate-ocw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fsubstrate-ocw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fsubstrate-ocw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fsubstrate-ocw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacksleo","download_url":"https://codeload.github.com/zacksleo/substrate-ocw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709912,"owners_count":20821298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T13:45:05.640Z","updated_at":"2025-04-01T20:49:53.194Z","avatar_url":"https://github.com/zacksleo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Substrate Offchain Worker\n\n## 核心代码\n\nhttps://github.com/zacksleo/substrate-ocw/blob/master/assignment/pallets/ocw/src/lib.rs#L115\n\n1. 使用 #[serde(deserialize_with=)] 宏, 将 json 数据反序列化成 struct\n2. 使用 #[serde(rename_all = \"camelCase\")] 宏, 将驼峰转为下划线格式的字段名\n\n```rust\n\n    // polkadot price\n    pub type PolkadotPrice = (u64, Permill);\n\n\n    // polkadot price data\n    #[derive(Deserialize, Encode, Decode, Default, Debug)]\n    #[serde(rename_all = \"camelCase\")]\n    struct PriceInfo {\n      #[serde(deserialize_with = \"de_string_to_tuple\")]\n      price_usd: PolkadotPrice,\n    }\n\n    // 将价格字符串反序列化为元组 (u64, Permill)\n    pub fn de_string_to_tuple\u003c'de, D\u003e(de: D) -\u003e Result\u003cPolkadotPrice, D::Error\u003e\n    where\n      D: Deserializer\u003c'de\u003e,\n    {\n      let s: \u0026str = Deserialize::deserialize(de)?;\n      let price_usd: Vec\u003c\u0026str\u003e = s.split(\".\").collect();\n      let price_usd_num: u64 = price_usd[0].parse().unwrap();\n      let price_usd_permill: Permill = Permill::from_parts(price_usd[1][..6].parse::\u003cu32\u003e().unwrap());\n      Ok((price_usd_num, price_usd_permill))\n    }\n\n```\n\n对于作业中的问题, 这里采用 “不签名但具签名信息的交易”, 原因如下:\n\n需要知道该交易来源是谁，但不需要该用户付手续费, 故使用“不签名但具签名信息的交易”\n\n```rust\n\n      /// 获取当前 DOT 的美元价格, 并提交到回链上\n      fn fetch_price_info() -\u003e Result\u003c(), Error\u003cT\u003e\u003e {\n\n        let mut lock = StorageLock::\u003cBlockAndTime\u003cSelf\u003e\u003e::with_block_and_time_deadline(\n          b\"offchain-demo-price::lock\", LOCK_BLOCK_EXPIRATION,\n          rt_offchain::Duration::from_millis(LOCK_TIMEOUT_EXPIRATION),\n        );\n\n        // We try to acquire the lock here. If failed, we know the `fetch_n_parse` part inside is being\n        //   executed by previous run of ocw, so the function just returns.\n        if let Ok(_guard) = lock.try_lock() {\n          match Self::fetch_n_parse::\u003cDataWrapper\u003cPriceInfo\u003e\u003e(HTTP_POLKADOT_PRICE_API) {\n            Ok(info) =\u003e {\n              // 需要知道该交易来源是谁，但不需要该用户付手续费, 故使用“不签名但具签名信息的交易”\n              let _ = Self::offchain_unsigned_tx_signed_payload_price(info.data.price_usd);\n            }\n            Err(err) =\u003e {\n              return Err(err);\n            }\n          }\n        }\n\n        Ok(())\n      }\n\n```\n\n其他, 改造部分代码, 添加泛型, 以最大程度的简化代码\n\n如将请求方法, 统一封装为 `\tfn fetch_from_remote(url: \u0026str) -\u003e Result\u003cVec\u003cu8\u003e, Error\u003cT\u003e\u003e `,  通过 url 就可以获取数据\n\n\n### 编译日志\n\n```bash\n➜  assignment git:(master) cargo build --release\nwarning: unused config key `build.rustc_wrapper` in `/Users/zacksleo/.cargo/config`\n   Compiling libc v0.2.98\n   Compiling proc-macro2 v1.0.28\n   Compiling unicode-xid v0.2.2\n   Compiling syn v1.0.74\n   Compiling version_check v0.9.3\n   Compiling cfg-if v1.0.0\n   Compiling autocfg v1.0.1\n   Compiling serde v1.0.130\n   Compiling serde_derive v1.0.130\n   Compiling log v0.4.14\n   Compiling scopeguard v1.1.0\n   Compiling memchr v2.4.0\n   Compiling smallvec v1.6.1\n   Compiling lazy_static v1.4.0\n   Compiling typenum v1.13.0\n   Compiling futures v0.1.31\n   Compiling slab v0.4.3\n   Compiling byteorder v1.4.3\n   Compiling cfg-if v0.1.10\n   Compiling ppv-lite86 v0.2.10\n   Compiling futures-core v0.3.16\n   Compiling pin-project-lite v0.2.7\n   Compiling futures-io v0.3.16\n   Compiling anyhow v1.0.42\n   Compiling proc-macro-hack v0.5.19\n   Compiling futures-sink v0.3.16\n   Compiling futures-task v0.3.16\n   Compiling proc-macro-nested v0.1.7\n   Compiling futures-channel v0.3.16\n   Compiling pin-utils v0.1.0\n   Compiling getrandom v0.1.16\n   Compiling subtle v2.4.1\n   Compiling either v1.6.1\n   Compiling opaque-debug v0.3.0\n   Compiling tinyvec_macros v0.1.0\n   Compiling static_assertions v1.1.0\n   Compiling block-padding v0.2.1\n   Compiling crunchy v0.2.2\n   Compiling cpufeatures v0.1.5\n   Compiling arrayref v0.3.6\n   Compiling byte-tools v0.3.1\n   Compiling arrayvec v0.5.2\n   Compiling constant_time_eq v0.1.5\n   Compiling keccak v0.1.0\n   Compiling opaque-debug v0.2.3\n   Compiling fake-simd v0.1.2\n   Compiling subtle v1.0.0\n   Compiling itoa v0.4.7\n   Compiling radium v0.6.2\n   Compiling ryu v1.0.5\n   Compiling signature v1.3.1\n   Compiling regex-syntax v0.6.25\n   Compiling libm v0.2.1\n   Compiling serde_json v1.0.67\n   Compiling wyz v0.2.0\n   Compiling tap v1.0.1\n   Compiling funty v1.1.0\n   Compiling arrayvec v0.7.1\n   Compiling byte-slice-cast v1.0.0\n   Compiling rustc-hash v1.1.0\n   Compiling hex v0.4.3\n   Compiling rustc-hex v2.1.0\n   Compiling adler v1.0.2\n   Compiling arrayvec v0.4.12\n   Compiling parity-util-mem v0.10.0\n   Compiling fnv v1.0.7\n   Compiling sp-std v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling zstd-safe v3.0.1+zstd.1.4.9\n   Compiling parity-wasm v0.42.2\n   Compiling erased-serde v0.3.16\n   Compiling ref-cast v1.0.6\n   Compiling slog v2.7.0\n   Compiling downcast-rs v1.2.0\n   Compiling ansi_term v0.12.1\n   Compiling hash-db v0.15.2\n   Compiling nodrop v0.1.14\n   Compiling memory_units v0.3.0\n   Compiling environmental v1.1.3\n   Compiling gimli v0.25.0\n   Compiling tiny-keccak v2.0.2\n   Compiling dyn-clone v1.0.4\n   Compiling async-trait v0.1.51\n   Compiling rustc-demangle v0.1.20\n   Compiling base58 v0.1.0\n   Compiling convert_case v0.4.0\n   Compiling paste v1.0.5\n   Compiling bytes v1.0.1\n   Compiling unicode-segmentation v1.8.0\n   Compiling remove_dir_all v0.5.3\n   Compiling bitflags v1.2.1\n   Compiling futures-timer v3.0.2\n   Compiling fixedbitset v0.2.0\n   Compiling multimap v0.8.3\n   Compiling matches v0.1.8\n   Compiling crossbeam-utils v0.8.5\n   Compiling semver-parser v0.7.0\n   Compiling cache-padded v1.1.1\n   Compiling untrusted v0.7.1\n   Compiling spin v0.5.2\n   Compiling parking v2.0.0\n   Compiling fastrand v1.5.0\n   Compiling waker-fn v1.1.0\n   Compiling percent-encoding v2.1.0\n   Compiling event-listener v2.5.1\n   Compiling httparse v1.4.1\n   Compiling bytes v0.5.6\n   Compiling data-encoding v2.3.2\n   Compiling pin-project-lite v0.1.12\n   Compiling async-task v4.0.3\n   Compiling signal-hook v0.3.9\n   Compiling pin-project-internal v0.4.28\n   Compiling atomic-waker v1.0.0\n   Compiling unsigned-varint v0.5.1\n   Compiling stable_deref_trait v1.2.0\n   Compiling try-lock v0.2.3\n   Compiling crc32fast v1.2.1\n   Compiling bs58 v0.4.0\n   Compiling fallible-iterator v0.2.0\n   Compiling quick-error v1.2.3\n   Compiling void v1.0.2\n   Compiling target-lexicon v0.12.1\n   Compiling asn1_der v0.7.4\n   Compiling prometheus v0.11.0\n   Compiling tower-service v0.3.1\n   Compiling httpdate v0.3.2\n   Compiling wasmparser v0.78.2\n   Compiling base64 v0.13.0\n   Compiling more-asserts v0.2.1\n   Compiling crossbeam-epoch v0.9.5\n   Compiling rayon-core v1.9.1\n   Compiling termcolor v1.1.2\n   Compiling wasmtime-cache v0.27.0\n   Compiling wasm-bindgen-shared v0.2.74\n   Compiling cpp_demangle v0.3.3\n   Compiling linked-hash-map v0.5.4\n   Compiling ipnet v2.3.1\n   Compiling bumpalo v3.7.0\n   Compiling pkg-config v0.3.19\n   Compiling cpuid-bool v0.2.0\n   Compiling maybe-uninit v2.0.0\n   Compiling scoped-tls v1.0.0\n   Compiling base64 v0.12.3\n   Compiling match_cfg v0.1.0\n   Compiling wasm-bindgen v0.2.74\n   Compiling nohash-hasher v0.2.0\n   Compiling parity-send-wrapper v0.1.0\n   Compiling hex_fmt v0.3.0\n   Compiling radium v0.5.3\n   Compiling base-x v0.2.8\n   Compiling glob v0.3.0\n   Compiling take_mut v0.2.2\n   Compiling ucd-trie v0.1.3\n   Compiling rawpointer v0.2.1\n   Compiling ip_network v0.3.4\n   Compiling failure_derive v0.1.8\n   Compiling sc-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling bindgen v0.59.1\n   Compiling winapi v0.3.9\n   Compiling core-foundation-sys v0.7.0\n   Compiling peeking_take_while v0.1.2\n   Compiling shlex v1.0.0\n   Compiling lazycell v1.3.0\n   Compiling percent-encoding v1.0.1\n   Compiling mio-named-pipes v0.1.7\n   Compiling retain_mut v0.1.3\n   Compiling pdqselect v0.1.0\n   Compiling camino v1.0.5\n   Compiling maplit v1.0.2\n   Compiling unicode-width v0.1.8\n   Compiling futures-timer v2.0.2\n   Compiling platforms v1.1.0\n   Compiling same-file v1.0.6\n   Compiling names v0.11.0\n   Compiling vec_map v0.8.2\n   Compiling strsim v0.8.0\n   Compiling ansi_term v0.11.0\n   Compiling quick-error v2.0.1\n   Compiling safe-mix v1.0.1\n   Compiling instant v0.1.10\n   Compiling lock_api v0.4.4\n   Compiling lock_api v0.3.4\n   Compiling tracing-core v0.1.18\n   Compiling sharded-slab v0.1.1\n   Compiling tinyvec v1.3.1\n   Compiling value-bag v1.0.0-alpha.7\n   Compiling ahash v0.7.4\n   Compiling generic-array v0.14.4\n   Compiling proc-macro-error-attr v1.0.4\n   Compiling proc-macro-error v1.0.4\n   Compiling nom v6.1.2\n   Compiling unicase v2.6.0\n   Compiling futures-macro v0.3.16\n   Compiling futures-util v0.3.16\n   Compiling indexmap v1.7.0\n   Compiling num-traits v0.2.14\n   Compiling num-integer v0.1.44\n   Compiling miniz_oxide v0.4.4\n   Compiling num-bigint v0.2.6\n   Compiling num-rational v0.2.4\n   Compiling memoffset v0.6.4\n   Compiling rayon v1.5.1\n   Compiling crossbeam-utils v0.7.2\n   Compiling atomic v0.5.0\n   Compiling memoffset v0.5.6\n   Compiling crossbeam-epoch v0.8.2\n   Compiling num-rational v0.4.0\n   Compiling block-padding v0.1.5\n   Compiling itertools v0.10.1\n   Compiling ed25519 v1.2.0\n   Compiling libloading v0.7.0\n   Compiling trie-root v0.16.0\n   Compiling blake2b_simd v0.5.11\n   Compiling blake2s_simd v0.5.11\n   Compiling itertools v0.9.0\n   Compiling http v0.2.4\n   Compiling tokio-sync v0.1.8\n   Compiling tokio-service v0.1.0\n   Compiling heck v0.3.3\n   Compiling unicode-bidi v0.3.5\n   Compiling concurrent-queue v1.2.2\n   Compiling semver v0.9.0\n   Compiling semver v0.6.0\n   Compiling form_urlencoded v1.0.1\n   Compiling async-mutex v1.4.0\n   Compiling async-lock v2.4.0\n   Compiling owning_ref v0.4.1\n   Compiling wasmi-validation v0.4.0\n   Compiling humantime v1.3.0\n   Compiling dns-parser v0.8.0\n   Compiling lru-cache v0.1.2\n   Compiling linked_hash_set v0.1.4\n   Compiling regex-automata v0.1.10\n   Compiling matrixmultiply v0.3.1\n   Compiling pest v2.1.3\n   Compiling clang-sys v1.2.0\n   Compiling textwrap v0.11.0\n   Compiling walkdir v2.3.2\n   Compiling addr2line v0.16.0\n   Compiling parity-wasm v0.32.0\n   Compiling unicode-normalization v0.1.19\n   Compiling rustc_version v0.2.3\n   Compiling build-helper v0.1.1\n   Compiling http-body v0.3.1\n   Compiling matchers v0.0.1\n   Compiling semver-parser v0.10.2\n   Compiling pest_meta v2.1.3\n   Compiling async-channel v1.6.1\n   Compiling quicksink v0.1.2\n   Compiling aho-corasick v0.7.18\n   Compiling object v0.26.0\n   Compiling futures-lite v1.12.0\n   Compiling bstr v0.2.16\n   Compiling parking_lot_core v0.8.3\n   Compiling num_cpus v1.13.0\n   Compiling getrandom v0.2.3\n   Compiling parking_lot_core v0.7.2\n   Compiling time v0.1.44\n   Compiling iovec v0.1.4\n   Compiling net2 v0.2.37\n   Compiling signal-hook-registry v1.4.0\n   Compiling socket2 v0.4.1\n   Compiling socket2 v0.3.19\n   Compiling atty v0.2.14\n   Compiling mach v0.3.2\n   Compiling dirs-sys-next v0.1.2\n   Compiling errno v0.2.7\n   Compiling hostname v0.3.1\n   Compiling if-addrs v0.6.5\n   Compiling memmap2 v0.2.3\n   Compiling fs2 v0.4.3\n   Compiling rand v0.4.6\n   Compiling dirs-sys v0.3.6\n   Compiling fdlimit v0.2.1\n   Compiling rpassword v5.0.1\n   Compiling jobserver v0.1.22\n   Compiling which v4.2.2\n   Compiling quote v1.0.9\n   Compiling uint v0.9.1\n   Compiling hash256-std-hasher v0.15.2\n   Compiling bitvec v0.20.4\n   Compiling generic-array v0.12.4\n   Compiling blake2-rfc v0.2.18\n   Compiling idna v0.2.3\n   Compiling idna v0.1.5\n   Compiling snow v0.7.2\n   Compiling parking_lot_core v0.6.2\n   Compiling parking_lot v0.9.0\n   Compiling hyper v0.12.36\n   Compiling crossbeam-channel v0.5.1\n   Compiling smallvec v0.6.14\n   Compiling bitvec v0.19.5\n   Compiling security-framework-sys v1.0.0\n   Compiling core-foundation v0.7.0\n   Compiling miow v0.3.7\n   Compiling futures-cpupool v0.1.8\n   Compiling threadpool v1.8.1\n   Compiling substrate-build-script-utils v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling rand_core v0.6.3\n   Compiling rand_core v0.5.1\n   Compiling parking_lot v0.11.1\n   Compiling parking_lot v0.10.2\n   Compiling bytes v0.4.12\n   Compiling clap v2.33.3\n   Compiling directories-next v2.0.0\n   Compiling regex v1.5.4\n   Compiling resolv-conf v0.7.0\n   Compiling directories v3.0.2\n   Compiling region v2.2.0\n   Compiling cc v1.0.69\n   Compiling prost-build v0.7.0\n   Compiling rand v0.3.23\n   Compiling digest v0.8.1\n   Compiling block-buffer v0.7.3\n   Compiling crypto-mac v0.7.0\n   Compiling digest v0.9.0\n   Compiling block-buffer v0.9.0\n   Compiling crypto-mac v0.8.0\n   Compiling block-cipher v0.8.0\n   Compiling universal-hash v0.4.1\n   Compiling aead v0.3.2\n   Compiling cipher v0.2.5\n   Compiling url v2.2.2\n   Compiling security-framework v1.0.0\n   Compiling url v1.7.2\n   Compiling tokio-executor v0.1.10\n   Compiling crossbeam-queue v0.2.3\n   Compiling rand_chacha v0.3.1\n   Compiling ocw-example v3.0.0-monthly-2021-08 (/Users/zacksleo/projects/github/zacksleo/substrate-ocw/assignment/node)\n   Compiling integer-sqrt v0.1.5\n   Compiling approx v0.5.0\n   Compiling num-complex v0.4.0\n   Compiling rand_chacha v0.2.2\n   Compiling rand_pcg v0.2.1\n   Compiling once_cell v1.8.0\n   Compiling http v0.1.21\n   Compiling string v0.2.1\n   Compiling tokio-buf v0.1.1\n   Compiling Inflector v0.11.4\n   Compiling hmac v0.7.1\n   Compiling pbkdf2 v0.3.0\n   Compiling sha2 v0.8.2\n   Compiling sha-1 v0.8.2\n   Compiling crossbeam-deque v0.8.1\n   Compiling pbkdf2 v0.4.0\n   Compiling stream-cipher v0.7.1\n   Compiling aes-soft v0.5.0\n   Compiling sha2 v0.9.5\n   Compiling hmac v0.8.1\n   Compiling sha3 v0.9.1\n   Compiling blake2 v0.9.1\n   Compiling sha-1 v0.9.7\n   Compiling polyval v0.4.5\n   Compiling poly1305 v0.6.2\n   Compiling salsa20 v0.7.2\n   Compiling tokio-current-thread v0.1.7\n   Compiling tokio-timer v0.2.13\n   Compiling rand v0.8.4\n   Compiling crossbeam-deque v0.7.4\n   Compiling chrono v0.4.19\n   Compiling rand v0.7.3\n   Compiling thread_local v1.1.3\n   Compiling blocking v1.0.2\n   Compiling async-executor v1.4.1\n   Compiling zstd-sys v1.4.20+zstd.1.4.9\n   Compiling backtrace v0.3.61\n   Compiling ring v0.16.20\n   Compiling blake3 v0.3.8\n   Compiling wasmtime-runtime v0.27.0\n   Compiling psm v0.1.14\n   Compiling libz-sys v1.1.3\n   Compiling libloading v0.5.2\n   Compiling simba v0.5.1\n   Compiling hmac-drbg v0.2.0\n   Compiling aes v0.5.0\n   Compiling ghash v0.3.1\n   Compiling http-body v0.1.0\n   Compiling cexpr v0.5.0\n   Compiling hashbrown v0.11.2\n   Compiling fixed-hash v0.7.0\n   Compiling rand_distr v0.4.1\n   Compiling tempfile v3.2.0\n   Compiling twox-hash v1.6.0\n   Compiling cuckoofilter v0.5.0\n   Compiling libsecp256k1 v0.3.5\n   Compiling aes-gcm v0.7.0\n   Compiling lru v0.6.6\n   Compiling synstructure v0.12.5\n   Compiling pest_generator v2.1.3\n   Compiling wasmi v0.9.0\n   Compiling sp-panic-handler v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling flate2 v1.0.20\n   Compiling fs-swap v0.2.6\n   Compiling ctor v0.1.20\n   Compiling thiserror-impl v1.0.26\n   Compiling zeroize_derive v1.1.0\n   Compiling impl-trait-for-tuples v0.2.1\n   Compiling tracing-attributes v0.1.15\n   Compiling parity-util-mem-derive v0.1.0\n   Compiling sp-debug-derive v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling ref-cast-impl v1.0.6\n   Compiling dyn-clonable-impl v0.9.0\n   Compiling derive_more v0.99.16\n   Compiling pin-project-internal v1.0.8\n   Compiling prost-derive v0.7.0\n   Compiling enum-as-inner v0.3.3\n   Compiling minicbor-derive v0.6.4\n   Compiling libp2p-swarm-derive v0.23.0\n   Compiling frame-support-procedural-tools-derive v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling data-encoding-macro-internal v0.1.10\n   Compiling nalgebra-macros v0.1.0\n   Compiling strum_macros v0.20.1\n   Compiling structopt-derive v0.4.15\n   Compiling pest_derive v2.1.0\n   Compiling zeroize v1.4.1\n   Compiling thiserror v1.0.26\n   Compiling dyn-clonable v0.9.0\n   Compiling pin-project v1.0.8\n   Compiling data-encoding-macro v0.1.12\n   Compiling pin-project v0.4.28\n   Compiling failure v0.1.8\n   Compiling prost v0.7.0\n   Compiling curve25519-dalek v3.1.0\n   Compiling merlin v2.0.1\n   Compiling curve25519-dalek v2.1.3\n   Compiling secrecy v0.7.0\n   Compiling chacha20 v0.5.0\n   Compiling tiny-bip39 v0.8.0\n   Compiling minicbor v0.8.1\n   Compiling multibase v0.8.0\n   Compiling tracing v0.1.26\n   Compiling tracing-log v0.1.2\n   Compiling trie-db v0.22.6\n   Compiling mio v0.6.23\n   Compiling polling v2.1.0\n   Compiling kv-log-macro v1.0.7\n   Compiling want v0.3.0\n   Compiling env_logger v0.7.1\n   Compiling pwasm-utils v0.18.1\n   Compiling tokio-io v0.1.13\n   Compiling tokio-threadpool v0.1.18\n   Compiling globset v0.4.8\n   Compiling want v0.2.0\n   Compiling parity-db v0.2.4\n   Compiling wasm-bindgen-backend v0.2.74\n   Compiling wasm-gc-api v0.1.11\n   Compiling librocksdb-sys v6.20.3\n   Compiling strum v0.20.0\n   Compiling structopt v0.3.22\n   Compiling chacha20poly1305 v0.6.0\n   Compiling nalgebra v0.27.1\n   Compiling prost-types v0.7.0\n   Compiling schnorrkel v0.9.1\n   Compiling x25519-dalek v1.1.1\n   Compiling tracing-futures v0.2.5\n   Compiling async-io v1.6.0\n   Compiling file-per-thread-logger v0.1.4\n   Compiling mio-uds v0.6.8\n   Compiling mio-extras v2.0.6\n   Compiling tokio-reactor v0.1.12\n   Compiling tokio-codec v0.1.2\n   Compiling tokio-fs v0.1.7\n   Compiling futures-executor v0.3.16\n   Compiling asynchronous-codec v0.6.0\n   Compiling trust-dns-proto v0.20.3\n   Compiling asynchronous-codec v0.5.0\n   Compiling wasm-bindgen-macro-support v0.2.74\n   Compiling substrate-bip39 v0.4.2\n   Compiling async-process v1.1.0\n   Compiling async-global-executor v2.0.2\n   Compiling if-watch v0.2.2\n   Compiling ed25519-dalek v1.0.1\n   Compiling impl-serde v0.3.1\n   Compiling tracing-serde v0.1.2\n   Compiling cranelift-entity v0.74.0\n   Compiling cranelift-codegen-shared v0.74.0\n   Compiling regalloc v0.0.31\n   Compiling toml v0.5.8\n   Compiling bincode v1.3.3\n   Compiling semver v0.11.0\n   Compiling cargo-platform v0.1.1\n   Compiling tokio v0.2.25\n   Compiling parity-ws v0.10.1\n   Compiling tokio-uds v0.2.7\n   Compiling tokio-tcp v0.1.4\n   Compiling tokio-udp v0.1.6\n   Compiling futures v0.3.16\n   Compiling unsigned-varint v0.7.0\n   Compiling unsigned-varint v0.6.0\n   Compiling async-std v1.9.0\n   Compiling wasm-bindgen-macro v0.2.74\n   Compiling tracing-subscriber v0.2.19\n   Compiling sp-serializer v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling jsonrpc-core v15.1.0\n   Compiling handlebars v3.5.5\n   Compiling gimli v0.24.0\n   Compiling object v0.24.0\n   Compiling h2 v0.1.26\n   Compiling cranelift-bforest v0.74.0\n   Compiling trust-dns-resolver v0.20.3\n   Compiling petgraph v0.5.1\n   Compiling cranelift-codegen-meta v0.74.0\n   Compiling wasm-timer v0.2.5\n   Compiling rw-stream-sink v0.2.1\n   Compiling sp-utils v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling yamux v0.9.0\n   Compiling soketto v0.4.2\n   Compiling libp2p-pnet v0.20.0\n   Compiling intervalier v0.4.0\n   Compiling exit-future v0.2.0\n   Compiling tokio v0.1.22\n   Compiling proc-macro-crate v1.0.0\n   Compiling proc-macro-crate v0.1.5\n   Compiling multistream-select v0.10.2\n   Compiling cargo_metadata v0.13.1\n   Compiling jsonrpc-pubsub v15.1.0\n   Compiling tokio-util v0.3.1\n   Compiling sct v0.6.1\n   Compiling webpki v0.21.4\n   Compiling addr2line v0.15.2\n   Compiling async-std-resolver v0.20.3\n   Compiling jsonrpc-server-utils v15.1.0\n   Compiling tokio-named-pipes v0.1.0\n   Compiling frame-support-procedural-tools v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling jsonrpc-derive v15.1.0\n   Compiling parity-scale-codec-derive v2.2.0\n   Compiling sp-runtime-interface-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-api-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling multihash-derive v0.7.2\n   Compiling scale-info-derive v0.7.0\n   Compiling sc-chain-spec-derive v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-tracing-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling jsonrpc-client-transports v15.1.0\n   Compiling statrs v0.15.0\n   Compiling h2 v0.2.7\n   Compiling ct-logs v0.7.0\n   Compiling js-sys v0.3.51\n   Compiling rustls v0.19.1\n   Compiling webpki-roots v0.21.1\n   Compiling rustls v0.18.1\n   Compiling parity-tokio-ipc v0.4.0\n   Compiling jsonrpc-ws-server v15.1.0\n   Compiling libp2p-core v0.28.3\n   Compiling libp2p-gossipsub v0.30.1\n   Compiling libp2p-plaintext v0.28.0\n   Compiling libp2p-floodsub v0.29.0\n   Compiling libp2p-identify v0.29.0\n   Compiling libp2p-relay v0.2.0\n   Compiling libp2p-kad v0.30.0\n   Compiling libp2p-noise v0.30.0\n   Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling multihash v0.13.2\n   Compiling jsonrpc-core-client v15.1.0\n   Compiling jsonrpc-http-server v15.1.0\n   Compiling parity-scale-codec v2.2.0\n   Compiling linregress v0.4.3\n   Compiling jsonrpc-ipc-server v15.1.0\n   Compiling futures-rustls v0.21.1\n   Compiling cranelift-codegen v0.74.0\n   Compiling tokio-rustls v0.14.1\n   Compiling rustls-native-certs v0.4.0\n   Compiling wasm-bindgen-futures v0.4.24\n   Compiling parity-multiaddr v0.11.2\n   Compiling cid v0.6.1\n   Compiling hyper v0.13.10\n   Compiling impl-codec v0.5.1\n   Compiling sp-storage v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-wasm-interface v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-tracing v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-arithmetic v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling fork-tree v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling scale-info v0.10.0\n   Compiling sp-version-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling primitive-types v0.10.1\n   Compiling sp-externalities v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling finality-grandpa v0.14.3\n   Compiling sp-runtime-interface v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling libp2p-swarm v0.29.0\n   Compiling libp2p-dns v0.28.1\n   Compiling libp2p-websocket v0.29.0\n   Compiling libp2p-uds v0.28.0\n   Compiling libp2p-tcp v0.28.0\n   Compiling libp2p-yamux v0.32.0\n   Compiling libp2p-mplex v0.28.0\n   Compiling libp2p-deflate v0.28.0\n   Compiling libp2p-wasm-ext v0.28.2\n   Compiling memory-db v0.27.0\n   Compiling kvdb v0.10.0\n   Compiling sp-core v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling libp2p-mdns v0.30.2\n   Compiling libp2p-ping v0.29.0\n   Compiling libp2p-request-response v0.11.0\n   Compiling substrate-prometheus-endpoint v0.9.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling hyper-rustls v0.21.0\n   Compiling sp-database v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling kvdb-memorydb v0.10.0\n   Compiling sc-proposer-metrics v0.9.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-trie v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-keystore v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-allocator v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-metadata v14.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-rpc v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling libp2p v0.37.1\n   Compiling sp-state-machine v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-telemetry v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-peerset v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling zstd v0.6.1+zstd.1.4.9\n   Compiling sp-maybe-compressed-blob v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling node-template-runtime v3.0.0-monthly-2021-08 (/Users/zacksleo/projects/github/zacksleo/substrate-ocw/assignment/runtime)\n   Compiling cranelift-frontend v0.74.0\n   Compiling cranelift-native v0.74.0\n   Compiling cranelift-wasm v0.74.0\n   Compiling wasmtime-environ v0.27.0\n   Compiling wasmtime-debug v0.27.0\n   Compiling wasmtime-cranelift v0.27.0\n   Compiling wasmtime-obj v0.27.0\n   Compiling wasmtime-profiling v0.27.0\n   Compiling wasmtime-jit v0.27.0\n   Compiling sp-io v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling wasmtime v0.27.0\n   Compiling sc-executor-wasmi v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-application-crypto v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-tasks v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-executor-wasmtime v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-runtime v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-keystore v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-version v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-inherents v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-staking v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-consensus-vrf v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-rpc-server v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-keyring v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-api v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-finality-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-session v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-offchain v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-system-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-consensus v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-block-builder v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-timestamp v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-authorship v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-transaction-storage-proof v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-blockchain v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-consensus-babe v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sp-consensus-aura v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-transaction-pool-api v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-client-api v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-consensus v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-block-builder v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-consensus-uncles v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-state-db v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-tracing v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-light v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-basic-authorship v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-consensus-epochs v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-consensus-babe v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-consensus-aura v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-system v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-network-gossip v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-informant v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-offchain v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-transaction-payment v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-authorship v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-executive v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-sudo v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-ocw v3.1.0 (/Users/zacksleo/projects/github/zacksleo/substrate-ocw/assignment/pallets/ocw)\n   Compiling pallet-randomness-collective-flip v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-timestamp v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-template v3.0.0-monthly-2021-08 (/Users/zacksleo/projects/github/zacksleo/substrate-ocw/assignment/pallets/template)\n   Compiling pallet-balances v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-transaction-payment-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-session v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-transaction-payment-rpc v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-chain-spec v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-rpc-api v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-rpc v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling substrate-frame-rpc-system v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-aura v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling pallet-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling rocksdb v0.17.0\n   Compiling kvdb-rocksdb v0.12.1\n   Compiling sc-client-db v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling sc-cli v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n   Compiling frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb)\n    Finished release [optimized] target(s) in 11m 02s\n```\n\n## \b运行日志\n\n```bash\n➜  assignment git:(master) ✗ ./target/release/ocw-example --tmp --dev\n2021-09-19 19:56:33 Running in --dev mode, RPC CORS has been disabled.\n2021-09-19 19:56:33 Substrate Node\n2021-09-19 19:56:33 ✌️  version 3.0.0-monthly-2021-08-c146ce5-x86_64-macos\n2021-09-19 19:56:33 ❤️  by Substrate DevHub \u003chttps://github.com/substrate-developer-hub\u003e, 2017-2021\n2021-09-19 19:56:33 📋 Chain specification: Development\n2021-09-19 19:56:33 🏷 Node name: cruel-match-8001\n2021-09-19 19:56:33 👤 Role: AUTHORITY\n2021-09-19 19:56:33 💾 Database: RocksDb at /var/folders/t4/bd7qj94x28qf3ldn7zkxpwnm0000gn/T/substratebgMvgT/chains/dev/db\n2021-09-19 19:56:33 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)\n2021-09-19 19:56:34 🔨 Initializing Genesis block/state (state: 0xdb8d…cd6d, header-hash: 0x4e4e…9b10)\n2021-09-19 19:56:34 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.\n2021-09-19 19:56:34 ⏱  Loaded block-time = 6s from block 0x4e4eaf4e2119a39faa165c3b2c91500a17c2e5382bee983c44b03a8049d59b10\n2021-09-19 19:56:34 Using default protocol ID \"sup\" because none is configured in the chain specs\n2021-09-19 19:56:34 🏷 Local node identity is: 12D3KooWFqEZvEwU5R6k4yrBxRWSYQ9PCCKVR6vsjumzw6vuth8N\n2021-09-19 19:56:34 📦 Highest known block at #0\n2021-09-19 19:56:34 〽️ Prometheus exporter started at 127.0.0.1:9615\n2021-09-19 19:56:34 Listening for new connections on 127.0.0.1:9944.\n2021-09-19 19:56:36 🙌 Starting consensus session on top of parent 0x4e4eaf4e2119a39faa165c3b2c91500a17c2e5382bee983c44b03a8049d59b10\n2021-09-19 19:56:36 🎁 Prepared block for proposing at 1 [hash: 0xb3db079733c5d440c4e8399fb5d40bb1077755523f309a40a0e76903f0e0111f; parent_hash: 0x4e4e…9b10; extrinsics (1): [0x4f1e…3ebc]]\n2021-09-19 19:56:36 🔖 Pre-sealed block for proposal at 1. Hash now 0x46b1d36c592a219ace88467852fa28fc73876f946f8a07f56dea8e2085aa420b, previously 0xb3db079733c5d440c4e8399fb5d40bb1077755523f309a40a0e76903f0e0111f.\n2021-09-19 19:56:36 ✨ Imported #1 (0x46b1…420b)\n2021-09-19 19:56:36 Hello World from offchain workers!\n2021-09-19 19:56:39 💤 Idle (0 peers), best: #1 (0x46b1…420b), finalized #0 (0x4e4e…9b10), ⬇ 0 ⬆ 0\n2021-09-19 19:56:42 🙌 Starting consensus session on top of parent 0x46b1d36c592a219ace88467852fa28fc73876f946f8a07f56dea8e2085aa420b\n2021-09-19 19:56:42 submit_number_unsigned: 1\n2021-09-19 19:56:42 Number vector: [1]\n2021-09-19 19:56:42 🎁 Prepared block for proposing at 2 [hash: 0xe1879def5e48f327ab9f0aa475a83e91adbc235b553c19130593892c3e48a275; parent_hash: 0x46b1…420b; extrinsics (2): [0xd2af…678b, 0xad43…44a0]]\n2021-09-19 19:56:42 🔖 Pre-sealed block for proposal at 2. Hash now 0xc64bc3e587349e5516b02046105c7605f1d084371ba10ff22132065603af31dd, previously 0xe1879def5e48f327ab9f0aa475a83e91adbc235b553c19130593892c3e48a275.\n2021-09-19 19:56:42 ✨ Imported #2 (0xc64b…31dd)\n2021-09-19 19:56:42 Hello World from offchain workers!\n2021-09-19 19:56:44 💤 Idle (0 peers), best: #2 (0xc64b…31dd), finalized #0 (0x4e4e…9b10), ⬇ 0 ⬆ 0\n2021-09-19 19:56:48 🙌 Starting consensus session on top of parent 0xc64bc3e587349e5516b02046105c7605f1d084371ba10ff22132065603af31dd\n2021-09-19 19:56:48 submit_number_unsigned_with_signed_payload: (2, MultiSigner::Sr25519(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...)))\n2021-09-19 19:56:48 Number vector: [1, 2]\n2021-09-19 19:56:48 🎁 Prepared block for proposing at 3 [hash: 0x9513392df2467e8aacf90ac81396514058d202d4ada491cbf2ce30c3569cb640; parent_hash: 0xc64b…31dd; extrinsics (2): [0x84c7…57b4, 0x5241…c013]]\n2021-09-19 19:56:48 🔖 Pre-sealed block for proposal at 3. Hash now 0xa6d88b47c38a3e17ca320a99136cbce63ebfc9fc15d2696034ac0812ffd9648a, previously 0x9513392df2467e8aacf90ac81396514058d202d4ada491cbf2ce30c3569cb640.\n2021-09-19 19:56:48 ✨ Imported #3 (0xa6d8…648a)\n2021-09-19 19:56:48 Hello World from offchain workers!\n2021-09-19 19:56:48 sending request to: https://api.github.com/orgs/substrate-developer-hub\n2021-09-19 19:56:48 response: {\"login\":\"substrate-developer-hub\",\"id\":47530779,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjQ3NTMwNzc5\",\"url\":\"https://api.github.com/orgs/substrate-developer-hub\",\"repos_url\":\"https://api.github.com/orgs/substrate-developer-hub/repos\",\"events_url\":\"https://api.github.com/orgs/substrate-developer-hub/events\",\"hooks_url\":\"https://api.github.com/orgs/substrate-developer-hub/hooks\",\"issues_url\":\"https://api.github.com/orgs/substrate-developer-hub/issues\",\"members_url\":\"https://api.github.com/orgs/substrate-developer-hub/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/substrate-developer-hub/public_members{/member}\",\"avatar_url\":\"https://avatars.githubusercontent.com/u/47530779?v=4\",\"description\":\"Documentation, samples, and tutorials for the Substrate framework for building blockchains.\",\"name\":\"Substrate Developer Hub\",\"company\":null,\"blog\":\"https://substrate.dev/\",\"location\":null,\"email\":null,\"twitter_username\":\"substrate_io\",\"is_verified\":false,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":34,\"public_gists\":0,\"followers\":0,\"following\":0,\"html_url\":\"https://github.com/substrate-developer-hub\",\"created_at\":\"2019-02-11T14:59:31Z\",\"updated_at\":\"2020-10-03T13:48:59Z\",\"type\":\"Organization\"}\n2021-09-19 19:56:49 💤 Idle (0 peers), best: #3 (0xa6d8…648a), finalized #1 (0x46b1…420b), ⬇ 0 ⬆ 0\n2021-09-19 19:56:54 🙌 Starting consensus session on top of parent 0xa6d88b47c38a3e17ca320a99136cbce63ebfc9fc15d2696034ac0812ffd9648a\n2021-09-19 19:56:54 🎁 Prepared block for proposing at 4 [hash: 0x086d1d401e5e9ab1c591439247b815e1a3e5391a9f0bd845568d1c650088bb39; parent_hash: 0xa6d8…648a; extrinsics (1): [0x3f02…4ad2]]\n2021-09-19 19:56:54 🔖 Pre-sealed block for proposal at 4. Hash now 0x3c8cd759a99c2af94743c1d36818965fe95a6aa4ad269d67b04e174669baca3c, previously 0x086d1d401e5e9ab1c591439247b815e1a3e5391a9f0bd845568d1c650088bb39.\n2021-09-19 19:56:54 ✨ Imported #4 (0x3c8c…ca3c)\n2021-09-19 19:56:54 Hello World from offchain workers!\n2021-09-19 19:56:54 sending request to: https://api.coincap.io/v2/assets/polkadot\n2021-09-19 19:56:54 💤 Idle (0 peers), best: #4 (0x3c8c…ca3c), finalized #1 (0x46b1…420b), ⬇ 0 ⬆ 0\n2021-09-19 19:56:55 Unexpected http request status code: 429\n2021-09-19 19:56:55 fetch_from_remote error: HttpFetchingError\n2021-09-19 19:56:55 offchain_worker error: HttpFetchingError\n2021-09-19 19:56:59 💤 Idle (0 peers), best: #4 (0x3c8c…ca3c), finalized #2 (0xc64b…31dd), ⬇ 0 ⬆ 0\n2021-09-19 19:57:00 🙌 Starting consensus session on top of parent 0x3c8cd759a99c2af94743c1d36818965fe95a6aa4ad269d67b04e174669baca3c\n2021-09-19 19:57:00 🎁 Prepared block for proposing at 5 [hash: 0x95204df7a12df763a77ac866217d3756b91c22d12dd324033afce6c425ec3868; parent_hash: 0x3c8c…ca3c; extrinsics (1): [0x71fc…180d]]\n2021-09-19 19:57:00 🔖 Pre-sealed block for proposal at 5. Hash now 0xa31b4c1a17dff5382a4e43b8d77b52621da5271592c7d64b96ef0ef3d636acd7, previously 0x95204df7a12df763a77ac866217d3756b91c22d12dd324033afce6c425ec3868.\n2021-09-19 19:57:00 ✨ Imported #5 (0xa31b…acd7)\n2021-09-19 19:57:00 Hello World from offchain workers!\n2021-09-19 19:57:04 💤 Idle (0 peers), best: #5 (0xa31b…acd7), finalized #3 (0xa6d8…648a), ⬇ 0 ⬆ 0\n2021-09-19 19:57:06 🙌 Starting consensus session on top of parent 0xa31b4c1a17dff5382a4e43b8d77b52621da5271592c7d64b96ef0ef3d636acd7\n2021-09-19 19:57:06 submit_number_signed: (5, d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))\n2021-09-19 19:57:06 Number vector: [1, 2, 5]\n2021-09-19 19:57:06 🎁 Prepared block for proposing at 6 [hash: 0xfee3295b7359aafd8d9108e8967ae0eb88b854160e328867151a9fd1443232f7; parent_hash: 0xa31b…acd7; extrinsics (2): [0x9ccc…192a, 0xace1…afa5]]\n2021-09-19 19:57:06 🔖 Pre-sealed block for proposal at 6. Hash now 0x9538d13a4d0ffe2bd6b4fdd73b969ece1cce93e3766e1795087082f8706c0f41, previously 0xfee3295b7359aafd8d9108e8967ae0eb88b854160e328867151a9fd1443232f7.\n2021-09-19 19:57:06 ✨ Imported #6 (0x9538…0f41)\n2021-09-19 19:57:06 Hello World from offchain workers!\n2021-09-19 19:57:09 💤 Idle (0 peers), best: #6 (0x9538…0f41), finalized #4 (0x3c8c…ca3c), ⬇ 0 ⬆ 0\n2021-09-19 19:57:12 🙌 Starting consensus session on top of parent 0x9538d13a4d0ffe2bd6b4fdd73b969ece1cce93e3766e1795087082f8706c0f41\n2021-09-19 19:57:12 submit_number_unsigned: 6\n2021-09-19 19:57:12 Number vector: [1, 2, 5, 6]\n2021-09-19 19:57:12 🎁 Prepared block for proposing at 7 [hash: 0xc8fa90b9d9a3365112fc0029a1de5926f61a03c08472173fdc5d1a68ca89c668; parent_hash: 0x9538…0f41; extrinsics (2): [0x519c…f54b, 0x64ea…7be6]]\n2021-09-19 19:57:12 🔖 Pre-sealed block for proposal at 7. Hash now 0x96c68f859042f320e3b1d1c961058a0065b162813417cad2bfc45d074b4b5397, previously 0xc8fa90b9d9a3365112fc0029a1de5926f61a03c08472173fdc5d1a68ca89c668.\n2021-09-19 19:57:12 ✨ Imported #7 (0x96c6…5397)\n2021-09-19 19:57:12 Hello World from offchain workers!\n2021-09-19 19:57:18 cached gh-info: { login: substrate-developer-hub, blog: https://substrate.dev/, public_repos: 34 }\n2021-09-19 19:57:19 💤 Idle (0 peers), best: #8 (0xdf9a…448d), finalized #6 (0x9538…0f41), ⬇ 0 ⬆ 0\n2021-09-19 19:57:24 🙌 Starting consensus session on top of parent 0xdf9a594f1b4b03ab9a269c14855ca2f899b8cb56ea896ca601acf0deddd7448d\n2021-09-19 19:57:24 🎁 Prepared block for proposing at 9 [hash: 0x0eeb350551527f649dd1097f340eabbbda809f03a702478bc55b59815081935b; parent_hash: 0xdf9a…448d; extrinsics (1): [0x5565…c5a5]]\n2021-09-19 19:57:24 🔖 Pre-sealed block for proposal at 9. Hash now 0x599f673147e6ed58100cd0a78bf83b0121b47b3b958da7a7955526225c50cc16, previously 0x0eeb350551527f649dd1097f340eabbbda809f03a702478bc55b59815081935b.\n2021-09-19 19:57:24 ✨ Imported #9 (0x599f…cc16)\n2021-09-19 19:57:24 Hello World from offchain workers!\n2021-09-19 19:57:24 sending request to: https://api.coincap.io/v2/assets/polkadot\n2021-09-19 19:57:24 response: {\"data\":{\"id\":\"polkadot\",\"rank\":\"8\",\"symbol\":\"DOT\",\"name\":\"Polkadot\",\"supply\":\"1030866753.5754000000000000\",\"maxSupply\":null,\"marketCapUsd\":\"34350009272.8500610313149153\",\"volumeUsd24Hr\":\"519731362.4194616042560985\",\"priceUsd\":\"33.3214832602879371\",\"changePercent24Hr\":\"-4.4379821572414742\",\"vwap24Hr\":\"34.7046567573065752\",\"explorer\":\"https://polkascan.io/polkadot\"},\"timestamp\":1632052644560}\n2021-09-19 19:57:24 💤 Idle (0 peers), best: #9 (0x599f…cc16), finalized #6 (0x9538…0f41), ⬇ 0 ⬆ 0\n2021-09-19 19:57:29 💤 Idle (0 peers), best: #9 (0x599f…cc16), finalized #7 (0x96c6…5397), ⬇ 0 ⬆ 0\n2021-09-19 19:57:30 🙌 Starting consensus session on top of parent 0x599f673147e6ed58100cd0a78bf83b0121b47b3b958da7a7955526225c50cc16\n2021-09-19 19:57:30 submit_price_unsigned_with_signed_payload: ((\n    33,\n    Permill(\n        321483,\n    ),\n), MultiSigner::Sr25519(\n    d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...),\n))\n2021-09-19 19:57:30 Number vector: [(33, Permill(321483))]\n2021-09-19 19:57:30 🎁 Prepared block for proposing at 10 [hash: 0x306f4b31121d8a01febb93f7f005ee140525dc0df7820fe3fd223c8ad4b7188a; parent_hash: 0x599f…cc16; extrinsics (2): [0x4c92…e9db, 0xb27f…36d5]]\n2021-09-19 19:57:30 🔖 Pre-sealed block for proposal at 10. Hash now 0xf3c2fba34780de6ec515112c63c9041fbd1e380137250202047451cccf02df5d, previously 0x306f4b31121d8a01febb93f7f005ee140525dc0df7820fe3fd223c8ad4b7188a.\n2021-09-19 19:57:30 ✨ Imported #10 (0xf3c2…df5d)\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fsubstrate-ocw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacksleo%2Fsubstrate-ocw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fsubstrate-ocw/lists"}