diff --git a/Cargo.lock b/Cargo.lock index a29ab5d1..f5b619fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,31 @@ dependencies = [ "regex", ] +[[package]] +name = "actix" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb72882332b6d6282f428b77ba0358cb2687e61a6f6df6a6d3871e8a177c2d4f" +dependencies = [ + "actix-macros", + "actix-rt", + "actix_derive", + "bitflags 2.4.2", + "bytes", + "crossbeam-channel", + "futures-core", + "futures-sink", + "futures-task", + "futures-util", + "log", + "once_cell", + "parking_lot", + "pin-project-lite", + "smallvec", + "tokio", + "tokio-util 0.7.10", +] + [[package]] name = "actix-codec" version = "0.5.2" @@ -25,15 +50,15 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.10", "tracing", ] [[package]] name = "actix-cors" -version = "0.6.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" +checksum = "f9e772b3bcafe335042b5db010ab7c09013dad6eac4915c91d8d50902769f331" dependencies = [ "actix-utils", "actix-web", @@ -54,8 +79,8 @@ dependencies = [ "actix-rt", "actix-service", "actix-utils", - "ahash 0.8.7", - "base64", + "ahash", + "base64 0.21.7", "bitflags 2.4.2", "brotli", "bytes", @@ -78,7 +103,7 @@ dependencies = [ "sha1", "smallvec", "tokio", - "tokio-util", + "tokio-util 0.7.10", "tracing", "zstd", ] @@ -90,7 +115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -128,7 +153,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "socket2 0.5.5", + "socket2", "tokio", "tracing", ] @@ -169,10 +194,10 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash 0.8.7", + "ahash", "bytes", "bytestring", - "cfg-if 1.0.0", + "cfg-if", "cookie", "derive_more", "encoding_rs", @@ -189,7 +214,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.5.5", + "socket2", "time", "url", ] @@ -203,16 +228,18 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] -name = "addr2line" -version = "0.19.0" +name = "actix_derive" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" dependencies = [ - "gimli 0.27.3", + "proc-macro2", + "quote", + "syn 2.0.49", ] [[package]] @@ -221,7 +248,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.1", + "gimli", ] [[package]] @@ -232,22 +259,11 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom 0.2.12", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.12", "once_cell", "version_check", @@ -301,9 +317,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ "anstyle", "anstyle-parse", @@ -315,9 +331,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -349,9 +365,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "arbitrary" @@ -368,18 +384,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "assert-json-diff" version = "2.0.2" @@ -390,6 +394,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-channel" version = "1.9.0" @@ -420,7 +430,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -431,18 +441,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "syn 2.0.49", ] [[package]] @@ -453,9 +452,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-config" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b30c39ebe61f75d1b3785362b1586b41991873c9ab3e317a9181c246fb71d82" +checksum = "7af266887e24cd5f6d2ea7433cacd25dcd4773b7f70e488701968a7cdf51df57" dependencies = [ "aws-credential-types", "aws-runtime", @@ -483,9 +482,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33cc49dcdd31c8b6e79850a179af4c367669150c7ac0135f176c61bec81a70f7" +checksum = "2d56f287a9e65e4914bfedb5b22c056b65e4c232fca512d5509a9df36386759f" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -493,20 +492,11 @@ dependencies = [ "zeroize", ] -[[package]] -name = "aws-http" -version = "0.60.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13ccfc04c9add2ee02a300cdc240d7c3e4477f100fb2380dc15fd75ca86d31da" -dependencies = [ - "aws-runtime", -] - [[package]] name = "aws-runtime" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb031bff99877c26c28895766f7bb8484a05e24547e370768d6cc9db514662aa" +checksum = "2d6a29eca8ea8982028a4df81883e7001e250a21d323b86418884b5345950a4b" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -528,12 +518,11 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "0.39.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29223b1074621f1d011bac836d995c002936663052b1e7ad02927551b17d6625" +checksum = "c977e92277652aefb9a76a0fca652b26757d6845dce0d7bf4426da80f13d85b0" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-sigv4", "aws-smithy-async", @@ -551,16 +540,16 @@ dependencies = [ "http-body", "once_cell", "percent-encoding", - "regex", + "regex-lite", "tracing", "url", ] [[package]] name = "aws-sdk-sso" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f486420a66caad72635bc2ce0ff6581646e0d32df02aa39dc983bfe794955a5b" +checksum = "e2d7f527c7b28af1a641f7d89f9e6a4863e8ec00f39d2b731b056fc5ec5ce829" dependencies = [ "aws-credential-types", "aws-runtime", @@ -580,9 +569,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ddccf01d82fce9b4a15c8ae8608211ee7db8ed13a70b514bbfe41df3d24841" +checksum = "0d0be3224cd574ee8ab5fd7c32087876f25c134c27ac603fcb38669ed8d346b0" dependencies = [ "aws-credential-types", "aws-runtime", @@ -602,9 +591,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a591f8c7e6a621a501b2b5d2e88e1697fcb6274264523a6ad4d5959889a41ce" +checksum = "5b3167c60d82a13bbaef569da06041644ff41e85c6377e5dad53fa2526ccfe9d" dependencies = [ "aws-credential-types", "aws-runtime", @@ -625,9 +614,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c371c6b0ac54d4605eb6f016624fb5c7c2925d315fdf600ac1bf21b19d5f1742" +checksum = "54b1cbe0eee57a213039088dbdeca7be9352f24e0d72332d961e8a1cb388f82d" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -645,7 +634,7 @@ dependencies = [ "p256", "percent-encoding", "ring", - "sha2 0.10.8", + "sha2", "subtle", "time", "tracing", @@ -654,9 +643,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ee2d09cce0ef3ae526679b522835d63e75fb427aca5413cd371e490d52dcc6" +checksum = "8ec441341e019c441aa78472ed6d206cfe198026c495277a95ac5bebda520742" dependencies = [ "futures-util", "pin-project-lite", @@ -665,9 +654,9 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.4" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2acd1b9c6ae5859999250ed5a62423aedc5cf69045b844432de15fa2f31f2b" +checksum = "6ee554133eca2611b66d23548e48f9b44713befdb025ab76bc00185b878397a1" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -680,7 +669,7 @@ dependencies = [ "md-5", "pin-project-lite", "sha1", - "sha2 0.10.8", + "sha2", "tracing", ] @@ -697,9 +686,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.4" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab56aea3cd9e1101a0a999447fb346afb680ab1406cebc44b32346e25b4117d" +checksum = "85d6a0619f7b67183067fa3b558f94f90753da2df8c04aeb7336d673f804b0b8" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -718,18 +707,18 @@ dependencies = [ [[package]] name = "aws-smithy-json" -version = "0.60.4" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3898ca6518f9215f62678870064398f00031912390efd03f1f6ef56d83aa8e" +checksum = "a1c1b5186b6f5c579bf0de1bcca9dd3d946d6d51361ea1d18131f6a0b64e13ae" dependencies = [ "aws-smithy-types", ] [[package]] name = "aws-smithy-query" -version = "0.60.4" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda4b1dfc9810e35fba8a620e900522cd1bd4f9578c446e82f49d1ce41d2e9f9" +checksum = "1c0a2ce65882e788d2cf83ff28b9b16918de0460c47bf66c5da4f6c17b4c9694" dependencies = [ "aws-smithy-types", "urlencoding", @@ -737,9 +726,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fafdab38f40ad7816e7da5dec279400dd505160780083759f01441af1bbb10ea" +checksum = "3b36f1f98c8d7b6256b86d4a3c8c4abb120670267baa9712a485ba477eaac9e9" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -762,14 +751,15 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c18276dd28852f34b3bf501f4f3719781f4999a51c7bff1a5c6dc8c4529adc29" +checksum = "180898ed701a773fb3fadbd94b9e9559125cf88eeb1815ab99e35d4f5f34f7fb" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", "http 0.2.11", + "http 1.0.0", "pin-project-lite", "tokio", "tracing", @@ -778,9 +768,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb3e134004170d3303718baa2a4eb4ca64ee0a1c0a7041dca31b38be0fb414f3" +checksum = "897f1db4020ad91f2c2421945ec49b7e3eb81cc3fea99e8b5dd5be721e697fed" dependencies = [ "base64-simd", "bytes", @@ -796,30 +786,30 @@ dependencies = [ "serde", "time", "tokio", - "tokio-util", + "tokio-util 0.7.10", ] [[package]] name = "aws-smithy-xml" -version = "0.60.4" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8604a11b25e9ecaf32f9aa56b9fe253c5e2f606a3477f0071e96d3155a5ed218" +checksum = "d16f94c9673412b7a72e3c3efec8de89081c320bf59ea12eed34c417a62ad600" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "789bbe008e65636fe1b6dbbb374c40c8960d1232b96af5ff4aec349f9c4accf4" +checksum = "0ff7e122ee50ca962e9de91f5850cc37e2184b1219611eef6d44aa85929b54f6" dependencies = [ "aws-credential-types", "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", "http 0.2.11", - "rustc_version 0.4.0", + "rustc_version", "tracing", ] @@ -829,12 +819,12 @@ version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.21.0", + "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object", "rustc-demangle", ] @@ -844,6 +834,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.7" @@ -866,17 +862,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bigdecimal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1e50562e37200edf7c6c43e54a08e64a5553bfb59d9c297d5572512aa517256" -dependencies = [ - "num-bigint 0.3.3", - "num-integer", - "num-traits", -] - [[package]] name = "bigdecimal" version = "0.4.2" @@ -890,15 +875,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -911,18 +887,6 @@ version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" -[[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 = "blake2" version = "0.9.2" @@ -934,127 +898,37 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "blake3" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "block-buffer" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", + "generic-array", ] [[package]] name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh-derive" -version = "0.9.3" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", + "borsh-derive", + "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ + "once_cell", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.49", + "syn_derive", ] [[package]] @@ -1086,31 +960,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" [[package]] name = "byteorder" @@ -1180,21 +1032,21 @@ dependencies = [ [[package]] name = "cfg-if" -version = "0.1.10" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "cfg-if" -version = "1.0.0" +name = "cfg_aliases" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1211,96 +1063,48 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", + "generic-array", ] [[package]] name = "clap" -version = "4.4.18" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", - "clap_derive 4.4.7", + "clap_derive", ] [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", - "clap_lex 0.6.0", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "clap_lex", + "strsim 0.11.0", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", + "syn 2.0.49", ] [[package]] name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "cloudabi" -version = "0.0.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -1328,15 +1132,15 @@ dependencies = [ "dotenv", "lazy_static", "near-lake-framework", - "opentelemetry", + "opentelemetry 0.19.0", "opentelemetry-jaeger", "regex", "serde", "serde_derive", "serde_json", - "toml 0.8.9", + "toml 0.8.10", "tracing", - "tracing-opentelemetry", + "tracing-opentelemetry 0.19.0", "tracing-stackdriver", "tracing-subscriber", ] @@ -1347,12 +1151,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "convert_case" version = "0.4.0" @@ -1386,15 +1184,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "cpp_demangle" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" -dependencies = [ - "cfg-if 1.0.0", -] - [[package]] name = "cpufeatures" version = "0.2.12" @@ -1405,129 +1194,21 @@ dependencies = [ ] [[package]] -name = "cranelift-bforest" -version = "0.96.4" +name = "crc32c" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182b82f78049f54d3aee5a19870d356ef754226665a695ce2fcdd5d55379718e" +checksum = "89254598aa9b9fa608de44b3ae54c810f0f06d755e24c50177f1f8f31ff50ce2" dependencies = [ - "cranelift-entity", + "rustc_version", ] [[package]] -name = "cranelift-codegen" -version = "0.96.4" +name = "crc32fast" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c027bf04ecae5b048d3554deb888061bc26f426afff47bf06d6ac933dce0a6" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ - "bumpalo", - "cranelift-bforest", - "cranelift-codegen-meta", - "cranelift-codegen-shared", - "cranelift-control", - "cranelift-entity", - "cranelift-isle", - "gimli 0.27.3", - "hashbrown 0.13.2", - "log", - "regalloc2", - "smallvec", - "target-lexicon 0.12.13", -] - -[[package]] -name = "cranelift-codegen-meta" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649f70038235e4c81dba5680d7e5ae83e1081f567232425ab98b55b03afd9904" -dependencies = [ - "cranelift-codegen-shared", -] - -[[package]] -name = "cranelift-codegen-shared" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a1d1c5ee2611c6a0bdc8d42d5d3dc5ce8bf53a8040561e26e88b9b21f966417" - -[[package]] -name = "cranelift-control" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da66a68b1f48da863d1d53209b8ddb1a6236411d2d72a280ffa8c2f734f7219e" -dependencies = [ - "arbitrary", -] - -[[package]] -name = "cranelift-entity" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd897422dbb66621fa558f4d9209875530c53e3c8f4b13b2849fbb667c431a6" -dependencies = [ - "serde", -] - -[[package]] -name = "cranelift-frontend" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05db883114c98cfcd6959f72278d2fec42e01ea6a6982cfe4f20e88eebe86653" -dependencies = [ - "cranelift-codegen", - "log", - "smallvec", - "target-lexicon 0.12.13", -] - -[[package]] -name = "cranelift-isle" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84559de86e2564152c87e299c8b2559f9107e9c6d274b24ebeb04fb0a5f4abf8" - -[[package]] -name = "cranelift-native" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f40b57f187f0fe1ffaf281df4adba2b4bc623a0f6651954da9f3c184be72761" -dependencies = [ - "cranelift-codegen", - "libc", - "target-lexicon 0.12.13", -] - -[[package]] -name = "cranelift-wasm" -version = "0.96.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3eab6084cc789b9dd0b1316241efeb2968199fee709f4bb4fe0fb0923bb468b" -dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "itertools 0.10.5", - "log", - "smallvec", - "wasmparser 0.103.0", - "wasmtime-types", -] - -[[package]] -name = "crc32c" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" -dependencies = [ - "rustc_version 0.4.0", -] - -[[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", + "cfg-if", ] [[package]] @@ -1576,7 +1257,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core 0.6.4", "subtle", "zeroize", @@ -1598,7 +1279,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array", "typenum", ] @@ -1608,7 +1289,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.7", + "generic-array", "subtle", ] @@ -1635,24 +1316,24 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.44" +version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +checksum = "1e2161dd6eba090ff1594084e95fd67aeccf04382ffea77999ea94ed42ec67b6" dependencies = [ "curl-sys", "libc", "openssl-probe", "openssl-sys", "schannel", - "socket2 0.4.10", - "winapi", + "socket2", + "windows-sys 0.52.0", ] [[package]] name = "curl-sys" -version = "0.4.71+curl-8.6.0" +version = "0.4.72+curl-8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b12a7ab780395666cb576203dc3ed6e01513754939a600b85196ccf5356bc5" +checksum = "29cbdc8314c447d11e8fd156dcdd031d9e02a7a976163e396b548c03153bc9ea" dependencies = [ "cc", "libc", @@ -1660,22 +1341,38 @@ dependencies = [ "openssl-sys", "pkg-config", "vcpkg", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "curve25519-dalek" -version = "3.2.0" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rand_core 0.6.4", + "rustc_version", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + [[package]] name = "darling" version = "0.14.4" @@ -1688,12 +1385,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ - "darling_core 0.20.5", - "darling_macro 0.20.5", + "darling_core 0.20.6", + "darling_macro 0.20.6", ] [[package]] @@ -1706,22 +1403,22 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 1.0.109", ] [[package]] name = "darling_core" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.48", + "strsim 0.10.0", + "syn 2.0.49", ] [[package]] @@ -1737,13 +1434,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ - "darling_core 0.20.5", + "darling_core 0.20.6", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1752,11 +1449,11 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown 0.14.3", - "lock_api 0.4.11", + "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core", ] [[package]] @@ -1765,8 +1462,8 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "bigdecimal 0.4.2", - "borsh 0.10.3", + "bigdecimal", + "borsh", "bytes", "configuration", "diesel", @@ -1778,11 +1475,12 @@ dependencies = [ "near-crypto", "near-indexer-primitives", "near-primitives", - "num-bigint 0.3.3", + "num-bigint 0.4.4", "num-traits", "prettytable-rs", "readnode-primitives", "scylla", + "scylla-cql", "serde", "serde_json", "tokio", @@ -1809,15 +1507,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "uuid", -] - [[package]] name = "der" version = "0.6.1" @@ -1846,23 +1535,23 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "derive_builder" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660047478bc508c0fde22c868991eec0c40a63e48d610befef466d48e2bee574" +checksum = "8f59169f400d8087f238c5c0c7db6a28af18681717f3b623227d92f397e938c7" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b217e6dd1011a54d12f3b920a411b5abd44b1716ecfe94f5f2f2f7b52e08ab7" +checksum = "a4ec317cc3e7ef0928b0ca6e4a634a4d6c001672ae210438cf114a83e56b018d" dependencies = [ "darling 0.14.4", "proc-macro2", @@ -1872,9 +1561,9 @@ dependencies = [ [[package]] name = "derive_builder_macro" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5f77d7e20ac9153428f7ca14a88aba652adfc7a0ef0a06d654386310ef663b" +checksum = "870368c3fb35b8031abb378861d4460f573b92238ec2152c927a21f77e3e0127" dependencies = [ "derive_builder_core", "syn 1.0.109", @@ -1889,7 +1578,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1899,7 +1588,7 @@ version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8" dependencies = [ - "bigdecimal 0.4.2", + "bigdecimal", "bitflags 2.4.2", "byteorder", "diesel_derives", @@ -1935,7 +1624,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1955,16 +1644,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.48", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", + "syn 2.0.49", ] [[package]] @@ -1973,7 +1653,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -1982,7 +1662,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -1993,7 +1673,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -2008,71 +1688,12 @@ dependencies = [ "winapi", ] -[[package]] -name = "dissimilar" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" - [[package]] name = "dotenv" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "dynasm" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "lazy_static", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "dynasm" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33dc03612f42465a8ed7f5e354bc2b79ba54cedefa81d5bd3a064f1835adaba8" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "lazy_static", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "dynasmrt" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" -dependencies = [ - "byteorder", - "dynasm 1.2.3", - "memmap2", -] - -[[package]] -name = "dynasmrt" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7dccc31a678058996aef614f6bd418ced384da70f284e83e2b7bf29b27b6a28" -dependencies = [ - "byteorder", - "dynasm 2.0.0", - "fnv", - "memmap2", -] - [[package]] name = "easy-ext" version = "0.2.9" @@ -2088,37 +1709,36 @@ dependencies = [ "der", "elliptic-curve", "rfc6979", - "signature", + "signature 1.6.4", ] [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "signature", + "signature 2.2.0", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "rand_core 0.6.4", + "sha2", + "subtle", ] [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -2131,7 +1751,7 @@ dependencies = [ "der", "digest 0.10.7", "ff", - "generic-array 0.14.7", + "generic-array", "group", "pkcs8", "rand_core 0.6.4", @@ -2152,7 +1772,7 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2172,28 +1792,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "enumset" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d" -dependencies = [ - "enumset_derive", -] - -[[package]] -name = "enumset_derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" -dependencies = [ - "darling 0.20.5", - "proc-macro2", - "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2201,13 +1800,12 @@ name = "epoch-indexer" version = "0.1.0" dependencies = [ "anyhow", - "clap 3.2.25", + "clap", "configuration", "database", - "futures", "near-chain-configs", "near-indexer-primitives", - "near-jsonrpc-client", + "near-jsonrpc-client 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "near-lake-framework", "readnode-primitives", "tokio", @@ -2222,24 +1820,13 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.31" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +checksum = "388979d208a049ffdfb22fa33b9c81942215b940910bccfe258caeb25d125cb3" dependencies = [ "serde", ] -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.8" @@ -2250,16 +1837,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -2307,20 +1884,10 @@ dependencies = [ ] [[package]] -name = "finite-wasm" -version = "0.5.0" +name = "fiat-crypto" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d81b511929c2669eaf64e36471cf27c2508133e62ade9d49e608e8d675e7854" -dependencies = [ - "bitvec", - "dissimilar", - "num-traits", - "prefix-sum-vec", - "thiserror", - "wasm-encoder", - "wasmparser 0.105.0", - "wasmprinter", -] +checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" [[package]] name = "finl_unicode" @@ -2337,6 +1904,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -2387,12 +1960,6 @@ dependencies = [ "winapi", ] -[[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.30" @@ -2475,7 +2042,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2517,28 +2084,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "fxprof-processed-profile" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" -dependencies = [ - "bitflags 2.4.2", - "debugid", - "fxhash", - "serde", - "serde_json", -] - -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2555,7 +2100,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -2566,22 +2111,11 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "gimli" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" -dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", - "stable_deref_trait", -] - [[package]] name = "gimli" version = "0.28.1" @@ -2611,39 +2145,18 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.2.2", + "indexmap 2.2.3", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.10", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.7", -] - [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.7", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.7", -] [[package]] name = "hashbrown" @@ -2651,7 +2164,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.7", + "ahash", "allocator-api2", ] @@ -2672,18 +2185,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -2709,6 +2213,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" version = "0.2.11" @@ -2777,7 +2290,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tower-service", "tracing", @@ -2800,6 +2313,18 @@ dependencies = [ "tokio-rustls", ] +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -2865,9 +2390,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -2880,7 +2405,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2889,17 +2414,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.4", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -2908,12 +2422,12 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.4", - "rustix 0.38.31", + "hermit-abi", + "libc", "windows-sys 0.52.0", ] @@ -2968,18 +2482,18 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -2993,7 +2507,7 @@ checksum = "9dbbfed4e59ba9750e15ba154fdfd9329cee16ff3df539c2666b70f58cc32105" [[package]] name = "jsonrpc-v2" version = "0.11.0" -source = "git+https://github.com/kobayurii/jsonrpc-v2?rev=95e7b1d2567ae841163af212a3f25abb6862becb#95e7b1d2567ae841163af212a3f25abb6862becb" +source = "git+https://github.com/kobayurii/jsonrpc-v2?branch=master#ee01c71bcd2e131d787988728b7288734c2371df" dependencies = [ "actix-service", "actix-web", @@ -3030,12 +2544,6 @@ dependencies = [ "spin 0.5.2", ] -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - [[package]] name = "libc" version = "0.2.153" @@ -3056,7 +2564,7 @@ checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ "bitflags 2.4.2", "libc", - "redox_syscall 0.4.1", + "redox_syscall", ] [[package]] @@ -3071,12 +2579,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -3100,15 +2602,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.11" @@ -3125,40 +2618,11 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", -] - [[package]] name = "lru" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" +checksum = "db2c024b41519440580066ba82aab04092b333e09066a5eb86c7c4890df31f22" dependencies = [ "hashbrown 0.14.3", ] @@ -3172,15 +2636,6 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - [[package]] name = "matchers" version = "0.1.0" @@ -3196,7 +2651,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "digest 0.10.7", ] @@ -3206,43 +2661,6 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" -[[package]] -name = "memfd" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" -dependencies = [ - "rustix 0.38.31", -] - -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.8.0" @@ -3301,10 +2719,16 @@ dependencies = [ ] [[package]] -name = "more-asserts" -version = "0.2.2" +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "mutually_exclusive_features" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +checksum = "6d02c0b00610773bb7fc61d85e13d86c7858cbdf00e1a120bfc41bc055dbaa0e" [[package]] name = "native-tls" @@ -3326,45 +2750,42 @@ dependencies = [ [[package]] name = "near-account-id" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35cbb989542587b47205e608324ddd391f0cee1c22b4b64ae49f458334b95907" dependencies = [ - "borsh 0.10.3", + "borsh", "serde", ] -[[package]] -name = "near-cache" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" -dependencies = [ - "lru 0.7.8", -] - [[package]] name = "near-chain-configs" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e5a8ace81c09d7eb165dffc1742358a021b2fa761f2160943305f83216003" dependencies = [ "anyhow", + "bytesize", "chrono", "derive_more", "near-config-utils", "near-crypto", + "near-parameters", "near-primitives", "num-rational", "once_cell", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "smart-default", "tracing", ] [[package]] name = "near-config-utils" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae1eaab1d545a9be7a55b6ef09f365c2017f93a03063547591d12c0c6d27e58" dependencies = [ "anyhow", "json_comments", @@ -3374,11 +2795,12 @@ dependencies = [ [[package]] name = "near-crypto" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2991d2912218a80ec0733ac87f84fa803accea105611eea209d4419271957667" dependencies = [ "blake2", - "borsh 0.10.3", + "borsh", "bs58", "c2-chacha", "curve25519-dalek", @@ -3400,16 +2822,18 @@ dependencies = [ [[package]] name = "near-fmt" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7d998dfc1e04001608899b2498ad5a782c7d036b73769d510de21964db99286" dependencies = [ "near-primitives-core", ] [[package]] name = "near-indexer-primitives" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "362042db6d020aba9ac03dadf32088f848cc2156c9a7976d45a2a9cf6b18548e" dependencies = [ "near-primitives", "serde", @@ -3418,10 +2842,29 @@ dependencies = [ [[package]] name = "near-jsonrpc-client" -version = "0.7.0" -source = "git+https://github.com/kobayurii/near-jsonrpc-client-rs.git?branch=0.7.0#55396b286cfb1f5d7c8e6d7caa9db73d087c821c" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18ad81e015f7aced8925d5b9ba3f369b36da9575c15812cfd0786bc1213284ca" +dependencies = [ + "borsh", + "lazy_static", + "log", + "near-chain-configs", + "near-crypto", + "near-jsonrpc-primitives", + "near-primitives", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "near-jsonrpc-client" +version = "0.8.0" +source = "git+https://github.com/near/near-jsonrpc-client-rs.git?branch=telezhnaya/wait_until#a4f27a4a6155b5572876dd46950ec8d3a680f12e" dependencies = [ - "borsh 0.10.3", + "borsh", "lazy_static", "log", "near-chain-configs", @@ -3436,8 +2879,9 @@ dependencies = [ [[package]] name = "near-jsonrpc-primitives" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0ce745e954ae776eef05957602e638ee9581106a3675946fb43c2fe7e38ef03" dependencies = [ "arbitrary", "near-chain-configs", @@ -3451,8 +2895,9 @@ dependencies = [ [[package]] name = "near-lake-framework" -version = "0.7.9" -source = "git+https://github.com/kobayurii/near-lake-framework-rs.git?branch=0.7.9#8b76ca8c1e335e3c888fa3efe523e16daf9ff2db" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e58822a397bad3a8d189aad5aa2366c1109090fb7bab04289c78ab1f31c7ba4c" dependencies = [ "anyhow", "async-stream", @@ -3473,15 +2918,64 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-o11y" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20762631bc8253030013bbae9b5f0542691edc1aa6722f1e8141cc9b928ae5b" +dependencies = [ + "actix", + "base64 0.21.7", + "clap", + "near-crypto", + "near-fmt", + "near-primitives-core", + "once_cell", + "opentelemetry 0.17.0", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions 0.9.0", + "prometheus", + "serde", + "serde_json", + "strum 0.24.1", + "thiserror", + "tokio", + "tracing", + "tracing-appender", + "tracing-opentelemetry 0.17.4", + "tracing-subscriber", +] + +[[package]] +name = "near-parameters" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f16a59b6c3e69b0585be951af6fe42a0ba86c0e207cb8c63badd19efd16680" +dependencies = [ + "assert_matches", + "borsh", + "enum-map", + "near-account-id", + "near-primitives-core", + "num-rational", + "serde", + "serde_repr", + "serde_yaml", + "strum 0.24.1", + "thiserror", +] + [[package]] name = "near-primitives" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0462b067732132babcc89d5577db3bfcb0a1bcfbaaed3f2db4c11cd033666314" dependencies = [ "arbitrary", - "borsh 0.10.3", + "base64 0.21.7", + "borsh", "bytesize", - "cfg-if 1.0.0", + "cfg-if", "chrono", "derive_more", "easy-ext", @@ -3489,6 +2983,8 @@ dependencies = [ "hex", "near-crypto", "near-fmt", + "near-o11y", + "near-parameters", "near-primitives-core", "near-rpc-error-macro", "near-stdx", @@ -3497,11 +2993,13 @@ dependencies = [ "once_cell", "primitive-types", "rand 0.8.5", + "rand_chacha 0.3.1", "reed-solomon-erasure", "serde", "serde_json", "serde_with", "serde_yaml", + "sha3", "smart-default", "strum 0.24.1", "thiserror", @@ -3511,12 +3009,13 @@ dependencies = [ [[package]] name = "near-primitives-core" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8443eb718606f572c438be6321a097a8ebd69f8e48d953885b4f16601af88225" dependencies = [ "arbitrary", - "base64", - "borsh 0.10.3", + "base64 0.21.7", + "borsh", "bs58", "derive_more", "enum-map", @@ -3525,192 +3024,70 @@ dependencies = [ "serde", "serde_repr", "serde_with", - "sha2 0.10.8", + "sha2", "strum 0.24.1", "thiserror", ] [[package]] name = "near-rpc-error-core" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80fca203c51edd9595ec14db1d13359fb9ede32314990bf296b6c5c4502f6ab7" dependencies = [ "quote", "serde", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "near-rpc-error-macro" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897a445de2102f6732c8a185d922f5e3bf7fd0a41243ce40854df2197237f799" dependencies = [ "fs2", "near-rpc-error-core", "serde", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "near-stdx" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" - -[[package]] -name = "near-vm-compiler" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" -dependencies = [ - "enumset", - "finite-wasm", - "near-vm-types", - "near-vm-vm", - "rkyv", - "smallvec", - "target-lexicon 0.12.13", - "thiserror", - "tracing", - "wasmparser 0.99.0", -] - -[[package]] -name = "near-vm-compiler-singlepass" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" -dependencies = [ - "dynasm 2.0.0", - "dynasmrt 2.0.0", - "enumset", - "finite-wasm", - "lazy_static", - "memoffset 0.8.0", - "more-asserts", - "near-vm-compiler", - "near-vm-types", - "near-vm-vm", - "rayon", - "smallvec", - "strum 0.24.1", - "tracing", -] - -[[package]] -name = "near-vm-engine" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" -dependencies = [ - "backtrace", - "cfg-if 1.0.0", - "enumset", - "finite-wasm", - "lazy_static", - "memmap2", - "more-asserts", - "near-vm-compiler", - "near-vm-types", - "near-vm-vm", - "region", - "rkyv", - "rustc-demangle", - "target-lexicon 0.12.13", - "thiserror", - "tracing", -] +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "855fd5540e3b4ff6fedf12aba2db1ee4b371b36f465da1363a6d022b27cb43b8" [[package]] name = "near-vm-runner" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56c80bdb1954808f59bd36a9112377197b38d424991383bf05f52d0fe2e0da5" dependencies = [ - "anyhow", - "base64", - "borsh 0.10.3", + "base64 0.21.7", + "borsh", "ed25519-dalek", - "finite-wasm", - "loupe", - "memoffset 0.8.0", - "near-cache", + "enum-map", + "memoffset", "near-crypto", + "near-parameters", "near-primitives-core", "near-stdx", - "near-vm-compiler", - "near-vm-compiler-singlepass", - "near-vm-engine", - "near-vm-types", - "near-vm-vm", + "num-rational", "once_cell", - "parity-wasm 0.41.0", - "parity-wasm 0.42.2", "prefix-sum-vec", - "pwasm-utils", "ripemd", "serde", + "serde_repr", "serde_with", - "sha2 0.10.8", + "sha2", "sha3", "strum 0.24.1", "thiserror", "tracing", - "wasm-encoder", - "wasmer-compiler-near", - "wasmer-compiler-singlepass-near", - "wasmer-engine-near", - "wasmer-engine-universal-near", - "wasmer-runtime-core-near", - "wasmer-runtime-near", - "wasmer-types-near", - "wasmer-vm-near", - "wasmparser 0.78.2", - "wasmtime", "zeropool-bn", ] -[[package]] -name = "near-vm-types" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" -dependencies = [ - "indexmap 1.9.3", - "num-traits", - "rkyv", - "thiserror", -] - -[[package]] -name = "near-vm-vm" -version = "1.36.0" -source = "git+https://github.com/near/nearcore.git?branch=1.36.0#b0c5d14557b0e24ee8f4ffcc293963b8ccf633a6" -dependencies = [ - "backtrace", - "cc", - "cfg-if 1.0.0", - "finite-wasm", - "indexmap 1.9.3", - "libc", - "memoffset 0.8.0", - "more-asserts", - "near-vm-types", - "region", - "rkyv", - "thiserror", - "tracing", - "wasmparser 0.99.0", - "winapi", -] - -[[package]] -name = "nix" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 0.1.10", - "libc", - "void", -] - [[package]] name = "ntapi" version = "0.4.1" @@ -3760,11 +3137,10 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] @@ -3783,9 +3159,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -3796,7 +3172,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi", "libc", ] @@ -3818,19 +3194,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "object" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" -dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", + "syn 2.0.49", ] [[package]] @@ -3861,7 +3225,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ "bitflags 2.4.2", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -3877,7 +3241,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3900,15 +3264,36 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.19.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4b8347cc26099d3aeee044065ecc3ae11469796b4d65d065a23a584ed92a6f" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" dependencies = [ - "opentelemetry_api", - "opentelemetry_sdk", -] - -[[package]] + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "opentelemetry" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4b8347cc26099d3aeee044065ecc3ae11469796b4d65d065a23a584ed92a6f" +dependencies = [ + "opentelemetry_api", + "opentelemetry_sdk", +] + +[[package]] name = "opentelemetry-http" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3933,21 +3318,48 @@ dependencies = [ "http 0.2.11", "isahc", "once_cell", - "opentelemetry", + "opentelemetry 0.19.0", "opentelemetry-http", - "opentelemetry-semantic-conventions", + "opentelemetry-semantic-conventions 0.11.0", "thiserror", "thrift", "tokio", ] +[[package]] +name = "opentelemetry-otlp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a" +dependencies = [ + "async-trait", + "futures", + "futures-util", + "http 0.2.11", + "opentelemetry 0.17.0", + "prost", + "thiserror", + "tokio", + "tonic", + "tonic-build", +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" +dependencies = [ + "opentelemetry 0.17.0", +] + [[package]] name = "opentelemetry-semantic-conventions" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24e33428e6bf08c6f7fcea4ddb8e358fab0fe48ab877a87c70c6ebe20f673ce5" dependencies = [ - "opentelemetry", + "opentelemetry 0.19.0", ] [[package]] @@ -3997,12 +3409,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "outref" version = "0.5.1" @@ -4023,69 +3429,23 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa", "elliptic-curve", - "sha2 0.10.8", + "sha2", ] -[[package]] -name = "page_size" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebde548fbbf1ea81a99b128872779c437752fb99f217c45245e1a61dcd9edcd" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "parity-wasm" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" - -[[package]] -name = "parity-wasm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - [[package]] name = "parking" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.3", -] - [[package]] name = "parking_lot" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.11", - "parking_lot_core 0.9.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93f386bb233083c799e6e642a9d73db98c24a5deeb95ffc85bf281255dffc98" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", + "lock_api", + "parking_lot_core", ] [[package]] @@ -4094,9 +3454,9 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets 0.48.5", ] @@ -4119,11 +3479,11 @@ version = "0.1.0" dependencies = [ "anyhow", "chrono", - "clap 4.4.18", + "clap", "dotenv", "futures", - "http 0.2.11", - "near-jsonrpc-client", + "http 1.0.0", + "near-jsonrpc-client 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "near-jsonrpc-primitives", "near-primitives", "rand 0.8.5", @@ -4132,6 +3492,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.2.3", +] + [[package]] name = "phf" version = "0.11.2" @@ -4167,7 +3537,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -4194,9 +3564,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "platforms" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "polling" @@ -4206,7 +3582,7 @@ checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "libc", "log", @@ -4220,7 +3596,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64", + "base64 0.21.7", "byteorder", "bytes", "fallible-iterator", @@ -4228,7 +3604,7 @@ dependencies = [ "md-5", "memchr", "rand 0.8.5", - "sha2 0.10.8", + "sha2", "stringprep", ] @@ -4296,21 +3672,21 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "0.1.5" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ - "toml 0.5.11", + "once_cell", + "toml_edit 0.19.15", ] [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "toml_edit 0.21.1", ] [[package]] @@ -4322,7 +3698,6 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", "version_check", ] @@ -4352,61 +3727,74 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot", "protobuf", "thiserror", ] [[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - -[[package]] -name = "psm" -version = "0.1.21" +name = "prost" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" dependencies = [ - "cc", + "bytes", + "prost-derive", ] [[package]] -name = "ptr_meta" -version = "0.1.4" +name = "prost-build" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" dependencies = [ - "ptr_meta_derive", + "bytes", + "heck 0.3.3", + "itertools 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost", + "prost-types", + "regex", + "tempfile", + "which", ] [[package]] -name = "ptr_meta_derive" -version = "0.1.4" +name = "prost-derive" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ + "anyhow", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "pwasm-utils" -version = "0.12.0" +name = "prost-types" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" +checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" dependencies = [ - "byteorder", - "log", - "parity-wasm 0.41.0", + "bytes", + "prost", ] +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + [[package]] name = "quote" version = "1.0.35" @@ -4416,12 +3804,6 @@ 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" @@ -4530,7 +3912,7 @@ dependencies = [ "actix-web", "anyhow", "assert-json-diff", - "borsh 0.10.3", + "borsh", "configuration", "database", "erased-serde", @@ -4539,13 +3921,14 @@ dependencies = [ "hex", "jsonrpc-v2", "lazy_static", - "lru 0.11.1", + "lru", "near-chain-configs", "near-crypto", "near-indexer-primitives", - "near-jsonrpc-client", + "near-jsonrpc-client 0.8.0 (git+https://github.com/near/near-jsonrpc-client-rs.git?branch=telezhnaya/wait_until)", "near-jsonrpc-primitives", "near-lake-framework", + "near-parameters", "near-primitives", "near-vm-runner", "paste", @@ -4566,21 +3949,14 @@ name = "readnode-primitives" version = "0.1.0" dependencies = [ "anyhow", - "borsh 0.10.3", + "borsh", "near-chain-configs", "near-indexer-primitives", - "num-bigint 0.3.3", "num-traits", "serde", "serde_json", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.4.1" @@ -4610,19 +3986,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "regalloc2" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a52e724646c6c0800fc456ec43b4165d2f91fba88ceaca06d9e0b400023478" -dependencies = [ - "hashbrown 0.13.2", - "log", - "rustc-hash", - "slice-group-by", - "smallvec", -] - [[package]] name = "regex" version = "1.10.3" @@ -4673,34 +4036,13 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags 1.3.2", - "libc", - "mach", - "winapi", -] - -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - [[package]] name = "reqwest" version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -4753,16 +4095,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4774,83 +4117,25 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "rkyv" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" -dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rustc-demangle" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[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.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.21", -] - -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno 0.3.8", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", + "semver", ] [[package]] @@ -4860,9 +4145,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.4.2", - "errno 0.3.8", + "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -4896,7 +4181,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.7", ] [[package]] @@ -4917,9 +4202,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "schannel" @@ -4936,7 +4221,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1473e24c637950c9bd38763220bea91ec3e095a89f672bbd7a10d03e77ba467" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-utils", ] @@ -4958,13 +4243,12 @@ dependencies = [ [[package]] name = "scylla" -version = "0.9.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8338911f1c2a7bf8ba4036997196e49e9eda8d4414af10548e9420e23a5dbd6f" +checksum = "03d2db76aa23f55d2ece5354e1a3778633098a3d1ea76153f494d71e92cd02d8" dependencies = [ "arc-swap", "async-trait", - "bigdecimal 0.2.2", "byteorder", "bytes", "chrono", @@ -4973,7 +4257,6 @@ dependencies = [ "histogram", "itertools 0.11.0", "lz4_flex", - "num-bigint 0.3.3", "num_enum", "rand 0.8.5", "rand_pcg", @@ -4981,7 +4264,7 @@ dependencies = [ "scylla-macros", "smallvec", "snap", - "socket2 0.5.5", + "socket2", "strum 0.23.0", "strum_macros 0.23.1", "thiserror", @@ -4992,42 +4275,40 @@ dependencies = [ [[package]] name = "scylla-cql" -version = "0.0.8" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048bdf0be96308ec0f5aeed2847bb2270f53355425b3afd67e64efc99d70b3e3" +checksum = "345626c0dd5d9624c413daaba854685bba6a65cff4eb5ea0fb0366df16901f67" dependencies = [ "async-trait", - "bigdecimal 0.2.2", + "bigdecimal", "byteorder", "bytes", "chrono", "lz4_flex", "num-bigint 0.3.3", + "num-bigint 0.4.4", "num_enum", "scylla-macros", + "secrecy", "snap", "thiserror", + "time", "tokio", "uuid", ] [[package]] name = "scylla-macros" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bbac3874ee838894b5a82c5833c2b0b29d39ca5ad486d982ee434177b2cc57" +checksum = "eb6085ff9c3fd7e5163826901d39164ab86f11bdca16b2f766a00c528ff9cef9" dependencies = [ + "darling 0.20.6", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - [[package]] name = "sec1" version = "0.3.0" @@ -5036,7 +4317,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct", "der", - "generic-array 0.14.7", + "generic-array", "pkcs8", "subtle", "zeroize", @@ -5061,6 +4342,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secrecy" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +dependencies = [ + "zeroize", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -5086,24 +4376,9 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "semver-parser" -version = "0.7.0" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" @@ -5114,25 +4389,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-bench" -version = "0.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" -dependencies = [ - "byteorder", - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" -dependencies = [ - "serde", -] - [[package]] name = "serde_derive" version = "1.0.196" @@ -5141,7 +4397,7 @@ checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -5163,7 +4419,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -5189,16 +4445,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.6.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" +checksum = "15d167997bd841ec232f5b2b8e0e26606df2e7caa4c31b95ea9ca52b200bd270" dependencies = [ - "base64", + "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.2", + "indexmap 2.2.3", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -5206,23 +4463,23 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.6.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" +checksum = "865f9743393e638991566a8b7a479043c2c8da94a33e0a31f18214c9cae0a64d" dependencies = [ - "darling 0.20.5", + "darling 0.20.6", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "serde_yaml" -version = "0.9.31" +version = "0.9.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" +checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.3", "itoa", "ryu", "serde", @@ -5235,37 +4492,24 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] [[package]] name = "sha2" -version = "0.9.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest 0.10.7", ] [[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" +name = "sha3" version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" @@ -5303,10 +4547,10 @@ dependencies = [ ] [[package]] -name = "simdutf8" -version = "0.1.4" +name = "signature" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" [[package]] name = "siphasher" @@ -5323,12 +4567,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "sluice" version = "0.5.5" @@ -5363,16 +4601,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.5" @@ -5405,20 +4633,14 @@ dependencies = [ "der", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "state-indexer" version = "0.1.0" dependencies = [ "actix-web", "anyhow", - "borsh 0.10.3", - "clap 3.2.25", + "borsh", + "clap", "configuration", "database", "epoch-indexer", @@ -5427,7 +4649,7 @@ dependencies = [ "humantime", "lazy_static", "near-indexer-primitives", - "near-jsonrpc-client", + "near-jsonrpc-client 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "near-lake-framework", "near-primitives", "openssl-probe", @@ -5460,6 +4682,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "strum" version = "0.23.0" @@ -5520,15 +4748,27 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.49", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -5537,17 +4777,17 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sysinfo" -version = "0.29.11" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" +checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "core-foundation-sys", "libc", "ntapi", "once_cell", "rayon", - "winapi", + "windows", ] [[package]] @@ -5571,34 +4811,15 @@ dependencies = [ "libc", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "target-lexicon" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" - -[[package]] -name = "target-lexicon" -version = "0.12.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" - [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.31", + "rustix", "windows-sys 0.52.0", ] @@ -5613,39 +4834,24 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -5654,7 +4860,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -5737,15 +4943,25 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", "tracing", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.2.0" @@ -5754,7 +4970,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -5780,16 +4996,16 @@ dependencies = [ "futures-channel", "futures-util", "log", - "parking_lot 0.12.1", + "parking_lot", "percent-encoding", "phf", "pin-project-lite", "postgres-protocol", "postgres-types", "rand 0.8.5", - "socket2 0.5.5", + "socket2", "tokio", - "tokio-util", + "tokio-util 0.7.10", "whoami", ] @@ -5816,25 +5032,30 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ "bytes", "futures-core", "futures-sink", + "log", "pin-project-lite", "tokio", - "tracing", ] [[package]] -name = "toml" -version = "0.5.11" +name = "tokio-util" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "serde", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] [[package]] @@ -5851,14 +5072,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.1", + "toml_edit 0.22.6", ] [[package]] @@ -5876,11 +5097,11 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -5889,13 +5110,93 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.3", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +dependencies = [ + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.1", ] +[[package]] +name = "tonic" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +dependencies = [ + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes", + "futures-core", + "futures-util", + "h2", + "http 0.2.11", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "prost-derive", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tonic-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +dependencies = [ + "proc-macro2", + "prost-build", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util 0.7.10", + "tower-layer", + "tower-service", + "tracing", +] + +[[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" @@ -5916,16 +5217,29 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.6.2" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d725b8fa6ef307b3f4856913523337de45c47cc79271bafd7acfb39559e3a2da" +checksum = "1fe0d5feac3f4ca21ba33496bcb1ccab58cca6412b1405ae80f0581541e0ca78" dependencies = [ "actix-web", + "mutually_exclusive_features", "pin-project", "tracing", "uuid", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.27" @@ -5934,7 +5248,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -5979,6 +5293,20 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry 0.17.0", + "tracing", + "tracing-core", + "tracing-log 0.1.4", + "tracing-subscriber", +] + [[package]] name = "tracing-opentelemetry" version = "0.19.0" @@ -5986,7 +5314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00a39dcf9bfc1742fa4d6215253b33a6e474be78275884c216fc2a06267b3600" dependencies = [ "once_cell", - "opentelemetry", + "opentelemetry 0.19.0", "tracing", "tracing-core", "tracing-log 0.1.4", @@ -6051,7 +5379,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "static_assertions", ] @@ -6061,7 +5389,7 @@ version = "0.1.0" dependencies = [ "actix-web", "anyhow", - "clap 3.2.25", + "clap", "configuration", "database", "futures", @@ -6069,7 +5397,7 @@ dependencies = [ "humantime", "lazy_static", "near-indexer-primitives", - "near-jsonrpc-client", + "near-jsonrpc-client 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "near-lake-framework", "prometheus", "readnode-primitives", @@ -6119,9 +5447,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" @@ -6191,12 +5519,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - [[package]] name = "vsimd" version = "0.8.0" @@ -6232,36 +5554,36 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -6269,9 +5591,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6279,435 +5601,43 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" - -[[package]] -name = "wasm-encoder" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77053dc709db790691d3732cfc458adc5acc881dec524965c608effdcd9c581" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasmer-compiler-near" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fdae7245128f284476e6db9653ef0a15b011975091bcd7f9d7303132409662" -dependencies = [ - "enumset", - "rkyv", - "smallvec", - "target-lexicon 0.12.13", - "thiserror", - "wasmer-types-near", - "wasmer-vm-near", - "wasmparser 0.78.2", -] - -[[package]] -name = "wasmer-compiler-singlepass-near" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4af0e438015585eb27b2c6f6869c58c540bfe27408b686b1778470bf301050" -dependencies = [ - "byteorder", - "dynasm 1.2.3", - "dynasmrt 1.2.3", - "lazy_static", - "memoffset 0.6.5", - "more-asserts", - "rayon", - "smallvec", - "wasmer-compiler-near", - "wasmer-types-near", - "wasmer-vm-near", -] - -[[package]] -name = "wasmer-engine-near" -version = "2.4.1" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4048411cabb2c94c7d8d11d9d0282cc6b15308b61ebc1e122c40e89865ebb5c5" -dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "memmap2", - "more-asserts", - "rustc-demangle", - "target-lexicon 0.12.13", - "thiserror", - "wasmer-compiler-near", - "wasmer-types-near", - "wasmer-vm-near", -] +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] -name = "wasmer-engine-universal-near" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f31c3d2850ac7957406d3c9581d9435ea8126a26478709fa7e931b6f562b4d" -dependencies = [ - "cfg-if 1.0.0", - "enumset", - "leb128", - "region", - "rkyv", - "thiserror", - "wasmer-compiler-near", - "wasmer-engine-near", - "wasmer-types-near", - "wasmer-vm-near", - "winapi", -] - -[[package]] -name = "wasmer-runtime-core-near" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3fac37da3c625e98708c5dd92d3f642aaf700fd077168d3d0fff277ec6a165" -dependencies = [ - "bincode", - "blake3", - "borsh 0.9.3", - "cc", - "digest 0.8.1", - "errno 0.2.8", - "hex", - "indexmap 1.9.3", - "lazy_static", - "libc", - "nix", - "page_size", - "parking_lot 0.10.2", - "rustc_version 0.2.3", - "serde", - "serde-bench", - "serde_bytes", - "serde_derive", - "smallvec", - "target-lexicon 0.10.0", - "wasmparser 0.51.4", - "winapi", -] - -[[package]] -name = "wasmer-runtime-near" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158e6fff11e5e1ef805af50637374d5bd43d92017beafa18992cdf7f3f7ae3e4" -dependencies = [ - "lazy_static", - "memmap", - "serde", - "serde_derive", - "wasmer-runtime-core-near", - "wasmer-singlepass-backend-near", -] - -[[package]] -name = "wasmer-singlepass-backend-near" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6edd0ba6c0bcf9b279186d4dbe81649dda3e5ef38f586865943de4dcd653f8" -dependencies = [ - "bincode", - "borsh 0.9.3", - "byteorder", - "dynasm 1.2.3", - "dynasmrt 1.2.3", - "lazy_static", - "libc", - "nix", - "serde", - "serde_derive", - "smallvec", - "wasmer-runtime-core-near", -] - -[[package]] -name = "wasmer-types-near" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba154adffb0fbd33f5dabd3788a1744d846b43e6e090d44269c7ee8fa5743e4" -dependencies = [ - "indexmap 1.9.3", - "rkyv", - "thiserror", -] - -[[package]] -name = "wasmer-vm-near" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a5585596f6e9915d606de944aece51626736fb1191aefb5b2ef108c6f7604a" -dependencies = [ - "backtrace", - "cc", - "cfg-if 1.0.0", - "indexmap 1.9.3", - "libc", - "memoffset 0.6.5", - "more-asserts", - "region", - "rkyv", - "thiserror", - "wasmer-types-near", - "winapi", -] - -[[package]] -name = "wasmparser" -version = "0.51.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" - -[[package]] -name = "wasmparser" -version = "0.78.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" - -[[package]] -name = "wasmparser" -version = "0.99.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef3b717afc67f848f412d4f02c127dd3e35a0eecd58c684580414df4fde01d3" -dependencies = [ - "indexmap 1.9.3", - "url", -] - -[[package]] -name = "wasmparser" -version = "0.103.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c437373cac5ea84f1113d648d51f71751ffbe3d90c00ae67618cf20d0b5ee7b" -dependencies = [ - "indexmap 1.9.3", - "url", -] - -[[package]] -name = "wasmparser" -version = "0.105.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83be9e0b3f9570dc1979a33ae7b89d032c73211564232b99976553e5c155ec32" -dependencies = [ - "indexmap 1.9.3", - "url", -] - -[[package]] -name = "wasmprinter" -version = "0.2.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b0e5ed7a74a065637f0d7798ce5f29cadb064980d24b0c82af5200122fa0d8" -dependencies = [ - "anyhow", - "wasmparser 0.105.0", -] - -[[package]] -name = "wasmtime" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634357e8668774b24c80b210552f3f194e2342a065d6d83845ba22c5817d0770" -dependencies = [ - "anyhow", - "bincode", - "bumpalo", - "cfg-if 1.0.0", - "fxprof-processed-profile", - "indexmap 1.9.3", - "libc", - "log", - "object 0.30.4", - "once_cell", - "paste", - "psm", - "serde", - "serde_json", - "target-lexicon 0.12.13", - "wasmparser 0.103.0", - "wasmtime-cranelift", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-asm-macros" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d33c73c24ce79b0483a3b091a9acf88871f4490b88998e8974b22236264d304c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "wasmtime-cranelift" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5800616a28ed6bd5e8b99ea45646c956d798ae030494ac0689bc3e45d3b689c1" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "gimli 0.27.3", - "log", - "object 0.30.4", - "target-lexicon 0.12.13", - "thiserror", - "wasmparser 0.103.0", - "wasmtime-cranelift-shared", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-cranelift-shared" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e4030b959ac5c5d6ee500078977e813f8768fa2b92fc12be01856cd0c76c55" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli 0.27.3", - "object 0.30.4", - "target-lexicon 0.12.13", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-environ" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec815d01a8d38aceb7ed4678f9ba551ae6b8a568a63810ac3ad9293b0fd01c8" -dependencies = [ - "anyhow", - "cranelift-entity", - "gimli 0.27.3", - "indexmap 1.9.3", - "log", - "object 0.30.4", - "serde", - "target-lexicon 0.12.13", - "thiserror", - "wasmparser 0.103.0", - "wasmtime-types", -] - -[[package]] -name = "wasmtime-jit" -version = "9.0.4" +name = "web-sys" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2712eafe829778b426cad0e1769fef944898923dd29f0039e34e0d53ba72b234" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ - "addr2line 0.19.0", - "anyhow", - "bincode", - "cfg-if 1.0.0", - "cpp_demangle", - "gimli 0.27.3", - "log", - "object 0.30.4", - "rustc-demangle", - "serde", - "target-lexicon 0.12.13", - "wasmtime-environ", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.48.0", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "wasmtime-jit-debug" -version = "9.0.4" +name = "which" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fb78eacf4a6e47260d8ef8cc81ea8ddb91397b2e848b3fb01567adebfe89b5" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ + "either", + "home", "once_cell", -] - -[[package]] -name = "wasmtime-jit-icache-coherence" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1364900b05f7d6008516121e8e62767ddb3e176bdf4c84dfa85da1734aeab79" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-runtime" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a16ffe4de9ac9669175c0ea5c6c51ffc596dfb49320aaa6f6c57eff58cef069" -dependencies = [ - "anyhow", - "cc", - "cfg-if 1.0.0", - "indexmap 1.9.3", - "libc", - "log", - "mach", - "memfd", - "memoffset 0.8.0", - "paste", - "rand 0.8.5", - "rustix 0.37.27", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-jit-debug", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-types" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19961c9a3b04d5e766875a5c467f6f5d693f508b3e81f8dc4a1444aa94f041c9" -dependencies = [ - "cranelift-entity", - "serde", - "thiserror", - "wasmparser 0.103.0", -] - -[[package]] -name = "web-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" -dependencies = [ - "js-sys", - "wasm-bindgen", + "rustix", ] [[package]] @@ -6736,21 +5666,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -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" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.0", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -6894,30 +5825,30 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.37" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401" dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", + "memchr", ] [[package]] -name = "wyz" -version = "0.5.1" +name = "winreg" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "tap", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -6943,7 +5874,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -6951,20 +5882,6 @@ name = "zeroize" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] [[package]] name = "zeropool-bn" @@ -6972,7 +5889,6 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e61de68ede9ffdd69c01664f65a178c5188b73f78faa21f0936016a888ff7c" dependencies = [ - "borsh 0.9.3", "byteorder", "crunchy", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index ca4be70a..6b82624c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,16 +18,3 @@ members = [ "state-indexer", "tx-indexer", ] - -[patch.crates-io] -near-chain-configs = { git = 'https://github.com/near/nearcore.git', branch = '1.36.0' } -near-crypto = { git = 'https://github.com/near/nearcore.git', branch = '1.36.0' } -near-jsonrpc-primitives = { git = 'https://github.com/near/nearcore.git', branch = '1.36.0' } -near-indexer-primitives = { git = 'https://github.com/near/nearcore.git', branch = '1.36.0' } -near-primitives = { git = 'https://github.com/near/nearcore.git', branch = '1.36.0' } -near-vm-runner = { git = 'https://github.com/near/nearcore.git', branch = '1.36.0' } - -# TODO: We use forks to resolve nearcore dependency conflicts. -# After updating the dependencies, we should use the published versions of the crates. -near-jsonrpc-client = { git = 'https://github.com/kobayurii/near-jsonrpc-client-rs.git', branch = '0.7.0' } -near-lake-framework = { git = 'https://github.com/kobayurii/near-lake-framework-rs.git', branch = '0.7.9' } diff --git a/configuration/Cargo.toml b/configuration/Cargo.toml index a88ce207..e1a59b7a 100644 --- a/configuration/Cargo.toml +++ b/configuration/Cargo.toml @@ -9,9 +9,9 @@ license.workspace = true [dependencies] anyhow = "1.0.70" -aws-credential-types = "1.0.0" -aws-sdk-s3 = { version = "0.39.1", features = ["behavior-version-latest"] } -aws-types = "1.0.0" +aws-credential-types = "1.1.4" +aws-sdk-s3 = { version = "1.14.0", features = ["behavior-version-latest"] } +aws-types = "1.1.4" dotenv = "0.15.0" lazy_static = "1.4.0" regex = "1.10.2" @@ -35,7 +35,7 @@ tracing-subscriber = { version = "0.3.15", features = [ tracing-opentelemetry = { version = "0.19", optional = true } tracing-stackdriver = "0.7.2" # GCP logs -near-lake-framework = "0.7.9" +near-lake-framework = "0.7.7" [features] tracing-instrumentation = ["dep:opentelemetry-jaeger", "dep:tracing-opentelemetry"] diff --git a/database/Cargo.toml b/database/Cargo.toml index 9013ea6f..06049e51 100644 --- a/database/Cargo.toml +++ b/database/Cargo.toml @@ -11,39 +11,40 @@ license.workspace = true anyhow = "1.0.70" async-trait = "0.1.66" bigdecimal = { version = "0.4.2", optional = true } -borsh = "0.10.2" -bytes = "1.0.1" +borsh = "1.3.1" +bytes = "1.5.0" diesel = { version = "2.1.3", features = ["postgres", "numeric", "serde_json"], optional = true } diesel-async = { version = "0.4.1", features = ["postgres", "deadpool"], optional = true } diesel_migrations = { version = "2.1.0", optional = true } futures = "0.3.5" hex = "0.4.3" prettytable-rs = { version = "0.10", optional = true } -num-bigint = { version = "0.3", optional = true } +num-bigint = { version = "0.4.4", optional = true } num-traits = { version = "0.2.15", optional = true } -scylla = { version = "0.9.0", optional = true } +scylla = { version = "0.12.0", features = ["full-serialization"], optional = true } +scylla-cql = { version = "0.1.0", optional = true } serde = { version = "1.0.145", features = ["derive"]} serde_json = "1.0.85" -tokio = { version = "1.19.2", features = [ +tokio = { version = "1.36.0", features = [ "sync", "time", "macros", "rt-multi-thread", ] } tracing = "0.1.34" -uuid = { version = "1.3.0", optional = true } +uuid = { version = "1.7.0", optional = true } configuration = { path = "../configuration" } readnode-primitives = { path = "../readnode-primitives" } -near-chain-configs = "1.36.0" -near-primitives = "1.36.0" -near-crypto = "1.36.0" -near-indexer-primitives = "1.36.0" +near-chain-configs = "0.20.0" +near-primitives = "0.20.0" +near-crypto = "0.20.0" +near-indexer-primitives = "0.20.0" [features] default = ["scylla_db"] postgres_db = ["dep:diesel", "dep:diesel-async", "dep:diesel_migrations", "dep:bigdecimal"] -scylla_db = ["dep:scylla", "dep:num-bigint", "dep:num-traits"] +scylla_db = ["dep:scylla", "dep:scylla-cql", "dep:num-bigint", "dep:num-traits"] scylla_db_tracing = ["dep:prettytable-rs", "dep:uuid", "scylla_db"] account_access_keys = [] diff --git a/database/src/base/rpc_server.rs b/database/src/base/rpc_server.rs index 5bda1a67..a4f40997 100644 --- a/database/src/base/rpc_server.rs +++ b/database/src/base/rpc_server.rs @@ -112,10 +112,4 @@ pub trait ReaderDbManager { &self, block_height: near_primitives::types::BlockHeight, ) -> anyhow::Result; - - /// Return protocol config by the given epoch id - async fn get_protocol_config_by_epoch_id( - &self, - epoch_id: near_primitives::hash::CryptoHash, - ) -> anyhow::Result; } diff --git a/database/src/base/state_indexer.rs b/database/src/base/state_indexer.rs index 844d38a5..00699975 100644 --- a/database/src/base/state_indexer.rs +++ b/database/src/base/state_indexer.rs @@ -119,14 +119,6 @@ pub trait StateIndexerDbManager { validators_info: &near_primitives::views::EpochValidatorInfo, ) -> anyhow::Result<()>; - async fn add_protocol_config( - &self, - epoch_id: near_indexer_primitives::CryptoHash, - epoch_height: u64, - epoch_start_height: u64, - protocol_config: &near_chain_configs::ProtocolConfigView, - ) -> anyhow::Result<()>; - async fn update_epoch_end_height( &self, epoch_id: near_indexer_primitives::CryptoHash, diff --git a/database/src/postgres/migrations/2024-02-14-125531_delete_protocol_configs/down.sql b/database/src/postgres/migrations/2024-02-14-125531_delete_protocol_configs/down.sql new file mode 100644 index 00000000..ba404b22 --- /dev/null +++ b/database/src/postgres/migrations/2024-02-14-125531_delete_protocol_configs/down.sql @@ -0,0 +1,10 @@ +CREATE TABLE IF NOT EXISTS protocol_configs ( + epoch_id text NOT NULL, + epoch_height numeric(20,0) NOT NULL, + epoch_start_height numeric(20,0) NOT NULL, + epoch_end_height numeric(20,0) NULL, + protocol_config jsonb NOT NULL +); + +ALTER TABLE ONLY protocol_configs + ADD CONSTRAINT protocol_config_pk PRIMARY KEY (epoch_id); diff --git a/database/src/postgres/migrations/2024-02-14-125531_delete_protocol_configs/up.sql b/database/src/postgres/migrations/2024-02-14-125531_delete_protocol_configs/up.sql new file mode 100644 index 00000000..f3bfe3a2 --- /dev/null +++ b/database/src/postgres/migrations/2024-02-14-125531_delete_protocol_configs/up.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS protocol_configs; diff --git a/database/src/postgres/models.rs b/database/src/postgres/models.rs index cb6219ea..4f15ee26 100644 --- a/database/src/postgres/models.rs +++ b/database/src/postgres/models.rs @@ -1,5 +1,4 @@ use crate::schema::*; -use borsh::{BorshDeserialize, BorshSerialize}; use diesel::prelude::*; use diesel_async::RunQueryDsl; @@ -362,7 +361,7 @@ impl AccountState { page_token: crate::PageToken, ) -> anyhow::Result<(Vec, crate::PageToken)> { let page_state = if let Some(page_state_token) = page_token { - PageState::try_from_slice(&hex::decode(page_state_token)?)? + borsh::from_slice::(&hex::decode(page_state_token)?)? } else { PageState::new(1000) }; @@ -384,7 +383,7 @@ impl AccountState { } else { Ok(( state_keys, - Some(hex::encode(page_state.next_page().try_to_vec()?)), + Some(hex::encode(borsh::to_vec(&page_state.next_page())?)), )) } } @@ -735,53 +734,3 @@ impl Validators { Ok(response) } } - -#[derive(Insertable, Queryable, Selectable)] -#[diesel(table_name = protocol_configs)] -pub struct ProtocolConfig { - pub epoch_id: String, - pub epoch_height: bigdecimal::BigDecimal, - pub epoch_start_height: bigdecimal::BigDecimal, - pub epoch_end_height: Option, - pub protocol_config: serde_json::Value, -} - -impl ProtocolConfig { - pub async fn insert_or_ignore( - &self, - mut conn: crate::postgres::PgAsyncConn, - ) -> anyhow::Result<()> { - diesel::insert_into(protocol_configs::table) - .values(self) - .on_conflict_do_nothing() - .execute(&mut conn) - .await?; - Ok(()) - } - - pub async fn update_epoch_end_height( - mut conn: crate::postgres::PgAsyncConn, - epoch_id: near_indexer_primitives::CryptoHash, - epoch_end_height: bigdecimal::BigDecimal, - ) -> anyhow::Result<()> { - diesel::update(protocol_configs::table) - .filter(protocol_configs::epoch_id.eq(epoch_id.to_string())) - .set(protocol_configs::epoch_end_height.eq(epoch_end_height)) - .execute(&mut conn) - .await?; - Ok(()) - } - - pub async fn get_protocol_config( - mut conn: crate::postgres::PgAsyncConn, - epoch_id: near_indexer_primitives::CryptoHash, - ) -> anyhow::Result { - let response = protocol_configs::table - .filter(protocol_configs::epoch_id.eq(epoch_id.to_string())) - .select(Self::as_select()) - .first(&mut conn) - .await?; - - Ok(response) - } -} diff --git a/database/src/postgres/rpc_server.rs b/database/src/postgres/rpc_server.rs index 652d0acc..fc294ea6 100644 --- a/database/src/postgres/rpc_server.rs +++ b/database/src/postgres/rpc_server.rs @@ -2,7 +2,6 @@ use std::str::FromStr; use crate::postgres::PostgresStorageManager; use bigdecimal::ToPrimitive; -use borsh::{BorshDeserialize, BorshSerialize}; pub struct PostgresDBManager { pg_pool: crate::postgres::PgAsyncPool, @@ -67,7 +66,7 @@ impl crate::ReaderDbManager for PostgresDBManager { ) -> anyhow::Result> { let result = crate::models::AccountState::get_state_keys_all( Self::get_connection(&self.pg_pool).await?, - account_id, + account_id.as_str(), ) .await? .into_iter() @@ -83,7 +82,7 @@ impl crate::ReaderDbManager for PostgresDBManager { let hex_str_prefix = hex::encode(prefix); let result = crate::models::AccountState::get_state_keys_by_prefix( Self::get_connection(&self.pg_pool).await?, - account_id, + account_id.as_str(), hex_str_prefix, ) .await? @@ -99,7 +98,7 @@ impl crate::ReaderDbManager for PostgresDBManager { ) -> anyhow::Result<(Vec, crate::PageToken)> { let (state_keys, next_page_token) = crate::models::AccountState::get_state_keys_by_page( Self::get_connection(&self.pg_pool).await?, - account_id, + account_id.as_str(), page_token, ) .await?; @@ -126,7 +125,7 @@ impl crate::ReaderDbManager for PostgresDBManager { }; let result = if let Ok(result) = crate::models::StateChangesData::get_state_key_value( connection, - account_id, + account_id.as_str(), block_height, hex::encode(key_data.clone()), ) @@ -146,7 +145,7 @@ impl crate::ReaderDbManager for PostgresDBManager { ) -> anyhow::Result> { let account_data = crate::models::StateChangesAccount::get_account( Self::get_connection(&self.pg_pool).await?, - account_id, + account_id.as_str(), request_block_height, ) .await?; @@ -176,7 +175,7 @@ impl crate::ReaderDbManager for PostgresDBManager { ) -> anyhow::Result>> { let contract_data = crate::models::StateChangesContract::get_contract( Self::get_connection(&self.pg_pool).await?, - account_id, + account_id.as_str(), request_block_height, ) .await?; @@ -205,10 +204,10 @@ impl crate::ReaderDbManager for PostgresDBManager { request_block_height: near_primitives::types::BlockHeight, public_key: near_crypto::PublicKey, ) -> anyhow::Result> { - let key_data = public_key.try_to_vec()?; + let key_data = borsh::to_vec(&public_key)?; let access_key_data = crate::models::StateChangesAccessKey::get_access_key( Self::get_connection(&self.pg_pool).await?, - account_id, + account_id.as_str(), request_block_height, hex::encode(key_data), ) @@ -241,7 +240,7 @@ impl crate::ReaderDbManager for PostgresDBManager { ) -> anyhow::Result>> { let active_access_keys = crate::models::StateChangesAccessKeys::get_active_access_keys( Self::get_connection(&self.pg_pool).await?, - &account_id, + account_id.as_str(), block_height, ) .await?; @@ -293,9 +292,7 @@ impl crate::ReaderDbManager for PostgresDBManager { transaction_hash, ) .await?; - Ok(readnode_primitives::TransactionDetails::try_from_slice( - &transaction_data, - )?) + Ok(borsh::from_slice::(&transaction_data)?) } async fn get_indexing_transaction_by_hash( @@ -308,7 +305,7 @@ impl crate::ReaderDbManager for PostgresDBManager { ) .await?; let mut transaction_details = - readnode_primitives::CollectingTransactionDetails::try_from_slice(&data_value)?; + borsh::from_slice::(&data_value)?; let result = crate::models::ReceiptOutcome::get_receipt_outcome( Self::get_connection(&self.pg_pool).await?, @@ -318,13 +315,10 @@ impl crate::ReaderDbManager for PostgresDBManager { .await?; for receipt_outcome in result { let receipt = - near_primitives::views::ReceiptView::try_from_slice(&receipt_outcome.receipt) - .expect("Failed to deserialize receipt"); - let execution_outcome = - near_primitives::views::ExecutionOutcomeWithIdView::try_from_slice( - &receipt_outcome.outcome, - ) - .expect("Failed to deserialize execution outcome"); + borsh::from_slice::(&receipt_outcome.receipt)?; + let execution_outcome = borsh::from_slice::< + near_primitives::views::ExecutionOutcomeWithIdView, + >(&receipt_outcome.outcome)?; transaction_details.receipts.push(receipt); transaction_details .execution_outcomes @@ -414,19 +408,4 @@ impl crate::ReaderDbManager for PostgresDBManager { validators_info, }) } - - async fn get_protocol_config_by_epoch_id( - &self, - epoch_id: near_indexer_primitives::CryptoHash, - ) -> anyhow::Result { - let protocol_config = crate::models::ProtocolConfig::get_protocol_config( - Self::get_connection(&self.pg_pool).await?, - epoch_id, - ) - .await?; - let (protocol_config,) = serde_json::from_value::<(near_chain_configs::ProtocolConfigView,)>( - protocol_config.protocol_config, - )?; - Ok(protocol_config) - } } diff --git a/database/src/postgres/schema.rs b/database/src/postgres/schema.rs index 2d7f1f2b..9ad3ba40 100644 --- a/database/src/postgres/schema.rs +++ b/database/src/postgres/schema.rs @@ -30,16 +30,6 @@ diesel::table! { } } -diesel::table! { - protocol_configs (epoch_id) { - epoch_id -> Text, - epoch_height -> Numeric, - epoch_start_height -> Numeric, - epoch_end_height -> Nullable, - protocol_config -> Jsonb, - } -} - diesel::table! { receipt_map (receipt_id) { receipt_id -> Text, @@ -138,7 +128,6 @@ diesel::allow_tables_to_appear_in_same_query!( block, chunk, meta, - protocol_configs, receipt_map, receipt_outcome, state_changes_access_key, diff --git a/database/src/postgres/state_indexer.rs b/database/src/postgres/state_indexer.rs index 3c122c77..a8fc14f4 100644 --- a/database/src/postgres/state_indexer.rs +++ b/database/src/postgres/state_indexer.rs @@ -112,7 +112,7 @@ impl crate::StateIndexerDbManager for PostgresDBManager { ) -> anyhow::Result>> { let active_access_keys = crate::models::StateChangesAccessKeys::get_active_access_keys( Self::get_connection(&self.pg_pool).await?, - &account_id, + account_id.as_str(), block_height, ) .await?; @@ -325,43 +325,18 @@ impl crate::StateIndexerDbManager for PostgresDBManager { Ok(()) } - async fn add_protocol_config( - &self, - epoch_id: near_indexer_primitives::CryptoHash, - epoch_height: u64, - epoch_start_height: u64, - protocol_config: &near_chain_configs::ProtocolConfigView, - ) -> anyhow::Result<()> { - crate::models::ProtocolConfig { - epoch_id: epoch_id.to_string(), - epoch_height: bigdecimal::BigDecimal::from(epoch_height), - epoch_start_height: bigdecimal::BigDecimal::from(epoch_start_height), - epoch_end_height: None, - protocol_config: serde_json::to_value(protocol_config)?, - } - .insert_or_ignore(Self::get_connection(&self.pg_pool).await?) - .await?; - Ok(()) - } - async fn update_epoch_end_height( &self, epoch_id: near_indexer_primitives::CryptoHash, epoch_end_block_hash: near_indexer_primitives::CryptoHash, ) -> anyhow::Result<()> { let epoch_end_height = self.get_block_by_hash(epoch_end_block_hash).await?; - - let validators_future = crate::models::Validators::update_epoch_end_height( + crate::models::Validators::update_epoch_end_height( Self::get_connection(&self.pg_pool).await?, epoch_id, bigdecimal::BigDecimal::from(epoch_end_height), - ); - let protocol_config_future = crate::models::ProtocolConfig::update_epoch_end_height( - Self::get_connection(&self.pg_pool).await?, - epoch_id, - bigdecimal::BigDecimal::from(epoch_end_height), - ); - futures::future::try_join(validators_future, protocol_config_future).await?; + ) + .await?; Ok(()) } } diff --git a/database/src/postgres/tx_indexer.rs b/database/src/postgres/tx_indexer.rs index f1fdea29..10b81620 100644 --- a/database/src/postgres/tx_indexer.rs +++ b/database/src/postgres/tx_indexer.rs @@ -1,6 +1,5 @@ use crate::postgres::PostgresStorageManager; use bigdecimal::ToPrimitive; -use borsh::{BorshDeserialize, BorshSerialize}; pub struct PostgresDBManager { pg_pool: crate::postgres::PgAsyncPool, @@ -30,14 +29,11 @@ impl crate::TxIndexerDbManager for PostgresDBManager { transaction: readnode_primitives::TransactionDetails, block_height: u64, ) -> anyhow::Result<()> { - let transaction_details = transaction - .try_to_vec() - .expect("Failed to borsh-serialize the Transaction"); crate::models::TransactionDetail { transaction_hash: transaction.transaction.hash.to_string(), block_height: bigdecimal::BigDecimal::from(block_height), account_id: transaction.transaction.signer_id.to_string(), - transaction_details, + transaction_details: borsh::to_vec(&transaction)?, } .insert_or_ignore(Self::get_connection(&self.pg_pool).await?) .await @@ -75,7 +71,7 @@ impl crate::TxIndexerDbManager for PostgresDBManager { ) -> anyhow::Result<()> { let transaction_hash = transaction_details.transaction.hash.clone().to_string(); let block_height = transaction_details.block_height; - let transaction_details = transaction_details.try_to_vec().map_err(|err| { + let transaction_details = borsh::to_vec(&transaction_details).map_err(|err| { tracing::error!(target: "tx_indexer", "Failed to serialize transaction details: {:?}", err); err})?; crate::models::TransactionCache { @@ -100,12 +96,8 @@ impl crate::TxIndexerDbManager for PostgresDBManager { .receipt .receipt_id .to_string(), - receipt: indexer_execution_outcome_with_receipt - .receipt - .try_to_vec()?, - outcome: indexer_execution_outcome_with_receipt - .execution_outcome - .try_to_vec()?, + receipt: borsh::to_vec(&indexer_execution_outcome_with_receipt.receipt)?, + outcome: borsh::to_vec(&indexer_execution_outcome_with_receipt.execution_outcome)?, } .insert_or_ignore(Self::get_connection(&self.pg_pool).await?) .await @@ -131,11 +123,10 @@ impl crate::TxIndexerDbManager for PostgresDBManager { Ok(transactions .into_iter() .map(|tx| { - let transaction_details = - readnode_primitives::CollectingTransactionDetails::try_from_slice( - &tx.transaction_details, - ) - .expect("Failed to deserialize transaction details"); + let transaction_details = borsh::from_slice::< + readnode_primitives::CollectingTransactionDetails, + >(&tx.transaction_details) + .expect("Failed to deserialize transaction details"); (transaction_details.transaction_key(), transaction_details) }) .collect()) @@ -156,11 +147,9 @@ impl crate::TxIndexerDbManager for PostgresDBManager { &transaction_hash, ) .await?; - Ok( - readnode_primitives::CollectingTransactionDetails::try_from_slice( - &transaction_details, - )?, - ) + Ok(borsh::from_slice::< + readnode_primitives::CollectingTransactionDetails, + >(&transaction_details)?) } async fn get_receipts_in_cache( @@ -176,14 +165,14 @@ impl crate::TxIndexerDbManager for PostgresDBManager { Ok(result .into_iter() .map(|receipt_outcome| { - let receipt = - near_primitives::views::ReceiptView::try_from_slice(&receipt_outcome.receipt) - .expect("Failed to deserialize receipt"); - let execution_outcome = - near_primitives::views::ExecutionOutcomeWithIdView::try_from_slice( - &receipt_outcome.outcome, - ) - .expect("Failed to deserialize execution outcome"); + let receipt = borsh::from_slice::( + &receipt_outcome.receipt, + ) + .expect("Failed to deserialize receipt"); + let execution_outcome = borsh::from_slice::< + near_primitives::views::ExecutionOutcomeWithIdView, + >(&receipt_outcome.outcome) + .expect("Failed to deserialize execution outcome"); near_indexer_primitives::IndexerExecutionOutcomeWithReceipt { receipt, execution_outcome, diff --git a/database/src/scylladb/mod.rs b/database/src/scylladb/mod.rs index c9e76912..a555c2bc 100644 --- a/database/src/scylladb/mod.rs +++ b/database/src/scylladb/mod.rs @@ -5,6 +5,7 @@ pub mod tx_indexer; use scylla::prepared_statement::PreparedStatement; use scylla::retry_policy::{QueryInfo, RetryDecision}; use scylla::transport::errors::QueryError; +use scylla_cql::types::serialize::row::SerializeRow; #[derive(Debug)] pub struct CustomDBRetryPolicy { @@ -81,7 +82,7 @@ impl Default for CustomRetrySession { impl scylla::retry_policy::RetrySession for CustomRetrySession { /// Called after the query failed - decide what to do next fn decide_should_retry(&mut self, query_info: QueryInfo) -> RetryDecision { - if let scylla::frame::types::LegacyConsistency::Serial(_) = query_info.consistency { + if query_info.consistency.is_serial() { return RetryDecision::DontRetry; }; tracing::warn!("ScyllaDB QueryError: {:?}", query_info.error); @@ -338,7 +339,7 @@ pub trait ScyllaStorageManager { async fn execute_prepared_query( scylla_session: &scylla::Session, query: &PreparedStatement, - values: impl scylla::frame::value::ValueList + std::marker::Send, + values: impl SerializeRow + Send, ) -> anyhow::Result { let result = scylla_session.execute(query, values).await?; @@ -391,7 +392,7 @@ pub trait ScyllaStorageManager { } if let Some(start_at) = tracing_info.started_at { - tracing_info_table.add_row(prettytable::row!["Started at", start_at]); + tracing_info_table.add_row(prettytable::row!["Started at", start_at.0]); } let mut events_table = diff --git a/database/src/scylladb/rpc_server.rs b/database/src/scylladb/rpc_server.rs index a81d82d4..5babc969 100644 --- a/database/src/scylladb/rpc_server.rs +++ b/database/src/scylladb/rpc_server.rs @@ -1,7 +1,6 @@ use std::convert::TryFrom; use std::str::FromStr; -use borsh::{BorshDeserialize, BorshSerialize}; use futures::StreamExt; use num_traits::ToPrimitive; use scylla::{prepared_statement::PreparedStatement, IntoTypedRows}; @@ -27,7 +26,6 @@ pub struct ScyllaDBManager { get_stored_at_block_height_and_shard_id_by_block_height: PreparedStatement, get_validators_by_epoch_id: PreparedStatement, get_validators_by_end_block_height: PreparedStatement, - get_protocol_config_by_epoch_id: PreparedStatement, } #[async_trait::async_trait] @@ -147,10 +145,6 @@ impl ScyllaStorageManager for ScyllaDBManager { &scylla_db_session, "SELECT epoch_id, epoch_height, validators_info FROM state_indexer.validators WHERE epoch_end_height = ?", ).await?, - get_protocol_config_by_epoch_id: Self::prepare_read_query( - &scylla_db_session, - "SELECT protocol_config FROM state_indexer.protocol_configs WHERE epoch_id = ?", - ).await?, })) } } @@ -377,7 +371,7 @@ impl crate::ReaderDbManager for ScyllaDBManager { request_block_height: near_primitives::types::BlockHeight, public_key: near_crypto::PublicKey, ) -> anyhow::Result> { - let key_data = public_key.try_to_vec()?; + let key_data = borsh::to_vec(&public_key)?; let (block_height, block_hash, data_blob) = Self::execute_prepared_query( &self.scylla_session, &self.get_access_key, @@ -465,9 +459,7 @@ impl crate::ReaderDbManager for ScyllaDBManager { .single_row()? .into_typed::<(Vec,)>()?; - Ok(readnode_primitives::TransactionDetails::try_from_slice( - &data_value, - )?) + Ok(borsh::from_slice::(&data_value)?) } /// Returns the readnode_primitives::TransactionDetails @@ -485,7 +477,7 @@ impl crate::ReaderDbManager for ScyllaDBManager { .single_row()? .into_typed::<(Vec,)>()?; let mut transaction_details = - readnode_primitives::CollectingTransactionDetails::try_from_slice(&data_value)?; + borsh::from_slice::(&data_value)?; let mut rows_stream = self .scylla_session @@ -500,9 +492,9 @@ impl crate::ReaderDbManager for ScyllaDBManager { .into_typed::<(Vec, Vec)>(); while let Some(next_row_res) = rows_stream.next().await { let (receipt, outcome) = next_row_res?; - let receipt = near_primitives::views::ReceiptView::try_from_slice(&receipt)?; + let receipt = borsh::from_slice::(&receipt)?; let execution_outcome = - near_primitives::views::ExecutionOutcomeWithIdView::try_from_slice(&outcome)?; + borsh::from_slice::(&outcome)?; transaction_details.receipts.push(receipt); transaction_details .execution_outcomes @@ -596,23 +588,4 @@ impl crate::ReaderDbManager for ScyllaDBManager { validators_info, }) } - - async fn get_protocol_config_by_epoch_id( - &self, - epoch_id: near_primitives::hash::CryptoHash, - ) -> anyhow::Result { - let (protocol_config,) = Self::execute_prepared_query( - &self.scylla_session, - &self.get_protocol_config_by_epoch_id, - (epoch_id.to_string(),), - ) - .await? - .single_row()? - .into_typed::<(String,)>()?; - - let protocol_config: near_chain_configs::ProtocolConfigView = - serde_json::from_str(&protocol_config)?; - - Ok(protocol_config) - } } diff --git a/database/src/scylladb/state_indexer.rs b/database/src/scylladb/state_indexer.rs index 272aac5f..0a2d7271 100644 --- a/database/src/scylladb/state_indexer.rs +++ b/database/src/scylladb/state_indexer.rs @@ -27,9 +27,7 @@ pub struct ScyllaDBManager { add_chunk: PreparedStatement, add_validators: PreparedStatement, - add_protocol_config: PreparedStatement, update_validators_epoch_end_height: PreparedStatement, - update_protocol_config_epoch_end_height: PreparedStatement, add_account_state: PreparedStatement, @@ -178,19 +176,7 @@ impl ScyllaStorageManager for ScyllaDBManager { .await?; scylla_db_session - .query( - " - CREATE TABLE IF NOT EXISTS protocol_configs ( - epoch_id varchar, - epoch_height varint, - epoch_start_height varint, - epoch_end_height varint, - protocol_config text, - PRIMARY KEY (epoch_id) - ) - ", - &[], - ) + .query("DROP TABLE IF EXISTS protocol_configs", &[]) .await?; scylla_db_session @@ -375,23 +361,11 @@ impl ScyllaStorageManager for ScyllaDBManager { VALUES (?, ?, ?, NULL, ?)", ) .await?, - add_protocol_config: Self::prepare_write_query( - &scylla_db_session, - "INSERT INTO state_indexer.protocol_configs - (epoch_id, epoch_height, epoch_start_height, epoch_end_height, protocol_config) - VALUES (?, ?, ?, NULL, ?)", - ) - .await?, update_validators_epoch_end_height: Self::prepare_write_query( &scylla_db_session, "UPDATE state_indexer.validators SET epoch_end_height = ? WHERE epoch_id = ?", ) .await?, - update_protocol_config_epoch_end_height: Self::prepare_write_query( - &scylla_db_session, - "UPDATE state_indexer.protocol_configs SET epoch_end_height = ? WHERE epoch_id = ?", - ) - .await?, add_account_state: Self::prepare_write_query( &scylla_db_session, "INSERT INTO state_indexer.account_state @@ -766,51 +740,21 @@ impl crate::StateIndexerDbManager for ScyllaDBManager { Ok(()) } - async fn add_protocol_config( - &self, - epoch_id: near_indexer_primitives::CryptoHash, - epoch_height: u64, - epoch_start_height: u64, - protocol_config: &near_chain_configs::ProtocolConfigView, - ) -> anyhow::Result<()> { - Self::execute_prepared_query( - &self.scylla_session, - &self.add_protocol_config, - ( - epoch_id.to_string(), - num_bigint::BigInt::from(epoch_height), - num_bigint::BigInt::from(epoch_start_height), - serde_json::to_string(protocol_config)?, - ), - ) - .await?; - Ok(()) - } - async fn update_epoch_end_height( &self, epoch_id: near_indexer_primitives::CryptoHash, epoch_end_block_hash: near_indexer_primitives::CryptoHash, ) -> anyhow::Result<()> { let epoch_end_height = self.get_block_by_hash(epoch_end_block_hash).await?; - - let validators_future = Self::execute_prepared_query( + Self::execute_prepared_query( &self.scylla_session, &self.update_validators_epoch_end_height, ( num_bigint::BigInt::from(epoch_end_height), epoch_id.to_string(), ), - ); - let protocol_config_future = Self::execute_prepared_query( - &self.scylla_session, - &self.update_protocol_config_epoch_end_height, - ( - num_bigint::BigInt::from(epoch_end_height), - epoch_id.to_string(), - ), - ); - futures::future::try_join(validators_future, protocol_config_future).await?; + ) + .await?; Ok(()) } } diff --git a/database/src/scylladb/tx_indexer.rs b/database/src/scylladb/tx_indexer.rs index 08a37bd2..91cc7f87 100644 --- a/database/src/scylladb/tx_indexer.rs +++ b/database/src/scylladb/tx_indexer.rs @@ -1,5 +1,4 @@ use crate::scylladb::ScyllaStorageManager; -use borsh::{BorshDeserialize, BorshSerialize}; use futures::StreamExt; use num_traits::ToPrimitive; use scylla::prepared_statement::PreparedStatement; @@ -54,10 +53,9 @@ impl ScyllaDBManager { .into_typed::<(Vec,)>(); while let Some(next_row_res) = rows_stream.next().await { let (transaction_details,) = next_row_res?; - let transaction_details = - readnode_primitives::CollectingTransactionDetails::try_from_slice( - &transaction_details, - )?; + let transaction_details = borsh::from_slice::< + readnode_primitives::CollectingTransactionDetails, + >(&transaction_details)?; result.push(transaction_details); } Ok(result) @@ -248,9 +246,6 @@ impl crate::TxIndexerDbManager for ScyllaDBManager { transaction: readnode_primitives::TransactionDetails, block_height: u64, ) -> anyhow::Result<()> { - let transaction_details = transaction - .try_to_vec() - .expect("Failed to borsh-serialize the Transaction"); Self::execute_prepared_query( &self.scylla_session, &self.add_transaction, @@ -258,7 +253,7 @@ impl crate::TxIndexerDbManager for ScyllaDBManager { transaction.transaction.hash.to_string(), num_bigint::BigInt::from(block_height), transaction.transaction.signer_id.to_string(), - &transaction_details, + &borsh::to_vec(&transaction)?, ), ) .await?; @@ -302,7 +297,7 @@ impl crate::TxIndexerDbManager for ScyllaDBManager { ) -> anyhow::Result<()> { let transaction_hash = transaction_details.transaction.hash.clone().to_string(); let block_height = transaction_details.block_height; - let transaction_details = transaction_details.try_to_vec().map_err(|err| { + let transaction_details = borsh::to_vec(&transaction_details).map_err(|err| { tracing::error!(target: "tx_indexer", "Failed to serialize transaction details: {:?}", err); err})?; Self::execute_prepared_query( @@ -337,12 +332,8 @@ impl crate::TxIndexerDbManager for ScyllaDBManager { .receipt .receipt_id .to_string(), - indexer_execution_outcome_with_receipt - .receipt - .try_to_vec()?, - indexer_execution_outcome_with_receipt - .execution_outcome - .try_to_vec()?, + borsh::to_vec(&indexer_execution_outcome_with_receipt.receipt)?, + borsh::to_vec(&indexer_execution_outcome_with_receipt.execution_outcome)?, ), ) .await?; @@ -433,11 +424,9 @@ impl crate::TxIndexerDbManager for ScyllaDBManager { .single_row()? .into_typed::<(Vec,)>()?; - Ok( - readnode_primitives::CollectingTransactionDetails::try_from_slice( - &transaction_details, - )?, - ) + Ok(borsh::from_slice::< + readnode_primitives::CollectingTransactionDetails, + >(&transaction_details)?) } async fn get_receipts_in_cache( @@ -458,9 +447,9 @@ impl crate::TxIndexerDbManager for ScyllaDBManager { .into_typed::<(Vec, Vec)>(); while let Some(next_row_res) = rows_stream.next().await { let (receipt, outcome) = next_row_res?; - let receipt = near_primitives::views::ReceiptView::try_from_slice(&receipt)?; + let receipt = borsh::from_slice::(&receipt)?; let execution_outcome = - near_primitives::views::ExecutionOutcomeWithIdView::try_from_slice(&outcome)?; + borsh::from_slice::(&outcome)?; result.push( near_indexer_primitives::IndexerExecutionOutcomeWithReceipt { receipt, diff --git a/docs/RPC_METHODS.md b/docs/RPC_METHODS.md index 48f2bfe4..7d45dae3 100644 --- a/docs/RPC_METHODS.md +++ b/docs/RPC_METHODS.md @@ -1,28 +1,33 @@ -| **Method** | **status** | **Note** | -|---------------------------------|------------|-----------------------------------------------------------------------------| -| block | Included | | -| chunk | Included | | -| query.view_account | Included | | -| query.view_state | Included | | -| view_state_paginated | Included | Custom method. See details [here](../docs/CUSTOM_RPC_METHODS.md) | -| query.view_code | Included | | -| query.view_access_key | Included | | -| query.call_function | Included | | -| query.view_access_key_list | Proxy | Planned. It will be implemented in the future. | -| gas_price | Included | | -| tx | Included | | -| EXPERIMENTAL_tx_status | Included | | -| broadcast_tx_commit | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | -| broadcast_tx_async | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | -| EXPETIMENTAL_receipt | Included | | -| EXPERIMENTAL_changes | Included | | -| EXPERIMENTAL_changes_in_block | Included | | -| network_info | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | -| status | Included | | -| health | Included | Health includes the info about the syncing state of the node of rpc-server. | -| light_client_proof | Proxy | | -| next_light_client_block | Proxy | | -| validators | Included | | -| EXPERIMENTAL_validators_ordered | Proxy | | -| EXPERIMENTAL_genesis_config | Included | Cache it on the start. | -| EXPERIMENTAL_protocol_config | Included | | \ No newline at end of file +| **Method** | **status** | **Note** | +|----------------------------------|---------------|-----------------------------------------------------------------------------| +| view_state_paginated | Included | Custom method. See details [here](../docs/CUSTOM_RPC_METHODS.md) | +| query.view_account | Included | | +| query.view_code | Included | | +| query.view_state | Included | | +| query.call_function | Included | | +| query.view_access_key | Included | | +| query.view_access_key_list | Proxy | Planned. It will be implemented in the future. | +| block | Included | | +| broadcast_tx_async | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | +| broadcast_tx_commit | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | +| chunk | Included | | +| gas_price | Included | | +| health | Included | Health includes the info about the syncing state of the node of rpc-server. | +| light_client_proof | Proxy | | +| next_light_client_block | Proxy | | +| network_info | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | +| status | Included | | +| send_tx | Proxy | PROXY_ONLY. Immediately proxy to a real RPC. | +| tx | Included | | +| validators | Included | | +| client_config | Unimplemented | | +| EXPERIMENTAL_changes | Included | | +| EXPERIMENTAL_changes_in_block | Included | | +| EXPERIMENTAL_genesis_config | Included | Cache it on the start. | +| EXPERIMENTAL_light_client_proof | Proxy | | +| EXPERIMENTAL_protocol_config | Included | | +| EXPETIMENTAL_receipt | Included | | +| EXPERIMENTAL_tx_status | Included | | +| EXPERIMENTAL_validators_ordered | Proxy | | +| EXPERIMENTAL_maintenance_windows | Unimplemented | | +| EXPERIMENTAL_split_storage_info | Unimplemented | | diff --git a/epoch-indexer/Cargo.toml b/epoch-indexer/Cargo.toml index 41a9f7a9..0e47fb8e 100644 --- a/epoch-indexer/Cargo.toml +++ b/epoch-indexer/Cargo.toml @@ -9,9 +9,8 @@ license.workspace = true [dependencies] anyhow = "1.0.70" -clap = { version = "3.1.6", features = ["color", "derive", "env"] } -futures = "0.3.5" -tokio = { version = "1.28.2", features = [ +clap = "4.4.18" +tokio = { version = "1.36.0", features = [ "sync", "time", "macros", @@ -23,10 +22,10 @@ configuration = { path = "../configuration" } database = { path = "../database" } readnode-primitives = { path = "../readnode-primitives" } -near-jsonrpc-client = "0.7.0" -near-chain-configs = "1.36.0" -near-indexer-primitives = "1.36.0" -near-lake-framework = "0.7.9" +near-jsonrpc-client = "0.8.0" +near-chain-configs = "0.20.0" +near-indexer-primitives = "0.20.0" +near-lake-framework = "0.7.7" [features] default = ["scylla_db"] diff --git a/epoch-indexer/src/config.rs b/epoch-indexer/src/config.rs index b6d1e569..d05baf83 100644 --- a/epoch-indexer/src/config.rs +++ b/epoch-indexer/src/config.rs @@ -1,14 +1,6 @@ use clap::{Parser, Subcommand}; #[derive(Parser, Debug)] -#[clap( - version, - author, - about, - setting(clap::AppSettings::DisableHelpSubcommand), - setting(clap::AppSettings::PropagateVersion), - setting(clap::AppSettings::NextLineHelp) -)] pub struct Opts { #[clap(subcommand)] pub start_options: StartOptions, diff --git a/epoch-indexer/src/lib.rs b/epoch-indexer/src/lib.rs index b1c570f8..041b2715 100644 --- a/epoch-indexer/src/lib.rs +++ b/epoch-indexer/src/lib.rs @@ -29,72 +29,18 @@ pub async fn get_epoch_validators( } } -/// util to fetch protocol config by epoch_start_height -/// try_another_blocks - special flag to try another blocks if we have error -/// in case of error we try to fetch protocol config for next block -pub async fn get_protocol_config( - epoch_start_height: u64, - client: &near_jsonrpc_client::JsonRpcClient, - try_another_blocks: bool, -) -> anyhow::Result { - let mut attempt_counter = 0; - let mut block_height = epoch_start_height; - loop { - let params = - near_jsonrpc_client::methods::EXPERIMENTAL_protocol_config::RpcProtocolConfigRequest { - block_reference: near_primitives::types::BlockReference::BlockId( - near_indexer_primitives::types::BlockId::Height(block_height), - ), - }; - match client.call(params).await { - Ok(response) => return Ok(response), - Err(e) => { - attempt_counter += 1; - if try_another_blocks { - block_height += 1; - } - tracing::debug!( - "Attempt: {}. Epoch_start_height {}. Error fetching protocol config: {:?}", - attempt_counter, - block_height, - e - ); - if attempt_counter > 20 { - anyhow::bail!( - "Failed to fetch epoch protocol config for epoch_start_height: {}", - epoch_start_height - ) - } - } - } - } -} - pub async fn get_epoch_info_by_id( epoch_id: CryptoHash, rpc_client: &near_jsonrpc_client::JsonRpcClient, ) -> anyhow::Result { let validators_info = get_epoch_validators(epoch_id, rpc_client).await?; - let protocol_config = - match get_protocol_config(validators_info.epoch_start_height, rpc_client, false).await { - Ok(protocol_config) => protocol_config, - Err(e) => { - tracing::warn!( - "Error fetching protocol config: {:?}. Try with another blocks", - e - ); - get_protocol_config(validators_info.epoch_start_height, rpc_client, true).await? - } - }; - Ok(readnode_primitives::IndexedEpochInfo { epoch_id, epoch_height: validators_info.epoch_height, epoch_start_height: validators_info.epoch_start_height, epoch_end_height: None, validators_info, - protocol_config, }) } @@ -219,21 +165,14 @@ pub async fn save_epoch_info( epoch.epoch_height }; - let save_validators_feature = db_manager.add_validators( - epoch.epoch_id, - epoch_height, - epoch.epoch_start_height, - &epoch.validators_info, - ); - - let save_protocol_config_feature = db_manager.add_protocol_config( - epoch.epoch_id, - epoch_height, - epoch.epoch_start_height, - &epoch.protocol_config, - ); - - futures::try_join!(save_validators_feature, save_protocol_config_feature)?; + db_manager + .add_validators( + epoch.epoch_id, + epoch_height, + epoch.epoch_start_height, + &epoch.validators_info, + ) + .await?; tracing::info!( "Save epoch info: epoch_id: {:?}, epoch_height: {:?}, epoch_start_height: {}", epoch.epoch_id, diff --git a/perf-testing/Cargo.toml b/perf-testing/Cargo.toml index a941abdc..f4f9e5b6 100644 --- a/perf-testing/Cargo.toml +++ b/perf-testing/Cargo.toml @@ -10,15 +10,15 @@ license.workspace = true [dependencies] anyhow = "1.0.70" chrono = "0.4.26" -clap = { version = "4.3.21", features = ["color", "derive", "env"] } +clap = { version = "4.4.18", features = ["color", "derive", "env"] } dotenv = "0.15" futures = "0.3.28" -http = "0.2.8" +http = "1.0.0" rand = "0.8" serde_json = "1.0" tokio = { version = "1.28.2", features = ["full", "tracing"] } tracing = "0.1.34" -near-jsonrpc-client = "0.7.0" -near-jsonrpc-primitives = "1.36.0" -near-primitives = "1.36.0" +near-jsonrpc-client = "0.8.0" +near-jsonrpc-primitives = "0.20.0" +near-primitives = "0.20.0" diff --git a/perf-testing/src/transactions.rs b/perf-testing/src/transactions.rs index 75a215b2..52965a17 100644 --- a/perf-testing/src/transactions.rs +++ b/perf-testing/src/transactions.rs @@ -10,8 +10,8 @@ async fn get_random_transaction(tx: &TxInfo, client: &JsonRpcClient) -> anyhow:: let _ = client .call(methods::tx::RpcTransactionStatusRequest { transaction_info: TransactionInfo::TransactionId { - hash: tx.hash, - account_id: tx.sender_id.clone(), + tx_hash: tx.hash, + sender_account_id: tx.sender_id.clone(), }, }) .await?; diff --git a/readnode-primitives/Cargo.toml b/readnode-primitives/Cargo.toml index 0c278267..a3cd7012 100644 --- a/readnode-primitives/Cargo.toml +++ b/readnode-primitives/Cargo.toml @@ -9,11 +9,10 @@ license.workspace = true [dependencies] anyhow = "1.0.70" -borsh = "0.10.2" -num-bigint = "0.3" +borsh = "1.3.1" num-traits = "0.2.15" serde = { version = "1.0.145", features = ["derive"] } serde_json = "1.0.85" -near-chain-configs = "1.36.0" -near-indexer-primitives = "1.36.0" +near-chain-configs = "0.20.0" +near-indexer-primitives = "0.20.0" diff --git a/readnode-primitives/src/lib.rs b/readnode-primitives/src/lib.rs index 96f1e999..c1602c90 100644 --- a/readnode-primitives/src/lib.rs +++ b/readnode-primitives/src/lib.rs @@ -1,7 +1,6 @@ use std::convert::TryFrom; use std::str::FromStr; -use borsh::{BorshDeserialize, BorshSerialize}; use near_indexer_primitives::{views, CryptoHash, IndexerTransactionWithOutcome}; use num_traits::ToPrimitive; use serde::{Deserialize, Serialize}; @@ -21,7 +20,7 @@ impl TransactionKey { } } -#[derive(BorshSerialize, BorshDeserialize, Serialize, Deserialize, Debug, Clone)] +#[derive(borsh::BorshSerialize, borsh::BorshDeserialize, Serialize, Deserialize, Debug, Clone)] pub struct CollectingTransactionDetails { pub transaction: views::SignedTransactionView, pub receipts: Vec, @@ -117,7 +116,7 @@ impl From for TransactionDetails { } } -#[derive(BorshSerialize, BorshDeserialize, Serialize, Deserialize, Debug, Clone)] +#[derive(borsh::BorshSerialize, borsh::BorshDeserialize, Serialize, Deserialize, Debug, Clone)] pub struct TransactionDetails { pub receipts: Vec, pub receipts_outcome: Vec, @@ -169,7 +168,7 @@ impl TransactionDetails { pub type StateKey = Vec; pub type StateValue = Vec; pub struct BlockHeightShardId(pub u64, pub u64); -pub struct QueryData { +pub struct QueryData { pub data: T, // block_height and block_hash we return here represents the moment // when the data was last updated in the database @@ -198,14 +197,6 @@ pub struct EpochValidatorsInfo { pub validators_info: views::EpochValidatorInfo, } -#[derive(Debug)] -pub struct ProtocolConfig { - pub epoch_id: CryptoHash, - pub epoch_height: u64, - pub epoch_start_height: u64, - pub protocol_config: near_chain_configs::ProtocolConfigView, -} - #[derive(Debug)] pub struct IndexedEpochInfo { pub epoch_id: CryptoHash, @@ -213,7 +204,6 @@ pub struct IndexedEpochInfo { pub epoch_start_height: u64, pub epoch_end_height: Option, pub validators_info: views::EpochValidatorInfo, - pub protocol_config: near_chain_configs::ProtocolConfigView, } #[derive(Debug)] @@ -253,7 +243,7 @@ impl CryptoHash, )> for QueryData where - T: BorshDeserialize, + T: borsh::BorshDeserialize, { type Error = anyhow::Error; diff --git a/rpc-server/Cargo.toml b/rpc-server/Cargo.toml index 4133ea2b..84e41bed 100644 --- a/rpc-server/Cargo.toml +++ b/rpc-server/Cargo.toml @@ -8,42 +8,44 @@ repository.workspace = true license.workspace = true [dependencies] -actix-web = "4.2.1" -actix-cors = "0.6.5" +actix-web = "4.5.1" +actix-cors = "0.7.0" anyhow = "1.0.70" assert-json-diff = { version = "2.0.2", optional = true } -borsh = "0.10.2" -erased-serde = "0.3.23" +borsh = "1.3.1" +erased-serde = "0.4.2" futures = "0.3.24" futures-locks = "0.7.1" hex = "0.4.3" -jsonrpc-v2 = { git = "https://github.com/kobayurii/jsonrpc-v2", rev = "95e7b1d2567ae841163af212a3f25abb6862becb" } +jsonrpc-v2 = { git = "https://github.com/kobayurii/jsonrpc-v2", branch = "master" } lazy_static = "1.4.0" -lru = "0.11.1" +lru = "0.12.2" paste = "1.0.14" prometheus = "0.13.1" serde = { version = "1.0.145", features = ["derive"] } serde_json = "1.0.85" thiserror = "1.0.40" -tokio = { version = "1.28.2", features = ["full", "tracing"] } +tokio = { version = "1.36.0", features = ["full", "tracing"] } tokio-stream = { version = "0.1.12" } tracing = { version = "0.1.36", features = ["std"] } -tracing-actix-web = "0.6.1" -sysinfo = "0.29.10" +tracing-actix-web = "0.7.9" +sysinfo = "0.30.5" configuration = { path = "../configuration" } database = { path = "../database" } readnode-primitives = { path = "../readnode-primitives" } -near-chain-configs = "1.36.0" -near-crypto = "1.36.0" -near-jsonrpc-client = "0.7.0" -near-jsonrpc-primitives = "1.36.0" -near-indexer-primitives = "1.36.0" -near-lake-framework = "0.7.9" -near-primitives = "1.36.0" -near-vm-runner = "1.36.0" +near-chain-configs = "0.20.0" +near-crypto = "0.20.0" +#near-jsonrpc-client = "0.8.0" Supports of nearcore 1.37 will be released in the next version +near-jsonrpc-client = {git = "https://github.com/near/near-jsonrpc-client-rs.git", branch = "telezhnaya/wait_until"} +near-jsonrpc-primitives = "0.20.0" +near-indexer-primitives = "0.20.0" +near-lake-framework = "0.7.7" +near-primitives = "0.20.0" +near-parameters = "0.20.0" +near-vm-runner = "0.20.0" [features] default = ["send_tx_methods", "scylla_db"] diff --git a/rpc-server/Dockerfile b/rpc-server/Dockerfile index d77fea83..a0c4147b 100644 --- a/rpc-server/Dockerfile +++ b/rpc-server/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.73 AS builder +FROM rust:1.75 AS builder ARG features="default" WORKDIR /tmp/ diff --git a/rpc-server/src/config.rs b/rpc-server/src/config.rs index 37d841da..fc6a1b38 100644 --- a/rpc-server/src/config.rs +++ b/rpc-server/src/config.rs @@ -4,9 +4,9 @@ use std::string::ToString; // TODO: Improve versioning in future. // For now, it's hardcoded and should be updated manually at each release.. -static NEARD_VERSION: &str = "1.36.0"; -static NEARD_BUILD: &str = "1.36.0"; -static RUSTC_VERSION: &str = "1.73.0"; +static NEARD_VERSION: &str = "1.37.0"; +static NEARD_BUILD: &str = "1.37.0"; +static RUSTC_VERSION: &str = "1.75.0"; // Struct to store genesis_config and genesis_block in the server context // Fetch once genesis info on start of the server and put it in the context diff --git a/rpc-server/src/errors.rs b/rpc-server/src/errors.rs index e0922b4f..c052c869 100644 --- a/rpc-server/src/errors.rs +++ b/rpc-server/src/errors.rs @@ -9,10 +9,14 @@ type BoxedSerialize = Box; pub struct RPCError(pub(crate) near_jsonrpc_primitives::errors::RpcError); impl RPCError { - pub(crate) fn unimplemented_error(msg: &str) -> Self { + pub(crate) fn unimplemented_error(method_name: &str) -> Self { Self::from(near_jsonrpc_primitives::errors::RpcError::new( -32601, - String::from(msg), + format!( + "Method `{}` is not implemented on this type of node. \ + Please send a request to NEAR JSON RPC instead.", + method_name + ), None, )) } diff --git a/rpc-server/src/health.rs b/rpc-server/src/health.rs index 9288488d..30e35bc9 100644 --- a/rpc-server/src/health.rs +++ b/rpc-server/src/health.rs @@ -1,7 +1,7 @@ use crate::config::ServerContext; use crate::utils::friendly_memory_size_format; use actix_web::Responder; -use sysinfo::{System, SystemExt}; +use sysinfo::System; #[derive(Debug, serde::Serialize, serde::Deserialize)] pub struct RPCHealthStatusResponse { diff --git a/rpc-server/src/main.rs b/rpc-server/src/main.rs index 3a30e7b2..c5689a38 100644 --- a/rpc-server/src/main.rs +++ b/rpc-server/src/main.rs @@ -52,36 +52,25 @@ async fn main() -> anyhow::Result<()> { let rpc = Server::new() .with_data(Data::new(server_context.clone())) - .with_method("query", modules::queries::methods::query) + // custom requests methods .with_method( "view_state_paginated", modules::state::methods::view_state_paginated, ) + // requests methods + .with_method("query", modules::queries::methods::query) + // basic requests methods .with_method("block", modules::blocks::methods::block) - .with_method( - "EXPERIMENTAL_changes", - modules::blocks::methods::changes_in_block_by_type, - ) - .with_method( - "EXPERIMENTAL_changes_in_block", - modules::blocks::methods::changes_in_block, - ) - .with_method("chunk", modules::blocks::methods::chunk) - .with_method("tx", modules::transactions::methods::tx) - .with_method( - "EXPERIMENTAL_tx_status", - modules::transactions::methods::tx_status, - ) .with_method( "broadcast_tx_async", - modules::transactions::methods::send_tx_async, + modules::transactions::methods::broadcast_tx_async, ) .with_method( "broadcast_tx_commit", - modules::transactions::methods::send_tx_commit, + modules::transactions::methods::broadcast_tx_commit, ) + .with_method("chunk", modules::blocks::methods::chunk) .with_method("gas_price", modules::gas::methods::gas_price) - .with_method("status", modules::network::methods::status) .with_method("health", modules::network::methods::health) .with_method( "light_client_proof", @@ -92,10 +81,18 @@ async fn main() -> anyhow::Result<()> { modules::clients::methods::next_light_client_block, ) .with_method("network_info", modules::network::methods::network_info) + .with_method("send_tx", modules::transactions::methods::send_tx) + .with_method("status", modules::network::methods::status) + .with_method("tx", modules::transactions::methods::tx) .with_method("validators", modules::network::methods::validators) + .with_method("client_config", modules::network::methods::client_config) .with_method( - "EXPERIMENTAL_validators_ordered", - modules::network::methods::validators_ordered, + "EXPERIMENTAL_changes", + modules::blocks::methods::changes_in_block_by_type, + ) + .with_method( + "EXPERIMENTAL_changes_in_block", + modules::blocks::methods::changes_in_block, ) .with_method( "EXPERIMENTAL_genesis_config", @@ -110,6 +107,22 @@ async fn main() -> anyhow::Result<()> { modules::network::methods::protocol_config, ) .with_method("EXPERIMENTAL_receipt", modules::receipts::methods::receipt) + .with_method( + "EXPERIMENTAL_tx_status", + modules::transactions::methods::tx_status, + ) + .with_method( + "EXPERIMENTAL_validators_ordered", + modules::network::methods::validators_ordered, + ) + .with_method( + "EXPERIMENTAL_maintenance_windows", + modules::network::methods::maintenance_windows, + ) + .with_method( + "EXPERIMENTAL_split_storage_info", + modules::network::methods::split_storage_info, + ) .finish(); actix_web::HttpServer::new(move || { diff --git a/rpc-server/src/modules/blocks/mod.rs b/rpc-server/src/modules/blocks/mod.rs index d1589293..48aeb894 100644 --- a/rpc-server/src/modules/blocks/mod.rs +++ b/rpc-server/src/modules/blocks/mod.rs @@ -31,7 +31,6 @@ impl From for CacheBlock { #[derive(Debug)] pub struct FinalBlockInfo { pub final_block_cache: CacheBlock, - pub current_protocol_config: near_chain_configs::ProtocolConfigView, pub current_validators: near_primitives::views::EpochValidatorInfo, } @@ -45,9 +44,6 @@ impl FinalBlockInfo { let final_block = crate::utils::get_final_cache_block(near_rpc_client) .await .expect("Error to get final block"); - let protocol_config = crate::utils::get_current_protocol_config(near_rpc_client) - .await - .expect("Error to get protocol_config"); let validators = crate::utils::get_current_validators(near_rpc_client) .await @@ -60,7 +56,6 @@ impl FinalBlockInfo { Self { final_block_cache: final_block, - current_protocol_config: protocol_config, current_validators: validators, } } diff --git a/rpc-server/src/modules/network/methods.rs b/rpc-server/src/modules/network/methods.rs index 58f023be..0a472040 100644 --- a/rpc-server/src/modules/network/methods.rs +++ b/rpc-server/src/modules/network/methods.rs @@ -5,7 +5,28 @@ use near_primitives::utils::from_timestamp; use crate::config::ServerContext; use crate::errors::RPCError; use crate::modules::blocks::utils::fetch_block_from_cache_or_get; -use crate::modules::network::{clone_protocol_config, parse_validator_request}; +use crate::modules::network::parse_validator_request; + +pub async fn client_config( + _data: Data, + Params(_params): Params, +) -> Result<(), RPCError> { + Err(RPCError::unimplemented_error("client_config")) +} + +pub async fn maintenance_windows( + _data: Data, + Params(_params): Params, +) -> Result<(), RPCError> { + Err(RPCError::unimplemented_error("maintenance_windows")) +} + +pub async fn split_storage_info( + _data: Data, + Params(_params): Params, +) -> Result<(), RPCError> { + Err(RPCError::unimplemented_error("split_storage_info")) +} pub async fn status( data: Data, @@ -70,11 +91,13 @@ pub async fn health( } pub async fn network_info( + data: Data, Params(_params): Params, ) -> Result { - Err(RPCError::unimplemented_error( - "Method is not implemented on this type of node. Please send a request to NEAR JSON RPC instead.", - )) + Ok(data + .near_rpc_client + .call(near_jsonrpc_client::methods::network_info::RpcNetworkInfoRequest) + .await?) } pub async fn validators( @@ -235,25 +258,18 @@ async fn protocol_config_call( error_message: err.to_string(), } })?; - let protocol_config = if data - .final_block_info - .read() - .await - .final_block_cache - .epoch_id - == block.epoch_id - { - let protocol_config = &data.final_block_info.read().await.current_protocol_config; - clone_protocol_config(protocol_config) - } else { - data.db_manager - .get_protocol_config_by_epoch_id(block.epoch_id) - .await - .map_err(|err| { - near_jsonrpc_primitives::types::config::RpcProtocolConfigError::InternalError { - error_message: err.to_string(), - } - })? + + let store = near_parameters::RuntimeConfigStore::for_chain_id( + &data.genesis_info.genesis_config.chain_id, + ); + let runtime_config = store.get_config(block.latest_protocol_version); + let protocol_config = near_chain_configs::ProtocolConfig { + genesis_config: data.genesis_info.genesis_config.clone(), + runtime_config: near_parameters::RuntimeConfig { + fees: runtime_config.fees.clone(), + wasm_config: runtime_config.wasm_config.clone(), + account_creation_config: runtime_config.account_creation_config.clone(), + }, }; - Ok(protocol_config) + Ok(protocol_config.into()) } diff --git a/rpc-server/src/modules/network/mod.rs b/rpc-server/src/modules/network/mod.rs index f424168b..c2a2e208 100644 --- a/rpc-server/src/modules/network/mod.rs +++ b/rpc-server/src/modules/network/mod.rs @@ -20,43 +20,3 @@ async fn parse_validator_request( }; Ok(request) } - -/// cannot move out of dereference of `futures_locks::RwLockReadGuard` -/// move occurs because value `current_protocol_config` has type `ProtocolConfigView`, -/// which does not implement the `Copy` trait -pub fn clone_protocol_config( - protocol_config: &near_chain_configs::ProtocolConfigView, -) -> near_chain_configs::ProtocolConfigView { - near_chain_configs::ProtocolConfigView { - protocol_version: protocol_config.protocol_version, - genesis_time: protocol_config.genesis_time, - chain_id: protocol_config.chain_id.clone(), - genesis_height: protocol_config.genesis_height, - num_block_producer_seats: protocol_config.num_block_producer_seats, - num_block_producer_seats_per_shard: protocol_config - .num_block_producer_seats_per_shard - .clone(), - avg_hidden_validator_seats_per_shard: protocol_config - .avg_hidden_validator_seats_per_shard - .clone(), - dynamic_resharding: protocol_config.dynamic_resharding, - protocol_upgrade_stake_threshold: protocol_config.protocol_upgrade_stake_threshold, - epoch_length: protocol_config.epoch_length, - gas_limit: protocol_config.gas_limit, - min_gas_price: protocol_config.min_gas_price, - max_gas_price: protocol_config.max_gas_price, - block_producer_kickout_threshold: protocol_config.block_producer_kickout_threshold, - chunk_producer_kickout_threshold: protocol_config.chunk_producer_kickout_threshold, - online_min_threshold: protocol_config.online_min_threshold, - online_max_threshold: protocol_config.online_max_threshold, - gas_price_adjustment_rate: protocol_config.gas_price_adjustment_rate, - runtime_config: protocol_config.runtime_config.clone(), - transaction_validity_period: protocol_config.transaction_validity_period, - protocol_reward_rate: protocol_config.protocol_reward_rate, - max_inflation_rate: protocol_config.max_inflation_rate, - num_blocks_per_year: protocol_config.num_blocks_per_year, - protocol_treasury_account: protocol_config.protocol_treasury_account.clone(), - fishermen_threshold: protocol_config.fishermen_threshold, - minimum_stake_divisor: protocol_config.minimum_stake_divisor, - } -} diff --git a/rpc-server/src/modules/queries/methods.rs b/rpc-server/src/modules/queries/methods.rs index 11f7a5c6..f9976ccf 100644 --- a/rpc-server/src/modules/queries/methods.rs +++ b/rpc-server/src/modules/queries/methods.rs @@ -301,12 +301,10 @@ async fn view_code( )?; Ok(near_jsonrpc_primitives::types::query::RpcQueryResponse { kind: near_jsonrpc_primitives::types::query::QueryResponseKind::ViewCode( - near_primitives::views::ContractCodeView::from( - near_primitives::contract::ContractCode::new( - contract_code.data, - Some(contract.data.code_hash()), - ), - ), + near_primitives::views::ContractCodeView { + code: contract_code.data, + hash: contract.data.code_hash(), + }, ), block_height: block.block_height, block_hash: block.block_hash, diff --git a/rpc-server/src/modules/queries/mod.rs b/rpc-server/src/modules/queries/mod.rs index 3b192147..a57d0430 100644 --- a/rpc-server/src/modules/queries/mod.rs +++ b/rpc-server/src/modules/queries/mod.rs @@ -122,8 +122,8 @@ impl near_vm_runner::logic::External for CodeStorage { } #[cfg_attr(feature = "tracing-instrumentation", tracing::instrument(skip(self)))] - fn get_trie_nodes_count(&self) -> near_primitives::types::TrieNodesCount { - near_primitives::types::TrieNodesCount { + fn get_trie_nodes_count(&self) -> near_vm_runner::logic::TrieNodesCount { + near_vm_runner::logic::TrieNodesCount { db_reads: 0, mem_reads: 0, } @@ -141,4 +141,101 @@ impl near_vm_runner::logic::External for CodeStorage { fn validator_total_stake(&self) -> Result { Ok(self.validators.values().sum()) } + + fn create_receipt( + &mut self, + _receipt_indices: Vec, + _receiver_id: near_primitives::types::AccountId, + ) -> Result { + Err(near_vm_runner::logic::VMLogicError::HostError( + near_vm_runner::logic::HostError::ProhibitedInView { + method_name: String::from("create_receipt"), + }, + )) + } + + fn append_action_create_account( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + ) -> Result<()> { + Ok(()) + } + + fn append_action_deploy_contract( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _code: Vec, + ) -> Result<()> { + Ok(()) + } + + fn append_action_function_call_weight( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _method_name: Vec, + _args: Vec, + _attached_deposit: near_primitives::types::Balance, + _prepaid_gas: near_primitives::types::Gas, + _gas_weight: near_primitives::types::GasWeight, + ) -> Result<()> { + Ok(()) + } + + fn append_action_transfer( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _deposit: near_primitives::types::Balance, + ) -> Result<()> { + Ok(()) + } + + fn append_action_stake( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _stake: near_primitives::types::Balance, + _public_key: near_crypto::PublicKey, + ) { + } + + fn append_action_add_key_with_full_access( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _public_key: near_crypto::PublicKey, + _nonce: near_primitives::types::Nonce, + ) { + } + + fn append_action_add_key_with_function_call( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _public_key: near_crypto::PublicKey, + _nonce: near_primitives::types::Nonce, + _allowance: Option, + _receiver_id: near_primitives::types::AccountId, + _method_names: Vec>, + ) -> Result<()> { + Ok(()) + } + + fn append_action_delete_key( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _public_key: near_crypto::PublicKey, + ) { + } + + fn append_action_delete_account( + &mut self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + _beneficiary_id: near_primitives::types::AccountId, + ) -> Result<()> { + Ok(()) + } + + fn get_receipt_receiver( + &self, + _receipt_index: near_vm_runner::logic::types::ReceiptIndex, + ) -> &near_primitives::types::AccountId { + panic!("Prohibited in view. `get_receipt_receiver`"); + } } diff --git a/rpc-server/src/modules/queries/utils.rs b/rpc-server/src/modules/queries/utils.rs index 04e974ec..53b7bfc0 100644 --- a/rpc-server/src/modules/queries/utils.rs +++ b/rpc-server/src/modules/queries/utils.rs @@ -1,13 +1,7 @@ use std::collections::HashMap; use std::ops::Deref; -#[cfg(feature = "account_access_keys")] -use borsh::BorshDeserialize; -use borsh::BorshSerialize; use futures::StreamExt; -use near_crypto::{KeyType, PublicKey}; -use near_primitives::utils::create_random_seed; -use tokio::task; use crate::config::CompiledCodeCache; use crate::errors::FunctionCallError; @@ -91,12 +85,12 @@ pub async fn fetch_list_access_keys_from_db( .into_iter() .map( |(public_key_hex, access_key)| near_primitives::views::AccessKeyInfoView { - public_key: near_crypto::PublicKey::try_from_slice( + public_key: borsh::from_slice::( &hex::decode(public_key_hex).unwrap(), ) .unwrap(), access_key: near_primitives::views::AccessKeyView::from( - near_primitives::account::AccessKey::try_from_slice(&access_key).unwrap(), + borsh::from_slice::(&access_key).unwrap(), ), }, ) @@ -144,26 +138,32 @@ pub async fn fetch_state_from_db( tracing::instrument(skip(context, code_storage, contract_code, compiled_contract_code_cache)) )] async fn run_code_in_vm_runner( - contract_code: near_primitives::contract::ContractCode, + contract_code: near_vm_runner::ContractCode, method_name: &str, context: near_vm_runner::logic::VMContext, mut code_storage: CodeStorage, - latest_protocol_version: near_primitives::types::ProtocolVersion, + protocol_version: near_primitives::types::ProtocolVersion, compiled_contract_code_cache: &std::sync::Arc, ) -> Result { let contract_method_name = String::from(method_name); let code_cache = std::sync::Arc::clone(compiled_contract_code_cache); - let results = task::spawn_blocking(move || { + let store = near_parameters::RuntimeConfigStore::free(); + let config = store.get_config(protocol_version).wasm_config.clone(); + let mut vm_config = near_parameters::vm::Config { + vm_kind: config.vm_kind.replace_with_wasmtime_if_unsupported(), + ..config + }; + vm_config.make_free(); + let results = tokio::task::spawn_blocking(move || { near_vm_runner::run( &contract_code, &contract_method_name, &mut code_storage, context, - &near_vm_runner::logic::VMConfig::free(), - &near_primitives::runtime::fees::RuntimeFeesConfig::free(), + &vm_config, + &near_parameters::RuntimeFeesConfig::free(), &[], - latest_protocol_version, Some(code_cache.deref()), ) }) @@ -247,9 +247,7 @@ pub async fn run_contract( .cloned(); let contract_code = match code { - Some(code) => { - near_primitives::contract::ContractCode::new(code, Some(contract.data.code_hash())) - } + Some(code) => near_vm_runner::ContractCode::new(code, Some(contract.data.code_hash())), None => { let code = db_manager .get_contract_code(&account_id, block.block_height) @@ -261,7 +259,7 @@ pub async fn run_contract( .write() .await .put(contract.data.code_hash(), code.data.clone()); - near_primitives::contract::ContractCode::new(code.data, Some(contract.data.code_hash())) + near_vm_runner::ContractCode::new(code.data, Some(contract.data.code_hash())) } }; @@ -282,17 +280,17 @@ pub async fn run_contract( ) }; - let public_key = PublicKey::empty(KeyType::ED25519); - let random_seed = create_random_seed( + let public_key = near_crypto::PublicKey::empty(near_crypto::KeyType::ED25519); + let random_seed = near_primitives::utils::create_random_seed( block.latest_protocol_version, near_primitives::hash::CryptoHash::default(), block.state_root, ); let context = near_vm_runner::logic::VMContext { - current_account_id: account_id.parse().unwrap(), - signer_account_id: account_id.parse().unwrap(), - signer_account_pk: public_key.try_to_vec().expect("Failed to serialize"), - predecessor_account_id: account_id.parse().unwrap(), + current_account_id: account_id.clone(), + signer_account_id: account_id.clone(), + signer_account_pk: borsh::to_vec(&public_key).expect("Failed to serialize"), + predecessor_account_id: account_id.clone(), input: args.into(), block_height: block.block_height, block_timestamp: block.block_timestamp, @@ -303,13 +301,13 @@ pub async fn run_contract( attached_deposit: 0, prepaid_gas: max_gas_burnt, random_seed, - view_config: Some(near_vm_runner::logic::ViewConfig { max_gas_burnt }), + view_config: Some(near_primitives::config::ViewConfig { max_gas_burnt }), output_data_receivers: vec![], }; let code_storage = CodeStorage::init( db_manager.clone(), - account_id.clone(), + account_id, block.block_height, epoch_validators .iter() diff --git a/rpc-server/src/modules/transactions/methods.rs b/rpc-server/src/modules/transactions/methods.rs index 6962a9c4..dbadbb97 100644 --- a/rpc-server/src/modules/transactions/methods.rs +++ b/rpc-server/src/modules/transactions/methods.rs @@ -9,6 +9,13 @@ use near_primitives::views::FinalExecutionOutcomeViewEnum::{ }; use serde_json::Value; +pub async fn send_tx( + data: Data, + Params(params): Params, +) -> Result { + Ok(data.near_rpc_client.call(params).await?) +} + /// Queries status of a transaction by hash and returns the final transaction result. #[cfg_attr(feature = "tracing-instrumentation", tracing::instrument(skip(data)))] pub async fn tx( @@ -32,8 +39,10 @@ pub async fn tx( // Note there is a difference in the implementation of the `tx` method in the `near_jsonrpc_client` // The method is `near_jsonrpc_client::methods::tx::RpcTransactionStatusRequest` in the client // so we can't just pass `params` there, instead we need to craft a request manually + // tx_status_request, near_jsonrpc_client::methods::tx::RpcTransactionStatusRequest { transaction_info: tx_status_request.transaction_info, + wait_until: tx_status_request.wait_until, }, "TX", ) @@ -71,6 +80,7 @@ pub async fn tx_status( // so we can't just pass `params` there, instead we need to craft a request manually near_jsonrpc_client::methods::EXPERIMENTAL_tx_status::RpcTransactionStatusRequest { transaction_info: tx_status_request.transaction_info, + wait_until: tx_status_request.wait_until, }, "EXPERIMENTAL_TX_STATUS", ) @@ -84,11 +94,11 @@ pub async fn tx_status( } #[cfg_attr(feature = "tracing-instrumentation", tracing::instrument(skip(data)))] -pub async fn send_tx_async( +pub async fn broadcast_tx_async( data: Data, Params(params): Params, ) -> Result { - tracing::debug!("`send_tx_async` call. Params: {:?}", params); + tracing::debug!("`broadcast_tx_async` call. Params: {:?}", params); if cfg!(feature = "send_tx_methods") { let signed_transaction = match parse_signed_transaction(params).await { Ok(signed_transaction) => signed_transaction, @@ -110,11 +120,11 @@ pub async fn send_tx_async( } #[cfg_attr(feature = "tracing-instrumentation", tracing::instrument(skip(data)))] -pub async fn send_tx_commit( +pub async fn broadcast_tx_commit( data: Data, Params(params): Params, ) -> Result { - tracing::debug!("`send_tx_commit` call. Params: {:?}", params); + tracing::debug!("`broadcast_tx_commit` call. Params: {:?}", params); if cfg!(feature = "send_tx_methods") { let signed_transaction = match parse_signed_transaction(params).await { Ok(signed_transaction) => signed_transaction, @@ -127,7 +137,11 @@ pub async fn send_tx_commit( match data.near_rpc_client.call(proxy_params).await { Ok(resp) => Ok( near_jsonrpc_primitives::types::transactions::RpcTransactionResponse { - final_execution_outcome: FinalExecutionOutcome(resp), + final_execution_outcome: Some(FinalExecutionOutcome(resp)), + // With the fact that we don't support non-finalised data yet, + // final_execution_status field can be always filled with FINAL. + // This logic will be more complicated when we add support of optimistic blocks. + final_execution_status: near_primitives::views::TxExecutionStatus::Final, }, ), Err(err) => Err(RPCError::from(err)), @@ -153,13 +167,13 @@ async fn tx_status_common( > { tracing::debug!("`tx_status_common` call."); let tx_hash = match &transaction_info { - near_jsonrpc_primitives::types::transactions::TransactionInfo::Transaction(tx) => { - tx.get_hash() - } + near_jsonrpc_primitives::types::transactions::TransactionInfo::Transaction( + near_jsonrpc_primitives::types::transactions::SignedTransaction::SignedTransaction(tx), + ) => tx.get_hash(), near_jsonrpc_primitives::types::transactions::TransactionInfo::TransactionId { - hash, + tx_hash, .. - } => *hash, + } => *tx_hash, }; let transaction_details = data @@ -175,17 +189,25 @@ async fn tx_status_common( if fetch_receipt { Ok( near_jsonrpc_primitives::types::transactions::RpcTransactionResponse { - final_execution_outcome: FinalExecutionOutcomeWithReceipt( + final_execution_outcome: Some(FinalExecutionOutcomeWithReceipt( transaction_details.to_final_execution_outcome_with_receipts(), - ), + )), + // With the fact that we don't support non-finalised data yet, + // final_execution_status field can be always filled with FINAL. + // This logic will be more complicated when we add support of optimistic blocks. + final_execution_status: near_primitives::views::TxExecutionStatus::Final, }, ) } else { Ok( near_jsonrpc_primitives::types::transactions::RpcTransactionResponse { - final_execution_outcome: FinalExecutionOutcome( + final_execution_outcome: Some(FinalExecutionOutcome( transaction_details.to_final_execution_outcome(), - ), + )), + // With the fact that we don't support non-finalised data yet, + // final_execution_status field can be always filled with FINAL. + // This logic will be more complicated when we add support of optimistic blocks. + final_execution_status: near_primitives::views::TxExecutionStatus::Final, }, ) } diff --git a/rpc-server/src/modules/transactions/mod.rs b/rpc-server/src/modules/transactions/mod.rs index cfec468f..8faff763 100644 --- a/rpc-server/src/modules/transactions/mod.rs +++ b/rpc-server/src/modules/transactions/mod.rs @@ -6,23 +6,24 @@ use serde_json::Value; pub async fn parse_transaction_status_common_request( value: Value, ) -> Result< - near_jsonrpc_primitives::types::transactions::RpcTransactionStatusCommonRequest, + near_jsonrpc_primitives::types::transactions::RpcTransactionStatusRequest, near_jsonrpc_primitives::errors::RpcError, > { tracing::debug!("`parse_transaction_status_common_request` call."); - if let Ok((hash, account_id)) = serde_json::from_value::<( + if let Ok((tx_hash, sender_account_id)) = serde_json::from_value::<( near_primitives::hash::CryptoHash, near_primitives::types::AccountId, )>(value.clone()) { let transaction_info = near_jsonrpc_primitives::types::transactions::TransactionInfo::TransactionId { - hash, - account_id, + tx_hash, + sender_account_id, }; Ok( - near_jsonrpc_primitives::types::transactions::RpcTransactionStatusCommonRequest { + near_jsonrpc_primitives::types::transactions::RpcTransactionStatusRequest { transaction_info, + wait_until: near_primitives::views::TxExecutionStatus::Final, }, ) } else { @@ -32,11 +33,14 @@ pub async fn parse_transaction_status_common_request( let transaction_info = near_jsonrpc_primitives::types::transactions::TransactionInfo::Transaction( - signed_transaction, + near_jsonrpc_primitives::types::transactions::SignedTransaction::SignedTransaction( + signed_transaction, + ), ); Ok( - near_jsonrpc_primitives::types::transactions::RpcTransactionStatusCommonRequest { + near_jsonrpc_primitives::types::transactions::RpcTransactionStatusRequest { transaction_info, + wait_until: near_primitives::views::TxExecutionStatus::Final, }, ) } diff --git a/rpc-server/src/utils.rs b/rpc-server/src/utils.rs index b8701fbd..ee746a3a 100644 --- a/rpc-server/src/utils.rs +++ b/rpc-server/src/utils.rs @@ -2,7 +2,6 @@ use crate::modules::blocks::{CacheBlock, FinalBlockInfo}; #[cfg(feature = "shadow_data_consistency")] use assert_json_diff::{assert_json_matches_no_panic, CompareMode, Config, NumericMode}; use futures::StreamExt; -use sysinfo::{System, SystemExt}; #[cfg(feature = "shadow_data_consistency")] const DEFAULT_RETRY_COUNT: u8 = 3; @@ -121,18 +120,6 @@ pub async fn get_final_cache_block(near_rpc_client: &JsonRpcClient) -> Option anyhow::Result { - let params = - near_jsonrpc_client::methods::EXPERIMENTAL_protocol_config::RpcProtocolConfigRequest { - block_reference: near_primitives::types::BlockReference::Finality( - near_primitives::types::Finality::Final, - ), - }; - Ok(near_rpc_client.call(params).await?) -} - pub async fn get_current_validators( near_rpc_client: &JsonRpcClient, ) -> anyhow::Result { @@ -154,8 +141,6 @@ async fn handle_streamer_message( if final_block_info.read().await.final_block_cache.epoch_id != block.epoch_id { tracing::info!("New epoch started: {:?}", block.epoch_id); - final_block_info.write().await.current_protocol_config = - get_current_protocol_config(near_rpc_client).await?; final_block_info.write().await.current_validators = get_current_validators(near_rpc_client).await?; } @@ -214,7 +199,7 @@ pub(crate) async fn calculate_contract_code_cache_sizes( block_cache_size: usize, limit_memory_cache: Option, ) -> usize { - let sys = System::new_all(); + let sys = sysinfo::System::new_all(); let total_memory = sys.total_memory() as usize; // Total memory in bytes let used_memory = sys.used_memory() as usize; // Used memory in bytes let available_memory = total_memory - used_memory - reserved_memory; // Available memory in bytes diff --git a/rust-toolchain b/rust-toolchain index 5e3a4256..7c7053aa 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.73.0 +1.75.0 diff --git a/state-indexer/Cargo.toml b/state-indexer/Cargo.toml index 9edf1bbd..db8297f3 100644 --- a/state-indexer/Cargo.toml +++ b/state-indexer/Cargo.toml @@ -10,30 +10,30 @@ license.workspace = true [dependencies] actix-web = "4.2.1" anyhow = "1.0.70" -borsh = "0.10.2" -clap = { version = "3.1.6", features = ["color", "derive"] } +borsh = "1.3.1" +clap = "4.4.18" futures = "0.3.5" hex = "0.4.3" humantime = "2.1.0" lazy_static = "1.4.0" openssl-probe = "0.1.5" prometheus = "0.13.1" -tokio = { version = "1.28.2", features = [ +tokio = { version = "1.36.0", features = [ "sync", "time", "macros", "rt-multi-thread", ] } -tokio-stream = { version = "0.1" } +tokio-stream = "0.1" tracing = "0.1.34" configuration = { path = "../configuration" } database = { path = "../database" } epoch-indexer = { path = "../epoch-indexer" } -near-primitives = "1.36.0" -near-indexer-primitives = "1.36.0" -near-jsonrpc-client = "0.7.0" -near-lake-framework = "0.7.9" +near-primitives = "0.20.0" +near-indexer-primitives = "0.20.0" +near-jsonrpc-client = "0.8.0" +near-lake-framework = "0.7.7" [features] default = ["scylla_db"] diff --git a/state-indexer/Dockerfile b/state-indexer/Dockerfile index 3394977c..52973170 100644 --- a/state-indexer/Dockerfile +++ b/state-indexer/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.73 AS builder +FROM rust:1.75 AS builder ARG features="default" WORKDIR /tmp/ diff --git a/state-indexer/src/configs.rs b/state-indexer/src/configs.rs index 6fc720f5..f73524b0 100644 --- a/state-indexer/src/configs.rs +++ b/state-indexer/src/configs.rs @@ -5,14 +5,6 @@ use near_lake_framework::near_indexer_primitives::types::{BlockReference, Finali /// NEAR Indexer for Explorer /// Watches for stream of blocks from the chain #[derive(Parser, Debug)] -#[clap( - version, - author, - about, - setting(clap::AppSettings::DisableHelpSubcommand), - setting(clap::AppSettings::PropagateVersion), - setting(clap::AppSettings::NextLineHelp) -)] pub(crate) struct Opts { #[clap(subcommand)] pub start_options: StartOptions, diff --git a/state-indexer/src/main.rs b/state-indexer/src/main.rs index 4b5050f0..608eaad4 100644 --- a/state-indexer/src/main.rs +++ b/state-indexer/src/main.rs @@ -1,4 +1,3 @@ -use borsh::BorshSerialize; use clap::Parser; use futures::StreamExt; @@ -168,7 +167,7 @@ async fn handle_state_changes( // returning a hex-encoded key to ensure we store data changes to the key // (if there is more than one change to the same key) let key: &[u8] = key.as_ref(); - format!("{}_data_{}", account_id.as_ref(), hex::encode(key)) + format!("{}_data_{}", account_id.as_str(), hex::encode(key)) } StateChangeValueView::AccessKeyUpdate { account_id, public_key, .. @@ -176,16 +175,14 @@ async fn handle_state_changes( | StateChangeValueView::AccessKeyDeletion { account_id, public_key } => { // returning a hex-encoded key to ensure we store data changes to the key // (if there is more than one change to the same key) - let data_key = public_key - .try_to_vec() - .expect("Failed to borsh-serialize the PublicKey"); - format!("{}_access_key_{}", account_id.as_ref(), hex::encode(data_key)) + let data_key = borsh::to_vec(&public_key)?; + format!("{}_access_key_{}", account_id.as_str(), hex::encode(data_key)) } // ContractCode and Account changes is not separate-able by any key, we can omit the suffix StateChangeValueView::ContractCodeUpdate { account_id, .. } - | StateChangeValueView::ContractCodeDeletion { account_id } => format!("{}_contract", account_id.as_ref()), + | StateChangeValueView::ContractCodeDeletion { account_id } => format!("{}_contract", account_id.as_str()), StateChangeValueView::AccountUpdate { account_id, .. } - | StateChangeValueView::AccountDeletion { account_id } => format!("{}_account", account_id.as_ref()), + | StateChangeValueView::AccountDeletion { account_id } => format!("{}_account", account_id.as_str()), }; // This will override the previous record for this account_id + state change kind + suffix state_changes_to_store.insert(key, state_change); @@ -225,12 +222,8 @@ async fn store_state_change( public_key, access_key, } => { - let data_key = public_key - .try_to_vec() - .expect("Failed to borsh-serialize the PublicKey"); - let data_value = access_key - .try_to_vec() - .expect("Failed to borsh-serialize the AccessKey"); + let data_key = borsh::to_vec(&public_key)?; + let data_value = borsh::to_vec(&access_key)?; let add_access_key_future = db_manager.add_access_key(account_id.clone(), block_height, block_hash, &data_key, &data_value); @@ -244,9 +237,7 @@ async fn store_state_change( add_access_key_future.await?; } StateChangeValueView::AccessKeyDeletion { account_id, public_key } => { - let data_key = public_key - .try_to_vec() - .expect("Failed to borsh-serialize the PublicKey"); + let data_key = borsh::to_vec(&public_key)?; let delete_access_key_future = db_manager.delete_access_key(account_id.clone(), block_height, block_hash, &data_key); @@ -270,9 +261,7 @@ async fn store_state_change( .await? } StateChangeValueView::AccountUpdate { account_id, account } => { - let value = Account::from(account) - .try_to_vec() - .expect("Failed to borsh-serialize the Account"); + let value = borsh::to_vec(&Account::from(account))?; db_manager .add_account(account_id, block_height, block_hash, value) .await? diff --git a/tx-indexer/Cargo.toml b/tx-indexer/Cargo.toml index 84177c8b..1657834d 100644 --- a/tx-indexer/Cargo.toml +++ b/tx-indexer/Cargo.toml @@ -8,30 +8,30 @@ repository.workspace = true license.workspace = true [dependencies] -actix-web = "4.2.1" +actix-web = "4.5.1" anyhow = "1.0.70" -clap = { version = "3.2.22", features = ["color", "derive", "env"] } +clap = "4.4.18" futures = "0.3.5" futures-locks = "0.7.1" humantime = "2.1.0" lazy_static = "1.4.0" prometheus = "0.13.1" -tokio = { version = "1.28.2", features = [ +tokio = { version = "1.36.0", features = [ "sync", "time", "macros", "rt-multi-thread", ] } -tokio-stream = { version = "0.1.12" } +tokio-stream = "0.1.12" tracing = "0.1.34" configuration = { path = "../configuration" } database = { path = "../database" } readnode-primitives = { path = "../readnode-primitives" } -near-indexer-primitives = "1.36.0" -near-jsonrpc-client = "0.7.0" -near-lake-framework = "0.7.9" +near-indexer-primitives = "0.20.0" +near-jsonrpc-client = "0.8.0" +near-lake-framework = "0.7.7" [features] default = ["scylla_db"] diff --git a/tx-indexer/Dockerfile b/tx-indexer/Dockerfile index e126acd1..a3460751 100644 --- a/tx-indexer/Dockerfile +++ b/tx-indexer/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.73 AS builder +FROM rust:1.75 AS builder ARG features="default" WORKDIR /tmp/ diff --git a/tx-indexer/src/config.rs b/tx-indexer/src/config.rs index cdf13039..372d0ff3 100644 --- a/tx-indexer/src/config.rs +++ b/tx-indexer/src/config.rs @@ -5,14 +5,6 @@ use near_jsonrpc_client::{methods, JsonRpcClient}; /// NEAR Indexer for Explorer /// Watches for stream of blocks from the chain #[derive(Parser, Debug)] -#[clap( - version, - author, - about, - setting(clap::AppSettings::DisableHelpSubcommand), - setting(clap::AppSettings::PropagateVersion), - setting(clap::AppSettings::NextLineHelp) -)] pub(crate) struct Opts { #[clap(subcommand)] pub start_options: StartOptions,