From f1cde883b86fe40525829f5a707bd00816bada9b Mon Sep 17 00:00:00 2001 From: akorchyn Date: Tue, 12 Nov 2024 20:50:28 +0200 Subject: [PATCH 1/5] chore!: updates near-* dependencies to 0.27 release --- near-sdk/Cargo.toml | 10 +++++----- near-sdk/src/environment/mock/mocked_blockchain.rs | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/near-sdk/Cargo.toml b/near-sdk/Cargo.toml index 79178b012..30768dd61 100644 --- a/near-sdk/Cargo.toml +++ b/near-sdk/Cargo.toml @@ -42,11 +42,11 @@ schemars = { version = "0.8.8", optional = true } near-abi = { version = "0.4.0", features = [ "__chunked-entries", ], optional = true } -near-vm-runner = { version = "0.26", optional = true } -near-primitives-core = { version = "0.26", optional = true } -near-primitives = { version = "0.26", optional = true } -near-crypto = { version = "0.26", default-features = false, optional = true } -near-parameters = { version = "0.26", optional = true } +near-vm-runner = { version = "0.27", optional = true } +near-primitives-core = { version = "0.27", optional = true } +near-primitives = { version = "0.27", optional = true } +near-crypto = { version = "0.27", default-features = false, optional = true } +near-parameters = { version = "0.27", optional = true } [dev-dependencies] near-sdk = { path = ".", features = ["legacy", "unit-testing"] } diff --git a/near-sdk/src/environment/mock/mocked_blockchain.rs b/near-sdk/src/environment/mock/mocked_blockchain.rs index 418e91c05..2935c87a0 100644 --- a/near-sdk/src/environment/mock/mocked_blockchain.rs +++ b/near-sdk/src/environment/mock/mocked_blockchain.rs @@ -61,6 +61,7 @@ struct LogicFixture { ext: Box, fees_config: Arc, context: Box, + memory: Box, } impl MockedBlockchain @@ -88,8 +89,9 @@ where let fees_config = Arc::new(fees_config); let result_state = ExecutionResultState::new(&context, context.make_gas_counter(&config), config.clone()); + let memory = Box::new(memory.unwrap_or_default()); - let mut logic_fixture = LogicFixture { ext, context, fees_config }; + let mut logic_fixture = LogicFixture { ext, context, fees_config, memory }; let logic = unsafe { VMLogic::new( @@ -97,7 +99,7 @@ where &*(logic_fixture.context.as_mut() as *mut near_vm_runner::logic::VMContext), logic_fixture.fees_config.clone(), result_state, - memory.unwrap_or_default(), + &mut *(logic_fixture.memory.as_mut() as *mut dyn MemoryLike), ) }; From 6ac7d21f8523110d3c09e9aab101356b7ff8c02e Mon Sep 17 00:00:00 2001 From: akorchyn Date: Tue, 12 Nov 2024 20:55:57 +0200 Subject: [PATCH 2/5] bump up rust as near-crypto doesn't support 1.79 anymore --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fc4f9b77..7bf2e9b16 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,11 +14,11 @@ jobs: matrix: platform: - os: ubuntu-latest - rs: 1.79 + rs: 1.80 - os: ubuntu-latest rs: stable - os: macos-latest - rs: 1.79 + rs: 1.80 - os: macos-latest rs: stable features: ['', '--features unstable,legacy,__abi-generate'] From 133a891fa244e2b23aca44c793b5804b13a0e305 Mon Sep 17 00:00:00 2001 From: akorchyn Date: Tue, 12 Nov 2024 21:08:47 +0200 Subject: [PATCH 3/5] update to workflow file --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7bf2e9b16..c8edcc6f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,11 +14,11 @@ jobs: matrix: platform: - os: ubuntu-latest - rs: 1.80 + rs: 1.80.0 - os: ubuntu-latest rs: stable - os: macos-latest - rs: 1.80 + rs: 1.80.0 - os: macos-latest rs: stable features: ['', '--features unstable,legacy,__abi-generate'] From 389d2f416d237355f60decfde56b048fffc05ba3 Mon Sep 17 00:00:00 2001 From: akorchyn Date: Wed, 13 Nov 2024 18:02:58 +0200 Subject: [PATCH 4/5] updated readme with minimum supported version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c14c812a8..cd6f1a7f8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@

Reference Documentation - MSRV + MSRV Crates.io version Download Join the community on Discord @@ -321,7 +321,7 @@ State breaking changes (low-level serialization format of any data type) will be ### MSRV -The minimum supported Rust version is currently `1.76`. There are no guarantees that this will be upheld if a security patch release needs to come in that requires a Rust toolchain increase. +The minimum supported Rust version is currently 1.80`. There are no guarantees that this will be upheld if a security patch release needs to come in that requires a Rust toolchain increase. ## Contributing From c3038745ec4f2ac1e891d5aec63fa3ef36b50b90 Mon Sep 17 00:00:00 2001 From: akorchyn Date: Wed, 13 Nov 2024 18:04:52 +0200 Subject: [PATCH 5/5] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd6f1a7f8..ff2e36d0c 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ State breaking changes (low-level serialization format of any data type) will be ### MSRV -The minimum supported Rust version is currently 1.80`. There are no guarantees that this will be upheld if a security patch release needs to come in that requires a Rust toolchain increase. +The minimum supported Rust version is currently `1.80`. There are no guarantees that this will be upheld if a security patch release needs to come in that requires a Rust toolchain increase. ## Contributing