Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 79 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/primitives/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct Version {
pub type DbVersion = u32;

/// Current version of the database.
pub const DB_VERSION: DbVersion = 25;
pub const DB_VERSION: DbVersion = 26;

/// Protocol version type.
pub use near_primitives_core::types::ProtocolVersion;
Expand Down
9 changes: 9 additions & 0 deletions core/store/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,15 @@ pub fn migrate_21_to_22(path: &String) {
set_store_version(&store, 22);
}

pub fn migrate_25_to_26(path: &String) {
let store = create_store(path);
let mut store_update = store.store_update();
store_update.delete_all(DBCol::ColCachedContractCode);
store_update.commit().unwrap();

set_store_version(&store, 26);
}

@matklad matklad Jul 26, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to just completely bust the precompilation cache at this time, as we haven't yet deployed compilation on contract deployment to the main net, and the code is written in such a way that empty cache causes slowdowns, rather then errors, so testnet should be fine.

That is, it's fine to land this without tackling #4473 first. @bowenwang1996 please veto this if I am mistaken in my assumptions here.

You've already approved this, so I'll auto-merge, but wanted to call this out just in case.


#[cfg(feature = "protocol_feature_block_header_v3")]
pub fn migrate_18_to_new_validator_stake(store: &Store) {
use near_primitives::epoch_manager::block_info::{BlockInfo, BlockInfoV1};
Expand Down
6 changes: 6 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ skip = [
# hashbrown uses an older version
{ name = "ahash", version = "=0.4.7" },

# zeropool-bn use borsh 0.8.1
{ name = "borsh", version = "=0.8.1" },
{ name = "borsh-derive", version = "=0.8.1" },
{ name = "borsh-derive-internal", version = "=0.8.1" },
{ name = "borsh-schema-derive-internal", version = "=0.8.1" },

# rocksdb (transitively through clang-sys) uses this as a build
# dependency which conflicts with 0.6.7 that wasmer-engine-native
# uses.
Expand Down
7 changes: 6 additions & 1 deletion nearcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ pub use crate::runtime::NightshadeRuntime;
use near_store::migrations::{
fill_col_outcomes_by_hash, fill_col_transaction_refcount, get_store_version, migrate_10_to_11,
migrate_11_to_12, migrate_13_to_14, migrate_14_to_15, migrate_17_to_18, migrate_21_to_22,
migrate_6_to_7, migrate_7_to_8, migrate_8_to_9, migrate_9_to_10, set_store_version,
migrate_25_to_26, migrate_6_to_7, migrate_7_to_8, migrate_8_to_9, migrate_9_to_10,
set_store_version,
};

#[cfg(feature = "protocol_feature_block_header_v3")]
Expand Down Expand Up @@ -226,6 +227,10 @@ pub fn apply_store_migrations(path: &String, near_config: &NearConfig) {
info!(target: "near", "Migrate DB from version 24 to 25");
migrate_24_to_25(&path);
}
if db_version <= 25 {
info!(target: "near", "Migrate DB from version 25 to 26");
migrate_25_to_26(&path);
}
#[cfg(feature = "nightly_protocol")]
{
let store = create_store(&path);
Expand Down
1 change: 1 addition & 0 deletions runtime/near-vm-runner-standalone/src/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ fn test_evm_slow_deserialize_repro() {
script.step(contract, "deploy_code").input(input).repeat(3);
let res = script.run();
assert_eq!(res.outcomes[0].1, None);
assert_eq!(res.outcomes[1].1, None);
}

evm_slow_deserialize_repro(VMKind::Wasmer0);
Expand Down
Loading