diff --git a/Cargo.lock b/Cargo.lock index ee629e28..8ac8f62a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -330,6 +330,27 @@ version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" +[[package]] +name = "arr_macro" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a105bfda48707cf19220129e78fca01e9639433ffaef4163546ed8fb04120a5" +dependencies = [ + "arr_macro_impl", + "proc-macro-hack", +] + +[[package]] +name = "arr_macro_impl" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" +dependencies = [ + "proc-macro-hack", + "quote", + "syn", +] + [[package]] name = "arrayref" version = "0.3.6" @@ -1549,6 +1570,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + [[package]] name = "funty" version = "1.1.0" @@ -1828,7 +1855,7 @@ dependencies = [ [[package]] name = "indexer-explorer" -version = "0.10.3-rc.1" +version = "0.10.3-rc.2" dependencies = [ "actix", "actix-diesel", @@ -1909,6 +1936,27 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +[[package]] +name = "jemalloc-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + +[[package]] +name = "jemallocator" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" +dependencies = [ + "jemalloc-sys", + "libc", +] + [[package]] name = "jobserver" version = "0.1.21" @@ -2179,7 +2227,7 @@ checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] name = "near-account-id" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "borsh 0.9.0", "serde", @@ -2188,7 +2236,7 @@ dependencies = [ [[package]] name = "near-chain" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "borsh 0.9.0", @@ -2217,7 +2265,7 @@ dependencies = [ [[package]] name = "near-chain-configs" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "chrono", "derive_more", @@ -2234,7 +2282,7 @@ dependencies = [ [[package]] name = "near-chain-primitives" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "chrono", "failure", @@ -2248,7 +2296,7 @@ dependencies = [ [[package]] name = "near-chunks" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "borsh 0.9.0", @@ -2271,7 +2319,7 @@ dependencies = [ [[package]] name = "near-chunks-primitives" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "near-chain-primitives", ] @@ -2279,7 +2327,7 @@ dependencies = [ [[package]] name = "near-client" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "actix-rt", @@ -2318,7 +2366,7 @@ dependencies = [ [[package]] name = "near-client-primitives" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "chrono", @@ -2336,7 +2384,7 @@ dependencies = [ [[package]] name = "near-crypto" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "arrayref", "blake2", @@ -2362,7 +2410,7 @@ dependencies = [ [[package]] name = "near-epoch-manager" version = "0.0.1" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "borsh 0.9.0", "cached", @@ -2384,7 +2432,7 @@ dependencies = [ [[package]] name = "near-indexer" version = "0.10.1" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "async-recursion", @@ -2405,7 +2453,7 @@ dependencies = [ [[package]] name = "near-jsonrpc" version = "0.2.2" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "actix-cors", @@ -2425,7 +2473,7 @@ dependencies = [ "near-network", "near-performance-metrics", "near-primitives", - "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d)", + "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd)", "prometheus", "serde", "serde_json", @@ -2437,7 +2485,7 @@ dependencies = [ [[package]] name = "near-jsonrpc-client" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix-http", "actix-web", @@ -2453,7 +2501,7 @@ dependencies = [ [[package]] name = "near-jsonrpc-primitives" version = "0.2.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "lazy_static", @@ -2463,7 +2511,7 @@ dependencies = [ "near-metrics", "near-primitives", "near-primitives-core 0.1.0", - "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d)", + "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd)", "serde", "serde_json", "thiserror", @@ -2474,7 +2522,7 @@ dependencies = [ [[package]] name = "near-metrics" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "lazy_static", "log", @@ -2484,7 +2532,7 @@ dependencies = [ [[package]] name = "near-network" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "borsh 0.9.0", @@ -2517,7 +2565,7 @@ dependencies = [ [[package]] name = "near-network-primitives" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "borsh 0.9.0", @@ -2533,7 +2581,7 @@ dependencies = [ [[package]] name = "near-performance-metrics" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "bitflags", @@ -2553,7 +2601,7 @@ dependencies = [ [[package]] name = "near-performance-metrics-macros" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "quote", "syn", @@ -2562,7 +2610,7 @@ dependencies = [ [[package]] name = "near-pool" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "borsh 0.9.0", "near-crypto", @@ -2573,7 +2621,7 @@ dependencies = [ [[package]] name = "near-primitives" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "base64 0.13.0", "borsh 0.9.0", @@ -2584,9 +2632,10 @@ dependencies = [ "derive_more", "easy-ext", "hex", + "jemallocator", "near-crypto", "near-primitives-core 0.1.0", - "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d)", + "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd)", "near-vm-errors 3.0.0", "num-rational", "primitive-types", @@ -2603,7 +2652,7 @@ dependencies = [ [[package]] name = "near-primitives-core" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "base64 0.11.0", "borsh 0.9.0", @@ -2652,7 +2701,7 @@ dependencies = [ [[package]] name = "near-rpc-error-core" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "proc-macro2", "quote", @@ -2677,9 +2726,9 @@ dependencies = [ [[package]] name = "near-rpc-error-macro" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ - "near-rpc-error-core 0.1.0 (git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d)", + "near-rpc-error-core 0.1.0 (git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd)", "proc-macro2", "quote", "serde", @@ -2699,11 +2748,14 @@ dependencies = [ [[package]] name = "near-rust-allocator-proxy" -version = "0.3.0" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f7efdf6d23964df1003d7784e3c2d99302f28eeeb19e1c19db75a0f886c358" +checksum = "1e2bfab80a5259c22f7a67ddf17e53b50eab9cb8325992df7e56a47a7a51ecdd" dependencies = [ + "arr_macro", "backtrace", + "jemalloc-sys", + "jemallocator", "libc", "log", "nix", @@ -2741,12 +2793,12 @@ dependencies = [ [[package]] name = "near-stable-hasher" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" [[package]] name = "near-store" version = "2.2.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "borsh 0.9.0", "byteorder", @@ -2777,7 +2829,7 @@ source = "git+https://github.com/near/near-sdk-rs?rev=03487c184d37b0382dd9bd41c5 [[package]] name = "near-telemetry" version = "0.1.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "actix-web", @@ -2794,12 +2846,12 @@ dependencies = [ [[package]] name = "near-vm-errors" version = "3.0.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "borsh 0.9.0", "hex", "near-account-id", - "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d)", + "near-rpc-error-macro 0.1.0 (git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd)", "serde", ] @@ -2818,7 +2870,7 @@ dependencies = [ [[package]] name = "near-vm-logic" version = "3.0.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "base64 0.13.0", "borsh 0.9.0", @@ -2856,7 +2908,7 @@ dependencies = [ [[package]] name = "near-vm-runner" version = "3.0.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "anyhow", "borsh 0.9.0", @@ -2883,8 +2935,8 @@ dependencies = [ [[package]] name = "nearcore" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +version = "1.22.0-rc.4" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "actix", "actix-rt", @@ -2897,6 +2949,7 @@ dependencies = [ "dirs", "easy-ext", "futures", + "jemallocator", "lazy-static-include", "near-chain", "near-chain-configs", @@ -2940,7 +2993,7 @@ dependencies = [ [[package]] name = "node-runtime" version = "3.0.0" -source = "git+https://github.com/near/nearcore?rev=b34c2885532049dad6ea0a954554131fb432985d#b34c2885532049dad6ea0a954554131fb432985d" +source = "git+https://github.com/near/nearcore?rev=25b000ae4dd9fe784695d07a3f2e99d82a6f10bd#25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" dependencies = [ "borsh 0.9.0", "byteorder", @@ -4757,9 +4810,9 @@ dependencies = [ [[package]] name = "wasmer-compiler-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a031e2aa4c253cd1a0f61f9b66dc1fdbe5ef7ff79d5e9eace40c8cac2d9ce337" +checksum = "1bd68dcb10e31d096fd0a7421e4150035623cb188e026d0bb6804a08f083d583" dependencies = [ "enumset", "loupe", @@ -4776,9 +4829,9 @@ dependencies = [ [[package]] name = "wasmer-compiler-singlepass-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b36773b8efc498c764aa82ea0335a5d58e4578b451c1116cda3a7bbf42c74d1" +checksum = "84c91c779f6339f5ccbe0fd324efb3668a499296394c9c343b5ca8d4fc6bca90" dependencies = [ "byteorder", "dynasm", @@ -4795,9 +4848,9 @@ dependencies = [ [[package]] name = "wasmer-derive-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e784e640f63c09f8bb236e58469e136ebe6f46fbe5cc58e046efc4804a34da50" +checksum = "54fcd5f4fb1bcecbfa04c00c2889261f3df4d99be2e1505b6614325413928045" dependencies = [ "proc-macro-error", "proc-macro2", @@ -4850,9 +4903,9 @@ dependencies = [ [[package]] name = "wasmer-engine-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd68343185cb15bb3668a2d2f6103e474553cc35a33346a0d8abdab2467ddeb6" +checksum = "2e67b29ef257c9e909728980467d0b94b4e1929ac8a1ea2304e2dd1a7f99fe21" dependencies = [ "backtrace", "lazy_static", @@ -4871,9 +4924,9 @@ dependencies = [ [[package]] name = "wasmer-engine-universal-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d23b38bf74d16a4b00f9a26627ce008578b9c48b9a3ac7586b992f875cbf2b7" +checksum = "75968090a3324470e9c418bec6fb40ed83b7becdea408d353cba1513d5c79f74" dependencies = [ "cfg-if 1.0.0", "leb128", @@ -4889,9 +4942,9 @@ dependencies = [ [[package]] name = "wasmer-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595ddd94dbb327d564c14342ceebc48fae50f81a3ae4b65a0159e43c4e626d39" +checksum = "15a0ffb7c11eea62685bc6048e77901e3db088937bf3bf14bd9f804f52aaf20f" dependencies = [ "cfg-if 1.0.0", "indexmap", @@ -5003,9 +5056,9 @@ dependencies = [ [[package]] name = "wasmer-types-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00310b8d7167ec0aa2df888d7803fa17239a958c6dee3137313e8d1b96036b61" +checksum = "c00b9ef1732969d2ab16db3c138c7292c0068f02cce860dd33dbce280bc09431" dependencies = [ "indexmap", "loupe", @@ -5038,9 +5091,9 @@ dependencies = [ [[package]] name = "wasmer-vm-near" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e862c259e2acb433a9185dd4be9f43726d3ac45ada2d8432f29e0e0d65e33847" +checksum = "db4d5891ac918f6177583f4ab20b2c6aca60c9f068a6ede12044395b8925018d" dependencies = [ "backtrace", "cc", diff --git a/Cargo.toml b/Cargo.toml index 8f7ea1c8..1e1641d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "indexer-explorer" -version = "0.10.3-rc.1" +version = "0.10.3-rc.2" authors = ["Near Inc "] edition = "2018" @@ -38,6 +38,6 @@ tracing-subscriber = "0.2.4" uint = { version = "0.8.3", default-features = false } actix-diesel = { git = "https://github.com/frol/actix-diesel", branch="actix-0.11-beta.2" } -near-indexer = { git = "https://github.com/near/nearcore", rev="b34c2885532049dad6ea0a954554131fb432985d" } -near-crypto = { git = "https://github.com/near/nearcore", rev="b34c2885532049dad6ea0a954554131fb432985d" } -near-client = { git = "https://github.com/near/nearcore", rev="b34c2885532049dad6ea0a954554131fb432985d" } +near-indexer = { git = "https://github.com/near/nearcore", rev="25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" } +near-crypto = { git = "https://github.com/near/nearcore", rev="25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" } +near-client = { git = "https://github.com/near/nearcore", rev="25b000ae4dd9fe784695d07a3f2e99d82a6f10bd" } diff --git a/TROBLESHOOTING.md b/TROBLESHOOTING.md new file mode 100644 index 00000000..16963631 --- /dev/null +++ b/TROBLESHOOTING.md @@ -0,0 +1,147 @@ +# Troubleshooting or NEAR Indexer for Explorer handbook + +This document tries to describe how to handle known issues that may occur during the work process of NEAR Indexer for Explorer instance. + +*It is assumed that the indexer instance is running with the `systemd` and the service is called `indexer`* + +We use this `systemd` config: + +```bash +[Unit] +Description=Indexer Service +StartLimitIntervalSec=500 +StartLimitBurst=5 + +[Service] +User=ubuntu +Group=ubuntu +ExecStart=/home/ubuntu/indexer run --stream-while-syncing sync-from-interruption --delta 500 +MemoryMax=90% +Restart=always +RestartSec=5s +EnvironmentFile=/home/ubuntu/.env +LimitAS=infinity +LimitRSS=infinity +LimitCORE=infinity +LimitNOFILE=65536 + +[Install] +WantedBy=multi-user.target +After=google-startup-scripts.service +``` + +--- + +In case of any issues, you need to check the node logs. Indexer is running as a `systemd` service, so you can check the logs with the command: + +```bash +$ journalctl --follow --unit indexer +``` + +Normal logs look similar to the screenshot + +![normal logs](./docs/handbook_1.png) + +During the normal working process indexer prints `INFO indexer_explorer: Block height N` + +If it does not print anything or prints some debug structures instead of normal logs it probably means something went wrong. See Common issues section. + + +## Common issues + +In case of any of the following issues, we stop the indexer `systemd` service to take manual control over indexer with the commands listed in the relevant sections below. + +```bash +$ sudo service indexer stop +``` + +To handle any of the following issues, we’ll be running the indexer manually in a `tmux` on behalf of the `ubuntu` user. + +```bash +$ sudo su ubuntu +$ cd ~ +$ tmux +``` + +All of the following section assumes you’re running the command in `tmux` + + +### If it stuck + +You need to record somewhere (a good place is https://github.com/near/near-indexer-for-explorer/issues) the block in which the indexer has stuck for further proper investigation. + +Example of not fine indexer logs: + +![logs with issues](./docs/handbook_2.png) + +For now, we want to try to “skip” that block. In order to achieve this, we would run the indexer syncing process from the block height number following for the one where we have stuck. + +If the stuck block height is 47961813 + +```bash +$ env RUST_LOG=”near=info” ./indexer run --stream-while-syncing sync-from-block --height 47961814 2>&1 | tee -a indexer.log +``` + +**Note** that this might be stuck as well, usually, nearest blocks have related data that can lead to getting stuck. So you might need to brute-force the block height to start syncing. Edit the above command by increasing the block height by 1 or by 10 until the indexer starts printing normal logs. If you cannot find that block in the nearest 100 blocks, see the next section. + + +### Non-strict-mode or If it stuck and we want to skip some blocks in order to continue properly + +Similar to the case “If it stuck” and we want to skip the weird blocks in order to make the indexer work properly and investigate the root cause later. + +You need to record somewhere (a good place is https://github.com/near/near-indexer-for-explorer/issues) the block in which the indexer has stuck for further proper investigation. + +Example of not fine indexer logs: + +![logs with issues](./docs/handbook_2.png) + +For now, we want to try to “skip” that block. In order to achieve this, we would run the indexer syncing process from the block height number following for the one where we have stuck in non-strict-mode. + +**A few words about non-strict-mode** + +In this mode, the indexer will ignore some relations to keep working and not failing if it is unable to store because of missing relative data. This will skip `account_state_changes`, `access_keys` and will retry storing receipts at most 4 times. + +We’re going to start from the stuck block and skip the next 100 (you can adjust it). After 100 blocks we will rerun the indexer in regular mode. + +If the stuck block height is 47961813 + +```bash +$ env RUST_LOG=”near=info” ./indexer run --stream-while-syncing --non-strict-mode --stop-after-number-of-blocks 100 sync-from-block --height 47961813 2>&1 | tee -a indexer.log +``` + +Once 100 blocks are indexed in `non-strict-mode` the indexer will stop. We need to run it in regular mode and wait for indexer team to investigate the root cause. + +```bash +$ env RUST_LOG=”near=info” ./indexer run --stream-while-syncing sync-from-interruption --delta 0 2>&1 | tee -a indexer-regular.log +``` + + +### How to catch the tip of the network if it lagged + +If the logs are normal but the latest printed block heights are delayed more than 30 minutes from the latest block height from the finality or the indexer was stuck for too long (see If it stuck section) we might need to catch up with the network. +Having at least two indexer nodes we need to run one of them in non-strict-mode from the latest block + +```bash +$ env RUST_LOG=”near=info” ./indexer run --stream-while-syncing --non-strict-mode sync-from-latest 2>&1 | tee -a indexer.log +``` + +This will force the indexer to sync with the network ignoring some of the data completely. It’ll ignore `account_state_changes`, `access_keys` and might ignore some receipts. + +On the other node, you need to perform actions from the “If it stuck” section + + +## Enabling verbose logs + +NEAR Indexer for Explorer is configured to respect `RUST_LOG` environment variable. In order to enable or change the log level of any of the underlying module you can use it. + +For example, to enable `info` level logs for the underlying `near` you can run the indexer like: + +```bash +$ env RUST_LOG="near=info" ./indexer run ... +``` + +### `--verbose` equivalent from the nearcore + +```bash +env RUST_LOG="cranelift_codegen=warn,cranelift_codegen=warn,h2=warn,trust_dns_resolver=warn,trust_dns_proto=warn,near=debug,indexer=debug,near_indexer_for_explorer=debug" ./indexer run ... +``` diff --git a/docs/handbook_1.png b/docs/handbook_1.png new file mode 100644 index 00000000..19c0a163 Binary files /dev/null and b/docs/handbook_1.png differ diff --git a/docs/handbook_2.png b/docs/handbook_2.png new file mode 100644 index 00000000..e88bca24 Binary files /dev/null and b/docs/handbook_2.png differ