From 8fba2ea772b1c4a7ae5c1db25ff6fa2192c6864f Mon Sep 17 00:00:00 2001 From: colindickson Date: Tue, 9 Jul 2024 09:25:51 -0400 Subject: [PATCH] update proto and prepare for 2.0 --- Cargo.lock | 358 +++++++++++++++++++-------------- Cargo.toml | 6 +- rust-toolchain.toml | 9 +- src/codec/mod.rs | 19 +- src/codec/sf.near.r#type.v1.rs | 5 + 5 files changed, 234 insertions(+), 163 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6fb5e68b..775852db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -320,12 +320,6 @@ dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -703,13 +697,11 @@ dependencies = [ [[package]] name = "blake2" -version = "0.9.2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug", + "digest 0.10.7", ] [[package]] @@ -1460,6 +1452,17 @@ dependencies = [ "serde", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "derive_arbitrary" version = "1.3.2" @@ -1638,15 +1641,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" -[[package]] -name = "elastic-array" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d63720ea2bc2e1b79f7aa044d9dc0b825f9ccb6930b32120f8fb9e873aa84bc" -dependencies = [ - "heapsize", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -2063,16 +2057,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", - "allocator-api2", -] - -[[package]] -name = "heapsize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" -dependencies = [ - "winapi", ] [[package]] @@ -2326,6 +2310,15 @@ dependencies = [ "regex", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -2421,7 +2414,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -2452,6 +2445,12 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libredox" version = "0.1.3" @@ -2547,15 +2546,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "lru" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" -dependencies = [ - "hashbrown 0.14.5", -] - [[package]] name = "lz4-sys" version = "1.9.4" @@ -2792,8 +2782,8 @@ dependencies = [ [[package]] name = "near-async" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "derive_more", @@ -2801,17 +2791,19 @@ dependencies = [ "near-async-derive", "near-o11y", "near-performance-metrics", + "near-time", "once_cell", "serde", "serde_json", "time", "tokio", + "tracing", ] [[package]] name = "near-async-derive" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "proc-macro2", "quote", @@ -2820,16 +2812,16 @@ dependencies = [ [[package]] name = "near-cache" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ - "lru 0.7.8", + "lru", ] [[package]] name = "near-chain" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "assert_matches", @@ -2841,7 +2833,7 @@ dependencies = [ "enum-map", "itertools 0.10.5", "itoa", - "lru 0.7.8", + "lru", "near-async", "near-cache", "near-chain-configs", @@ -2868,14 +2860,15 @@ dependencies = [ "strum", "tempfile", "thiserror", + "time", "tracing", "yansi", ] [[package]] name = "near-chain-configs" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "anyhow", "bytesize", @@ -2899,8 +2892,8 @@ dependencies = [ [[package]] name = "near-chain-primitives" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "near-async", "near-crypto", @@ -2912,8 +2905,8 @@ dependencies = [ [[package]] name = "near-chunks" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "borsh 1.5.0", @@ -2921,7 +2914,7 @@ dependencies = [ "derive_more", "futures", "itertools 0.10.5", - "lru 0.7.8", + "lru", "near-async", "near-chain", "near-chain-configs", @@ -2945,8 +2938,8 @@ dependencies = [ [[package]] name = "near-chunks-primitives" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "near-chain-primitives", "near-primitives", @@ -2954,8 +2947,8 @@ dependencies = [ [[package]] name = "near-client" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "actix-rt", @@ -2968,7 +2961,7 @@ dependencies = [ "derive_more", "futures", "itertools 0.10.5", - "lru 0.7.8", + "lru", "near-async", "near-cache", "near-chain", @@ -3004,6 +2997,7 @@ dependencies = [ "sysinfo", "tempfile", "thiserror", + "time", "tokio", "tracing", "yansi", @@ -3011,8 +3005,8 @@ dependencies = [ [[package]] name = "near-client-primitives" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "chrono", @@ -3033,8 +3027,8 @@ dependencies = [ [[package]] name = "near-config-utils" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "anyhow", "json_comments", @@ -3044,8 +3038,8 @@ dependencies = [ [[package]] name = "near-crypto" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "blake2", "borsh 1.5.0", @@ -3068,12 +3062,13 @@ dependencies = [ [[package]] name = "near-dyn-configs" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "anyhow", "near-async", "near-chain-configs", + "near-crypto", "near-o11y", "near-primitives", "once_cell", @@ -3087,8 +3082,8 @@ dependencies = [ [[package]] name = "near-epoch-manager" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "borsh 1.5.0", "itertools 0.10.5", @@ -3111,7 +3106,7 @@ dependencies = [ [[package]] name = "near-firehose-indexer" -version = "1.40.0" +version = "2.0.0-rc.1" dependencies = [ "actix", "clap 3.2.25", @@ -3131,16 +3126,16 @@ dependencies = [ [[package]] name = "near-fmt" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "near-primitives-core", ] [[package]] name = "near-indexer" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "anyhow", @@ -3167,8 +3162,8 @@ dependencies = [ [[package]] name = "near-indexer-primitives" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "near-primitives", "serde", @@ -3177,8 +3172,8 @@ dependencies = [ [[package]] name = "near-jsonrpc" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "actix-cors", @@ -3209,8 +3204,8 @@ dependencies = [ [[package]] name = "near-jsonrpc-client" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix-http", "awc", @@ -3223,8 +3218,8 @@ dependencies = [ [[package]] name = "near-jsonrpc-primitives" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "arbitrary", "near-chain-configs", @@ -3240,8 +3235,8 @@ dependencies = [ [[package]] name = "near-mainnet-res" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "near-account-id", "near-chain-configs", @@ -3251,8 +3246,8 @@ dependencies = [ [[package]] name = "near-network" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "anyhow", @@ -3268,8 +3263,9 @@ dependencies = [ "futures-util", "im", "itertools 0.10.5", - "lru 0.7.8", + "lru", "near-async", + "near-chain-configs", "near-crypto", "near-fmt", "near-o11y", @@ -3285,6 +3281,7 @@ dependencies = [ "protobuf-codegen", "rand", "rayon", + "reed-solomon-erasure", "serde", "sha2", "smart-default", @@ -3300,8 +3297,8 @@ dependencies = [ [[package]] name = "near-o11y" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "base64 0.21.7", @@ -3326,8 +3323,8 @@ dependencies = [ [[package]] name = "near-parameters" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "borsh 1.5.0", "enum-map", @@ -3343,8 +3340,8 @@ dependencies = [ [[package]] name = "near-performance-metrics" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "bitflags 1.3.2", @@ -3359,8 +3356,8 @@ dependencies = [ [[package]] name = "near-performance-metrics-macros" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "quote", "syn 2.0.65", @@ -3368,8 +3365,8 @@ dependencies = [ [[package]] name = "near-pool" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "borsh 1.5.0", "near-crypto", @@ -3381,8 +3378,8 @@ dependencies = [ [[package]] name = "near-primitives" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "arbitrary", "base64 0.21.7", @@ -3393,19 +3390,19 @@ dependencies = [ "chrono", "derive_more", "easy-ext", - "enum-map", "hex", "itertools 0.10.5", - "near-async", "near-crypto", "near-fmt", "near-parameters", "near-primitives-core", "near-rpc-error-macro", "near-stdx", + "near-time", "near-vm-runner", "num-rational", "once_cell", + "ordered-float", "primitive-types", "rand", "rand_chacha", @@ -3413,7 +3410,6 @@ dependencies = [ "serde", "serde_json", "serde_with", - "serde_yaml", "sha3", "smart-default", "strum", @@ -3424,8 +3420,8 @@ dependencies = [ [[package]] name = "near-primitives-core" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "arbitrary", "base64 0.21.7", @@ -3443,8 +3439,8 @@ dependencies = [ [[package]] name = "near-rosetta-rpc" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "actix-cors", @@ -3474,8 +3470,8 @@ dependencies = [ [[package]] name = "near-rpc-error-core" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "quote", "serde", @@ -3484,8 +3480,8 @@ dependencies = [ [[package]] name = "near-rpc-error-macro" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "near-rpc-error-core", "serde", @@ -3494,13 +3490,13 @@ dependencies = [ [[package]] name = "near-stdx" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" [[package]] name = "near-store" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "actix-rt", @@ -3508,13 +3504,13 @@ dependencies = [ "borsh 1.5.0", "bytesize", "crossbeam", + "derive-where", "derive_more", - "elastic-array", "enum-map", "hex", "itertools 0.10.5", "itoa", - "lru 0.7.8", + "lru", "near-async", "near-chain-configs", "near-crypto", @@ -3528,10 +3524,12 @@ dependencies = [ "once_cell", "rand", "rayon", + "reed-solomon-erasure", "rlimit", "rocksdb", "serde", "serde_json", + "smallvec", "strum", "tempfile", "thiserror", @@ -3541,8 +3539,8 @@ dependencies = [ [[package]] name = "near-telemetry" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "awc", @@ -3558,10 +3556,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-time" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" +dependencies = [ + "once_cell", + "serde", + "time", + "tokio", +] + [[package]] name = "near-vm-compiler" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "enumset", "finite-wasm", @@ -3576,8 +3585,8 @@ dependencies = [ [[package]] name = "near-vm-compiler-singlepass" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "dynasm 2.0.0", "dynasmrt 2.0.0", @@ -3597,8 +3606,8 @@ dependencies = [ [[package]] name = "near-vm-engine" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "backtrace", "cfg-if 1.0.0", @@ -3620,18 +3629,19 @@ dependencies = [ [[package]] name = "near-vm-runner" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "anyhow", - "base64 0.21.7", "borsh 1.5.0", + "bytesize", "ed25519-dalek", "enum-map", "finite-wasm", - "lru 0.12.3", + "lru", "memoffset 0.8.0", "near-crypto", + "near-o11y", "near-parameters", "near-primitives-core", "near-stdx", @@ -3645,6 +3655,7 @@ dependencies = [ "parity-wasm 0.41.0", "parity-wasm 0.42.2", "prefix-sum-vec", + "prometheus", "pwasm-utils", "ripemd", "rustix", @@ -3672,8 +3683,8 @@ dependencies = [ [[package]] name = "near-vm-types" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "indexmap 1.9.3", "num-traits", @@ -3683,8 +3694,8 @@ dependencies = [ [[package]] name = "near-vm-vm" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "backtrace", "cc", @@ -3704,8 +3715,8 @@ dependencies = [ [[package]] name = "near-wallet-contract" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "anyhow", "near-primitives-core", @@ -3714,8 +3725,8 @@ dependencies = [ [[package]] name = "nearcore" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "actix", "actix-rt", @@ -3804,12 +3815,10 @@ dependencies = [ [[package]] name = "node-runtime" -version = "1.40.0" -source = "git+https://github.com/near/nearcore?rev=1.40.0#7dd0b5993577f592be15eb102e5a3da37be66271" +version = "2.0.0-rc.1" +source = "git+https://github.com/near/nearcore?rev=2.0.0-rc.1#053726e31bb4eb73c572e07292943e59dbb11c4a" dependencies = [ "borsh 1.5.0", - "hex", - "near-chain-configs", "near-crypto", "near-o11y", "near-parameters", @@ -3819,12 +3828,10 @@ dependencies = [ "near-vm-runner", "near-wallet-contract", "num-bigint 0.3.3", - "num-rational", "num-traits", "once_cell", "rand", "rayon", - "serde", "serde_json", "sha2", "thiserror", @@ -3953,12 +3960,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl" version = "0.10.64" @@ -4093,7 +4094,10 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" dependencies = [ + "borsh 1.5.0", "num-traits", + "rand", + "serde", ] [[package]] @@ -4223,6 +4227,17 @@ dependencies = [ "parking_lot_core 0.7.3", ] +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api 0.4.12", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.2" @@ -4247,6 +4262,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + [[package]] name = "parking_lot_core" version = "0.9.10" @@ -4749,6 +4778,7 @@ dependencies = [ "libc", "rand_chacha", "rand_core", + "serde", ] [[package]] @@ -4768,6 +4798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", + "serde", ] [[package]] @@ -4814,6 +4845,15 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.5.1" @@ -4836,11 +4876,15 @@ dependencies = [ [[package]] name = "reed-solomon-erasure" -version = "4.0.2" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +checksum = "7263373d500d4d4f505d43a2a662d475a894aa94503a1ee28e9188b5f3960d4f" dependencies = [ + "libm", + "lru", + "parking_lot 0.11.2", "smallvec", + "spin 0.9.8", ] [[package]] @@ -4978,7 +5022,7 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", + "spin 0.5.2", "untrusted", "web-sys", "winapi", @@ -5545,6 +5589,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "sptr" version = "0.3.2" diff --git a/Cargo.toml b/Cargo.toml index da00def3..e8e22e05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["firehose-pb"] [package] name = "near-firehose-indexer" -version = "1.40.0" +version = "2.0.0-rc.1" authors = ["StreamingFast Developers "] edition = "2021" @@ -22,8 +22,8 @@ rkyv = "=0.7.38" tracing = { version = "0.1.36", features = ["std"] } tracing-subscriber = { version = "0.3.15", features = ["env-filter", "fmt", "registry", "std"] } -near-indexer = { git = "https://github.com/near/nearcore", rev = "1.40.0" } -near-crypto = { git = "https://github.com/near/nearcore", rev = "1.40.0" } +near-indexer = { git = "https://github.com/near/nearcore", rev = "2.0.0-rc.1" } +near-crypto = { git = "https://github.com/near/nearcore", rev = "2.0.0-rc.1" } [build-dependencies] tonic-build = "0.8.4" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b76bf618..a45a9399 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,7 @@ [toolchain] -channel = "1.77.0" -components = ["rustfmt", "clippy"] -targets = ["wasm32-unknown-unknown"] +# This specifies the version of Rust we use to build. +# Individual crates in the workspace may support a lower version, as indicated by `rust-version` field in each crate's `Cargo.toml`. +# The version specified below, should be at least as high as the maximum `rust-version` within the workspace. +channel = "1.78.0" +components = ["rustfmt", "clippy", "rust-analyzer"] +targets = ["wasm32-unknown-unknown"] \ No newline at end of file diff --git a/src/codec/mod.rs b/src/codec/mod.rs index 8391d33d..71f43caf 100644 --- a/src/codec/mod.rs +++ b/src/codec/mod.rs @@ -253,9 +253,7 @@ impl From for execution_outcome::Status { 0: UnknownExecutionStatus {}, }, ExecutionStatusView::SuccessValue(v) => execution_outcome::Status::SuccessValue { - 0: SuccessValueExecutionStatus { - value: v.into(), - }, + 0: SuccessValueExecutionStatus { value: v.into() }, }, ExecutionStatusView::SuccessReceiptId(v) => { execution_outcome::Status::SuccessReceiptId { @@ -436,6 +434,9 @@ impl From for execution_outcome::Status { near_errors::ReceiptValidationError::ActionsValidation(_) => { ReceiptValidationError::ActionsValidationError.into() } + near_primitives::errors::ReceiptValidationError::ReceiptSizeExceeded { .. } => { + ReceiptValidationError::ReceiptSizeExceeded.into() + } }} } } @@ -553,6 +554,18 @@ impl From for execution_outcome::Status { near_errors::InvalidTxError::TransactionSizeExceeded { .. } => InvalidTxError::TransactionSizeExceeded.into(), + near_primitives::errors::InvalidTxError::InvalidTransactionVersion {..} => { + InvalidTxError::InvalidTransactionVersion.into() + } + near_primitives::errors::InvalidTxError::StorageError(_) => { + InvalidTxError::StorageError.into() + } + near_primitives::errors::InvalidTxError::ShardCongested {..} => { + InvalidTxError::ShardCongested.into() + } + near_primitives::errors::InvalidTxError::ShardStuck {..} => { + InvalidTxError::ShardStuck.into() + } }, }) } diff --git a/src/codec/sf.near.r#type.v1.rs b/src/codec/sf.near.r#type.v1.rs index af16eb36..3fc40bc6 100644 --- a/src/codec/sf.near.r#type.v1.rs +++ b/src/codec/sf.near.r#type.v1.rs @@ -896,6 +896,7 @@ pub enum ReceiptValidationError { ReturnedValueLengthExceeded = 4, NumberInputDataDependenciesExceeded = 5, ActionsValidationError = 6, + ReceiptSizeExceeded = 7, } ///todo: add more detail? #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] @@ -915,6 +916,10 @@ pub enum InvalidTxError { Expired = 11, ActionsValidation = 12, TransactionSizeExceeded = 13, + InvalidTransactionVersion = 14, + StorageError = 15, + ShardCongested = 16, + ShardStuck = 17, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)]