From 134a899ed67ddd56c1283db40d287f9f05673907 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 16:46:45 +0200 Subject: [PATCH 01/28] Account V2 Moving Account to primitives --- chain/chain/src/test_utils.rs | 4 +- chain/rosetta-rpc/src/lib.rs | 11 +- core/primitives-core/Cargo.toml | 1 - core/primitives-core/src/access_key.rs | 70 +++++++ core/primitives-core/src/lib.rs | 2 +- core/primitives/Cargo.toml | 2 +- .../src/account.rs | 178 ++++++++++-------- core/primitives/src/lib.rs | 3 +- core/primitives/src/state_record.rs | 3 +- core/primitives/src/test_utils.rs | 5 +- core/primitives/src/transaction.rs | 4 +- core/primitives/src/types.rs | 3 +- core/primitives/src/views.rs | 7 +- core/store/src/lib.rs | 3 +- .../genesis-csv-to-json/src/csv_parser.rs | 9 +- genesis-tools/genesis-populate/src/lib.rs | 1 + neard/src/config.rs | 5 +- neard/src/genesis_validate.rs | 3 +- neard/src/runtime/mod.rs | 3 +- runtime/runtime/src/actions.rs | 11 +- runtime/runtime/src/adapter.rs | 3 +- runtime/runtime/src/config.rs | 2 +- runtime/runtime/src/ext.rs | 2 +- runtime/runtime/src/lib.rs | 5 +- runtime/runtime/src/state_viewer/mod.rs | 3 +- runtime/runtime/src/verifier.rs | 6 +- .../runtime/tests/runtime_group_tools/mod.rs | 8 +- test-utils/testlib/src/node/runtime_node.rs | 9 +- test-utils/testlib/src/runtime_utils.rs | 3 +- test-utils/testlib/src/standard_test_cases.rs | 2 +- test-utils/testlib/src/user/mod.rs | 2 +- 31 files changed, 259 insertions(+), 114 deletions(-) create mode 100644 core/primitives-core/src/access_key.rs rename core/{primitives-core => primitives}/src/account.rs (60%) diff --git a/chain/chain/src/test_utils.rs b/chain/chain/src/test_utils.rs index 0851bfab37a..027ebfb62db 100644 --- a/chain/chain/src/test_utils.rs +++ b/chain/chain/src/test_utils.rs @@ -12,7 +12,8 @@ use tracing::debug; use near_chain_primitives::{Error, ErrorKind}; use near_crypto::{KeyType, PublicKey, SecretKey, Signature}; use near_pool::types::PoolIterator; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::access_key::AccessKey; +use near_primitives::account::Account; use near_primitives::challenge::ChallengesResult; use near_primitives::epoch_manager::block_info::BlockInfo; use near_primitives::epoch_manager::epoch_info::EpochInfo; @@ -807,6 +808,7 @@ impl RuntimeAdapter for KeyValueRuntime { 0, CryptoHash::default(), 0, + PROTOCOL_VERSION, ) .into(), ), diff --git a/chain/rosetta-rpc/src/lib.rs b/chain/rosetta-rpc/src/lib.rs index d150dc8b79c..bf51656276f 100644 --- a/chain/rosetta-rpc/src/lib.rs +++ b/chain/rosetta-rpc/src/lib.rs @@ -17,6 +17,8 @@ use near_primitives::borsh::BorshDeserialize; use near_primitives::serialize::BaseEncode; pub use config::RosettaRpcConfig; +use near_primitives::version::PROTOCOL_VERSION; +use near_primitives::views::AccountView; mod adapters; mod config; @@ -376,7 +378,14 @@ async fn account_balance( Err(crate::errors::ErrorKind::NotFound(_)) => ( block.header.hash, block.header.height, - near_primitives::account::Account::new(0, 0, Default::default(), 0).into(), + AccountView { + amount: 0, + locked: 0, + code_hash: Default::default(), + storage_usage: 0, + storage_paid_at: 0, + } + .into(), ), Err(err) => return Err(err.into()), }; diff --git a/core/primitives-core/Cargo.toml b/core/primitives-core/Cargo.toml index e4747b16ff6..59e4e224a36 100644 --- a/core/primitives-core/Cargo.toml +++ b/core/primitives-core/Cargo.toml @@ -25,7 +25,6 @@ lazy_static = "1.4" [features] default = [] costs_counting = [] -protocol_feature_add_account_versions = [] protocol_feature_evm = [] protocol_feature_alt_bn128 = [] protocol_feature_tx_size_limit = [] diff --git a/core/primitives-core/src/access_key.rs b/core/primitives-core/src/access_key.rs new file mode 100644 index 00000000000..267a1a3ba9b --- /dev/null +++ b/core/primitives-core/src/access_key.rs @@ -0,0 +1,70 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use serde::{Deserialize, Serialize}; + +use crate::serialize::option_u128_dec_format; +use crate::types::{AccountId, Balance, Nonce}; + +/// Access key provides limited access to an account. Each access key belongs to some account and +/// is identified by a unique (within the account) public key. One account may have large number of +/// access keys. Access keys allow to act on behalf of the account by restricting transactions +/// that can be issued. +/// `account_id,public_key` is a key in the state +#[derive( + BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug, +)] +pub struct AccessKey { + /// The nonce for this access key. + /// NOTE: In some cases the access key needs to be recreated. If the new access key reuses the + /// same public key, the nonce of the new access key should be equal to the nonce of the old + /// access key. It's required to avoid replaying old transactions again. + pub nonce: Nonce, + + /// Defines permissions for this access key. + pub permission: AccessKeyPermission, +} + +impl AccessKey { + pub const ACCESS_KEY_NONCE_RANGE_MULTIPLIER: u64 = 1_000_000; + + pub fn full_access() -> Self { + Self { nonce: 0, permission: AccessKeyPermission::FullAccess } + } +} + +/// Defines permissions for AccessKey +#[derive( + BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug, +)] +pub enum AccessKeyPermission { + FunctionCall(FunctionCallPermission), + + /// Grants full access to the account. + /// NOTE: It's used to replace account-level public keys. + FullAccess, +} + +/// Grants limited permission to make transactions with FunctionCallActions +/// The permission can limit the allowed balance to be spent on the prepaid gas. +/// It also restrict the account ID of the receiver for this function call. +/// It also can restrict the method name for the allowed function calls. +#[derive( + BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug, +)] +pub struct FunctionCallPermission { + /// Allowance is a balance limit to use by this access key to pay for function call gas and + /// transaction fees. When this access key is used, both account balance and the allowance is + /// decreased by the same value. + /// `None` means unlimited allowance. + /// NOTE: To change or increase the allowance, the old access key needs to be deleted and a new + /// access key should be created. + #[serde(with = "option_u128_dec_format")] + pub allowance: Option, + + /// The access key only allows transactions with the given receiver's account id. + pub receiver_id: AccountId, + + /// A list of method names that can be used. The access key only allows transactions with the + /// function call of one of the given method names. + /// Empty list means any method name can be used. + pub method_names: Vec, +} diff --git a/core/primitives-core/src/lib.rs b/core/primitives-core/src/lib.rs index 3996b93c18b..3308fa7b636 100644 --- a/core/primitives-core/src/lib.rs +++ b/core/primitives-core/src/lib.rs @@ -1,7 +1,7 @@ pub use borsh; pub use num_rational; -pub mod account; +pub mod access_key; pub mod config; pub mod contract; pub mod hash; diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index 690f7005ba3..f6bcbc3bc34 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -43,7 +43,7 @@ default = ["jemallocator", "stable_protocol_features"] dump_errors_schema = ["near-rpc-error-macro/dump_errors_schema"] stable_protocol_features = ["protocol_feature_lower_storage_cost"] protocol_feature_lower_storage_cost = [] -protocol_feature_add_account_versions = ["near-primitives-core/protocol_feature_add_account_versions"] +protocol_feature_add_account_versions = [] protocol_feature_forward_chunk_parts = [] protocol_feature_rectify_inflation = [] protocol_feature_evm = ["near-primitives-core/protocol_feature_evm"] diff --git a/core/primitives-core/src/account.rs b/core/primitives/src/account.rs similarity index 60% rename from core/primitives-core/src/account.rs rename to core/primitives/src/account.rs index 8b16e7b239a..badd922630e 100644 --- a/core/primitives-core/src/account.rs +++ b/core/primitives/src/account.rs @@ -1,9 +1,17 @@ +#[cfg(feature = "protocol_feature_add_account_versions")] +use crate::checked_feature; +use crate::serialize::u128_dec_format_compatible; use borsh::{BorshDeserialize, BorshSerialize}; +#[cfg(feature = "protocol_feature_add_account_versions")] +use core::default::Default; +#[cfg(feature = "protocol_feature_add_account_versions")] +use core::result::Result; +#[cfg(feature = "protocol_feature_add_account_versions")] +use core::result::Result::Ok; +use near_primitives_core::hash::CryptoHash; +use near_primitives_core::types::{Balance, ProtocolVersion, StorageUsage}; +use serde; use serde::{Deserialize, Serialize}; - -use crate::hash::CryptoHash; -use crate::serialize::{option_u128_dec_format, u128_dec_format_compatible}; -use crate::types::{AccountId, Balance, Nonce, StorageUsage}; #[cfg(feature = "protocol_feature_add_account_versions")] use std::io; @@ -12,7 +20,11 @@ use std::io; BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Debug, Clone, Copy, )] pub enum AccountVersion { + /// Versioning release V1, + /// Recalculated storage usage due to previous bug, see + /// https://github.com/near/nearcore/issues/3824 + V2, } #[cfg(feature = "protocol_feature_add_account_versions")] @@ -55,14 +67,25 @@ impl Account { locked: Balance, code_hash: CryptoHash, storage_usage: StorageUsage, + protocol_version: ProtocolVersion, ) -> Self { - Account { + #[cfg(not(feature = "protocol_feature_add_account_versions"))] + let _ = protocol_version; + Self { amount, locked, code_hash, storage_usage, #[cfg(feature = "protocol_feature_add_account_versions")] - version: AccountVersion::V1, + version: if checked_feature!( + "protocol_feature_add_account_versions", + AccountVersions, + protocol_version + ) { + AccountVersion::V2 + } else { + AccountVersion::V1 + }, } } @@ -128,6 +151,16 @@ struct LegacyAccount { storage_usage: StorageUsage, } +#[cfg(feature = "protocol_feature_add_account_versions")] +#[derive(BorshSerialize, BorshDeserialize)] +struct SerializableAccount { + amount: Balance, + locked: Balance, + code_hash: CryptoHash, + storage_usage: StorageUsage, + version: AccountVersion, +} + #[cfg(feature = "protocol_feature_add_account_versions")] impl BorshDeserialize for Account { fn deserialize(buf: &mut &[u8]) -> Result { @@ -143,7 +176,14 @@ impl BorshDeserialize for Account { version: AccountVersion::V1, }) } else { - unreachable!(); + let deserialized_account = SerializableAccount::deserialize(buf)?; + Ok(Account { + amount: deserialized_account.amount, + locked: deserialized_account.locked, + code_hash: deserialized_account.code_hash, + storage_usage: deserialized_account.storage_usage, + version: deserialized_account.version, + }) } } } @@ -159,91 +199,73 @@ impl BorshSerialize for Account { storage_usage: self.storage_usage, } .serialize(writer), + _ => SerializableAccount { + amount: self.amount, + locked: self.locked, + code_hash: self.code_hash, + storage_usage: self.storage_usage, + version: self.version, + } + .serialize(writer), } } } -/// Access key provides limited access to an account. Each access key belongs to some account and -/// is identified by a unique (within the account) public key. One account may have large number of -/// access keys. Access keys allow to act on behalf of the account by restricting transactions -/// that can be issued. -/// `account_id,public_key` is a key in the state -#[derive( - BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug, -)] -pub struct AccessKey { - /// The nonce for this access key. - /// NOTE: In some cases the access key needs to be recreated. If the new access key reuses the - /// same public key, the nonce of the new access key should be equal to the nonce of the old - /// access key. It's required to avoid replaying old transactions again. - pub nonce: Nonce, - - /// Defines permissions for this access key. - pub permission: AccessKeyPermission, -} - -impl AccessKey { - pub const ACCESS_KEY_NONCE_RANGE_MULTIPLIER: u64 = 1_000_000; - - pub fn full_access() -> Self { - Self { nonce: 0, permission: AccessKeyPermission::FullAccess } - } -} - -/// Defines permissions for AccessKey -#[derive( - BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug, -)] -pub enum AccessKeyPermission { - FunctionCall(FunctionCallPermission), - - /// Grants full access to the account. - /// NOTE: It's used to replace account-level public keys. - FullAccess, -} - -/// Grants limited permission to make transactions with FunctionCallActions -/// The permission can limit the allowed balance to be spent on the prepaid gas. -/// It also restrict the account ID of the receiver for this function call. -/// It also can restrict the method name for the allowed function calls. -#[derive( - BorshSerialize, BorshDeserialize, Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug, -)] -pub struct FunctionCallPermission { - /// Allowance is a balance limit to use by this access key to pay for function call gas and - /// transaction fees. When this access key is used, both account balance and the allowance is - /// decreased by the same value. - /// `None` means unlimited allowance. - /// NOTE: To change or increase the allowance, the old access key needs to be deleted and a new - /// access key should be created. - #[serde(with = "option_u128_dec_format")] - pub allowance: Option, - - /// The access key only allows transactions with the given receiver's account id. - pub receiver_id: AccountId, - - /// A list of method names that can be used. The access key only allows transactions with the - /// function call of one of the given method names. - /// Empty list means any method name can be used. - pub method_names: Vec, -} - #[cfg(test)] mod tests { + use crate::account::Account; + #[cfg(feature = "protocol_feature_add_account_versions")] + use crate::account::{AccountVersion, LegacyAccount}; + #[cfg(feature = "protocol_feature_add_account_versions")] + use crate::borsh::BorshDeserialize; + use crate::hash::CryptoHash; + #[cfg(feature = "protocol_feature_add_account_versions")] + use crate::version::ProtocolFeature; + #[cfg(not(feature = "protocol_feature_add_account_versions"))] + use crate::version::PROTOCOL_VERSION; use borsh::BorshSerialize; - - use crate::hash::hash; - use crate::serialize::to_base; - - use super::*; + use near_primitives_core::hash::hash; + use near_primitives_core::serialize::to_base; #[test] fn test_account_serialization() { - let acc = Account::new(1_000_000, 1_000_000, CryptoHash::default(), 100); + #[cfg(feature = "protocol_feature_add_account_versions")] + let acc = Account::new( + 1_000_000, + 1_000_000, + CryptoHash::default(), + 100, + ProtocolFeature::AccountVersions.protocol_version() - 1, + ); + #[cfg(not(feature = "protocol_feature_add_account_versions"))] + let acc = Account::new(1_000_000, 1_000_000, CryptoHash::default(), 100, PROTOCOL_VERSION); let bytes = acc.try_to_vec().unwrap(); assert_eq!(to_base(&hash(&bytes)), "EVk5UaxBe8LQ8r8iD5EAxVBs6TJcMDKqyH7PBuho6bBJ"); } + #[test] + #[cfg(feature = "protocol_feature_add_account_versions")] + fn test_account_size() { + let new_account = Account::new( + 0, + 0, + CryptoHash::default(), + 0, + ProtocolFeature::AccountVersions.protocol_version(), + ); + let old_account = Account::new( + 0, + 0, + CryptoHash::default(), + 0, + ProtocolFeature::AccountVersions.protocol_version() - 1, + ); + let new_bytes = new_account.try_to_vec().unwrap(); + let old_bytes = old_account.try_to_vec().unwrap(); + assert!(new_bytes.len() > old_bytes.len()); + assert_eq!(old_bytes.len(), std::mem::size_of::()); + } + #[test] #[cfg(feature = "protocol_feature_add_account_versions")] fn test_account_deserialization() { diff --git a/core/primitives/src/lib.rs b/core/primitives/src/lib.rs index db644981910..d795942a448 100644 --- a/core/primitives/src/lib.rs +++ b/core/primitives/src/lib.rs @@ -1,7 +1,8 @@ pub use near_primitives_core::borsh; pub use near_primitives_core::num_rational; -pub use near_primitives_core::account; +pub use near_primitives_core::access_key; +pub mod account; pub mod block; pub mod block_header; pub mod challenge; diff --git a/core/primitives/src/state_record.rs b/core/primitives/src/state_record.rs index 2b00969367a..a7225c86d3e 100644 --- a/core/primitives/src/state_record.rs +++ b/core/primitives/src/state_record.rs @@ -4,7 +4,8 @@ use std::fmt::{Display, Formatter}; use near_crypto::PublicKey; -use crate::account::{AccessKey, Account}; +use crate::access_key::AccessKey; +use crate::account::Account; use crate::hash::{hash, CryptoHash}; use crate::receipt::{Receipt, ReceivedData}; use crate::serialize::{base64_format, option_base64_format}; diff --git a/core/primitives/src/test_utils.rs b/core/primitives/src/test_utils.rs index 71f4f9ea276..499d316f7c9 100644 --- a/core/primitives/src/test_utils.rs +++ b/core/primitives/src/test_utils.rs @@ -4,7 +4,7 @@ use num_rational::Rational; use near_crypto::{EmptySigner, PublicKey, Signature, Signer}; -use crate::account::{AccessKey, AccessKeyPermission, Account}; +use crate::account::Account; use crate::block::Block; use crate::block_header::BlockHeader; #[cfg(not(feature = "protocol_feature_block_header_v3"))] @@ -25,9 +25,10 @@ use crate::types::{AccountId, Balance, BlockHeight, EpochId, EpochInfoProvider, use crate::validator_signer::ValidatorSigner; use crate::version::PROTOCOL_VERSION; use crate::views::FinalExecutionStatus; +use near_primitives_core::access_key::{AccessKey, AccessKeyPermission}; pub fn account_new(amount: Balance, code_hash: CryptoHash) -> Account { - Account::new(amount, 0, code_hash, std::mem::size_of::() as u64) + Account::new(amount, 0, code_hash, std::mem::size_of::() as u64, PROTOCOL_VERSION) } impl Transaction { diff --git a/core/primitives/src/transaction.rs b/core/primitives/src/transaction.rs index 724a76aaeeb..9a00ab29cbb 100644 --- a/core/primitives/src/transaction.rs +++ b/core/primitives/src/transaction.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use near_crypto::{PublicKey, Signature}; -use crate::account::AccessKey; +use crate::access_key::AccessKey; use crate::errors::TxExecutionError; use crate::hash::{hash, CryptoHash}; use crate::logging; @@ -423,7 +423,7 @@ mod tests { use near_crypto::{InMemorySigner, KeyType, Signature, Signer}; - use crate::account::{AccessKeyPermission, FunctionCallPermission}; + use crate::access_key::{AccessKeyPermission, FunctionCallPermission}; use crate::serialize::to_base; use super::*; diff --git a/core/primitives/src/types.rs b/core/primitives/src/types.rs index 382abfbb76c..a4cb44f9ce8 100644 --- a/core/primitives/src/types.rs +++ b/core/primitives/src/types.rs @@ -4,7 +4,8 @@ use serde::{Deserialize, Serialize}; use near_crypto::PublicKey; -use crate::account::{AccessKey, Account}; +use crate::access_key::AccessKey; +use crate::account::Account; use crate::challenge::ChallengesResult; use crate::errors::EpochError; use crate::hash::CryptoHash; diff --git a/core/primitives/src/views.rs b/core/primitives/src/views.rs index 9e49515710a..5973777104f 100644 --- a/core/primitives/src/views.rs +++ b/core/primitives/src/views.rs @@ -13,7 +13,8 @@ use serde::{Deserialize, Serialize}; use near_crypto::{PublicKey, Signature}; -use crate::account::{AccessKey, AccessKeyPermission, Account, FunctionCallPermission}; +use crate::access_key::{AccessKey, AccessKeyPermission, FunctionCallPermission}; +use crate::account::Account; use crate::block::{Block, BlockHeader}; use crate::block_header::{ BlockHeaderInnerLite, BlockHeaderInnerRest, BlockHeaderInnerRestV2, BlockHeaderV1, @@ -48,7 +49,7 @@ use crate::types::{ StateChangeValue, StateChangeWithCause, StateChangesRequest, StateRoot, StorageUsage, StoreKey, StoreValue, ValidatorKickoutReason, }; -use crate::version::{ProtocolVersion, Version}; +use crate::version::{ProtocolVersion, Version, PROTOCOL_VERSION}; use validator_stake_view::ValidatorStakeView; /// A view of the account @@ -117,7 +118,7 @@ impl From for AccountView { impl From<&AccountView> for Account { fn from(view: &AccountView) -> Self { - Account::new(view.amount, view.locked, view.code_hash, view.storage_usage) + Account::new(view.amount, view.locked, view.code_hash, view.storage_usage, PROTOCOL_VERSION) } } diff --git a/core/store/src/lib.rs b/core/store/src/lib.rs index 2c1881c71d5..9a8ff72c898 100644 --- a/core/store/src/lib.rs +++ b/core/store/src/lib.rs @@ -19,7 +19,7 @@ pub use db::{ LARGEST_TARGET_HEIGHT_KEY, LATEST_KNOWN_KEY, NUM_COLS, SHOULD_COL_GC, SKIP_COL_GC, TAIL_KEY, }; use near_crypto::PublicKey; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::account::Account; use near_primitives::contract::ContractCode; pub use near_primitives::errors::StorageError; use near_primitives::hash::CryptoHash; @@ -38,6 +38,7 @@ pub use crate::trie::{ update::TrieUpdateValuePtr, KeyForStateChanges, PartialStorage, ShardTries, Trie, TrieChanges, WrappedTrieChanges, }; +use near_primitives::access_key::AccessKey; pub mod db; pub mod migrations; diff --git a/genesis-tools/genesis-csv-to-json/src/csv_parser.rs b/genesis-tools/genesis-csv-to-json/src/csv_parser.rs index 969d5914080..c99f399d624 100644 --- a/genesis-tools/genesis-csv-to-json/src/csv_parser.rs +++ b/genesis-tools/genesis-csv-to-json/src/csv_parser.rs @@ -15,6 +15,7 @@ use near_primitives::receipt::{ActionReceipt, Receipt, ReceiptEnum}; use near_primitives::state_record::StateRecord; use near_primitives::transaction::{Action, FunctionCallAction}; use near_primitives::types::{AccountId, AccountInfo, Balance, Gas}; +use near_primitives::version::PROTOCOL_VERSION; use near_runtime_utils::is_valid_account_id; /// Methods that can be called by a non-privileged access key. @@ -196,7 +197,13 @@ fn account_records(row: &Row, gas_price: Balance) -> Vec { let mut res = vec![StateRecord::Account { account_id: row.account_id.clone(), - account: Account::new(row.amount, row.validator_stake, smart_contract_hash.into(), 0), + account: Account::new( + row.amount, + row.validator_stake, + smart_contract_hash.into(), + 0, + PROTOCOL_VERSION, + ), }]; // Add restricted access keys. diff --git a/genesis-tools/genesis-populate/src/lib.rs b/genesis-tools/genesis-populate/src/lib.rs index bf1f09c6df6..388819eb6d8 100644 --- a/genesis-tools/genesis-populate/src/lib.rs +++ b/genesis-tools/genesis-populate/src/lib.rs @@ -251,6 +251,7 @@ impl GenesisBuilder { testing_init_stake, self.additional_accounts_code_hash, 0, + self.genesis.config.protocol_version, ); set_account(&mut state_update, account_id.clone(), &account); let account_record = StateRecord::Account { account_id: account_id.clone(), account }; diff --git a/neard/src/config.rs b/neard/src/config.rs index bb02feefe29..b76cf959089 100644 --- a/neard/src/config.rs +++ b/neard/src/config.rs @@ -20,7 +20,8 @@ use near_network::test_utils::open_port; use near_network::types::ROUTED_MESSAGE_TTL; use near_network::utils::blacklist_from_iter; use near_network::NetworkConfig; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::access_key::AccessKey; +use near_primitives::account::Account; use near_primitives::hash::CryptoHash; use near_primitives::runtime::config::RuntimeConfig; use near_primitives::state_record::StateRecord; @@ -719,7 +720,7 @@ fn add_account_with_key( ) { records.push(StateRecord::Account { account_id: account_id.to_string(), - account: Account::new(amount, staked, code_hash, 0), + account: Account::new(amount, staked, code_hash, 0, PROTOCOL_VERSION), }); records.push(StateRecord::AccessKey { account_id: account_id.to_string(), diff --git a/neard/src/genesis_validate.rs b/neard/src/genesis_validate.rs index a363aa026b7..5cb2a2e2d1d 100644 --- a/neard/src/genesis_validate.rs +++ b/neard/src/genesis_validate.rs @@ -109,11 +109,12 @@ mod test { use near_crypto::{KeyType, PublicKey}; use near_primitives::account::{AccessKey, Account}; use near_primitives::types::AccountInfo; + use near_primitives::version::PROTOCOL_VERSION; const VALID_ED25519_RISTRETTO_KEY: &str = "ed25519:KuTCtARNzxZQ3YvXDeLjx83FDqxv2SdQTSbiq876zR7"; fn create_account() -> Account { - Account::new(100, 10, Default::default(), 0) + Account::new(100, 10, Default::default(), 0, PROTOCOL_VERSION) } #[test] diff --git a/neard/src/runtime/mod.rs b/neard/src/runtime/mod.rs index e1e361d4e4e..b747678e7d7 100644 --- a/neard/src/runtime/mod.rs +++ b/neard/src/runtime/mod.rs @@ -21,7 +21,8 @@ use near_chain_configs::{BETANET_EVM_CHAIN_ID, MAINNET_EVM_CHAIN_ID, TESTNET_EVM use near_crypto::{PublicKey, Signature}; use near_epoch_manager::{EpochManager, RewardCalculator}; use near_pool::types::PoolIterator; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::access_key::AccessKey; +use near_primitives::account::Account; use near_primitives::block::{Approval, ApprovalInner}; use near_primitives::challenge::ChallengesResult; use near_primitives::contract::ContractCode; diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index 1f73043efd5..932359b974c 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -1,7 +1,8 @@ use borsh::{BorshDeserialize, BorshSerialize}; use near_crypto::PublicKey; -use near_primitives::account::{AccessKey, AccessKeyPermission, Account}; +use near_primitives::access_key::{AccessKey, AccessKeyPermission}; +use near_primitives::account::Account; use near_primitives::checked_feature; use near_primitives::contract::ContractCode; use near_primitives::errors::{ @@ -377,6 +378,7 @@ pub(crate) fn action_create_account( account_id: &AccountId, predecessor_id: &AccountId, result: &mut ActionResult, + protocol_version: ProtocolVersion, ) { // NOTE: The account_id is valid, because the Receipt is validated before. debug_assert!(is_valid_account_id(account_id)); @@ -414,6 +416,7 @@ pub(crate) fn action_create_account( 0, CryptoHash::default(), fee_config.storage_usage_config.num_bytes_account, + protocol_version, )); } @@ -424,6 +427,7 @@ pub(crate) fn action_implicit_account_creation_transfer( actor_id: &mut AccountId, account_id: &AccountId, transfer: &TransferAction, + protocol_version: ProtocolVersion, ) { // NOTE: The account_id is hex like, because we've checked the permissions before. debug_assert!(is_account_id_64_len_hex(account_id)); @@ -450,6 +454,7 @@ pub(crate) fn action_implicit_account_creation_transfer( + public_key.len() as u64 + access_key.try_to_vec().unwrap().len() as u64 + fee_config.storage_usage_config.num_extra_bytes_record, + protocol_version, )); set_access_key(state_update, account_id.clone(), public_key, &access_key); @@ -626,7 +631,7 @@ pub(crate) fn action_add_key( { let mut access_key = add_key.access_key.clone(); access_key.nonce = (apply_state.block_index - 1) - * near_primitives::account::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; + * near_primitives::access_key::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; set_access_key( state_update, account_id.clone(), @@ -780,6 +785,7 @@ mod tests { use near_store::test_utils::create_tries; use super::*; + use near_primitives::version::PROTOCOL_VERSION; fn test_action_create_account( account_id: AccountId, @@ -800,6 +806,7 @@ mod tests { &account_id, &predecessor_id, &mut action_result, + PROTOCOL_VERSION, ); if action_result.result.is_ok() { assert!(account.is_some()); diff --git a/runtime/runtime/src/adapter.rs b/runtime/runtime/src/adapter.rs index 8b907d60be0..851ec6112c2 100644 --- a/runtime/runtime/src/adapter.rs +++ b/runtime/runtime/src/adapter.rs @@ -1,5 +1,6 @@ use near_crypto::PublicKey; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::access_key::AccessKey; +use near_primitives::account::Account; use near_primitives::contract::ContractCode; use near_primitives::hash::CryptoHash; use near_primitives::types::{ diff --git a/runtime/runtime/src/config.rs b/runtime/runtime/src/config.rs index 204248cea34..e4ad2eab7fa 100644 --- a/runtime/runtime/src/config.rs +++ b/runtime/runtime/src/config.rs @@ -5,7 +5,7 @@ use num_bigint::BigUint; use num_traits::cast::ToPrimitive; use num_traits::pow::Pow; -use near_primitives::account::AccessKeyPermission; +use near_primitives::access_key::AccessKeyPermission; use near_primitives::checked_feature; use near_primitives::errors::IntegerOverflowError; // Just re-exporting RuntimeConfig for backwards compatibility. diff --git a/runtime/runtime/src/ext.rs b/runtime/runtime/src/ext.rs index 6360905323d..185971a9847 100644 --- a/runtime/runtime/src/ext.rs +++ b/runtime/runtime/src/ext.rs @@ -4,7 +4,7 @@ use borsh::BorshDeserialize; use log::debug; use near_crypto::PublicKey; -use near_primitives::account::{AccessKey, AccessKeyPermission, FunctionCallPermission}; +use near_primitives::access_key::{AccessKey, AccessKeyPermission, FunctionCallPermission}; use near_primitives::contract::ContractCode; use near_primitives::errors::{ExternalError, StorageError}; use near_primitives::hash::CryptoHash; diff --git a/runtime/runtime/src/lib.rs b/runtime/runtime/src/lib.rs index 1efa3bb75da..e52f1c14b40 100644 --- a/runtime/runtime/src/lib.rs +++ b/runtime/runtime/src/lib.rs @@ -9,7 +9,8 @@ use near_crypto::PublicKey; pub use near_primitives; use near_primitives::runtime::get_insufficient_storage_stake; use near_primitives::{ - account::{AccessKey, Account}, + access_key::AccessKey, + account::Account, contract::ContractCode, errors::{ActionError, ActionErrorKind, RuntimeError, TxExecutionError}, hash::CryptoHash, @@ -323,6 +324,7 @@ impl Runtime { &receipt.receiver_id, &receipt.predecessor_id, &mut result, + apply_state.current_protocol_version, ); } Action::DeployContract(deploy_contract) => { @@ -379,6 +381,7 @@ impl Runtime { actor_id, &receipt.receiver_id, transfer, + apply_state.current_protocol_version, ); } } diff --git a/runtime/runtime/src/state_viewer/mod.rs b/runtime/runtime/src/state_viewer/mod.rs index 1f67ebfe01f..bdd84687052 100644 --- a/runtime/runtime/src/state_viewer/mod.rs +++ b/runtime/runtime/src/state_viewer/mod.rs @@ -1,7 +1,8 @@ use log::debug; use near_crypto::{KeyType, PublicKey}; use near_primitives::{ - account::{AccessKey, Account}, + access_key::AccessKey, + account::Account, borsh::BorshDeserialize, contract::ContractCode, hash::CryptoHash, diff --git a/runtime/runtime/src/verifier.rs b/runtime/runtime/src/verifier.rs index 5813d17329b..03a8adccbdb 100644 --- a/runtime/runtime/src/verifier.rs +++ b/runtime/runtime/src/verifier.rs @@ -1,7 +1,7 @@ use near_crypto::key_conversion::is_valid_staking_key; use near_primitives::runtime::get_insufficient_storage_stake; use near_primitives::{ - account::AccessKeyPermission, + access_key::AccessKeyPermission, config::VMLimitConfig, errors::{ ActionsValidationError, InvalidAccessKeyError, InvalidTxError, ReceiptValidationError, @@ -137,8 +137,8 @@ pub fn verify_and_charge_transaction( current_protocol_version, { if let Some(height) = block_height { - let upper_bound = - height * near_primitives::account::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; + let upper_bound = height + * near_primitives::access_key::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; if transaction.nonce >= upper_bound { return Err(InvalidTxError::NonceTooLarge { tx_nonce: transaction.nonce, diff --git a/runtime/runtime/tests/runtime_group_tools/mod.rs b/runtime/runtime/tests/runtime_group_tools/mod.rs index 352d0d6b1a5..c2bc6130564 100644 --- a/runtime/runtime/tests/runtime_group_tools/mod.rs +++ b/runtime/runtime/tests/runtime_group_tools/mod.rs @@ -175,7 +175,13 @@ impl RuntimeGroup { if (i as u64) < num_existing_accounts { state_records.push(StateRecord::Account { account_id: account_id.to_string(), - account: Account::new(TESTING_INIT_BALANCE, TESTING_INIT_STAKE, code_hash, 0), + account: Account::new( + TESTING_INIT_BALANCE, + TESTING_INIT_STAKE, + code_hash, + 0, + PROTOCOL_VERSION, + ), }); state_records.push(StateRecord::AccessKey { account_id: account_id.to_string(), diff --git a/test-utils/testlib/src/node/runtime_node.rs b/test-utils/testlib/src/node/runtime_node.rs index 2c99a51ab8c..24f044183ab 100644 --- a/test-utils/testlib/src/node/runtime_node.rs +++ b/test-utils/testlib/src/node/runtime_node.rs @@ -14,6 +14,7 @@ use crate::runtime_utils::{ }; use crate::user::runtime_user::MockClient; use crate::user::{RuntimeUser, User}; +use near_primitives::version::PROTOCOL_VERSION; pub struct RuntimeNode { pub client: Arc>, @@ -28,7 +29,13 @@ impl RuntimeNode { add_test_contract(&mut genesis, &bob_account()); genesis.records.as_mut().push(StateRecord::Account { account_id: evm_account(), - account: Account::new(TESTING_INIT_BALANCE, 0, CryptoHash::default(), 0), + account: Account::new( + TESTING_INIT_BALANCE, + 0, + CryptoHash::default(), + 0, + PROTOCOL_VERSION, + ), }); Self::new_from_genesis(account_id, genesis) } diff --git a/test-utils/testlib/src/runtime_utils.rs b/test-utils/testlib/src/runtime_utils.rs index 17ee0f9cde5..c6d67c04e4c 100644 --- a/test-utils/testlib/src/runtime_utils.rs +++ b/test-utils/testlib/src/runtime_utils.rs @@ -5,6 +5,7 @@ use near_primitives::account::Account; use near_primitives::hash::{hash, CryptoHash}; use near_primitives::state_record::StateRecord; use near_primitives::types::{AccountId, StateRoot}; +use near_primitives::version::PROTOCOL_VERSION; use near_store::test_utils::create_tries; use near_store::{ShardTries, TrieUpdate}; use neard::config::GenesisExt; @@ -44,7 +45,7 @@ pub fn add_test_contract(genesis: &mut Genesis, account_id: &AccountId) { if !is_account_record_found { genesis.records.as_mut().push(StateRecord::Account { account_id: account_id.clone(), - account: Account::new(0, 0, *DEFAULT_TEST_CONTRACT_HASH, 0), + account: Account::new(0, 0, *DEFAULT_TEST_CONTRACT_HASH, 0, PROTOCOL_VERSION), }); } genesis.records.as_mut().push(StateRecord::Contract { diff --git a/test-utils/testlib/src/standard_test_cases.rs b/test-utils/testlib/src/standard_test_cases.rs index 17beb1b8142..310360c4ce0 100644 --- a/test-utils/testlib/src/standard_test_cases.rs +++ b/test-utils/testlib/src/standard_test_cases.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use assert_matches::assert_matches; use near_crypto::{InMemorySigner, KeyType}; use near_jsonrpc_primitives::errors::ServerError; -use near_primitives::account::{AccessKey, AccessKeyPermission, FunctionCallPermission}; +use near_primitives::access_key::{AccessKey, AccessKeyPermission, FunctionCallPermission}; use near_primitives::checked_feature; use near_primitives::errors::{ ActionError, ActionErrorKind, ContractCallError, InvalidAccessKeyError, InvalidTxError, diff --git a/test-utils/testlib/src/user/mod.rs b/test-utils/testlib/src/user/mod.rs index 60fa552655b..fe6426e026b 100644 --- a/test-utils/testlib/src/user/mod.rs +++ b/test-utils/testlib/src/user/mod.rs @@ -4,7 +4,7 @@ use futures::{future::LocalBoxFuture, FutureExt}; use near_crypto::{PublicKey, Signer}; use near_jsonrpc_primitives::errors::ServerError; -use near_primitives::account::AccessKey; +use near_primitives::access_key::AccessKey; use near_primitives::hash::CryptoHash; use near_primitives::receipt::Receipt; use near_primitives::transaction::{ From 816a00f0a20870f6a193ff989af02bd40ee62cb6 Mon Sep 17 00:00:00 2001 From: EgorKulikov Date: Wed, 21 Apr 2021 17:16:24 +0200 Subject: [PATCH 02/28] Update core/primitives/src/account.rs Co-authored-by: Aleksey Kladov --- core/primitives/src/account.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/primitives/src/account.rs b/core/primitives/src/account.rs index badd922630e..7f314ce8d49 100644 --- a/core/primitives/src/account.rs +++ b/core/primitives/src/account.rs @@ -2,12 +2,6 @@ use crate::checked_feature; use crate::serialize::u128_dec_format_compatible; use borsh::{BorshDeserialize, BorshSerialize}; -#[cfg(feature = "protocol_feature_add_account_versions")] -use core::default::Default; -#[cfg(feature = "protocol_feature_add_account_versions")] -use core::result::Result; -#[cfg(feature = "protocol_feature_add_account_versions")] -use core::result::Result::Ok; use near_primitives_core::hash::CryptoHash; use near_primitives_core::types::{Balance, ProtocolVersion, StorageUsage}; use serde; From ab029b8a8153117baad07dee0a6a8d27d0047b69 Mon Sep 17 00:00:00 2001 From: EgorKulikov Date: Wed, 21 Apr 2021 17:22:14 +0200 Subject: [PATCH 03/28] Update chain/rosetta-rpc/src/lib.rs Co-authored-by: Aleksey Kladov --- chain/rosetta-rpc/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/rosetta-rpc/src/lib.rs b/chain/rosetta-rpc/src/lib.rs index bf51656276f..6d974f59488 100644 --- a/chain/rosetta-rpc/src/lib.rs +++ b/chain/rosetta-rpc/src/lib.rs @@ -15,11 +15,11 @@ use near_chain_configs::Genesis; use near_client::{ClientActor, ViewClientActor}; use near_primitives::borsh::BorshDeserialize; use near_primitives::serialize::BaseEncode; - -pub use config::RosettaRpcConfig; use near_primitives::version::PROTOCOL_VERSION; use near_primitives::views::AccountView; +pub use config::RosettaRpcConfig; + mod adapters; mod config; mod errors; From d73e4750922eb0034bc7c42972e922c64863413e Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 19:15:43 +0200 Subject: [PATCH 04/28] Fixing build --- chain/jsonrpc/tests/rpc_query.rs | 2 +- chain/rosetta-rpc/src/adapters/mod.rs | 2 +- chain/rosetta-rpc/src/lib.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chain/jsonrpc/tests/rpc_query.rs b/chain/jsonrpc/tests/rpc_query.rs index 694e92da10d..00047095689 100644 --- a/chain/jsonrpc/tests/rpc_query.rs +++ b/chain/jsonrpc/tests/rpc_query.rs @@ -12,7 +12,7 @@ use near_jsonrpc_primitives::types::query::QueryResponseKind; use near_jsonrpc_primitives::types::validator::RpcValidatorsOrderedRequest; use near_logger_utils::init_test_logger; use near_network::test_utils::WaitOrTimeout; -use near_primitives::account::{AccessKey, AccessKeyPermission}; +use near_primitives::access_key::{AccessKey, AccessKeyPermission}; use near_primitives::hash::CryptoHash; use near_primitives::types::{BlockId, BlockReference, ShardId, SyncCheckpoint}; use near_primitives::views::QueryRequest; diff --git a/chain/rosetta-rpc/src/adapters/mod.rs b/chain/rosetta-rpc/src/adapters/mod.rs index ea90704976e..559ef89f56a 100644 --- a/chain/rosetta-rpc/src/adapters/mod.rs +++ b/chain/rosetta-rpc/src/adapters/mod.rs @@ -698,7 +698,7 @@ impl std::convert::TryFrom> for NearActions { actions.push( near_primitives::transaction::AddKeyAction { - access_key: near_primitives::account::AccessKey::full_access(), + access_key: near_primitives::access_key::AccessKey::full_access(), public_key, } .into(), diff --git a/chain/rosetta-rpc/src/lib.rs b/chain/rosetta-rpc/src/lib.rs index 6d974f59488..8d57001cd36 100644 --- a/chain/rosetta-rpc/src/lib.rs +++ b/chain/rosetta-rpc/src/lib.rs @@ -15,7 +15,6 @@ use near_chain_configs::Genesis; use near_client::{ClientActor, ViewClientActor}; use near_primitives::borsh::BorshDeserialize; use near_primitives::serialize::BaseEncode; -use near_primitives::version::PROTOCOL_VERSION; use near_primitives::views::AccountView; pub use config::RosettaRpcConfig; From ecaabfc9f431f1617a4fed547904f2549f933723 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 19:51:19 +0200 Subject: [PATCH 05/28] Fixing build --- chain/rosetta-rpc/src/adapters/mod.rs | 2 +- genesis-tools/genesis-populate/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chain/rosetta-rpc/src/adapters/mod.rs b/chain/rosetta-rpc/src/adapters/mod.rs index 559ef89f56a..abfdb401133 100644 --- a/chain/rosetta-rpc/src/adapters/mod.rs +++ b/chain/rosetta-rpc/src/adapters/mod.rs @@ -1015,7 +1015,7 @@ mod tests { } .into()]; let add_key_actions = vec![near_primitives::transaction::AddKeyAction { - access_key: near_primitives::account::AccessKey::full_access(), + access_key: near_primitives::access_key::AccessKey::full_access(), public_key: near_crypto::SecretKey::from_random(near_crypto::KeyType::ED25519) .public_key(), } diff --git a/genesis-tools/genesis-populate/src/lib.rs b/genesis-tools/genesis-populate/src/lib.rs index 388819eb6d8..48252ecf99d 100644 --- a/genesis-tools/genesis-populate/src/lib.rs +++ b/genesis-tools/genesis-populate/src/lib.rs @@ -13,7 +13,8 @@ use near_chain::types::BlockHeaderInfo; use near_chain::{Block, Chain, ChainStore, RuntimeAdapter}; use near_chain_configs::Genesis; use near_crypto::{InMemorySigner, KeyType}; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::access_key::AccessKey; +use near_primitives::account::Account; use near_primitives::block::{genesis_chunks, Tip}; use near_primitives::contract::ContractCode; use near_primitives::hash::{hash, CryptoHash}; From b11063486bcec9b1b84197ab67e6d74be686071d Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 20:29:26 +0200 Subject: [PATCH 06/28] Fixing build --- genesis-tools/genesis-csv-to-json/src/csv_parser.rs | 3 ++- runtime/runtime-params-estimator/src/cases.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/genesis-tools/genesis-csv-to-json/src/csv_parser.rs b/genesis-tools/genesis-csv-to-json/src/csv_parser.rs index c99f399d624..cdabba9c8f9 100644 --- a/genesis-tools/genesis-csv-to-json/src/csv_parser.rs +++ b/genesis-tools/genesis-csv-to-json/src/csv_parser.rs @@ -9,7 +9,8 @@ use serde::{Deserialize, Serialize}; use near_crypto::{KeyType, PublicKey}; use near_network::PeerInfo; -use near_primitives::account::{AccessKey, AccessKeyPermission, Account, FunctionCallPermission}; +use near_primitives::access_key::{AccessKey, AccessKeyPermission, FunctionCallPermission}; +use near_primitives::account::Account; use near_primitives::hash::{hash, CryptoHash}; use near_primitives::receipt::{ActionReceipt, Receipt, ReceiptEnum}; use near_primitives::state_record::StateRecord; diff --git a/runtime/runtime-params-estimator/src/cases.rs b/runtime/runtime-params-estimator/src/cases.rs index 85468631884..86c6ddc23db 100644 --- a/runtime/runtime-params-estimator/src/cases.rs +++ b/runtime/runtime-params-estimator/src/cases.rs @@ -9,7 +9,7 @@ use std::process; use std::sync::{Arc, Mutex}; use near_crypto::{InMemorySigner, KeyType, PublicKey}; -use near_primitives::account::{AccessKey, AccessKeyPermission, FunctionCallPermission}; +use near_primitives::access_key::{AccessKey, AccessKeyPermission, FunctionCallPermission}; use near_primitives::hash::CryptoHash; use near_primitives::transaction::{ Action, AddKeyAction, CreateAccountAction, DeleteAccountAction, DeleteKeyAction, From 1fb8a6b558a9480e9ebe2aab1d0afea389e83d81 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 21:39:14 +0200 Subject: [PATCH 07/28] Fixing build --- chain/client/tests/process_blocks.rs | 2 +- neard/src/genesis_validate.rs | 3 ++- runtime/runtime/src/actions.rs | 2 +- runtime/runtime/src/state_viewer/mod.rs | 16 ++++++++++++++-- runtime/runtime/src/verifier.rs | 3 ++- runtime/runtime/tests/runtime_group_tools/mod.rs | 3 ++- runtime/runtime/tests/test_async_calls.rs | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) diff --git a/chain/client/tests/process_blocks.rs b/chain/client/tests/process_blocks.rs index 5a4883ecc5d..55098b8adde 100644 --- a/chain/client/tests/process_blocks.rs +++ b/chain/client/tests/process_blocks.rs @@ -2623,7 +2623,7 @@ fn test_block_ordinal() { mod access_key_nonce_range_tests { use super::*; use near_client::test_utils::create_chunk_with_transactions; - use near_primitives::account::AccessKey; + use near_primitives::access_key::AccessKey; /// Test that duplicate transactions are properly rejected. #[test] diff --git a/neard/src/genesis_validate.rs b/neard/src/genesis_validate.rs index 5cb2a2e2d1d..f0ef67242f5 100644 --- a/neard/src/genesis_validate.rs +++ b/neard/src/genesis_validate.rs @@ -107,7 +107,8 @@ mod test { use near_chain_configs::GenesisRecords; use near_crypto::{KeyType, PublicKey}; - use near_primitives::account::{AccessKey, Account}; + use near_primitives::access_key::AccessKey; + use near_primitives::account::Account; use near_primitives::types::AccountInfo; use near_primitives::version::PROTOCOL_VERSION; diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index 932359b974c..b4e4bcd78c5 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -893,7 +893,7 @@ mod tests { storage_usage: u64, state_update: &mut TrieUpdate, ) -> ActionResult { - let mut account = Some(Account::new(100, 0, *code_hash, storage_usage)); + let mut account = Some(Account::new(100, 0, *code_hash, storage_usage, PROTOCOL_VERSION)); let mut actor_id = account_id.clone(); let mut action_result = ActionResult::default(); let receipt = Receipt::new_balance_refund(&"alice.near".to_string(), 0); diff --git a/runtime/runtime/src/state_viewer/mod.rs b/runtime/runtime/src/state_viewer/mod.rs index bdd84687052..de558b1b7a3 100644 --- a/runtime/runtime/src/state_viewer/mod.rs +++ b/runtime/runtime/src/state_viewer/mod.rs @@ -485,7 +485,13 @@ mod tests { set_account( &mut state_update, alice_account(), - &Account::new(0, 0, CryptoHash::default(), TrieViewer::CONTRACT_STATE_SIZE_LIMIT + 1), + &Account::new( + 0, + 0, + CryptoHash::default(), + TrieViewer::CONTRACT_STATE_SIZE_LIMIT + 1, + PROTOCOL_VERSION, + ), ); let trie_viewer = TrieViewer::new(); let result = trie_viewer.view_state(&state_update, &alice_account(), b""); @@ -499,7 +505,13 @@ mod tests { set_account( &mut state_update, alice_account(), - &Account::new(0, 0, CryptoHash::default(), TrieViewer::CONTRACT_STATE_SIZE_LIMIT + 1), + &Account::new( + 0, + 0, + CryptoHash::default(), + TrieViewer::CONTRACT_STATE_SIZE_LIMIT + 1, + PROTOCOL_VERSION, + ), ); state_update.set( TrieKey::ContractCode { account_id: alice_account() }, diff --git a/runtime/runtime/src/verifier.rs b/runtime/runtime/src/verifier.rs index 03a8adccbdb..7380d8f71a0 100644 --- a/runtime/runtime/src/verifier.rs +++ b/runtime/runtime/src/verifier.rs @@ -468,7 +468,8 @@ mod tests { use std::sync::Arc; use near_crypto::{InMemorySigner, KeyType, PublicKey, Signer}; - use near_primitives::account::{AccessKey, Account, FunctionCallPermission}; + use near_primitives::access_key::{AccessKey, FunctionCallPermission}; + use near_primitives::account::Account; use near_primitives::hash::{hash, CryptoHash}; use near_primitives::receipt::DataReceiver; use near_primitives::test_utils::account_new; diff --git a/runtime/runtime/tests/runtime_group_tools/mod.rs b/runtime/runtime/tests/runtime_group_tools/mod.rs index c2bc6130564..740d4cd12f6 100644 --- a/runtime/runtime/tests/runtime_group_tools/mod.rs +++ b/runtime/runtime/tests/runtime_group_tools/mod.rs @@ -1,5 +1,6 @@ use near_crypto::{InMemorySigner, KeyType}; -use near_primitives::account::{AccessKey, Account}; +use near_primitives::access_key::AccessKey; +use near_primitives::account::Account; use near_primitives::hash::{hash, CryptoHash}; use near_primitives::receipt::Receipt; use near_primitives::state_record::StateRecord; diff --git a/runtime/runtime/tests/test_async_calls.rs b/runtime/runtime/tests/test_async_calls.rs index be9eed9122b..f8fff681aa8 100644 --- a/runtime/runtime/tests/test_async_calls.rs +++ b/runtime/runtime/tests/test_async_calls.rs @@ -1,7 +1,7 @@ use crate::runtime_group_tools::RuntimeGroup; use borsh::ser::BorshSerialize; use near_crypto::{InMemorySigner, KeyType}; -use near_primitives::account::{AccessKeyPermission, FunctionCallPermission}; +use near_primitives::access_key::{AccessKeyPermission, FunctionCallPermission}; use near_primitives::checked_feature; use near_primitives::hash::CryptoHash; use near_primitives::receipt::{ActionReceipt, ReceiptEnum}; From dbef212809e096fc629fbe4d923962065dde4e76 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 22:08:53 +0200 Subject: [PATCH 08/28] Fixing build --- tests/test_errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_errors.rs b/tests/test_errors.rs index f48d1638418..efa6ba4cbd9 100644 --- a/tests/test_errors.rs +++ b/tests/test_errors.rs @@ -4,7 +4,7 @@ use near_chain_configs::Genesis; use near_crypto::{InMemorySigner, KeyType}; use near_logger_utils::init_integration_logger; use near_network::test_utils::open_port; -use near_primitives::account::AccessKey; +use near_primitives::access_key::AccessKey; use near_primitives::errors::{InvalidAccessKeyError, InvalidTxError}; use near_primitives::transaction::{ Action, AddKeyAction, CreateAccountAction, SignedTransaction, TransferAction, From 9f388b08ddcdc779ae2f90b4172fd2616d8fd3a4 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Wed, 21 Apr 2021 23:08:34 +0200 Subject: [PATCH 09/28] Fixing test --- chain/client/tests/challenges.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/chain/client/tests/challenges.rs b/chain/client/tests/challenges.rs index ddcb237c29a..82e678cb44a 100644 --- a/chain/client/tests/challenges.rs +++ b/chain/client/tests/challenges.rs @@ -402,6 +402,7 @@ fn test_verify_chunk_invalid_state_challenge() { let merkle_proofs = Block::compute_chunk_headers_root(block.chunks().iter()).1; assert_eq!(prev_merkle_proofs[0], challenge_body.prev_merkle_proof); assert_eq!(merkle_proofs[0], challenge_body.merkle_proof); + #[cfg(not(feature = "protocol_feature_add_account_versions"))] assert_eq!( challenge_body.partial_state.0, vec![ @@ -419,6 +420,24 @@ fn test_verify_chunk_invalid_state_challenge() { ] ], ); + #[cfg(feature = "protocol_feature_add_account_versions")] + assert_eq!( + challenge_body.partial_state.0, + vec![ + vec![ + 1, 5, 0, 197, 185, 48, 117, 208, 162, 58, 178, 211, 174, 224, 17, 151, 175, + 104, 50, 193, 73, 241, 135, 170, 42, 77, 144, 147, 221, 252, 5, 35, 120, 151, + 31, 171, 30, 7, 228, 175, 99, 17, 113, 5, 94, 136, 200, 39, 136, 37, 110, 166, + 241, 148, 128, 55, 131, 173, 97, 98, 201, 68, 82, 244, 223, 70, 86, 164, 5, 0, + 0, 0, 0, 0, 0 + ], + vec![ + 3, 1, 0, 0, 0, 16, 63, 153, 161, 236, 209, 114, 108, 112, 213, 218, 218, 180, + 13, 34, 58, 16, 28, 70, 130, 240, 120, 187, 247, 141, 141, 132, 82, 113, 80, + 140, 82, 144, 216, 5, 0, 0, 0, 0, 0, 0 + ] + ], + ); } let challenge = Challenge::produce(ChallengeBody::ChunkState(challenge_body), &validator_signer); From 933d86161033748d70389193c9d8d1e311443f15 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 13:19:13 +0200 Subject: [PATCH 10/28] Storage usage fix --- Cargo.lock | 11 + Cargo.toml | 5 +- core/chain-configs/src/genesis_config.rs | 5 + core/primitives/Cargo.toml | 2 + core/primitives/res/storage_usage_delta.csv | 3112 +++++++++++++++++ core/primitives/src/runtime/config.rs | 92 +- genesis-tools/genesis-populate/src/lib.rs | 6 +- neard/src/runtime/mod.rs | 10 +- runtime/near-vm-logic/src/gas_counter.rs | 4 +- runtime/runtime/Cargo.toml | 1 + runtime/runtime/src/actions.rs | 79 +- runtime/runtime/src/lib.rs | 6 +- .../runtime/tests/runtime_group_tools/mod.rs | 1 + .../storage-usage-delta-calculator/Cargo.toml | 12 + .../src/main.rs | 31 + 15 files changed, 3347 insertions(+), 30 deletions(-) create mode 100644 core/primitives/res/storage_usage_delta.csv create mode 100644 utils/storage-usage-delta-calculator/Cargo.toml create mode 100644 utils/storage-usage-delta-calculator/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index a065110c450..36ee49dd348 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3417,10 +3417,12 @@ dependencies = [ "bs58", "byteorder", "chrono", + "csv", "derive_more", "easy-ext", "hex", "jemallocator", + "lazy-static-include", "lazy_static", "near-crypto", "near-primitives-core", @@ -5327,6 +5329,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" +[[package]] +name = "storage-usage-delta-calculator" +version = "0.1.0" +dependencies = [ + "near-chain-configs", + "near-primitives", + "node-runtime", +] + [[package]] name = "store-validator" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 0fe7a4abecc..b903904c9fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,8 @@ members = [ "genesis-tools/keypair-generator", "tools/restaked", "tools/indexer/example", - "tools/delay_detector" + "tools/delay_detector", + "utils/storage-usage-delta-calculator" ] [dev-dependencies] @@ -116,7 +117,7 @@ protocol_feature_block_header_v3 = ["near-primitives/protocol_feature_block_head protocol_feature_access_key_nonce_range = ["neard/protocol_feature_access_key_nonce_range", "testlib/protocol_feature_access_key_nonce_range"] protocol_feature_tx_size_limit = ["near-primitives/protocol_feature_tx_size_limit", "node-runtime/protocol_feature_tx_size_limit", "neard/protocol_feature_tx_size_limit"] protocol_feature_allow_create_account_on_delete = ["testlib/protocol_feature_allow_create_account_on_delete", "near-primitives/protocol_feature_allow_create_account_on_delete", "node-runtime/protocol_feature_allow_create_account_on_delete", "neard/protocol_feature_allow_create_account_on_delete"] -protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions"] +protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions", "neard/protocol_feature_add_account_versions"] # enable this to build neard with wasmer 1.0 runner # now if none of wasmer0_default, wasmer1_default or wasmtime_default is enabled, wasmer0 would be default diff --git a/core/chain-configs/src/genesis_config.rs b/core/chain-configs/src/genesis_config.rs index b313613480a..f3a458e02ac 100644 --- a/core/chain-configs/src/genesis_config.rs +++ b/core/chain-configs/src/genesis_config.rs @@ -235,6 +235,11 @@ impl GenesisConfig { }) .collect() } + + /// Returns true iff chain_id is mainnet + pub fn is_mainnet(&self) -> bool { + self.chain_id.as_str() == "mainnet" + } } impl GenesisRecords { diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index f6bcbc3bc34..d4d2c1b231e 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -16,10 +16,12 @@ bs58 = "0.4" base64 = "0.13" byteorder = "1.3" chrono = { version = "0.4.4", features = ["serde"] } +csv = "1.1" derive_more = "0.99.3" easy-ext = "0.2" sha2 = "0.9" lazy_static = "1.4" +lazy-static-include = "3" serde = { version = "1", features = ["derive"] } serde_json = "1" smart-default = "0.6" diff --git a/core/primitives/res/storage_usage_delta.csv b/core/primitives/res/storage_usage_delta.csv new file mode 100644 index 00000000000..53b9088993f --- /dev/null +++ b/core/primitives/res/storage_usage_delta.csv @@ -0,0 +1,3112 @@ +0.near,1 +00.near,1 +001.near,1 +007.near,3 +0110b3cbbb0eb096319f1e12460519e65d0429375b7258f377265979c119889c,3 +0153b15fecd4ffd382ffad6882ee053e0a0fddefa7e1a99d8aa29eb07dc9bac2,2 +0154af6f1023fdfd8d87906211c7bae2bc2efae1e5b3347683813f598a19d50e,1 +037bf673cb864e5a14fec7c476fb60d0416e1a46b196b2f95b87599c1c73073e,3 +04bbe8cdda12ab0081a3c4379c97623ffebf33ec4c1d7949acc4f2626cd638a9,4 +0514dc4c3005dd273ed59ac5bab420f81008c698df31d72baa088f92c3340ed4,1 +07.near,1 +0a1eb8bbd90d8a187672baab254774424f4fd58bf11fd6025cb60f118f930005,1 +0aab2c312b933402b75764488c5ffdf2e6ef2b7bcc4cdaab422873e17f9b7f6a,4 +0c0dbe4fd0ec7b6f49388fcd80085fc2f58d12b5a353031a15ba3fa0939bc1c3,5 +0c6c891f032d39d667356fb891a1083fa062cefc5aeae2b1786b84104158ae90,7 +0d10552f8c8cc44b2438f086e989b053b0c604e69a1b9e3858f51a334fe3346b,1 +0d5054e7ee907ca117d7660350bd4a023968d51650c7c4d99c4eb86349752f66,3 +0d7b443198e08e34350371f65ace682f1ca9786d9bf54b2b52ae608fbd81c230,1 +0de88eb5ab5894e784f454508f396a7fed67c56d302264becdfaa9029453a138,2 +0e2b64a24d58fdeba14234372bb0b23a8b683033680acf59cc2c8833bb64dbe6,5 +0e7a0c50b20f5037b40a220aef05fab39aff40b923be04006ff7a6062c424c8b,2 +0ed97eb8b992487f7f03451a24b1fe40d53ca6658afc42b0ab8fe4639385439c,2 +0fb8d555930d307a9d20d5ffb0ffdac5e869b31c17277bd1d800ba6d806dc477,1 +0x.near,1 +0x3bfc.near,1 +1.near,1 +10.near,2 +100.near,1 +100x.near,1 +1015a0dadb90ca2d30035c15261204a7b3f4693177ab8a9771b62591af55d737,4 +1024.near,1 +10scarandres.near,1 +11.near,1 +11_8-bernaced-00_7.near,5 +11november.near,1 +123.near,1 +1234.near,1 +12ed01143181f20669a689d0e1ee202a7d8301fba4c4864274de4bdffdc6abe5,3 +132b92af125cb0b94f6cc8767539bf6e6fa3a2761824ba92913e272a4646165a,2 +13ba6764bee29e130a9cea6ff5545ba137ea48ccf23ab08d55001a388d1eed55,1 +14161728bc6fd05a204a6a74c51c1256d1be6160c42b9dbfcb56de24dd24ba2c,5 +14b1f401dc50576118a2472acd428f7c4c2c99e5ae21d1c01dd483593026bf9b,7 +15.near,4 +166a8baa5a06c12a89bd9fe53be82f4f3113aff7a5b8ad1c790f6fe215de69bb,5 +18.near,1 +19240275b389c3d4f37ad6d015d0e5552f353e17a55555f4b88d120e208b35f2,2 +1a1b2e1105736ad5cf15377b239ad0060ff698b427d837047dd8c6cefc664821,3 +1a313ebf78de0975aa0d2d06f064db497e76e82dfe59ae91c6bd11fd96240f1e,3 +1a360b62fac5a1693883a50a8a629f23d54c3ad08f9b1411ba1de41931f6635b,1 +1ab5994f049e3b19f1a9a00af5466184df51143299ff74fdc0ef55ad3c452f60,1 +1e4703c615a76e489c8812485cc48103f05e28ef719c7e64c7f99abbcf3a8514,2 +1e6221ca523a6e16e271dda75b8edeae5b35b30de5b3b666e2eb86a974cd435e,1 +1earn1.near,1 +1inch.near,1 +1kk.near,3 +2.near,1 +2140a646e0a3c8c974fb0c6e318fbf62d086784a5f7419d80caae4fcb40a76d6,2 +22.near,1 +237dd62c081e1ccc75f4ba77b02dcea4e56fde024f16746727285c042dc3027a,2 +23d810a933bbac6447aaada7ef03156eb324a124857a7528942819b47f81c1a3,1 +273ee3cbd1f36fd54dc52a4f93302cc80fd3e7d64486ceba35f5b4d1f7ebea8d,3 +27eef9392cbcd7ff73675755cdf8a930c5d829306f2653b404ca2ebf45821c53,3 +28121990fg.near,2 +294548b971fa95fb635aca80caf6ec25cf26b2082c11beee3ad23edd3c119fbd,3 +29878949f636662ce3c2429e45a68469f799f08817cc2d1b57936ddff2e390e8,3 +2a50c02c6c506d7745713986e4d5fe0fc9806a819dc10225d762d96236a5b986,1 +2bb9146b50b937ae0a02be5407dab2104311c228cf72521d59e652c693927052,4 +2c080e67e1696fce40dbd29f37c0cb222f69d051f3d820479dcf68b69b8b6040,1 +2e8b636a1b4ebc65969e2509dfdae58fd93135d5d688bc6e57ff9443398b4cec,4 +2f7b6346ccb5b22d9e18caf0c46412cdc03b94783d2ecec3f9d3cb62395460a7,4 +2ge.near,1 +2smart4.near,1 +303c0fe14eeac48e62cfc6ea8a4b0ad5c314b56038dd9b618a3a7a68004e0976,1 +31337.near,1 +31536812dcdf087d2f58d2006273342bb8a07691b187e60fa95013c546e3c697,22 +317c975115ab57b7cff17aede35e7313b61d94283653e98193b62f4f5ef84155,2 +329794744.near,2 +362.near,1 +372ad2d5c7cbab331e985ad0b82aa1ef4d8a814114506b55166b46dfedcf3cb8,1 +3803e3358a676111a436ff0c2199165c290200682cedc3cef42b97db3e69436e,1 +3832040fea9bb71e7d5b9878028daa11205347bbc4397120fdd629ebffbb3ee7,5 +3839632950.near,1 +3b83b07cab54824a59c3d3f2e203a7cd913b7fcdc4439595983e2402c2cf791d,1 +3bcec9ab1433c85ec3073271652cbb56970affa28fc7681ed1ee7edcffbb41c8,11 +3dda717ab16163320d3cb4c301d458b747800a78a001a8c2e62d6c67f77e1621,1 +3dee906ea97fae13af3aaeccb3d48b2c26333dbe2e1400e0806d03b366c02554,1 +4.near,2 +40fe3cb2aed51e9566bda6125a73542a4f8783b10cb121adcbd138090413c87c,4 +417d3db9955230c26c5f20d8976238809b93b200b20a902d2026503b564bc590,1 +41a91e65b740aa45f7e43a7beb3f7e7ea89b886ef866d463b649b2ce250c5ac8,1 +42095658e8f68de946387fdb4b57aba8688c19accc0c7561d21a40750acbfc3d,3 +427921797a22047e361bd436fc3046be9af45d9a2fdb889fee4578f7e15b476d,16 +42d4333ddf86fa25f44e3958aaf7c47f8381ba288298913985321778c57b4f87,3 +44.near,1 +454864608.near,1 +4840e45ddb1f88707a66adb4014aef69aac28f4e6bf888be9af9875254778049,1 +489fcc38ffe24db6bf49b37391f16cf55aff87e9e74752206876c5f2bcd96550,5 +49b215f4ce37d8635322a23164e2129832e12a3aad8909f11015682fe2001243,3 +49caf8c545700980ac5cd883bfc3682feeb971083c5569fe6ef67cc93ca3f47f,3 +4b84545328537c4c97fd353879bf016275ae42888a9a613320a0929b3b12be9e,1 +4b919505a2e49a3b47d4b7327d3b3bf1faeb02c21d797e3364bdde605ac03947,1 +4myson.near,1 +4nts.are.near,1 +5.near,1 +501f05dc581cc48e6c49ee2519dd983dcc209fda7d42053adb5d496042b2931e,1 +51.near,1 +51407b06e1740af4f5bc0d6fadbda8ec749087167b965808ed5430e9181f522f,2 +518d7a7700b37d96543682aa5db65ec74082021542a01c32007af800d29da550,1 +51ffc319cb90baa612c62fdb1c36f333db2034e403be321b88f1b0d6f754cfde,3 +520.near,1 +52fd2108c386cf51aea902e6fcea63db21887e3ee6ca4cb01bdea670c9dcf731,1 +55.near,1 +5df4b64e6e427f91d59b802b2447180b914edf54aa9afa28f6c9d5b4b1f7d8ea,1 +5ec98442007ea2f2789e1b18fda4cede7af01e933bd055fd64cfa59d0764070f,4 +5fff20e450e7297c455c88c4deb96679fb4bd360cf029ab65fe6722b37b6ddb5,4 +6.near,1 +6119bc71a0004cd7da1d838c90e43534c15d7e0b7f1233f9a9b9871070d1d54b,3 +632be5d6e0ac3bec82f8cde5cbc29535b3d17c2728332de224d500dd3f919cb4,4 +6577af8fce464dff3bdfcda04c9d93b80eb9bd2d7600648bfb154ece709199ee,7 +659f400d18b5585fbe993d94090a2a7720b3905671c16d939f3ca75dc8748388,1 +66.near,1 +666.near,1 +6755a67d6fc7e0d00eccc19f5f4ac4c796b70a9d05c600213079efdb35929ed8,2 +6a62e81e18f79c5aaf721cd8ec79394e02dacef82b881efebd0840398161fa7e,1 +6a9f536eaaccb62fc3ccda6018aa4a856893a9418dd7c0f62040d49240c925d1,1 +6fe52682536bd3f2195f58a9ace51c9ded130959da5550d936bfb9d000045af1,2 +7013df963f4f3226fc7fe393e0f459c4710c5e4b9f1455b772fb033adcd0db9d,2 +710ea433fd8f67300c78c43351f847b48dd4ac0ae6b958d44081d5efc2458f5f,5 +72119254f1872216214542967b700deecfe12f679c4206bce96159a580827b9a,2 +736d01a5f9e2a6b6cebff2b56eaab5ba86d9efa51f6a292294e7a0f4e4f304bc,3 +75180a176bc103dd239f43271ab8e95da5782755dc9a210925a0e722cb5fccbf,6 +75570b99df84e2e8b138dbb6d084bed628cbb2e8179d0c7ba6d941b445d4f556,2 +7671144.near,2 +77.near,2 +77725bb78fcfe81cbd640fdaa25f28fd3050ceae281c5d3764b694cc32cd66d4,1 +7ee2991cb2076c43e90e37543efd0f1bac32f5c10f9b1755907723725c055444,6 +7inch_dick.near,1 +7nda.near,1 +8.near,1 +810d9ece5ed546dd3f17aea5f22b6044de70477d85ad53307eb07c920fcab139,4 +8378ceb0c3dce515575bc04985acd20ab3de5bfc932daee11db781c0bac2c929,1 +858035a9c9cec30c9f07be24ddf7b1ea1a513b001ce8046e4f6c5eb96222c51f,2 +86.near,1 +86b1889b9876cdfbd40b0bab21b8efa60559e02115850a743cbbdd8063b31803,1 +88.near,2 +8819beaa2fa7cef4fe800f6a890c1293e3e90f21d23027293a2690540de986f7,1 +884e0aa90212fb91dc0b718987c5c5fc140cf5694316645f6716d5aaa2ef0a9a,1 +888.near,1 +88888.near,1 +8888888.near,1 +8cfeba62ea751cac817c7c0a39bd8a594f0f5ba91e4caf4304260785045b2e04,2 +8dc251953d089d322fcdf21853331e12b467285174268f9020834962b3c6eb67,3 +8ee0eabdb51eb6984ceb018851b93cea431681b0f9e0816061a8e7fe23c4a544,1 +90b952a3f8a44642c4c61689bee725a5ce3927ba4a520be031e1c6d23fadc28f,3 +90d23a0362766761a59dad0afca2243d3635f17bd0091aff1f5fb2eb804cb32c,10 +9306bf915f8a4948d1c6b16d3a68897338309be7bdd6ef4887b2a11656c39ee5,25 +93947f0956ab5e947b04775a08a3588818adbacf852de1af10a53cd2fc0913d7,2 +9434e48096b096ac4111a3488cf01c4376aa5ffe111e6be818eaa35ed5be0c1e,5 +960390f1cfc00c5dab00e5a6b148d8105b999b796d7b94b948f588f42fbcd1f1,3 +996.near,2 +999.near,1 +99999.near,1 +9ba1203d33ae0e66f8b0d55a0cc0de4bdc7decbc14912c3192a5d5aacd3f48f7,4 +9e227608367c2ee4fa0b5f4aa1f6a1edca390e30c3eba3c1b478d767873edfb3,11 +9e233ab3b452fd8e3cf322d4285880a30999767e09dc248c95347c0a1bba9bfd,3 +9f01a286fca244938bfb85e4f42513d582b91829ef60ad54e0bf70b39850b2dc,2 +9fb0e708aa699867ddf68297704f5733e0a960c32e4a5a141ebfcb930965105a,2 +a.near,1 +a0244742a4cbe6eb5227022032180ccd97f9860a7d0b3caa23f2da40401cda4f,3 +a03d8af59a1e193e40df0cc3f86cc71854373d757777bc9df1bb3688b8977482,2 +a3d68485efea9f80611ff9a983ea006b24481ca5856da8b2d799e2f51c9b98ce,4 +a4bf751682fb82bc61de4bfd5824ab3191259309d2c37a87c34da62310ccb954,4 +a707181abad1a2679da6ff53c55d8247a636d769215a736b4cb4984e41e3195d,4 +a_mote.near,2 +aaaeeeggg.near,2 +aac2aad7527581b68ca6ec86344f799afa4b75a0014dd0919e755ab8a041c0e9,6 +aad.near,1 +aaronlutze.near,1 +ab1.near,2 +ab2.near,1 +abc.near,1 +abin.near,1 +abl.near,2 +abl2.near,2 +aborjin.near,1 +abosiqi.near,3 +abraham.near,1 +abstractmonday1.near,1 +abu.near,1 +abzman.near,1 +acdab2c10ef8a4aa3e895c90814f3d7a4ca50c5582a3bdbca091f4ec783d924d,5 +ace.near,1 +acelee668.near,2 +acotelo.near,1 +acoyne1.near,1 +acoyne2.near,1 +acp.near,2 +acpearson.near,2 +ad9be0b70a92c588c53934f92a4ba4429ac6173228d9ecb12341fddf449c425e,1 +adamko.near,1 +admin.near,2 +adnan.near,1 +adrianchase.near,1 +adrianirimia.near,2 +adrimrl.near,1 +adrymothe.near,1 +aeeeinvest.near,1 +aeror.near,2 +afqanich.near,2 +age.near,2 +ahe.near,2 +ahmadsalman.near,1 +ahmedjacob.near,2 +ahsette.near,1 +ai.near,2 +aidar.near,1 +airocket.near,1 +aiym.near,1 +ajaykumarp0900.near,2 +ajcct22.near,1 +ak.near,1 +ak6.near,1 +akagetbetter.near,1 +akariko.near,2 +akartik87.near,1 +akil.near,2 +akueitaiwan.near,2 +akulov.near,1 +alan.near,1 +alan1.near,2 +alan2.near,2 +alan3.near,1 +alannice.near,1 +alanromero6695.near,1 +alby.near,2 +alejoy2k.near,2 +aleksandr.near,1 +aleksandr_bakanov.near,1 +aleksey.near,1 +aleph.near,1 +alethea.near,1 +alex.near,3 +alex1.near,2 +alex13.near,1 +alex487.near,1 +alexander.near,1 +alexandermacgg.near,1 +alexbys.near,2 +alexde.near,1 +alexey.near,1 +alexeymarkov080.near,1 +alexk.near,1 +alexmonttoya.near,1 +alextom.near,1 +alexyang.near,1 +ali.near,1 +aliaksandrh.near,2 +alibaba.near,1 +alifromcairo.near,1 +aliskhan.near,2 +alive29.near,1 +aljpra.near,2 +alkan.near,1 +alma.near,2 +almutasemalhaj.near,1 +alpcan.near,1 +alpha25.near,1 +alsharif.near,1 +alvin0617.near,1 +am0250.near,1 +ama89.near,2 +amani.near,1 +amazon.near,1 +amg.near,2 +amir.near,1 +amirmurad.near,2 +amisare.near,1 +amit.near,1 +amos.near,1 +ampl.near,1 +ams.near,1 +amster.near,1 +amyk.near,1 +an.near,1 +analilia23.near,1 +analilia2303.near,1 +anandp1005.near,1 +anastdubrovina.near,2 +andre.near,1 +andre20113.near,1 +andreafortugno.near,1 +andreasmueller.near,2 +andrecronje.near,1 +andrewseptember.near,1 +andrey.near,2 +andreyvelde.near,3 +andrius.near,2 +andy.near,2 +andy12.near,1 +andyf.near,1 +angrykoreandad.near,1 +anisha.near,1 +anki.near,2 +anna.near,1 +annachu8.near,1 +annaleoprowell.near,1 +annastories.near,1 +annet09.near,1 +annita.near,1 +annmarzak2020.near,1 +anoane.near,2 +anonimus_it.near,1 +anonymwhale.near,1 +ant.near,1 +antoinevergne.near,1 +anton.near,1 +antonbvb.near,1 +antonio.near,1 +antsibirev.near,1 +anumation.near,1 +anxongdong.near,1 +anyhowclick.near,1 +anyog77.near,1 +aoi.near,1 +apok.near,1 +apolinares.near,1 +aptemuyc.near,2 +aqua_chiang.near,1 +aquila.near,1 +aramak.near,1 +aravind.near,2 +aravind1456.near,1 +archebald.near,1 +arco.near,1 +arcosivan13.near,1 +arctek.near,1 +are.near,2 +areddy.near,1 +ares.near,5 +arfrol.near,1 +arhimond.near,2 +aris.near,1 +arista.near,1 +arman.near,1 +armi.near,1 +arr.near,1 +art.near,2 +artem.near,1 +arthur.near,1 +arthur36.near,1 +arthurs.near,1 +arthurs2.near,1 +artolose.near,1 +artur.near,1 +aryan.near,1 +ash.near,5 +ashwincc.near,9 +asif.near,1 +asotirov.near,1 +aspaceodyssey2001.near,1 +assefreak.near,2 +astamo.near,1 +astan.near,1 +astro.near,1 +astromartian.near,2 +atillaofcrypto.near,1 +atrdenis.near,1 +atskbook.near,2 +auction.near,1 +audaciousamit30.near,1 +audit.near,1 +auel.near,1 +aurel.near,1 +aurora.near,1 +austin.near,4 +autox.near,2 +avantiurin.near,2 +avh857.near,1 +aviy17.near,2 +avizar.near,1 +avogadro31.near,1 +avtomax.near,1 +aw_khalifa.near,1 +awesome.near,1 +awulf.near,1 +axe.near,1 +axel.near,1 +axl.near,1 +axser.near,2 +ay.near,1 +ayotom4u.near,2 +ayy.near,1 +az58348118.near,1 +az6ykawallet.near,1 +azaticus.near,1 +b03a405ec73abb57ce8379889b4e705b6a33e2178f67349ccda1a87ef87e7cff,2 +b0d8134aef7b38217d53e2df574064a7d2020ecdea4fa7c875a4c6c0b3aa0405,4 +b17088e2d35317c7e38f08689973c71349e9bdc11e08dd4eb8ade316d79e7bad,3 +b4b6c1ba1db210d9dfbb6c242d5d6266988ffae9bdc24f4b2be0b1e700704fc4,2 +b4e194dc7b583f7b95c4549c47206f4283f38b208f293045609cd9ba819db17b,4 +b525bd7c8dda7c6db8dd9da09c8791b2ee2c732c1db10478885084540b600180,3 +b6954715.near,1 +b87d7996f47a8d9c5c838457883abf543918bf1dc915ad033dfbcb40c8062cad,1 +baa52093ca28dbc224c9a699ee559bd3b08c84f2d2c119ad7955722102623500,3 +baba.near,1 +babachyke.near,1 +babooha1.near,1 +babykuteok23.near,1 +back2thailand.near,2 +badgermilk33.near,4 +badick.near,1 +baed60a83adf64b3d89eefcc4c2e9bd53b7e86f02c0afc1e986e5fcf2db418a7,1 +baer.near,1 +baf.near,1 +baggy.near,1 +baidu.near,1 +baillokb.near,1 +bakautm.near,1 +bakulowski23.near,1 +baltitus2020.near,5 +bambaleo.near,1 +bandele.near,1 +bangbangwu.near,1 +bank.near,1 +barbear.near,1 +bas.near,2 +basando09gambler.near,1 +basedserg.near,2 +basov.near,1 +batbh.near,1 +battuta.near,1 +bayswatermay65.near,1 +bayusoe.near,1 +bcd38694fae6dba4b2458d44f5b094096ffc3d2342641e9c4d662e666c05ca9c,6 +bcfiekuo25656.near,1 +bdetto2010.near,1 +be.near,1 +bear.near,1 +beatguy99.near,1 +bedivere007.near,1 +beetlz.near,1 +begimay.near,1 +believemestalinspeakslikeyou.near,1 +bellyom.near,1 +belove.near,1 +ben_1507.near,1 +benhartney.near,1 +benjake.near,1 +benjamin.near,2 +benjaminbalazs.near,2 +benoit.near,3 +bentien.near,2 +beny.near,1 +berkayboga.near,1 +berlin.near,1 +berry3425.near,2 +besavage.near,1 +bet.near,1 +bf15b701370b4024a3b465669425e0c38dab3d11f5bf536c62826d3ca38397d9,1 +bfa14bc3bbc363ace68a1bbce2c03400ad956174d8c0caeb61426484635ef8ac,4 +bibo.near,1 +bichenkk.near,1 +bigcoin.near,1 +bigfish.near,2 +bigpapa.near,1 +bigpapa2.near,1 +bilaljivraj.near,2 +billtr.near,2 +binancelabs.near,1 +bingowrt.near,2 +biogkosm.near,1 +bipbippp.near,1 +birchmd.near,2 +birishka.near,1 +bitcoin.near,1 +bitcoinaddict.near,1 +bitcoinbarber.near,2 +bitcoinrok.near,2 +bitcoins.near,2 +bitfinex.near,2 +bithumb.near,1 +bitinvestia.near,1 +bitlion.near,1 +bitmax.near,2 +bitprop.near,1 +bizi.near,1 +bjorn.near,1 +bkk920.near,1 +bkvkrll.near,2 +blackflag.near,1 +blackheuk.near,2 +blackrium.near,1 +blake.near,1 +blakeboe.near,2 +blakenear.near,2 +blanco-75.near,1 +blasio.near,1 +blasio02.near,1 +blinks.near,1 +blitz-123.near,2 +blizzhard.near,1 +block.near,1 +blockchaincompanies.near,2 +blockdaemon.near,1 +blockstech.near,1 +blok1919.near,2 +bloomedemperor777.near,2 +bluccoj.near,1 +bluccox.near,1 +blueblindmelon.near,1 +blxpro.near,1 +bmahony.near,1 +bmahony2.near,1 +bnb.near,1 +bobek.near,1 +bobjmiles.near,2 +bodin2499.near,2 +bodya.near,1 +bogdan.near,1 +bohdan.near,1 +boiler1981.near,2 +bojana.near,1 +boka_sfc.near,4 +bokhaled.near,2 +bombaymillions.near,2 +bomboleylo.near,1 +bond_y8674.near,1 +bonesdu.near,1 +bonestoh.near,2 +bonka.near,1 +bonmale.near,1 +boot1985.near,1 +borbox14.near,1 +borneodreams.near,1 +boss.near,1 +boss57.near,1 +boulder.near,1 +bowen1.near,2 +br4h.near,1 +braaaaam.near,2 +brad.near,2 +brambumbes.near,1 +bratukhin.near,2 +brianbencom315.near,1 +bridgecraven.near,2 +brightside.near,3 +brka.near,1 +bro.near,1 +brossan.near,1 +brunitob.near,2 +bruno.near,1 +bryan994.near,1 +btc.near,1 +btc123.near,1 +btcd.near,1 +buchi.near,1 +bugzbtc.near,1 +buivantai.near,2 +bulldogs8tigers.near,1 +bulldojkee.near,1 +bunghi.near,1 +bunnydoodle12.near,1 +burgheleaico.near,1 +bustups22.near,1 +buy.near,1 +buzi.near,4 +bve73.near,2 +bydaichi.near,1 +bymetin79.near,1 +c3de7f0ba6ee1cfca2e55541707bb91cb6d0c59a0cb8a489a7f00f5c14360b88,4 +c3lestial.near,1 +c4885c8ab855c95d905be6b160333f55a9294b89641035bd321ab7d051f7e882,4 +c55e4140ef5ed72bfa54f560c795ab96a38cc4e9079c7d07a88433c5b19662fb,4 +c711198b5065bd07dac5a3f2bdc97cd3700b0af7cba0f4b51d91a350513ec942,11 +c77b49f39a3ae39c1d94d8e4186b3110a022a4118c49d7ef2a913809c4046c50,4 +c7f2a4ae16c9514159386f5351bf0365032b8c76801341087bc3627221cdd25e,9 +c80f0a2093b7075b3717ea94dcc3bd54b369e47bc9096d6920f2baf16d1693ec,4 +cacossio.near,1 +cadel.near,1 +caesar0314.near,2 +caizhenhao.near,1 +cake.near,2 +can.near,1 +canahmett.near,1 +captainwhale.near,1 +carangel.near,1 +carles.near,1 +carlos.near,2 +carolinanoriega.near,2 +cashman.near,1 +casino.near,1 +caso234.near,1 +caso234z.near,1 +castleman.near,2 +catalin.near,2 +catfat.near,1 +catoshi.near,1 +cbbffb1ef77b7258ae161102d549251177205345c5318e0be9ab1c0adf95f132,2 +cbret81.near,1 +cc.near,1 +cc3f289f216158c78a126d9394b9b7e50fd27d327e2fc630668bc068a6d07548,2 +cd1ec14a5e33a4d922fffc6eece8dfad31964e7238f28a431550ce2919faad63,1 +ce0c6c3f00cdc1495d78b222b933b7a4a39bfcfdc6b19ee95020ca1faee6ebba,1 +cea7ac3268c4efe1639776501cfd3d486d0cb61e9a0e5888986635944b07d539,5 +cedric.near,1 +ceo.near,1 +cestovatel.near,2 +cesxy.near,1 +ceyptoslash.near,1 +cfzy8888.near,1 +cgrvgha6bvjh2apkzbbcdxdouy3yapjj.near,1 +chad.near,1 +chagabee.near,1 +chain_green.near,1 +chainwang.near,2 +champinemcfaddin.near,1 +chance2dance.near,1 +chandru.near,2 +changning.near,1 +charles.near,1 +charliephy.near,2 +charlotte.near,1 +chcobesc.near,1 +cheburechek.near,2 +cheikhada.near,1 +chen813.near,3 +chenda.near,1 +chengizkhann.near,1 +chengizkhanns.near,1 +chengxiaokris.near,1 +cherouvim21.near,1 +cheryl.near,1 +cheslav.near,1 +chestnut.near,2 +chewie1.near,1 +cheyne.near,1 +chez77.near,1 +chief.near,1 +china.near,5 +chipon46.near,1 +chirag911.near,1 +chiwairen.near,5 +chouchou.near,1 +chouhsinyo.near,4 +chris.near,1 +chris_ns.near,1 +chrispaes.near,2 +christiaan.near,2 +christian.near,1 +christianwolf.near,1 +chrom175.near,1 +chuanshao.near,1 +chuckando.near,2 +chulei.near,1 +chun.near,1 +chung.near,3 +chuppi1108.near,2 +ciprian.near,1 +ciptim.near,1 +ckb.near,4 +ckhk5661.near,2 +claim-tokens.near,1 +clark.near,2 +claudia.near,1 +claudiu.near,1 +claunas.near,1 +clawmvp.near,1 +cleaner.near,1 +cliu.near,2 +cm.near,1 +cn.near,1 +coachb.near,1 +cocolin51.near,1 +code.near,1 +coffee.near,1 +coinbank.near,1 +coinbase.near,2 +coindex.near,1 +coinless.near,1 +coinlist.near,1 +coinmarketcap.near,1 +coinmike86.near,1 +coins.near,1 +coldwinter.near,1 +colli.near,1 +combatant.near,1 +comcmipi.near,1 +commam7109.near,1 +companya.near,1 +compound.near,1 +condes.near,1 +contributors.near,1 +coonolex.near,1 +cooper.near,2 +copperbrain.near,1 +coreman.near,1 +cosmopolite.near,1 +cowaribit.near,1 +cr.near,1 +craig.near,1 +craigwright.near,2 +crasengover.near,2 +crass.near,2 +crazypiano.near,1 +crc5.near,1 +crespo58.near,1 +criogen.near,1 +crlwallet.near,1 +crypted.near,1 +cryptio.near,2 +cryptnito.near,1 +crypto80.near,1 +crypto_bu.near,2 +cryptobro.near,1 +cryptochin.near,2 +cryptocurrency.near,1 +cryptodonny.near,2 +cryptodruu.near,1 +cryptodzh.near,1 +cryptoearn.near,2 +cryptoinvestingk.near,1 +cryptojay.near,1 +cryptojones.near,1 +cryptoking.near,2 +cryptolab.near,1 +cryptolife.near,2 +cryptolonewolf.near,2 +cryptomearis.near,1 +cryptomilion.near,1 +cryptomoneymaker.near,1 +crypton0ob.near,1 +cryptonear.near,1 +cryptosa.near,2 +cryptosafu.near,1 +cryptotiger.near,1 +cryptovision.near,1 +cryptowhale.near,1 +cryptoyoda.near,1 +crysto73.near,1 +csk13925957545.near,1 +ct.near,1 +cxz.near,1 +cypherhunter.near,1 +cz.near,1 +czech.near,2 +czizzy.near,3 +d075b44b14dbda71a31f05abd24aa4c76b1f3ef42898abf67073d38d8fbfe801,1 +d1.near,1 +d1eselforeva.near,1 +d258ab4694321dcde0c5bcc7097e5dafff46523840cf3a7370d78565e96d9253,4 +d31700.near,1 +d4e5cc25b629236480a236553680f218a37972dc3a5eee1bca1aa31838c80541,1 +d53f439c2377739a1e529f5438f2a44821c853ab871d38221f185ccfb7fc8784,34 +d5617c05503cac78c0aae88ed9550932c104e4e734166fa874eefe93c23eacd2,1 +d5f29321220d0829ca1565d04a1fc07aaff326ab655a299add8543aa41bd4f5f,4 +d6e8bfda2d5b11da382de2edb7d4f5a05237a539847dd794cd9ee30ec859bae2,4 +d7c9d5126ef6b118224e49cf44133df2adde499e053d044fa4f860bb97552bbd,2 +daeho.near,1 +daf.near,1 +daflv.near,1 +dahlberry.near,4 +dai.near,1 +daixinyi.near,1 +daliut.near,2 +damianguenther.near,1 +dana888.near,1 +danbiscuitbrown.near,1 +danchr.near,1 +dandoon.near,1 +dane75.near,1 +dangdh.near,1 +danger25.near,1 +dani.near,1 +daniel.near,2 +danielc.near,1 +danielledelsing.near,1 +danil.near,1 +daniyar.near,2 +danklasson.near,2 +dannn14.near,1 +dannyvanosdeman.near,1 +danosn69191969.near,1 +danyjj.near,1 +dao.near,1 +daoasset.near,1 +daphunk.near,1 +dar1.near,1 +dariako13.near,1 +darkec.near,1 +darkodoog.near,3 +darkodoog2.near,2 +darksurfer.near,1 +darlka.near,2 +daunjuan.near,2 +davidbksantos.near,1 +daviddion.near,1 +davideverda.near,2 +davidistaken.near,1 +davinci.near,3 +davram.near,1 +dawg.near,1 +dawns.near,1 +daz.near,1 +dbswap.near,2 +dcha16.near,1 +ddanchev.near,1 +dear.near,1 +decentraliseme.near,2 +deepakdinkan.near,2 +def626f5e77305e783fc61be8ff390c6010bca1779d5a7a0d218dd76802a51c7,2 +defi.near,2 +defiance.near,1 +defykonglong.near,1 +deg.near,1 +del_la.near,2 +delboy.near,1 +delpadschnick.near,1 +deltarun1.near,2 +demerald.near,1 +demon7719.near,1 +demos.near,1 +den.near,37 +den20102004.near,1 +denis125.near,1 +dennis.near,1 +dennison.near,1 +denturebur.near,2 +deposit.near,1 +derkaalbers.near,2 +deskertw.near,2 +destrla.near,1 +desy.near,1 +dev.near,3 +devasterus.near,1 +devdn3dsr63.near,1 +deviate.near,1 +dex.near,2 +dexxa05.near,2 +deyond2020.near,1 +deysler.near,1 +dfa635185b3392d5e5a0eed62eb1f58bb7d6392ce2c5ff07acf4922726744256,2 +dfcb2aff667f14b9adc3522e2db4b2f898f6cc3bf42300175f98661eb89f19b6,1 +dfe4dbf46adc0dfa56c5f612dabe2caf93f783f22f3242e07ee653d85ec421a7,3 +dg.near,1 +dgimmy.near,1 +dharmadhikari.near,1 +dhaval567.near,1 +dhoick.near,2 +diana.near,1 +didi.near,1 +diegordo.near,1 +digimon3y.near,3 +dii.near,2 +dillsp88.near,1 +dimaro.near,1 +dimaro1.near,10 +dimmao.near,2 +dinhhongd.near,2 +dinokidjs.near,1 +dio.near,1 +dipsyv.near,2 +direzza.near,1 +dissy.near,2 +distinct.near,1 +dj72crypt.near,1 +django.near,1 +djchahal.near,1 +djoker.near,1 +dk009.near,2 +dkdk009.near,1 +dlt.near,1 +dlwodlwogks.near,1 +dmark2729.near,1 +dmitri.near,2 +dmt.near,2 +dnovy.near,1 +dog.near,1 +dojisama.near,1 +dolphintwo.near,1 +domains.near,1 +dominic.near,2 +don.near,9 +donaldp.near,1 +donan.near,1 +dongding.near,1 +dot.near,1 +dozer.near,2 +dpod52.near,1 +dragonbran945.near,1 +drchudi_near.near,1 +drewx.near,2 +drey.near,1 +drt860109.near,1 +drupa.near,1 +dsalv.near,2 +dscocco.near,1 +dsgital.near,1 +dsouza.near,2 +dsrv.near,1 +dss.near,1 +du.near,1 +duckhai.near,2 +duongkta.near,1 +duongphi0111.near,1 +durga.near,1 +duxin.near,1 +duyhuanh.near,1 +duytan.near,3 +dxndaniel.near,1 +dytackxh4.near,1 +dz.near,1 +dzlzv.near,1 +e02df51342ae2b7193ac78c721ad12b1dbc684ef99be531ebf2939fa210140cd,5 +e0x.near,1 +e1862ef993daf5a4b7c34aaa8c8dfe018ed273b5e393e73385e5a6f0b9ca7df7,8 +e23100a2e5a3478018364b876ceedc416162f52e6f1edd832f924276bce712e1,3 +e5292fc55f5eee5acbb6de64b5da63b9168bec1741de0b19b88b85fe9fe92996,2 +e597a6b44de31c79b6c15f2030e53ef701ad84efa0f2fa41b5621724132b29fd,7 +e644521f6235ffe0943f6f00ab5081c39b9a32e22feaece47998115a3fa6a7da,1 +e77dc00ba3ca284f3c3186a59dbffce7729e7f8f0dbba7b9bed45b2e5646b983,26 +e7ed1672d8ffa2ba50634e619f0144c55fb44265e7ad979376efbaa8e8a55fec,1 +e7ef040fba4e567e2543e6814387749709d6152329220111b6895f1a845d4ddc,3 +e9bf7bbfe620284ddb7451b8aec7d40a475fd1cf5400f4fe2f2a9a883f0ba462,6 +ea3843fde8e221f237b5cd6d269fcdca69d10b2fabd53e57bde6946dbf5548d4,5 +eagle.near,1 +eagle1024.near,2 +ebc1599e57e840017d8120ba70d9762a21a0444924a29769a5b8fed2546c5dd9,3 +eddienuta.near,1 +ede294.near,2 +eden.near,2 +edgar.near,1 +edgarvgz.near,2 +edrush2004.near,1 +eelco.near,2 +ef46b5bc99d85aacc5858af3ffdb2cc9145eb9913ba3e33317cfa90288312264,2 +ef6e3920b04ff7d203c79ea0271c4fbd3a0c00f699ba72f36b2e1cc2c8930fbe,1 +effylou.near,1 +egle.near,2 +einar.near,2 +einsteiger.near,1 +eintracht1.near,6 +eirjag.near,1 +ek.near,5 +elcapitan.near,3 +elecnodo.near,1 +electro.near,1 +electroexts.near,1 +elegant.near,1 +elemond.near,2 +elen.near,1 +elena.near,1 +elenabot.near,1 +elenagonzalez.near,1 +elianewells.near,2 +ellyse11.near,1 +ellyse12.near,1 +elnikov.near,1 +elorpar.near,2 +elpav70.near,1 +elrider71.near,1 +elrulo.near,1 +elvisy.near,1 +emanueldiniz.near,1 +embiei.near,1 +embydextrous.near,2 +emcs1974.near,1 +emiel.near,1 +emili2017.near,1 +eminem.near,1 +emmazhuxy.near,3 +emptyvoid.near,1 +emre3jw3.near,2 +end.near,1 +end.was.near,2 +enguessanro.near,1 +enzy.near,1 +ep.near,1 +equilibrium.near,1 +erfan.near,1 +erfan_isaac.near,1 +ericyfhung.near,2 +erik.near,2 +ernest.near,2 +ernesto.near,1 +ernesto_cardenas_near.near,2 +erwinfranken.near,1 +esc.near,2 +ese.near,2 +est1908.near,1 +eth.near,1 +ethd.near,2 +ethyhy.near,1 +eti_eyen01.near,1 +etsk.near,2 +eugent.near,5 +europe.near,1 +euthepronto.near,1 +everstake.near,1 +everstake1.near,9 +evg1987a.near,1 +evgen.near,1 +evgeny.near,1 +evgor.near,1 +evian.near,1 +eviltwindc.near,2 +evkim.near,2 +exan.near,1 +excalibur.near,1 +exiart.near,1 +ey.near,1 +ezbruh.near,1 +f.near,1 +f1tz14.near,1 +f2e7e054d0f96e01f1f90e7f2bd5a3fd55437ace0e32b67183f6f3e6eb18f2ad,1 +f5912374fd229bd851f73250abb8839f7fee00b9f17df4915142edfa9ec819c8,2 +fabi.near,1 +fabiolaluna.near,2 +facebook.near,2 +fadiseva.near,1 +fadyamr.near,2 +faprinvest.near,2 +far.near,1 +farhod.near,3 +faridrached.near,1 +faruk.near,1 +fathurohman.near,3 +fauji25.near,1 +fb4caef88752f052dd8a0e17ec18e2a8ba0d75db694dd5ec889de6d80908f21a,4 +fbalwy.near,1 +fc31f902de0ca48ef5def39c3a3d1540fc877b6197fb65c55f71fccf3350a40f,1 +fckmyluck.near,2 +fd04644aae2a2f84e3742269140f5bdc35c70fbed13ff3bd5642a78b0ac572e4,2 +fdbd7d79985344fcf58d4f8a8d067549b907c85355d8d261db19b2f8e5978615,1 +fe5ef5f84e9d40b4901fa8dc602e0acfc77b8b9cbb40508a3d379271287a8370,1 +fedul.near,2 +feng.near,1 +fengkiej.near,5 +ferhat89.near,1 +ferlee.near,1 +fern.near,2 +fernando7.near,1 +ff7247ce7fce8a6d4e615a0507bf0d0d47282fa4cd1dbf1ba5c4aa2e34f4ebca,1 +ff8rinoaff8.near,2 +fifi.near,1 +filipe.near,1 +fill.near,2 +filtom.near,1 +finance.near,1 +finchen.near,1 +finhumb.near,1 +firefist.near,1 +first.near,1 +firstmajor.near,1 +fjbase21.near,1 +fjythomas.near,2 +flashboys.near,2 +flatron7.near,1 +flavian.near,1 +flo.near,3 +florian.near,1 +florinda_gomes.near,1 +fluslie.near,1 +fluxper.near,1 +flyinglooper.near,1 +fmiah.near,2 +fog.near,1 +fokusnik.near,1 +fomo.near,1 +foobar.near,2 +fooc.near,1 +forest.near,1 +foundation.near,1 +foxtraveller.near,1 +fracto.near,1 +francisagui.near,1 +francisobasi.near,2 +franco.near,2 +francodiaz777.near,2 +frani.near,2 +frank.near,2 +frankwhite.near,1 +franky.near,1 +franrodriguez.near,1 +franyjosemaria.near,1 +franziskus.near,1 +fred.near,2 +fred2.near,2 +fredtupas.near,4 +free.near,3 +freemangoo.near,3 +freestriker00.near,1 +frog.near,1 +fruitdealer.near,1 +fruitjuice.near,1 +frytos.near,1 +fsv.near,1 +ftor.near,2 +fuck.near,1 +fulushou7111.near,1 +fundamentallabs.near,1 +funktified.near,1 +fusan.near,2 +future.near,3 +futureis.near,1 +g30ff1rl.near,1 +gabriel.near,1 +gabriel85.near,2 +gagdiez.near,1 +galant.near,1 +games.near,1 +gamesdarker.near,1 +gaming.near,1 +gardel.near,2 +gary.near,2 +garyhagu.near,1 +gaston.near,1 +gate.near,1 +gay.near,1 +gazelle.near,1 +gbali.near,1 +ge9123.near,4 +gelfw12.near,2 +gem.near,1 +gemini.near,1 +gen9.near,1 +genericname.near,1 +genesis.near,1 +genie.near,3 +genius.near,1 +geo.near,2 +george.near,1 +geovanus.near,1 +gerard.near,1 +gewgwe.near,1 +gfflo.near,2 +ggal.near,2 +ggg.near,2 +ghedley.near,1 +giallorossi_10.near,1 +giandmn.near,3 +gibby.near,1 +gidroplan.near,1 +ginzy.near,1 +gio3gio.near,1 +girazoki.near,3 +gktnr0418.near,1 +glad.near,1 +gleb.near,1 +glenn.near,1 +global1.near,1 +gmaverickv.near,1 +gmck.near,1 +goatmine.near,1 +gocrypto.near,1 +goctienao.near,1 +godisgreat.near,1 +godwitt28.near,1 +goli.near,1 +gonchiferradas.near,1 +gonefishing.near,2 +goodwin.near,1 +google.near,1 +goraset.near,1 +goraya.near,2 +gorazd.near,2 +gordonleesmith.near,1 +gorochi.near,2 +gps.near,1 +gramatikov.near,1 +gravelpit.near,1 +great.near,1 +greedywhale.near,1 +greg.near,1 +greg99.near,1 +grehei.near,1 +grek.near,1 +grek_vlg.near,1 +greso.near,1 +gresya.near,1 +grifflet.near,1 +grr.near,1 +guantanamoboy.near,1 +gudu169.near,1 +guillesker.near,2 +gun.near,2 +gurugraptor.near,1 +gustav.near,1 +gustavo.near,1 +gwak.near,1 +gwogwosachi.near,1 +gxlitian.near,3 +h1tthat.near,1 +h4xxl.near,1 +hahaha.near,1 +haihv96.near,2 +haiptmkt.near,2 +hakathon13.near,1 +halar_1099_kimchi.near,1 +hamper.near,1 +hamzanet01.near,1 +hannahui.near,1 +hansu4t.near,1 +hansu4t2.near,1 +hansvl.near,5 +hantaejae.near,2 +hao.near,1 +hardy008.near,1 +haroldbaks77.near,1 +harris.near,1 +haru.near,1 +hash.near,1 +hashboy.near,1 +hashpark.near,1 +hatatoshi.near,1 +hatred09.near,1 +hatropine7.near,2 +haustein.near,1 +hauteclairestassin.near,1 +haydon.near,1 +hb33.near,2 +hcsyyk.near,2 +hdt33.near,1 +he.near,1 +he090279kap.near,1 +he4usa.near,1 +health.near,2 +heartchan.near,1 +hector.near,1 +heinrichschw.near,1 +heisenberg39.near,1 +hejunqiu.near,1 +helen.near,1 +hello.near,1 +helloworld.near,1 +help_is.near,1 +hendrikvveen.near,2 +hennyc.near,1 +henrywang7.near,22 +heraclitus.near,1 +herberthenghan.near,2 +heretikkk.near,1 +hermann.near,1 +hewig.near,1 +hhmeen.near,2 +hhomsi.near,1 +hi.near,1 +hideekin.near,2 +hidesun22.near,2 +hiimyims5111.near,2 +hippaz.near,2 +hirajyoti.near,2 +hirama.near,1 +hiro0911.near,1 +hiroki.near,2 +hisham.near,2 +hitthebricks.near,1 +hl.near,1 +hlongalee.near,1 +hnx.near,1 +hobbit.near,1 +hodarrenkm.near,2 +hodl.near,2 +hodlov.near,1 +hodlsworth.near,1 +holleroi.near,1 +home.near,1 +homejumper.near,2 +hongchang.near,1 +hor.near,4 +hotarrowin.near,1 +hrasta.near,1 +hrock.near,4 +hryshko_denys.near,3 +hua.near,1 +huajuan.near,1 +huckour.near,2 +huehner.near,1 +huenkaileung.near,1 +hughhill.near,1 +hugomartinezrosa.near,1 +hulahuub.near,2 +hulk.near,1 +huluwa.near,2 +humaid475.near,2 +human.near,2 +hungaus811.near,1 +hunnxolo.near,1 +huuhoang4984.near,3 +hyper_doge.near,1 +hyugbin.near,1 +ia.near,2 +ia2jbk3fix7ttxiungh2het2mmxlmkj8.near,2 +iadibr.near,6 +iaecoin.near,1 +ialtaf-choudhry.near,1 +iamluieey.near,2 +ian.near,2 +ianabell.near,2 +ianbonavente.near,2 +iandillon.near,1 +iasonas2019.near,1 +ibardak.near,1 +ibingbing.near,1 +ibm.near,1 +iborion.near,1 +ican3701.near,4 +ichongge.near,1 +icodrops.near,1 +icohiinvestbot.near,2 +icon470.near,1 +icovassabi.near,2 +idnl.near,1 +ig27.near,1 +ig6duv66.near,1 +ignacio1.near,2 +ignacio2.near,2 +igor.near,1 +igor76.near,1 +igorbobritckii.near,1 +igorbunkov.near,1 +igoreshka888.near,1 +ihorhorb.near,2 +iissii97.near,1 +ijulia.near,1 +ikbremen-1073.near,2 +ikqsang.near,1 +ilanedils.near,1 +ilde.near,1 +iliabitfinex.near,1 +ilina.near,1 +illia_k.near,1 +illuminati.near,1 +ilya.near,2 +ilya123.near,2 +ilya4756.near,2 +imanel.near,2 +imker.near,1 +immoait.near,2 +impe83.near,1 +imrano.near,1 +imyourfather.near,2 +india.near,1 +inferno.near,1 +ini333.near,2 +inna.near,1 +inotel.near,1 +insidenima.near,1 +insider.near,1 +inst.near,1 +introbits.near,2 +invest.near,1 +invest115.near,1 +investiq.near,1 +invictus.near,1 +ipanda.near,1 +iren20113.near,1 +irishstevemc.near,1 +irobot.near,1 +ironbear.near,1 +is.near,3 +iskerl.near,1 +itachi7368.near,2 +iterrible.near,1 +ituniversum.near,1 +ivan.near,1 +ivanfurta.near,1 +ivanl.near,1 +ivanortiz96.near,2 +ivanytt.near,2 +ivbeb777.near,1 +ivs19.near,1 +iwan.near,1 +ix3m.near,1 +izixhidi.near,1 +izztalbraqi.near,3 +j.near,4 +j03rg1.near,1 +jack933.near,2 +jackie.near,1 +jacklin.near,1 +jackma.near,1 +jackrose0503.near,1 +jackyu.near,2 +jacobcheng.near,1 +jaegu01.near,2 +jaga.near,1 +jaggz1066.near,1 +jahandadkhan.near,1 +jaihanuman.near,1 +jake.near,1 +jakes2020.near,2 +jamadi5039.near,1 +jamkira.near,1 +jan.near,1 +janoltvoort.near,1 +jantapw.near,1 +japan.near,1 +jarekpiotrowski.near,1 +jash.near,2 +jason.near,1 +jason300000.near,1 +javabdalex.near,1 +javiveloso1.near,2 +jay.near,1 +jaycrypto.near,3 +jayjay888.near,1 +jayyoo.near,2 +jazael90.near,2 +jazza09.near,1 +jc.near,1 +jcj.near,2 +jcmi.near,1 +jeanmart.near,1 +jeedocrypto.near,2 +jeedocrypto2.near,2 +jeez07z.near,1 +jeff0052.near,1 +jegib.near,1 +jehanchu.near,1 +jele7ka.near,1 +jelvin8.near,1 +jen.near,7 +jepped.near,1 +jerrymoon.near,1 +jerrys.near,1 +jeschis.near,1 +jessica.near,1 +jestin.near,1 +jgsp.near,1 +jhuebner1.near,1 +jiang.near,1 +jiangbingquan.near,1 +jianshu.near,1 +jiayaoqi.near,1 +jik_k.near,1 +jikthapat.near,1 +jim.near,1 +jimbo.near,1 +jimmyrhino20.near,1 +jimvdberg24.near,3 +jimy1111.near,1 +jin.near,2 +jinshawn.near,1 +jinxuan.near,1 +jiru.near,4 +jisol8122.near,1 +jjp.near,1 +jk1151.near,1 +jkimmich.near,1 +jkprag78.near,2 +jleang.near,2 +jmdoyle.near,1 +jmunb.near,2 +jnear.near,1 +jocellin.near,2 +joel.near,1 +joeljonas9597.near,2 +joelwee.near,2 +joelyd19.near,1 +joemoms.near,1 +johannesst.near,2 +john.near,1 +johncalvin46.near,1 +johnh.near,1 +johnhoffmann.near,2 +johnny.near,2 +johnryan.near,1 +johnt80.near,2 +jojorge26.near,2 +jollymetalbastard.near,2 +jollymetaltrader.near,1 +jonathan.near,1 +jonathan6620.near,2 +jongkwang.near,1 +jonju.near,2 +joonian.near,2 +jop.near,1 +jordaai.near,2 +jordyfiene.near,2 +jorgellfagundes.near,1 +joryivanoff.near,1 +josebawakeboarder.near,8 +josef.near,1 +josemanuel2.near,1 +josh.near,2 +josh5.near,1 +josh6.near,2 +joshua.near,2 +jpbytez.near,1 +js974lin.near,1 +jsc2.near,1 +jsc3.near,1 +jsc4.near,2 +jsc5.near,1 +jsc6.near,1 +jsc7.near,1 +jsc8.near,3 +jt77.near,1 +jubi.near,1 +juergen311.near,3 +julia.near,1 +jumidamo.near,1 +jun.near,3 +juncuirina.near,2 +junhyub11.near,1 +jurij.near,2 +jurquidiz.near,1 +justcrucial.near,1 +justin.near,2 +jwallet1.near,1 +jwbcdz.near,2 +jy.near,2 +k.near,1 +k111sg.near,1 +k5zr8d.near,1 +kaan.near,2 +kai.near,1 +kairypto.near,1 +kaiserreich.near,1 +kaiyuan.near,1 +kake.near,1 +kalimbamba.near,1 +kalockwo.near,1 +kalom.near,2 +kalyani.near,1 +kamil7890.near,3 +kammon.near,1 +kamui02.near,2 +kaneluo.near,1 +kanemori.near,1 +kanskey.near,2 +kao.near,2 +kar.near,1 +karimfa.near,1 +karimhassaneid.near,2 +karl.near,1 +karthik.near,1 +karthvader.near,1 +katman.near,1 +kato.near,2 +katrin.near,1 +kazadar.near,1 +kazantip.near,2 +kazbek.near,1 +kb1224.near,1 +kcupac.near,2 +kdimarik89.near,1 +keatsol.near,1 +keith.near,1 +kek.near,1 +kellybelly.near,1 +kelvin.near,1 +kelvinngzh.near,1 +kemo.near,2 +kemola.near,1 +kemosabe.near,1 +kendall.near,1 +kenichi.near,1 +kenny2020.near,1 +kennzonki.near,1 +kentoshi.near,1 +kenttran.near,1 +kevinburkhard.near,1 +khaikhai1960.near,1 +khalisy.near,2 +khidir.near,1 +khn.near,1 +khorolets.near,1 +khoruzhyi.near,1 +khunchan.near,1 +kiberg.near,1 +kickbuttowski.near,2 +kiddunstopped.near,1 +killua.near,1 +kimon.near,1 +kinggogh.near,3 +kingstatoshi.near,2 +kiran.near,2 +kircovich.near,1 +kircovich2.near,2 +kirill_ri.near,2 +kishan748.near,2 +kitty.near,1 +kivo2004.near,2 +kiwi092020.near,1 +kjellnearwallet.near,1 +kkund.near,1 +klaustin.near,1 +knyazev7aa.near,1 +kobarisun.near,1 +koenig.near,1 +kokkieroy.near,1 +koledg129g.near,2 +komido815.near,1 +kon.near,2 +kondor.near,2 +konsulat.near,2 +koolkamzzy.near,1 +korkius.near,1 +koszula.near,1 +kps289.near,1 +kramerrold.near,1 +kraze.near,1 +krendelyok.near,1 +kriptofinance.near,1 +kris25.near,1 +kriso444.near,2 +krisszet.near,1 +kristaps.near,1 +kristapsd.near,1 +kritsdapat.near,1 +krobi.near,2 +krol.near,2 +kruggok.near,1 +krypto_jan.near,1 +krypto_jan2.near,1 +ks.near,2 +ksg79.near,1 +kucoin.near,1 +kuka.near,1 +kukulabanze.near,1 +kumosoukai.near,1 +kuroko1949.near,1 +kusola.near,1 +kusols.near,1 +kybik.near,1 +kytzu.near,1 +l3po.near,2 +l7p4qbzj3z.near,1 +lakond.near,1 +lalo2.near,1 +lamandderi.near,1 +lamer.near,2 +lanax.near,2 +lance009.near,1 +lancelot.near,2 +land.near,1 +landa1993.near,2 +lara.near,1 +larch.near,1 +late.near,1 +lauranuta.near,1 +laurent.near,1 +laurentmaillard.near,1 +law.near,2 +lazyhjq.near,2 +lazza_l0ma.near,1 +lbilskicrypto.near,1 +ldn.near,1 +ldn91ptit.near,4 +ledat1612.near,1 +ledger.near,1 +legiojuve.near,1 +lehadobriy.near,1 +lehung.near,3 +lei.near,2 +leifythebeastie.near,1 +lelouch888.near,1 +lenall51.near,1 +lenara.near,1 +lennieyoo.near,2 +lenny00001.near,3 +lentv.near,2 +leo.near,1 +leong.near,1 +leonidtmn.near,1 +leonie.near,8 +leonlauaus.near,1 +leoyishaun.near,1 +lesterrawks123.near,1 +letitia.near,1 +levanquan297.near,2 +levin.near,1 +lewinsuker.near,1 +lewismelland.near,2 +lewyatan.near,1 +lex.near,1 +lex20150720.near,2 +lexlex.near,1 +li.near,2 +libby08.near,1 +life.near,1 +lightzealot.near,1 +likewhite.near,2 +liliherciu.near,3 +lilin_888.near,1 +lin.near,1 +line.near,2 +lingxxx.near,1 +linhphieu.near,1 +linkdrop.near,1 +linusx58.near,1 +lissargentina.near,1 +lito.near,1 +liu120626.near,1 +liu890610.near,1 +liver.near,1 +lixoy.near,1 +lj.near,1 +lkk.near,1 +lntranet.near,1 +lobster_xie.near,1 +locked.near,1 +lockup.near,6 +logic.near,2 +loni.near,1 +loomist.near,1 +loperk.near,3 +lordshillings.near,1 +loris.near,1 +lou135222.near,1 +louanojax.near,1 +louisnguyen.near,2 +love.near,1 +lovemansh84.near,1 +lp.near,2 +lpthanh.near,1 +lrubiorod.near,1 +lt1412.near,1 +lu666.near,1 +luana.near,1 +luca.near,1 +lucas.near,2 +lucho1963.near,1 +lucjah.near,1 +luck.near,1 +luedu2020.near,2 +luffy.near,1 +luhar.near,1 +luisaoxd20.near,2 +luisvillarreal.near,1 +lukasso.near,1 +lukasso2.near,1 +lukecaan.near,1 +lumpi-1714wpx.near,1 +luna.near,1 +luongbdhust.near,11 +luuvu.near,1 +lxbach.near,2 +lyonkwek.near,1 +lyybtc.near,2 +m.near,2 +m17.near,2 +m2dream.near,1 +m3.near,1 +ma.near,1 +maagueror.near,2 +maanimo.near,2 +macanga.near,2 +machina.near,1 +machoman.near,1 +mackalicious.near,2 +madbustazz.near,1 +madcapslaugh.near,2 +madgasm.near,1 +madison.near,2 +madvillain.near,1 +madxista.near,1 +magadan.near,1 +maghrebcrypto.near,2 +magic1go.near,1 +magmza.near,2 +magnetic.near,1 +maher.near,1 +mahmuttahaolcucu.near,2 +maibei.near,2 +majal.near,2 +majest3.near,2 +major.near,1 +majosk.near,1 +make023.near,1 +makhova.near,1 +makindea.near,1 +malik.near,1 +malykhin.near,2 +man.near,1 +manatwork.near,2 +manfred90.near,2 +manginobi.near,2 +maninder.near,2 +manish.near,1 +manju.near,1 +manos.near,1 +manovitskiy-andrey.near,1 +mansley.near,7 +mantradao.near,1 +maotai.near,1 +maratxo.near,2 +marcel1111.near,3 +marcelo.near,1 +margask.near,1 +marianmelinte.near,1 +mariano11.near,1 +mariia33.near,2 +mario.near,2 +mario66.near,1 +marionclaire.near,1 +maritn.near,1 +mark.near,1 +markgenuine.near,2 +marko.near,1 +markwenink.near,1 +markyllanos.near,13 +marley.near,1 +marrescia.near,2 +mars.near,1 +marshx136.near,1 +martian.near,1 +martiescribano.near,1 +martin.near,2 +martin_burgherr.near,1 +martinescribano.near,1 +maruman.near,1 +matejtomazin.near,1 +math.near,1 +mathewvarghese2001.near,2 +mathiaskuehl.near,1 +mathtest.near,1 +mathwallet.near,1 +mathwallet1.near,1 +matrainier.near,1 +mats478.near,2 +matsumoto.near,1 +matt1.near,6 +matt7.near,3 +mattjbailey.near,1 +mattmcl.near,1 +mattmcl1.near,1 +mattrobo3.near,1 +matveynearwallet11.near,1 +matyan5921.near,1 +mav_rick.near,1 +max2017.near,1 +max250777.near,1 +maxfil.near,1 +maxgwei.near,2 +maxib0r.near,2 +maxim.near,3 +maximise.near,1 +maximkhoroshev.near,1 +maximoff.near,1 +maxjirawat.near,2 +maxlev.near,9 +maxyok.near,1 +mazzystar.near,3 +mbarbosa.near,2 +mbtrilla.near,1 +mcb.near,2 +mcb2001.near,4 +mcdcrypt.near,1 +mchristiansen.near,1 +mdzor.near,2 +meadowlane1862.near,1 +meatjuice.near,1 +mecogrouppsy.near,1 +medlucky.near,1 +megacel.near,1 +megachan.near,2 +megagangsta.near,1 +megapapka.near,1 +mehdi.near,2 +meike-9.near,1 +meilin.near,1 +mel_smog.near,2 +meli13.near,1 +mellandlewis.near,1 +melu.near,1 +melvin.near,2 +meomeo.near,1 +mercadobursatil2020.near,1 +merkletree.near,1 +messidou.near,2 +metoo.near,1 +mexite.near,1 +mezoantropo.near,1 +mf.near,1 +mgazvoda.near,1 +mgs.near,2 +mh.near,2 +mhmtozback.near,2 +miaodacuo.near,2 +miaxxx.near,1 +micabytes.near,3 +micdrabble.near,2 +michael.near,2 +michael0503.near,2 +michaelcdeguzman.near,1 +michaeldeguzman.near,1 +michel.near,1 +michen.near,1 +michess.near,1 +midnighter.near,2 +mieszko.near,1 +mighty44.near,2 +migi.near,1 +miguelangelo.near,1 +mihai.near,2 +mijnders.near,1 +mike06.near,1 +mike520.near,1 +mikefluff.near,1 +mikhail.near,1 +mikhalytch.near,2 +mikvol.near,1 +mila.near,1 +mila1.near,1 +milen.near,4 +milica.near,1 +millioner2021-891301.near,1 +millsy.near,1 +mim.near,1 +min.near,1 +minhloc.near,1 +minhtbk.near,2 +minilim.near,2 +miquel.near,1 +miriam.near,2 +mirki.near,2 +miron.near,1 +misch.near,1 +misha.near,1 +missdefi.near,2 +missy-missy.near,1 +mister95.near,1 +mistervp.near,1 +misu.near,1 +mix.near,1 +mjaeckel.near,2 +mjoaquim.near,1 +mlknbr.near,2 +mlr.near,1 +mm.near,1 +mmasal.near,2 +mmasal74.near,2 +mmayer.near,1 +mmladin.near,1 +mmm.near,1 +mmmax5075.near,1 +mnemonik.near,1 +mnnblck.near,1 +mo.near,1 +moi.near,2 +moku.near,1 +momomo.near,1 +monce.near,1 +money.near,1 +moo9000.near,2 +moogz.near,1 +moonboi9001.near,1 +moonhappyblock.near,1 +moonhunter.near,1 +moonshot.near,2 +moontrader.near,7 +mort.near,2 +morten76.near,2 +motao.near,1 +motti.near,1 +mouthface.near,1 +moyatronik1.near,1 +mpescoin94.near,1 +mqamar1994.near,1 +mrak.near,1 +mrbin228.near,1 +mrcrypt.near,1 +mrfinely.near,2 +mrkev.near,1 +mrmirliflore.near,1 +mrreddington2015.near,2 +mrskill.near,1 +mrt.near,2 +mrtn.near,1 +mrtung101291.near,1 +mrwong.near,1 +mrwrong.near,1 +ms31.near,1 +msflorentine.near,2 +mtelegin.near,2 +mueller.near,2 +muffy.near,2 +mula.near,2 +mularkey.near,1 +multiwhs.near,2 +mummyhap.near,1 +mumu.near,1 +mumunana.near,1 +munaf.near,1 +mundocrypto.near,1 +muralikrishnan.near,1 +murderbear.near,1 +musakatae.near,1 +mushhz.near,1 +musk.near,1 +muzammil.near,1 +mw.near,1 +mw3ka2tcj_6pd5f7qoesz.near,2 +mxc.near,6 +my_wallet.near,2 +myaccount.near,1 +mykha2.near,2 +mymali.near,1 +mymind.near,1 +mynear.near,1 +mzidov.near,3 +n3m0.near,2 +n3r0n.near,1 +n44bsa.near,1 +n4o4oakos.near,4 +na5.near,1 +nabeel.near,1 +nabetakato.near,1 +nabulmar.near,1 +nadeemkhan.near,1 +nadezdapw.near,1 +naeun.near,2 +nafooch.near,1 +naka.near,1 +nakamoto.near,1 +nallow.near,1 +namantra.near,1 +namarseklasno.near,2 +naozhong.near,4 +narasimha.near,1 +narniec.near,1 +naruemon.near,1 +narutra2.near,1 +nas.near,1 +nata.near,1 +natalia.near,1 +naturalwarp.near,2 +natyendo.near,2 +navarich.near,1 +nb.near,2 +nbawyl.near,2 +near,4196 +near.near,1 +near001.near,1 +near12.near,2 +near123.near,3 +near24.near,2 +near29holger.near,1 +near34holger.near,1 +near_stepec_ico.near,2 +nearest.near,2 +nearfans.near,1 +nearjapan.near,1 +nearjt.near,1 +nearlover.near,1 +nearman.near,2 +nearman99.near,1 +nearmoon.near,2 +nearorfar.near,1 +nearpig.near,2 +nearwallet.near,2 +necron.near,1 +nedski.near,1 +neerajpoddar.near,3 +negat1ve.near,1 +nene.near,1 +neonoinm14.near,2 +neoxxx.near,1 +nepal.near,2 +nepta.near,5 +nepytaev.near,4 +nero.near,1 +nesh34.near,1 +netfatik.near,1 +netzzimedia.near,1 +nevermind.near,2 +newbietomarket.near,2 +newera.near,1 +newinternet.near,1 +newmancoin.near,1 +newtestone.near,1 +nexus.near,1 +nexus2.near,1 +ngocgiauktb.near,1 +ngoctuyenpro88.near,3 +ngoquanghieu01.near,1 +ngoquanghieu02.near,1 +nguyencongsau.near,4 +nguyenhuuthang.near,2 +nguyenkhang.near,2 +nguyenmanhha.near,1 +nguyenquockhank123321.near,1 +nhanha1960.near,1 +nhatnm.near,1 +nhmh1011.near,3 +nhuanhplc.near,2 +nic.near,1 +nicandro.near,1 +nicolecano.near,1 +nightingale.near,1 +nightsailor.near,1 +nijem79.near,2 +nik.near,1 +nikolai1.near,1 +nikolajrosendal.near,1 +nikolay.near,1 +nikolenko.near,1 +nil.near,2 +ning.near,1 +ninini222nini22.near,2 +ninjazz.near,1 +niocris.near,2 +nitin666.near,2 +nitup88.near,1 +nk112.near,1 +nke1675.near,4 +nknm99.near,1 +nntn61.near,1 +nodeasy.near,1 +nomaan.near,1 +nomer1.near,1 +nomer2.near,1 +nomer3.near,1 +nomer4.near,1 +nomer5.near,1 +nomer6.near,1 +nonli.near,1 +nonsense.near,3 +noom.near,1 +noreply.near,1 +norvit.near,3 +not.near,1 +notfarbutreally.near,1 +notime.near,1 +notsatoshi.near,1 +nottoo.near,1 +nqlarch.near,1 +nsretenovic.near,1 +number9dream.near,1 +nuneun.near,8 +nurgazy.near,2 +nurislan.near,1 +nut.near,1 +nwright.near,1 +nyc.near,1 +o.near,1 +o309steffe.near,1 +o6mopok.near,1 +o_belo.near,2 +od3.near,1 +odin.near,1 +odoovan.near,3 +og.near,2 +ograma.near,2 +ohadbachner.near,1 +ojosdepez.near,2 +okinawa.near,1 +oldripvanwinkle.near,1 +oldschool.near,1 +oleg.near,2 +olegan.near,1 +olegjan2008.near,1 +oleksandrantipin.near,2 +olesiasol1981.near,1 +olha.near,2 +oli.near,1 +olibay.near,7 +oliser.near,1 +omanizen.near,1 +omar.near,1 +omeshock.near,2 +omg.near,2 +omgclayaiken.near,1 +omgwhy.near,1 +omoide365.near,1 +onceberry.near,2 +ondrishe.near,4 +one.near,2 +oni365.near,1 +onslaught.near,1 +ontask.near,3 +onur.near,1 +oops.near,1 +openb0x.near,1 +oracle.near,1 +orange.near,1 +orangelcub.near,1 +ordian.near,1 +ork.near,1 +orlando.near,1 +orlando_larias.near,1 +ortonre.near,1 +os.near,1 +oscar.near,2 +oscarola.near,2 +oscartsui.near,2 +osipoff.near,1 +oskolkov.near,2 +osoroshia.near,1 +othylmann.near,1 +otukarehitoiki.near,2 +ourplay.near,1 +outinside.near,1 +over.near,1 +ovi.near,1 +owarsharif.near,1 +ox5678.near,1 +oxotnik1.near,1 +oxotnik2.near,1 +ozan.near,1 +ozgur.near,1 +ozymandius.near,1 +p007.near,2 +pa132.near,1 +pablo1128.near,2 +pablot-93.near,2 +pacek.near,1 +pacheckd.near,1 +paco.near,2 +pancer.near,1 +panda8888.near,1 +pandalucu66.near,1 +pandeymikhil.near,1 +pantera_capital.near,1 +pantufl.near,2 +paquci.near,2 +paradigm.near,1 +parisa.near,2 +parviz.near,3 +pastamasta.near,2 +pathrock.near,1 +patrick.near,6 +patrick1.near,10 +paul.near,1 +paul_budd1.near,1 +paulbarnard.near,1 +paulgould.near,1 +pauljin.near,1 +paulli31.near,1 +paulnear01.near,2 +paulwhiteway.near,1 +payments.near,1 +paypal.near,1 +pchela_tr.near,2 +peenka.near,1 +peeveee1.near,1 +penatrader.near,1 +pepip.near,1 +peterz.near,1 +petrov.near,1 +petrpko.near,1 +petyokamenov.near,1 +phackrudin.near,2 +phainesthai.near,1 +phigna1022.near,1 +philh.near,1 +philomene57.near,2 +phlippsenx.near,1 +phuonganh.near,1 +phuongdung224466.near,1 +phuongnt.near,1 +piahrey.near,1 +pierandrea.near,1 +pihun.near,5 +pikanou.near,1 +pinkmole.near,1 +pintofmilk.near,2 +pip_gazebo.near,2 +pirosiki.near,2 +pishikinaleks.near,4 +pitafina.near,2 +pizza.near,1 +pjh.near,1 +pkmelee337.near,1 +plavi.near,2 +plavi23.near,2 +plus3crypto.near,2 +pmerheb.near,1 +poker.near,1 +polaco.near,5 +policej.near,1 +politicalbadger.near,1 +polyatskiy.near,1 +pomalllka.near,1 +pompomlewis.near,2 +pongty.near,3 +ponomarev1980.near,1 +pooh.near,4 +poojabarman1960.near,1 +poopoopaper.near,1 +power.near,6 +ppp666.near,1 +pradeep1231.near,2 +pradeipnear.near,3 +prague.near,1 +prateek.near,1 +prateekj.near,1 +prateekjassal.near,1 +praxr.near,2 +preddy.near,1 +preico.near,1 +prhino.near,1 +primerwallet.near,1 +prinjangwanich.near,7 +priyanka.near,2 +proff23562356.near,1 +proofofstack.near,6 +protector23.near,1 +protocol.near,2 +pruvh.near,1 +prymmer.near,1 +ptrpollupuu.near,1 +pucheta.near,1 +puchicoins.near,2 +puchojenso.near,1 +pukutai.near,1 +pushpraj.near,1 +putin.near,1 +pvkpgp.near,1 +pycche.near,1 +q9.near,1 +qasemiah.near,1 +qcs13.near,1 +qianji.near,1 +qmargo.near,2 +qmargo1.near,2 +qmargo2.near,2 +qq.near,2 +qs6.near,1 +quangnvd.near,1 +quantum.near,1 +quecksilber.near,2 +queen.near,1 +quickbrownfox.near,1 +quimby.near,1 +quocdung.near,2 +qwer947.near,2 +r1chman.near,1 +r4bb1t.near,2 +r4bbit.near,1 +r9ph9fe8fbrq3.near,1 +rabadji.near,1 +rabbidfly.near,1 +rabbit5.near,2 +radikkrs.near,1 +rafa.near,3 +raghul.near,1 +raj.near,1 +rakmon.near,1 +ramacoin.near,1 +ramen.near,1 +rameshilu.near,1 +ramikorhonen.near,1 +ramil.near,3 +ramonrov.near,1 +ramonrov2.near,1 +rani.near,1 +rasec24ollirum.near,1 +rash1k.near,1 +rasher17.near,1 +rastalandtv.near,1 +ratatoeskr.near,3 +rav.near,2 +ravikan.near,1 +raymaker.near,2 +raz.near,1 +rback.near,2 +rbb.near,1 +rdrkn.near,1 +realfriend.near,1 +rebel_121.near,1 +red.near,1 +redlof.near,1 +redpacket.near,1 +reef2020.near,1 +reemo.near,1 +rehash.near,1 +reiss.near,1 +remedj.near,1 +renatov.near,1 +renta.near,1 +renuo.near,1 +reon.near,1 +rest.near,1 +resta69.near,2 +retsambew.near,1 +revenge.near,1 +revolution.near,1 +rezzak.near,1 +rflxvty.near,1 +rhaoniaragao.near,1 +rhrusch.near,1 +rhunestel.near,1 +riccardo.near,1 +richarddixon.near,2 +rick.near,1 +rimednid.near,2 +rimrim.near,3 +rinisoemarwoto.near,1 +ripzery.near,1 +rishabhtushar.near,2 +risinghigh.near,1 +ritesh.near,1 +ritsu.near,1 +rivendell.near,1 +rizkiutama.near,2 +rkreinbihl.near,1 +rl149.near,1 +rmayav.near,3 +rmoiseenkov.near,5 +rnd.near,1 +roadtobitcoin.near,1 +robert-zaremba.near,1 +robert.near,2 +robertkirchner.near,2 +robertlim01.near,2 +roberto_carlos_1987.near,2 +robfarg.near,1 +robin.near,2 +robin23tt.near,2 +robotix.near,1 +rocco19.near,1 +rodnca.near,1 +rogertje.near,1 +rohitgarnaik.near,1 +rojer.near,1 +rok.near,1 +rokmc1066k.near,1 +rokradej.near,2 +romacdmx2020.near,1 +romacdmx20202.near,2 +roman.near,1 +romano.near,1 +romario.near,2 +romaxa92.near,1 +romezzz.near,1 +ronaldboege.near,1 +ronmnm.near,1 +rooat.near,2 +rovve89.near,1 +royalfly.near,1 +royalfu.near,1 +rpw30078.near,3 +rromic.near,2 +rsidhu.near,2 +rsiva.near,1 +rss335.near,2 +rtd2.near,9 +rthom.near,9 +ru.near,4 +rubin315.near,1 +ruchitha.near,1 +ruda.near,1 +rudaneck.near,1 +ruelas.near,3 +ruoyanlee.near,4 +rus.near,1 +rusalimchik.near,1 +ruslan.near,1 +russia.near,1 +ruviy.near,1 +ruxpin1.near,1 +ryancollison.near,2 +rybardolaza.near,2 +ryn5g3du.near,1 +ryr.near,2 +rzz.near,2 +s.near,4 +sacha.near,2 +sachaeslahi.near,3 +saechiis.near,1 +saengsooday.near,1 +saenzcalzada.near,2 +safranov.near,1 +saganata.near,1 +sailinon.near,1 +sajakhta.near,1 +saker2811.near,2 +sam.near,1 +samakrutti.near,1 +samanthabarretto.near,2 +samdiacos.near,2 +samer.near,3 +samgold.near,1 +sami1.near,1 +sami2.near,1 +samijomana.near,5 +samime.near,1 +sammy.near,1 +samolower.near,1 +sandeepsudagani.near,2 +sander.near,1 +sanders-z.near,3 +sandy.near,1 +sangoku.near,1 +sanjay_mandhan.near,1 +sanket.near,1 +santucho1979.near,1 +sanz.near,1 +sarang.near,1 +saravana.near,1 +sas.near,1 +sasha.near,1 +sashareyes.near,1 +satinevood.near,1 +satoshi-nakamoto.near,1 +satoshi.near,1 +satoshi0124.near,2 +satoshi_nakamoto.near,2 +satoshi_near.near,1 +sauceee.near,2 +sauges.near,2 +saulscotland19.near,2 +sav.near,1 +savelev.near,1 +sayes.near,1 +sbls0919.near,1 +scale.near,2 +scazie.near,1 +schlaptop.near,3 +schmidde83.near,1 +schopenhauer.near,1 +schwendenwein.near,1 +scorind5.near,1 +scouser.near,2 +scout.near,2 +scoutz52.near,2 +scrappy.near,1 +se.near,1 +sean.near,2 +seb.near,1 +seba.near,1 +sebo58.near,1 +sed19.near,1 +segundawallet.near,1 +sei204.near,2 +sejwa.near,1 +selenaarh1.near,1 +selvam22.near,1 +semenivanov6677.near,1 +send.near,1 +seniores111.near,1 +seoj.near,1 +seokhyun.near,2 +seomax.near,1 +serg.near,2 +sergeyostrovnoy.near,7 +sergeyrozov.near,1 +sergio.near,1 +sergiofranco.near,1 +serik.near,1 +serjlug2020.near,1 +serjsergsky.near,2 +service.near,1 +serzh32.near,8 +sessileserrated.near,1 +seven.near,1 +sex.near,1 +sfeinberg.near,1 +sfeinberg818.near,1 +sff.near,1 +sgvtys.near,1 +shadyrifles.near,1 +shahnawaz.near,1 +shakur.near,1 +shanton.near,2 +shar.near,1 +sharding786.near,1 +sharzone.near,1 +shaurya11.near,1 +shazib.near,1 +shekhar.near,1 +sheva_9.near,1 +shikione.near,1 +shinevillehome.near,5 +shitcoinsenpai.near,1 +shivam.near,1 +shodan.near,2 +shower.near,2 +shreyas.near,1 +shryi41.near,1 +shubyhere.near,1 +shuo.near,1 +shushle04.near,1 +silent.near,2 +silvano.near,2 +simbro.near,1 +simon.near,1 +simona.near,1 +simonasta.near,1 +simongotlib.near,1 +simonyeung.near,1 +simple_simon.near,1 +siribo4134.near,1 +sirius.near,1 +sittipong.near,2 +siva.near,1 +sixi.near,1 +sjsvvsd2.near,1 +sjsvvsd3.near,1 +sjteeves.near,1 +skarabej.near,1 +skeanparty.near,1 +skippasteve.near,1 +skiprippa.near,1 +skkyy.near,1 +skopintsev.near,4 +skorikoff.near,2 +skycastle.near,1 +skydan.near,3 +slattz83.near,4 +slavon.near,2 +slimchance.near,1 +slnear.near,1 +slowpok.near,1 +smart.near,1 +smartstake.near,1 +smercer.near,2 +smith.near,1 +smj9065.near,1 +smoke.near,1 +smurfoleta.near,1 +snakamoto.near,2 +sneza.near,1 +snowman.near,1 +sokolenkoandr.near,2 +solimir.near,1 +sonic.near,1 +sorokin87.near,1 +sp1010.near,1 +spacex.near,1 +spaincity914.near,1 +sparrow.near,1 +spartacus.near,1 +spasoman.near,1 +specialnear.near,1 +spedisci.near,1 +sphinx.near,1 +spoonmeon.near,2 +sprigan.near,2 +spritelemon36.near,1 +sputnik.near,1 +sqzz.near,1 +sr-trading.near,1 +srazajamal.near,2 +sreeraj.near,1 +sri.near,1 +srikanthraju1979.near,1 +srini.near,3 +sromic2.near,3 +srubarmichal.near,1 +srv.near,1 +ss.near,1 +stack.near,1 +stacks.near,1 +stakery.near,1 +stakeservice.near,2 +staking4all-validator.near,1 +staking4all.near,1 +staking4all01.near,1 +stan.near,1 +stanchocorporation.near,1 +standrews.near,2 +stanislavmileshin.near,2 +stankf.near,2 +stanly.near,1 +stanvtb.near,1 +stanwang.near,2 +stardust.near,6 +startico2017.near,7 +stbanhf.near,2 +steefan.near,1 +steeny.near,1 +stefan.near,1 +stefan1103.near,2 +steffen.near,2 +stela.near,1 +stells.near,1 +sten.near,2 +stephenreid.near,1 +sterx.near,1 +stevanus.near,1 +steve.near,1 +steven1989.near,2 +stevenlwk.near,1 +stijnlohuis.near,4 +stirzy.near,1 +stone.near,1 +straj7771.near,1 +strikerjax.near,1 +studeywebs.near,1 +stumpydoo5.near,1 +styxson.near,2 +subaozi.near,1 +subbu.near,1 +suhanbae.near,2 +suisiwen.near,1 +sukrucildirr.near,1 +sumit.near,2 +sun.near,1 +sung.near,1 +sunliming.near,2 +sunrise.near,1 +sunshine.near,1 +superlogico1983.near,2 +superman.near,1 +superpups.near,2 +superzack1221.near,1 +supi-tup.near,1 +suppernho.near,5 +suresh.near,1 +surf.near,1 +sushi.near,1 +sushiswap.near,1 +suyoda.near,2 +suzu151091.near,1 +svdv.near,1 +svetlanabunkova.near,1 +svetlanaby.near,1 +swaggadan.near,2 +swagomat.near,1 +sweetpotatoz.near,1 +swiss-staking.near,1 +swx123.near,3 +swys.near,1 +sxguan666.near,1 +sxguanok.near,2 +symadrynnikov.near,1 +syncnode.near,1 +system_s.near,1 +sz.near,2 +t14ul1.near,1 +tabtrading.near,1 +taforyou.near,1 +taganskii.near,1 +taheer121.near,2 +taiyab.near,2 +takashi.near,2 +taku.near,1 +tameemwallet2.near,1 +tanderug.near,1 +taoros.near,3 +tarun.near,1 +taruntrav.near,2 +tatelinpp.near,5 +tatyana_igumenceva.near,1 +taurolsan.near,1 +taylorholland13.near,1 +tayyab.near,1 +tb.near,1 +tchiu.near,2 +tclshilf.near,1 +tdmoor.near,5 +techno.near,1 +teleginate.near,1 +telegins.near,1 +teleginsv.near,1 +temaspeak.near,2 +temidayore.near,1 +tententen2.near,3 +terencehan.near,1 +terentyev089.near,1 +terror7777.near,1 +terryow11.near,1 +teuhcatl.near,1 +teusevi.near,2 +tevinl.near,2 +texgeek.near,2 +th3m477.near,1 +thanhvinh10589.near,1 +thatalex.near,1 +the.near,1 +the_lexa.near,1 +the_liolik.near,1 +thegoat.near,2 +thehatter.near,1 +themoon.near,1 +theo.near,2 +theobtl.near,1 +theresa.near,1 +thesky1234.near,2 +thienlongtu.near,6 +thisismynearwallet.near,1 +thiyaneswaran.near,2 +thomas.near,1 +thomasbaak.near,2 +thomasschneider110471.near,12 +thsnz.near,1 +ti3au.near,2 +tichathegreat.near,1 +tiger.near,1 +till.near,1 +timchuk_vladimir89.near,1 +timo.near,2 +timolei.near,1 +timonthen3arkat.near,1 +tinaing2019.near,2 +tinanpha.near,1 +tinotrung.near,1 +tipazloy.near,2 +tirreg9.near,1 +titalunz.near,2 +titikaka791.near,1 +tj77.near,6 +tlinder.near,1 +tobeaj2mer.near,1 +tobiofneptune.near,1 +todamoon.near,1 +todd.near,3 +todeco.near,2 +toebee.near,1 +tof.near,1 +tokenfundamentalist.near,1 +tolzr.near,1 +tom.near,2 +tom68.near,1 +tomas.near,1 +tomas007ales.near,1 +tomasz.near,2 +tome.near,1 +tommy.near,1 +tommybananas.near,1 +tommynara.near,2 +tommyvo.near,1 +tommzardoz.near,1 +tompi_2014.near,1 +tongcp1576.near,1 +tonton.near,3 +tony.near,1 +toonni.near,2 +torledo.near,1 +toth3moon.near,1 +tp493159.near,1 +trachartem.near,2 +tradesman.near,1 +trananhkhoait.near,1 +tranducnham.near,1 +travellerfrank.near,1 +treasury.near,1 +trepidswampmountain.near,1 +trevordagg.near,2 +tribe.near,1 +trick.near,1 +trim.near,1 +trojan.near,1 +troks.near,2 +trongtour.near,4 +troy.near,1 +true.near,2 +truongpx.near,1 +truongvanhoa19.near,1 +tschimi.near,1 +tso.near,1 +tsyregma.near,1 +tuanduongk37.near,1 +tunghaolin.near,1 +tuzem.near,1 +twintbeast.near,2 +twr.near,2 +txentejmnz.near,2 +txirrisklas.near,2 +tyler.near,1 +tymon.near,4 +tyoo.near,1 +tzouf.near,1 +u.near,2 +ubikcapital.near,1 +uen.near,2 +ujjwal.near,1 +ul.near,1 +ula.near,1 +ultracyl.near,1 +undefined.near,2 +underminer.near,1 +unicorn.near,1 +uniswap.near,1 +unit.near,1 +unknow-person.near,1 +unlimg.near,1 +unternehmer_83.near,1 +up.near,6 +upepe3keyama.near,4 +uptowneric.near,1 +ural.near,1 +urmas.near,1 +us.near,2 +usa.near,1 +usd.near,1 +usdt.near,1 +username.near,4 +userzuzer.near,2 +utifom.near,1 +vabsie.near,1 +vaclavmaslov1975.near,1 +vadim_0060708.near,2 +vadimpigolenko.near,2 +vaihen.near,1 +valodja.near,2 +vananh.near,1 +vanminh122298.near,1 +vantoanbk57.near,2 +vanvinh.near,1 +varenka.near,1 +varlan.near,2 +varun.near,1 +vasay1990.near,1 +vasilies.near,1 +vasilij333.near,2 +vavanu4.near,2 +vbs.near,1 +vcar.near,1 +vdfrost.near,1 +vdyz4t8u.near,1 +vega.near,1 +veitali.near,3 +vencn.near,1 +venediger.near,1 +verosar.near,1 +very.near,3 +vgng.near,2 +vicky.near,2 +vickyrock30.near,1 +vict.near,1 +vietanh.near,1 +vietanhle8888.near,1 +vietdo.near,1 +vigneshmadrista.near,1 +vigneshpandian.near,1 +vijayakumar.near,1 +vikassood1.near,1 +viktor.near,2 +viktor_benner.near,1 +viktorliu.near,1 +viktorskf.near,1 +vikusss89.near,1 +vilija.near,2 +vincent.near,1 +vinilpc.near,1 +vinmar.near,3 +vip.near,1 +vitalik.near,1 +vitalik_buterin.near,1 +vitaliy.near,1 +vitaly.near,1 +vitas86.near,1 +vitkov.near,1 +vitkov2.near,1 +vivi1333.near,1 +vk1118.near,1 +vlad.near,1 +vladimirg.near,1 +vladis.near,1 +vladsmd.near,2 +voland04.near,1 +vote4pedro.near,1 +vovusik.near,1 +vox.near,1 +vy_vy_22.near,1 +vytas.near,1 +wang16.near,2 +wangchao86.near,1 +wanglei0095.near,1 +wangsta.near,1 +wanseob.near,1 +warisyaqubi.near,2 +warlock.near,1 +warmcapital.near,1 +was.near,3 +waters.near,1 +wearesatoshi.near,1 +weariedatom.near,3 +web3.near,1 +webmel.near,2 +weed.near,1 +weiliangfung.near,2 +wenjielu.near,2 +wenxianjiang.near,1 +wetez.near,1 +whatever.near,1 +whiletrue.near,2 +white_house.near,3 +whoismrbru.near,1 +whoismrskill.near,1 +wildalert.near,1 +willymooth.near,1 +wimscot123.near,2 +win.near,1 +winnerclubs.near,1 +winnieyow.near,1 +wistar.near,1 +wladka666.near,3 +wodikasha.near,1 +wojak.near,1 +wolf34.near,1 +wompwomp.near,1 +wonbo.near,1 +wonderreturn.near,1 +woodwam.near,1 +wookiewarrior.near,2 +wow.near,1 +wowanjd.near,1 +wr.near,1 +wtldmrs.near,2 +wu365.near,1 +wu40.near,1 +wudi.near,2 +wuffle.near,1 +wurstmensch.near,1 +ww.near,1 +wx.near,2 +x.near,1 +xafobia.near,2 +xander.near,1 +xanyar.near,2 +xbadmax.near,2 +xbleidx11.near,1 +xedap.near,1 +xianghong0912.near,1 +xiaobo.near,1 +xiaojun.near,1 +xikunying.near,1 +xoreth.near,8 +xpaco.near,2 +xpromt.near,1 +xrahul.near,1 +xtreme11.near,1 +xtreme12.near,1 +xuyogi.near,1 +xvideos469.near,2 +xx.near,1 +xxx.near,1 +xy.near,2 +xyb.near,2 +y0b.near,1 +yajirushiworks2020.near,2 +yakultza.near,2 +yam.near,1 +yams.near,4 +yan.near,5 +yangchj.near,1 +yangshen.near,1 +yangweizi911.near,1 +yanmingguo.near,1 +yanok1985.near,2 +yaomengmeng1986.near,1 +yarco.near,1 +yashman.near,1 +yasser.near,2 +ybob.near,2 +yc.near,2 +ycl.near,2 +yderdiki.near,1 +yearn.near,1 +yellowboy.near,1 +yessin.near,2 +yfi.near,1 +yfledger.near,1 +yicrson.near,1 +yin123y.near,3 +yinqa.near,1 +ykhan60.near,1 +ykvph.near,1 +yl.near,1 +yoda.near,3 +yoda_uk.near,2 +yodake.near,2 +yolo_surf.near,1 +yongming.near,5 +yoonho00.near,1 +york1ng99.near,1 +youtube.near,2 +yrl2000.near,1 +ysxlin01.near,2 +yt8686jh.near,1 +yuchialiang.near,2 +yuggalen.near,1 +yujinbo.near,1 +yulian.near,1 +yuridiablo.near,2 +yuristturist.near,1 +yuriy.near,1 +yury.near,1 +yuta.near,1 +yuther.near,1 +yy.near,1 +yylai.near,2 +z.near,1 +zachzwei.near,1 +zaebumba.near,1 +zamzam1.near,1 +zamzam2.near,1 +zano66.near,1 +zaremba.near,1 +zazoley.near,2 +zealot.near,1 +zeecity.near,1 +zenithli.near,1 +zeromax.near,1 +zeroone.near,1 +zeus7912.near,4 +zeusone.near,1 +zeze.near,2 +zhartur89.near,1 +zhelserhii09.near,1 +zhuhao529440.near,1 +zhuoyue.near,1 +ziaaddils.near,1 +zilj.near,1 +zinur.near,1 +zitko.near,2 +ziyou.near,1 +zjouraolian.near,1 +zkp.near,2 +zoek.near,1 +zorro.near,1 +zpool.near,4 +zyzygy.near,1 +zzangpk.near,1 +zzf.near,1 +zztom.near,1 diff --git a/core/primitives/src/runtime/config.rs b/core/primitives/src/runtime/config.rs index c3494725aea..dd0ba835460 100644 --- a/core/primitives/src/runtime/config.rs +++ b/core/primitives/src/runtime/config.rs @@ -7,6 +7,8 @@ use crate::runtime::fees::RuntimeFeesConfig; use crate::serialize::u128_dec_format; use crate::types::{AccountId, Balance}; use crate::version::ProtocolVersion; +#[cfg(feature = "protocol_feature_add_account_versions")] +use std::collections::HashMap; use std::sync::{Arc, Mutex}; /// The structure that holds the parameters of the runtime, mostly economics. @@ -24,6 +26,12 @@ pub struct RuntimeConfig { pub wasm_config: VMConfig, /// Config that defines rules for account creation. pub account_creation_config: AccountCreationConfig, + /// Storage usage delta that need to be added on migration of account from v1 to v2 + /// See https://github.com/near/nearcore/issues/3824 + #[serde(default = "RuntimeConfig::empty_storage_usage_delta")] + #[serde(skip)] + #[cfg(feature = "protocol_feature_add_account_versions")] + pub storage_usage_delta: &'static HashMap, } impl Default for RuntimeConfig { @@ -34,6 +42,8 @@ impl Default for RuntimeConfig { transaction_costs: RuntimeFeesConfig::default(), wasm_config: VMConfig::default(), account_creation_config: AccountCreationConfig::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + storage_usage_delta: &EMPTY_STORAGE_USAGE_DELTA, } } } @@ -42,13 +52,45 @@ lazy_static::lazy_static! { static ref LOWER_STORAGE_COST_CONFIG: Mutex>> = Mutex::new(None); } +#[cfg(feature = "protocol_feature_add_account_versions")] +lazy_static::lazy_static! { + static ref STORAGE_USAGE_DELTA_FROM_FILE: HashMap = RuntimeConfig::read_storage_usage_delta(); + static ref EMPTY_STORAGE_USAGE_DELTA: HashMap = HashMap::new(); + // static ref STORAGE_USAGE_DELTA_CSV: str = include_str!("../../res/storage_usage_delta.csv"); +} + +#[cfg(feature = "protocol_feature_add_account_versions")] +lazy_static_include::lazy_static_include_str! { + STORAGE_USAGE_DELTA_CSV => "res/storage_usage_delta.csv" +} + impl RuntimeConfig { + #[cfg(feature = "protocol_feature_add_account_versions")] + fn read_storage_usage_delta() -> HashMap { + let mut reader = csv::Reader::from_reader(STORAGE_USAGE_DELTA_CSV.as_bytes()); + let mut result = HashMap::new(); + for record in reader.records() { + let record = record.expect("Malformed storage_usage_delta.csv"); + let account_id = &record[0]; + let delta = record[1].parse::().expect("Malformed storage_usage_delta.csv"); + result.insert(account_id.to_string() as AccountId, delta); + } + result + } + + #[cfg(feature = "protocol_feature_add_account_versions")] + fn empty_storage_usage_delta() -> &'static HashMap { + &EMPTY_STORAGE_USAGE_DELTA + } + pub fn free() -> Self { Self { storage_amount_per_byte: 0, transaction_costs: RuntimeFeesConfig::free(), wasm_config: VMConfig::free(), account_creation_config: AccountCreationConfig::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + storage_usage_delta: &EMPTY_STORAGE_USAGE_DELTA, } } @@ -58,19 +100,34 @@ impl RuntimeConfig { pub fn from_protocol_version( genesis_runtime_config: &Arc, protocol_version: ProtocolVersion, + is_mainnet: bool, ) -> Arc { + let result: Arc; if checked_feature!( "protocol_feature_lower_storage_cost", LowerStorageCost, protocol_version ) { let mut config = LOWER_STORAGE_COST_CONFIG.lock().unwrap(); - config + result = config .get_or_insert_with(|| Arc::new(genesis_runtime_config.decrease_storage_cost())) .clone() } else { - genesis_runtime_config.clone() + result = genesis_runtime_config.clone(); + } + #[cfg(feature = "protocol_feature_add_account_versions")] + if is_mainnet + && checked_feature!( + "protocol_feature_add_account_versions", + AccountVersions, + protocol_version + ) + { + return Arc::new(result.add_storage_usage_delta()).clone(); } + #[cfg(not(feature = "protocol_feature_add_account_versions"))] + let _ = is_mainnet; + result } /// Returns a new config with decreased storage cost. @@ -79,6 +136,13 @@ impl RuntimeConfig { config.storage_amount_per_byte = 10u128.pow(19); config } + + #[cfg(feature = "protocol_feature_add_account_versions")] + fn add_storage_usage_delta(&self) -> Self { + let mut config = self.clone(); + config.storage_usage_delta = &STORAGE_USAGE_DELTA_FROM_FILE; + config + } } /// The structure describes configuration for creation of new accounts. @@ -103,6 +167,9 @@ impl Default for AccountCreationConfig { #[cfg(test)] mod tests { use super::*; + use crate::hash::hash; + use crate::serialize::to_base; + use crate::version::ProtocolFeature::AccountVersions; #[test] fn test_max_prepaid_gas() { @@ -118,14 +185,31 @@ mod tests { #[test] fn test_lower_cost() { let config = Arc::new(RuntimeConfig::default()); - let config_same = RuntimeConfig::from_protocol_version(&config, 0); + let config_same = RuntimeConfig::from_protocol_version(&config, 0, false); assert_eq!( config_same.as_ref().storage_amount_per_byte, config.as_ref().storage_amount_per_byte ); - let config_lower = RuntimeConfig::from_protocol_version(&config, ProtocolVersion::MAX); + let config_lower = + RuntimeConfig::from_protocol_version(&config, ProtocolVersion::MAX, false); assert!( config_lower.as_ref().storage_amount_per_byte < config.as_ref().storage_amount_per_byte ); } + + #[test] + #[cfg(feature = "protocol_feature_add_account_versions")] + fn test_storage_usage_delta() { + assert_eq!( + to_base(hash(STORAGE_USAGE_DELTA_CSV.as_bytes())), + "6vvz6vHkKekc6sEk2nzzJoWLBsiV7cy7Z5KMGKrzHGy1" + ); + let config = Arc::new(RuntimeConfig::default()); + let config_same = RuntimeConfig::from_protocol_version(&config, 0, false); + let config_with_delta = + RuntimeConfig::from_protocol_version(&config, AccountVersions.protocol_version(), true); + assert_eq!(config.storage_usage_delta.len(), 0); + assert_eq!(config_same.storage_usage_delta.len(), 0); + assert_eq!(config_with_delta.storage_usage_delta.len(), 3111); + } } diff --git a/genesis-tools/genesis-populate/src/lib.rs b/genesis-tools/genesis-populate/src/lib.rs index 48252ecf99d..641e7650646 100644 --- a/genesis-tools/genesis-populate/src/lib.rs +++ b/genesis-tools/genesis-populate/src/lib.rs @@ -163,10 +163,8 @@ impl GenesisBuilder { self.state_updates.remove(&shard_idx).expect("State updates are always available"); // Compute storage usage and update accounts. - for (account_id, storage_usage) in self - .runtime - .runtime - .compute_storage_usage(&records, &self.genesis.config.runtime_config) + for (account_id, storage_usage) in + Runtime::compute_storage_usage(&records, &self.genesis.config.runtime_config) { let mut account = get_account(&state_update, &account_id)?.expect("We should've created account"); diff --git a/neard/src/runtime/mod.rs b/neard/src/runtime/mod.rs index b747678e7d7..a040b658c77 100644 --- a/neard/src/runtime/mod.rs +++ b/neard/src/runtime/mod.rs @@ -413,6 +413,7 @@ impl NightshadeRuntime { config: RuntimeConfig::from_protocol_version( &self.genesis_runtime_config, current_protocol_version, + self.genesis_config.is_mainnet(), ), cache: Some(Arc::new(StoreCompiledContractCache { store: self.store.clone() })), #[cfg(feature = "protocol_feature_evm")] @@ -548,6 +549,7 @@ impl RuntimeAdapter for NightshadeRuntime { let runtime_config = RuntimeConfig::from_protocol_version( &self.genesis_runtime_config, current_protocol_version, + self.genesis_config.is_mainnet(), ); if let Some(state_root) = state_root { @@ -620,6 +622,7 @@ impl RuntimeAdapter for NightshadeRuntime { let runtime_config = RuntimeConfig::from_protocol_version( &self.genesis_runtime_config, current_protocol_version, + self.genesis_config.is_mainnet(), ); while total_gas_burnt < transactions_gas_limit { @@ -1489,8 +1492,11 @@ impl RuntimeAdapter for NightshadeRuntime { let mut config = self.genesis_config.clone(); config.protocol_version = protocol_version; // Currently only runtime config is changed through protocol upgrades. - let runtime_config = - RuntimeConfig::from_protocol_version(&self.genesis_runtime_config, protocol_version); + let runtime_config = RuntimeConfig::from_protocol_version( + &self.genesis_runtime_config, + protocol_version, + self.genesis_config.is_mainnet(), + ); config.runtime_config = (*runtime_config).clone(); Ok(config) } diff --git a/runtime/near-vm-logic/src/gas_counter.rs b/runtime/near-vm-logic/src/gas_counter.rs index dcacacb8f2e..a772e11758b 100644 --- a/runtime/near-vm-logic/src/gas_counter.rs +++ b/runtime/near-vm-logic/src/gas_counter.rs @@ -118,7 +118,9 @@ impl GasCounter { #[cfg(feature = "protocol_feature_evm")] #[inline] pub fn inc_evm_gas_counter(&mut self, value: EvmGas) { - with_evm_gas_counter(|c| *c += value); + #[cfg(feature = "costs_counting")] + EVM_GAS_COUNTER.with(|f| *f.borrow_mut() += value); + let _ = value; } #[inline] diff --git a/runtime/runtime/Cargo.toml b/runtime/runtime/Cargo.toml index dfa49981419..cb4ed6246b3 100644 --- a/runtime/runtime/Cargo.toml +++ b/runtime/runtime/Cargo.toml @@ -54,6 +54,7 @@ protocol_feature_alt_bn128 = [ ] protocol_feature_tx_size_limit = [] protocol_feature_allow_create_account_on_delete = ["near-primitives/protocol_feature_allow_create_account_on_delete", "near-vm-logic/protocol_feature_allow_create_account_on_delete"] +protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions"] [dev-dependencies] tempfile = "3" diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index b4e4bcd78c5..bf0db7562eb 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -41,6 +41,8 @@ use near_vm_logic::{VMContext, VMOutcome}; use crate::config::{safe_add_gas, RuntimeConfig}; use crate::ext::RuntimeExt; use crate::{ActionResult, ApplyState}; +#[cfg(feature = "protocol_feature_add_account_versions")] +use near_primitives::account::AccountVersion::{V1, V2}; use near_vm_runner::precompile_contract; /// Runs given function call with given context / apply state. @@ -269,6 +271,13 @@ pub(crate) fn action_function_call( result.gas_used = safe_add_gas(result.gas_used, outcome.used_gas)?; result.logs.extend(outcome.logs.into_iter()); if execution_succeeded { + #[cfg(feature = "protocol_feature_add_account_versions")] + recalculate_usage( + account, + account_id, + &apply_state.config, + apply_state.current_protocol_version, + ); account.set_amount(outcome.balance); account.set_storage_usage(outcome.storage_usage); result.result = Ok(outcome.return_data); @@ -470,6 +479,13 @@ pub(crate) fn action_deploy_contract( let code = ContractCode::new(deploy_contract.code.clone(), None); let prev_code = get_code(state_update, account_id, Some(account.code_hash()))?; let prev_code_length = prev_code.map(|code| code.code.len() as u64).unwrap_or_default(); + #[cfg(feature = "protocol_feature_add_account_versions")] + recalculate_usage( + account, + account_id, + &apply_state.config, + apply_state.current_protocol_version, + ); account.set_storage_usage(account.storage_usage().checked_sub(prev_code_length).unwrap_or(0)); account.set_storage_usage( account.storage_usage().checked_add(code.code.len() as u64).ok_or_else(|| { @@ -574,29 +590,35 @@ pub(crate) fn action_delete_account( } pub(crate) fn action_delete_key( - fee_config: &RuntimeFeesConfig, state_update: &mut TrieUpdate, account: &mut Account, result: &mut ActionResult, account_id: &AccountId, delete_key: &DeleteKeyAction, - current_protocol_version: ProtocolVersion, + apply_state: &ApplyState, ) -> Result<(), StorageError> { let access_key = get_access_key(state_update, &account_id, &delete_key.public_key)?; if let Some(access_key) = access_key { - let storage_usage_config = &fee_config.storage_usage_config; - let storage_usage = if current_protocol_version >= DELETE_KEY_STORAGE_USAGE_PROTOCOL_VERSION - { - delete_key.public_key.try_to_vec().unwrap().len() as u64 - + access_key.try_to_vec().unwrap().len() as u64 - + storage_usage_config.num_extra_bytes_record - } else { - delete_key.public_key.try_to_vec().unwrap().len() as u64 - + Some(access_key).try_to_vec().unwrap().len() as u64 - + storage_usage_config.num_extra_bytes_record - }; + let storage_usage_config = &apply_state.config.transaction_costs.storage_usage_config; + let storage_usage = + if apply_state.current_protocol_version >= DELETE_KEY_STORAGE_USAGE_PROTOCOL_VERSION { + delete_key.public_key.try_to_vec().unwrap().len() as u64 + + access_key.try_to_vec().unwrap().len() as u64 + + storage_usage_config.num_extra_bytes_record + } else { + delete_key.public_key.try_to_vec().unwrap().len() as u64 + + Some(access_key).try_to_vec().unwrap().len() as u64 + + storage_usage_config.num_extra_bytes_record + }; // Remove access key remove_access_key(state_update, account_id.clone(), delete_key.public_key.clone()); + #[cfg(feature = "protocol_feature_add_account_versions")] + recalculate_usage( + account, + account_id, + &apply_state.config, + apply_state.current_protocol_version, + ); account.set_storage_usage(account.storage_usage().checked_sub(storage_usage).unwrap_or(0)); } else { result.result = Err(ActionErrorKind::DeleteKeyDoesNotExist { @@ -649,6 +671,13 @@ pub(crate) fn action_add_key( } ); let storage_config = &apply_state.config.transaction_costs.storage_usage_config; + #[cfg(feature = "protocol_feature_add_account_versions")] + recalculate_usage( + account, + account_id, + &apply_state.config, + apply_state.current_protocol_version, + ); account.set_storage_usage( account .storage_usage() @@ -778,6 +807,30 @@ pub(crate) fn check_account_existence( Ok(()) } +#[cfg(feature = "protocol_feature_add_account_versions")] +fn recalculate_usage( + account: &mut Account, + account_id: &AccountId, + runtime_config: &RuntimeConfig, + current_protocol_version: ProtocolVersion, +) { + if checked_feature!( + "protocol_feature_add_account_versions", + AddAccountVersions, + current_protocol_version + ) && account.version() == V1 + { + account.set_version(V2); + if (runtime_config.storage_usage_delta.has_element(account_id)) { + account.set_storage_usage( + account + .storage_usage() + .saturating_add(runtime_config.storage_usage_delta.get(account_id).unwrap()), + ); + } + } +} + #[cfg(test)] mod tests { use near_primitives::hash::hash; diff --git a/runtime/runtime/src/lib.rs b/runtime/runtime/src/lib.rs index e52f1c14b40..d9e3d3e9a21 100644 --- a/runtime/runtime/src/lib.rs +++ b/runtime/runtime/src/lib.rs @@ -410,13 +410,12 @@ impl Runtime { Action::DeleteKey(delete_key) => { near_metrics::inc_counter(&metrics::ACTION_DELETE_KEY_TOTAL); action_delete_key( - &apply_state.config.transaction_costs, state_update, account.as_mut().expect(EXPECT_ACCOUNT_EXISTS), &mut result, account_id, delete_key, - apply_state.current_protocol_version, + apply_state, )?; } Action::DeleteAccount(delete_account) => { @@ -1282,7 +1281,6 @@ impl Runtime { /// It's okay to use unsafe math here, because this method should only be called on the trusted /// state records (e.g. at launch from genesis) pub fn compute_storage_usage>( - &self, records: &[Record], config: &RuntimeConfig, ) -> HashMap { @@ -1372,7 +1370,7 @@ impl Runtime { } } } - for (account_id, storage_usage) in self.compute_storage_usage(records, &config) { + for (account_id, storage_usage) in Runtime::compute_storage_usage(records, &config) { let mut account = get_account(&state_update, &account_id) .expect("Genesis storage error") .expect("Account must exist"); diff --git a/runtime/runtime/tests/runtime_group_tools/mod.rs b/runtime/runtime/tests/runtime_group_tools/mod.rs index 740d4cd12f6..fba0e7c2448 100644 --- a/runtime/runtime/tests/runtime_group_tools/mod.rs +++ b/runtime/runtime/tests/runtime_group_tools/mod.rs @@ -18,6 +18,7 @@ use std::thread; use std::thread::JoinHandle; pub mod random_config; +mod storage_usage_delta_calculator; /// Initial balance used in tests. pub const TESTING_INIT_BALANCE: Balance = 1_000_000_000 * NEAR_BASE; diff --git a/utils/storage-usage-delta-calculator/Cargo.toml b/utils/storage-usage-delta-calculator/Cargo.toml new file mode 100644 index 00000000000..0269687c6b6 --- /dev/null +++ b/utils/storage-usage-delta-calculator/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "storage-usage-delta-calculator" +version = "0.1.0" +authors = ["Egor Kulikov "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +near-chain-configs = { path = "../../core/chain-configs" } +near-primitives = { path = "../../core/primitives" } +node-runtime = { path = "../../runtime/runtime" } diff --git a/utils/storage-usage-delta-calculator/src/main.rs b/utils/storage-usage-delta-calculator/src/main.rs new file mode 100644 index 00000000000..d8f9575b467 --- /dev/null +++ b/utils/storage-usage-delta-calculator/src/main.rs @@ -0,0 +1,31 @@ +use near_chain_configs::Genesis; +use near_primitives::runtime::config::RuntimeConfig; +use near_primitives::state_record::StateRecord; +use node_runtime::Runtime; +use std::fs::OpenOptions; +use std::io::prelude::*; +use std::io::Error; + +fn main() -> Result<(), Error> { + println!("Start"); + + let genesis = Genesis::from_file("output.json"); + let mut writer = OpenOptions::new().append(true).create(true).open("delta.csv").unwrap(); + + println!("Genesis read"); + let storage_usage = + Runtime::compute_storage_usage(&genesis.records.0[..], &RuntimeConfig::default()); + println!("Storage usage calculated"); + for record in genesis.records.0 { + if let StateRecord::Account { account_id, account } = record { + let actual_storage_usage = storage_usage.get(account_id.as_str()).unwrap(); + let saved_storage_usage = account.storage_usage(); + let delta = actual_storage_usage - saved_storage_usage; + if delta != 0 { + println!("{},{}", account_id, delta); + writeln!(&mut writer, "{},{}", account_id, delta)?; + } + } + } + Ok(()) +} From 0bf112b42894b19cd08d3f153371df00a6f74cc7 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 15:10:15 +0200 Subject: [PATCH 11/28] Compliation fix --- core/primitives/src/runtime/config.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/primitives/src/runtime/config.rs b/core/primitives/src/runtime/config.rs index dd0ba835460..72c6cb12b3c 100644 --- a/core/primitives/src/runtime/config.rs +++ b/core/primitives/src/runtime/config.rs @@ -167,8 +167,11 @@ impl Default for AccountCreationConfig { #[cfg(test)] mod tests { use super::*; + #[cfg(feature = "protocol_feature_add_account_versions")] use crate::hash::hash; + #[cfg(feature = "protocol_feature_add_account_versions")] use crate::serialize::to_base; + #[cfg(feature = "protocol_feature_add_account_versions")] use crate::version::ProtocolFeature::AccountVersions; #[test] From 869aa916b9c09e3fa42136b08d8e1a0696685c21 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 15:59:52 +0200 Subject: [PATCH 12/28] Compliation fix --- Cargo.lock | 1 + genesis-tools/genesis-populate/Cargo.toml | 1 + genesis-tools/genesis-populate/src/lib.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 36ee49dd348..54384317a72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2076,6 +2076,7 @@ dependencies = [ "near-telemetry", "near-test-contracts", "neard", + "node-runtime", "tempfile", ] diff --git a/genesis-tools/genesis-populate/Cargo.toml b/genesis-tools/genesis-populate/Cargo.toml index f1a3da2d898..cfc787c95d2 100644 --- a/genesis-tools/genesis-populate/Cargo.toml +++ b/genesis-tools/genesis-populate/Cargo.toml @@ -24,3 +24,4 @@ near-jsonrpc = { path = "../../chain/jsonrpc" } near-telemetry = { path = "../../chain/telemetry" } near-epoch-manager = { path = "../../chain/epoch_manager" } near-test-contracts = { path = "../../runtime/near-test-contracts" } +node-runtime = { path = "../../runtime/runtime" } diff --git a/genesis-tools/genesis-populate/src/lib.rs b/genesis-tools/genesis-populate/src/lib.rs index 641e7650646..165ba3ea4bd 100644 --- a/genesis-tools/genesis-populate/src/lib.rs +++ b/genesis-tools/genesis-populate/src/lib.rs @@ -25,6 +25,7 @@ use near_store::{ create_store, get_account, set_access_key, set_account, set_code, ColState, Store, TrieUpdate, }; use neard::{get_store_path, NightshadeRuntime}; +use node_runtime::Runtime; fn get_account_id(account_index: u64) -> String { format!("near_{}_{}", account_index, account_index) From 77e4bc048b4a9aabd63de541ebe9d9066434c4be Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 16:36:23 +0200 Subject: [PATCH 13/28] Compliation fix --- runtime/runtime/tests/runtime_group_tools/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/runtime/tests/runtime_group_tools/mod.rs b/runtime/runtime/tests/runtime_group_tools/mod.rs index fba0e7c2448..740d4cd12f6 100644 --- a/runtime/runtime/tests/runtime_group_tools/mod.rs +++ b/runtime/runtime/tests/runtime_group_tools/mod.rs @@ -18,7 +18,6 @@ use std::thread; use std::thread::JoinHandle; pub mod random_config; -mod storage_usage_delta_calculator; /// Initial balance used in tests. pub const TESTING_INIT_BALANCE: Balance = 1_000_000_000 * NEAR_BASE; From 10ea6481d66476c4cce3f8b8bc8db11e6df35cdc Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 18:49:30 +0200 Subject: [PATCH 14/28] Compliation fix --- runtime/near-vm-logic/src/gas_counter.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/near-vm-logic/src/gas_counter.rs b/runtime/near-vm-logic/src/gas_counter.rs index a772e11758b..dcacacb8f2e 100644 --- a/runtime/near-vm-logic/src/gas_counter.rs +++ b/runtime/near-vm-logic/src/gas_counter.rs @@ -118,9 +118,7 @@ impl GasCounter { #[cfg(feature = "protocol_feature_evm")] #[inline] pub fn inc_evm_gas_counter(&mut self, value: EvmGas) { - #[cfg(feature = "costs_counting")] - EVM_GAS_COUNTER.with(|f| *f.borrow_mut() += value); - let _ = value; + with_evm_gas_counter(|c| *c += value); } #[inline] From a3d33ec9a893cbe508a6639ccf902fc347439ea0 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 20:39:32 +0200 Subject: [PATCH 15/28] Compliation fix --- core/store/src/migrations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/store/src/migrations.rs b/core/store/src/migrations.rs index 526fe68a750..c5a17b6feaf 100644 --- a/core/store/src/migrations.rs +++ b/core/store/src/migrations.rs @@ -316,7 +316,7 @@ impl<'a> BatchedStoreUpdate<'a> { value: &T, ) -> Result<(), std::io::Error> { let value_bytes = value.try_to_vec()?; - self.batch_size += key.as_ref().len() + value_bytes.len() + 8; + self.batch_size += key.len() + value_bytes.len() + 8; self.store_update.as_mut().unwrap().set(col, key.as_ref(), &value_bytes); if self.batch_size > self.batch_size_limit { From 89c97805c6684de2af6c2cb65970cafe949c531c Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 21:29:51 +0200 Subject: [PATCH 16/28] Compliation fix --- runtime/runtime/src/actions.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index bf0db7562eb..c2b187664ad 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -816,16 +816,16 @@ fn recalculate_usage( ) { if checked_feature!( "protocol_feature_add_account_versions", - AddAccountVersions, + AccountVersions, current_protocol_version ) && account.version() == V1 { account.set_version(V2); - if (runtime_config.storage_usage_delta.has_element(account_id)) { + if runtime_config.storage_usage_delta.has_element(account_id) { account.set_storage_usage( account .storage_usage() - .saturating_add(runtime_config.storage_usage_delta.get(account_id).unwrap()), + .saturating_add(*runtime_config.storage_usage_delta.get(account_id).unwrap()), ); } } From fbad24f16a5ad8f88036d9df22f1dae297509c92 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 22:43:57 +0200 Subject: [PATCH 17/28] Compliation fix Removing dead code --- core/primitives/src/runtime/config.rs | 1 - runtime/runtime/src/actions.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/primitives/src/runtime/config.rs b/core/primitives/src/runtime/config.rs index 72c6cb12b3c..cf6d75f3da2 100644 --- a/core/primitives/src/runtime/config.rs +++ b/core/primitives/src/runtime/config.rs @@ -56,7 +56,6 @@ lazy_static::lazy_static! { lazy_static::lazy_static! { static ref STORAGE_USAGE_DELTA_FROM_FILE: HashMap = RuntimeConfig::read_storage_usage_delta(); static ref EMPTY_STORAGE_USAGE_DELTA: HashMap = HashMap::new(); - // static ref STORAGE_USAGE_DELTA_CSV: str = include_str!("../../res/storage_usage_delta.csv"); } #[cfg(feature = "protocol_feature_add_account_versions")] diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index c2b187664ad..78770fd0c03 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -821,7 +821,7 @@ fn recalculate_usage( ) && account.version() == V1 { account.set_version(V2); - if runtime_config.storage_usage_delta.has_element(account_id) { + if *runtime_config.storage_usage_delta.has_element(account_id) { account.set_storage_usage( account .storage_usage() From f5712b104733a85a99e860b2af0a70f162382c93 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 22:46:22 +0200 Subject: [PATCH 18/28] Comment --- core/primitives/src/runtime/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/primitives/src/runtime/config.rs b/core/primitives/src/runtime/config.rs index cf6d75f3da2..2628ce7d6f7 100644 --- a/core/primitives/src/runtime/config.rs +++ b/core/primitives/src/runtime/config.rs @@ -28,6 +28,7 @@ pub struct RuntimeConfig { pub account_creation_config: AccountCreationConfig, /// Storage usage delta that need to be added on migration of account from v1 to v2 /// See https://github.com/near/nearcore/issues/3824 + /// Account list for mainnet generated by utils/storage-usage-delta-calculator #[serde(default = "RuntimeConfig::empty_storage_usage_delta")] #[serde(skip)] #[cfg(feature = "protocol_feature_add_account_versions")] From a823ecbe0d117a344d0632700978da34a3b1af64 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 23:24:55 +0200 Subject: [PATCH 19/28] Compilation fix --- runtime/runtime/src/actions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index 78770fd0c03..38b016e3836 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -821,7 +821,7 @@ fn recalculate_usage( ) && account.version() == V1 { account.set_version(V2); - if *runtime_config.storage_usage_delta.has_element(account_id) { + if (*runtime_config.storage_usage_delta).has_element(account_id) { account.set_storage_usage( account .storage_usage() From e5a223839bab0ff674f7127a92206694a030571c Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Thu, 22 Apr 2021 23:41:45 +0200 Subject: [PATCH 20/28] Compilation fix --- runtime/runtime/src/actions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index 38b016e3836..ffa205d7763 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -821,7 +821,7 @@ fn recalculate_usage( ) && account.version() == V1 { account.set_version(V2); - if (*runtime_config.storage_usage_delta).has_element(account_id) { + if runtime_config.storage_usage_delta.contains_key(account_id) { account.set_storage_usage( account .storage_usage() From 2e8eb29be20b16d63012fc77547d4ead0a0c8212 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Mon, 26 Apr 2021 13:00:10 +0200 Subject: [PATCH 21/28] Moving delta storage usage from runtime config to static --- Cargo.lock | 4 +- core/primitives/Cargo.toml | 2 - core/primitives/src/runtime/apply_state.rs | 3 + core/primitives/src/runtime/config.rs | 95 +------------------ core/primitives/src/views.rs | 3 + neard/Cargo.toml | 14 +-- neard/src/runtime/mod.rs | 17 ++-- runtime/runtime-params-estimator/Cargo.toml | 7 +- .../runtime-params-estimator/src/testbed.rs | 2 + runtime/runtime/Cargo.toml | 3 + .../runtime}/res/storage_usage_delta.csv | 0 runtime/runtime/src/actions.rs | 80 +++++++++++++--- runtime/runtime/src/adapter.rs | 1 + runtime/runtime/src/lib.rs | 2 + runtime/runtime/src/state_viewer/mod.rs | 12 +++ .../runtime/tests/runtime_group_tools/mod.rs | 2 + test-utils/testlib/Cargo.toml | 5 + test-utils/testlib/src/user/runtime_user.rs | 4 + 18 files changed, 133 insertions(+), 123 deletions(-) rename {core/primitives => runtime/runtime}/res/storage_usage_delta.csv (100%) diff --git a/Cargo.lock b/Cargo.lock index 54384317a72..c95b2fa6988 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3418,12 +3418,10 @@ dependencies = [ "bs58", "byteorder", "chrono", - "csv", "derive_more", "easy-ext", "hex", "jemallocator", - "lazy-static-include", "lazy_static", "near-crypto", "near-primitives-core", @@ -3750,9 +3748,11 @@ dependencies = [ "base64 0.11.0", "borsh", "byteorder", + "csv", "ethereum-types 0.11.0", "hex", "indicatif 0.13.0", + "lazy-static-include", "lazy_static", "log", "near-chain-configs", diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index d4d2c1b231e..f6bcbc3bc34 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -16,12 +16,10 @@ bs58 = "0.4" base64 = "0.13" byteorder = "1.3" chrono = { version = "0.4.4", features = ["serde"] } -csv = "1.1" derive_more = "0.99.3" easy-ext = "0.2" sha2 = "0.9" lazy_static = "1.4" -lazy-static-include = "3" serde = { version = "1", features = ["derive"] } serde_json = "1" smart-default = "0.6" diff --git a/core/primitives/src/runtime/apply_state.rs b/core/primitives/src/runtime/apply_state.rs index e1dfefd2a91..e4cc53030bb 100644 --- a/core/primitives/src/runtime/apply_state.rs +++ b/core/primitives/src/runtime/apply_state.rs @@ -41,4 +41,7 @@ pub struct ApplyState { pub evm_chain_id: u64, /// Data collected from making a contract call pub profile: crate::profile::ProfileData, + /// True iff this ApplyState is on mainnet + #[cfg(feature = "protocol_feature_add_account_versions")] + pub is_mainnet: bool, } diff --git a/core/primitives/src/runtime/config.rs b/core/primitives/src/runtime/config.rs index 2628ce7d6f7..c3494725aea 100644 --- a/core/primitives/src/runtime/config.rs +++ b/core/primitives/src/runtime/config.rs @@ -7,8 +7,6 @@ use crate::runtime::fees::RuntimeFeesConfig; use crate::serialize::u128_dec_format; use crate::types::{AccountId, Balance}; use crate::version::ProtocolVersion; -#[cfg(feature = "protocol_feature_add_account_versions")] -use std::collections::HashMap; use std::sync::{Arc, Mutex}; /// The structure that holds the parameters of the runtime, mostly economics. @@ -26,13 +24,6 @@ pub struct RuntimeConfig { pub wasm_config: VMConfig, /// Config that defines rules for account creation. pub account_creation_config: AccountCreationConfig, - /// Storage usage delta that need to be added on migration of account from v1 to v2 - /// See https://github.com/near/nearcore/issues/3824 - /// Account list for mainnet generated by utils/storage-usage-delta-calculator - #[serde(default = "RuntimeConfig::empty_storage_usage_delta")] - #[serde(skip)] - #[cfg(feature = "protocol_feature_add_account_versions")] - pub storage_usage_delta: &'static HashMap, } impl Default for RuntimeConfig { @@ -43,8 +34,6 @@ impl Default for RuntimeConfig { transaction_costs: RuntimeFeesConfig::default(), wasm_config: VMConfig::default(), account_creation_config: AccountCreationConfig::default(), - #[cfg(feature = "protocol_feature_add_account_versions")] - storage_usage_delta: &EMPTY_STORAGE_USAGE_DELTA, } } } @@ -53,44 +42,13 @@ lazy_static::lazy_static! { static ref LOWER_STORAGE_COST_CONFIG: Mutex>> = Mutex::new(None); } -#[cfg(feature = "protocol_feature_add_account_versions")] -lazy_static::lazy_static! { - static ref STORAGE_USAGE_DELTA_FROM_FILE: HashMap = RuntimeConfig::read_storage_usage_delta(); - static ref EMPTY_STORAGE_USAGE_DELTA: HashMap = HashMap::new(); -} - -#[cfg(feature = "protocol_feature_add_account_versions")] -lazy_static_include::lazy_static_include_str! { - STORAGE_USAGE_DELTA_CSV => "res/storage_usage_delta.csv" -} - impl RuntimeConfig { - #[cfg(feature = "protocol_feature_add_account_versions")] - fn read_storage_usage_delta() -> HashMap { - let mut reader = csv::Reader::from_reader(STORAGE_USAGE_DELTA_CSV.as_bytes()); - let mut result = HashMap::new(); - for record in reader.records() { - let record = record.expect("Malformed storage_usage_delta.csv"); - let account_id = &record[0]; - let delta = record[1].parse::().expect("Malformed storage_usage_delta.csv"); - result.insert(account_id.to_string() as AccountId, delta); - } - result - } - - #[cfg(feature = "protocol_feature_add_account_versions")] - fn empty_storage_usage_delta() -> &'static HashMap { - &EMPTY_STORAGE_USAGE_DELTA - } - pub fn free() -> Self { Self { storage_amount_per_byte: 0, transaction_costs: RuntimeFeesConfig::free(), wasm_config: VMConfig::free(), account_creation_config: AccountCreationConfig::default(), - #[cfg(feature = "protocol_feature_add_account_versions")] - storage_usage_delta: &EMPTY_STORAGE_USAGE_DELTA, } } @@ -100,34 +58,19 @@ impl RuntimeConfig { pub fn from_protocol_version( genesis_runtime_config: &Arc, protocol_version: ProtocolVersion, - is_mainnet: bool, ) -> Arc { - let result: Arc; if checked_feature!( "protocol_feature_lower_storage_cost", LowerStorageCost, protocol_version ) { let mut config = LOWER_STORAGE_COST_CONFIG.lock().unwrap(); - result = config + config .get_or_insert_with(|| Arc::new(genesis_runtime_config.decrease_storage_cost())) .clone() } else { - result = genesis_runtime_config.clone(); - } - #[cfg(feature = "protocol_feature_add_account_versions")] - if is_mainnet - && checked_feature!( - "protocol_feature_add_account_versions", - AccountVersions, - protocol_version - ) - { - return Arc::new(result.add_storage_usage_delta()).clone(); + genesis_runtime_config.clone() } - #[cfg(not(feature = "protocol_feature_add_account_versions"))] - let _ = is_mainnet; - result } /// Returns a new config with decreased storage cost. @@ -136,13 +79,6 @@ impl RuntimeConfig { config.storage_amount_per_byte = 10u128.pow(19); config } - - #[cfg(feature = "protocol_feature_add_account_versions")] - fn add_storage_usage_delta(&self) -> Self { - let mut config = self.clone(); - config.storage_usage_delta = &STORAGE_USAGE_DELTA_FROM_FILE; - config - } } /// The structure describes configuration for creation of new accounts. @@ -167,12 +103,6 @@ impl Default for AccountCreationConfig { #[cfg(test)] mod tests { use super::*; - #[cfg(feature = "protocol_feature_add_account_versions")] - use crate::hash::hash; - #[cfg(feature = "protocol_feature_add_account_versions")] - use crate::serialize::to_base; - #[cfg(feature = "protocol_feature_add_account_versions")] - use crate::version::ProtocolFeature::AccountVersions; #[test] fn test_max_prepaid_gas() { @@ -188,31 +118,14 @@ mod tests { #[test] fn test_lower_cost() { let config = Arc::new(RuntimeConfig::default()); - let config_same = RuntimeConfig::from_protocol_version(&config, 0, false); + let config_same = RuntimeConfig::from_protocol_version(&config, 0); assert_eq!( config_same.as_ref().storage_amount_per_byte, config.as_ref().storage_amount_per_byte ); - let config_lower = - RuntimeConfig::from_protocol_version(&config, ProtocolVersion::MAX, false); + let config_lower = RuntimeConfig::from_protocol_version(&config, ProtocolVersion::MAX); assert!( config_lower.as_ref().storage_amount_per_byte < config.as_ref().storage_amount_per_byte ); } - - #[test] - #[cfg(feature = "protocol_feature_add_account_versions")] - fn test_storage_usage_delta() { - assert_eq!( - to_base(hash(STORAGE_USAGE_DELTA_CSV.as_bytes())), - "6vvz6vHkKekc6sEk2nzzJoWLBsiV7cy7Z5KMGKrzHGy1" - ); - let config = Arc::new(RuntimeConfig::default()); - let config_same = RuntimeConfig::from_protocol_version(&config, 0, false); - let config_with_delta = - RuntimeConfig::from_protocol_version(&config, AccountVersions.protocol_version(), true); - assert_eq!(config.storage_usage_delta.len(), 0); - assert_eq!(config_same.storage_usage_delta.len(), 0); - assert_eq!(config_with_delta.storage_usage_delta.len(), 3111); - } } diff --git a/core/primitives/src/views.rs b/core/primitives/src/views.rs index 18c8be79211..b05e21de50a 100644 --- a/core/primitives/src/views.rs +++ b/core/primitives/src/views.rs @@ -96,6 +96,9 @@ pub struct ViewApplyState { /// EVM chain ID #[cfg(feature = "protocol_feature_evm")] pub evm_chain_id: u64, + /// True iff this is on mainnet + #[cfg(feature = "protocol_feature_add_account_versions")] + pub is_mainnet: bool, } impl From<&Account> for AccountView { diff --git a/neard/Cargo.toml b/neard/Cargo.toml index b884f69e336..169dcb2af69 100644 --- a/neard/Cargo.toml +++ b/neard/Cargo.toml @@ -6,10 +6,10 @@ edition = "2018" default-run = "neard" [dependencies] -jemallocator = { version = "0.3" } +jemallocator = { version = "0.3" } actix = "0.11.0-beta.2" actix-rt = "2" -actix-web = { version = "4.0.0-beta.1", features = [ "openssl" ] } +actix-web = { version = "4.0.0-beta.1", features = ["openssl"] } byteorder = "1.2" easy-ext = "0.2" chrono = { version = "0.4.4", features = ["serde"] } @@ -17,7 +17,7 @@ git-version = "0.3.1" futures = "0.3" clap = "2.32" rand = "0.7" -serde = { version = "1", features = [ "derive" ] } +serde = { version = "1", features = ["derive"] } serde_json = "1" dirs = "3" borsh = "0.8.1" @@ -33,9 +33,9 @@ near-crypto = { path = "../core/crypto" } near-primitives = { path = "../core/primitives" } near-chain-configs = { path = "../core/chain-configs" } near-store = { path = "../core/store" } -node-runtime = { path = "../runtime/runtime"} +node-runtime = { path = "../runtime/runtime" } near-chain = { path = "../chain/chain" } -near-chunks = { path = "../chain/chunks"} +near-chunks = { path = "../chain/chunks" } near-client = { path = "../chain/client" } near-pool = { path = "../chain/pool" } near-network = { path = "../chain/network" } @@ -59,7 +59,7 @@ primitive-types = "0.9" performance_stats = ["near-performance-metrics/performance_stats"] memory_stats = ["near-performance-metrics/memory_stats"] c_memory_stats = ["near-performance-metrics/c_memory_stats"] -adversarial = ["near-client/adversarial", "near-network/adversarial", "near-store/adversarial"] +adversarial = ["near-client/adversarial", "near-network/adversarial", "near-store/adversarial"] expensive_tests = ["near-client/expensive_tests", "near-epoch-manager/expensive_tests", "near-chain/expensive_tests"] metric_recorder = ["near-network/metric_recorder", "near-client/metric_recorder"] no_cache = ["node-runtime/no_cache", "near-store/no_cache", "near-chain/no_cache"] @@ -71,7 +71,7 @@ protocol_feature_evm = ["near-primitives/protocol_feature_evm", "node-runtime/pr protocol_feature_alt_bn128 = ["near-primitives/protocol_feature_alt_bn128", "node-runtime/protocol_feature_alt_bn128"] protocol_feature_block_header_v3 = ["near-epoch-manager/protocol_feature_block_header_v3", "near-store/protocol_feature_block_header_v3", "near-primitives/protocol_feature_block_header_v3", "near-chain/protocol_feature_block_header_v3", "near-client/protocol_feature_block_header_v3"] protocol_feature_access_key_nonce_range = ["near-primitives/protocol_feature_access_key_nonce_range", "node-runtime/protocol_feature_access_key_nonce_range", "near-client/protocol_feature_access_key_nonce_range"] -protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions"] +protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions", "node-runtime/protocol_feature_add_account_versions"] protocol_feature_tx_size_limit = ["near-primitives/protocol_feature_tx_size_limit", "node-runtime/protocol_feature_tx_size_limit"] protocol_feature_allow_create_account_on_delete = ["node-runtime/protocol_feature_allow_create_account_on_delete"] nightly_protocol_features = ["nightly_protocol", "near-primitives/nightly_protocol_features", "near-client/nightly_protocol_features", "near-epoch-manager/nightly_protocol_features", "near-store/nightly_protocol_features", "protocol_feature_forward_chunk_parts", "protocol_feature_rectify_inflation", "protocol_feature_evm", "protocol_feature_block_header_v3", "protocol_feature_alt_bn128", "protocol_feature_access_key_nonce_range", "protocol_feature_add_account_versions", "protocol_feature_tx_size_limit", "protocol_feature_allow_create_account_on_delete"] diff --git a/neard/src/runtime/mod.rs b/neard/src/runtime/mod.rs index b931ae821f0..32fa8011f8f 100644 --- a/neard/src/runtime/mod.rs +++ b/neard/src/runtime/mod.rs @@ -414,13 +414,14 @@ impl NightshadeRuntime { config: RuntimeConfig::from_protocol_version( &self.genesis_runtime_config, current_protocol_version, - self.genesis_config.is_mainnet(), ), cache: Some(Arc::new(StoreCompiledContractCache { store: self.store.clone() })), is_new_chunk, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: self.evm_chain_id(), profile: Default::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: self.genesis_config.is_mainnet(), }; let apply_result = self @@ -551,7 +552,6 @@ impl RuntimeAdapter for NightshadeRuntime { let runtime_config = RuntimeConfig::from_protocol_version( &self.genesis_runtime_config, current_protocol_version, - self.genesis_config.is_mainnet(), ); if let Some(state_root) = state_root { @@ -624,7 +624,6 @@ impl RuntimeAdapter for NightshadeRuntime { let runtime_config = RuntimeConfig::from_protocol_version( &self.genesis_runtime_config, current_protocol_version, - self.genesis_config.is_mainnet(), ); while total_gas_burnt < transactions_gas_limit { @@ -1273,6 +1272,8 @@ impl RuntimeAdapter for NightshadeRuntime { current_protocol_version, #[cfg(feature = "protocol_feature_evm")] self.evm_chain_id(), + #[cfg(feature = "protocol_feature_add_account_versions")] + self.genesis_config.is_mainnet(), ) .map_err(|err| near_chain::near_chain_primitives::error::QueryError::from_call_function_error(err, block_height, *block_hash))?; Ok(QueryResponse { @@ -1498,11 +1499,8 @@ impl RuntimeAdapter for NightshadeRuntime { let mut config = self.genesis_config.clone(); config.protocol_version = protocol_version; // Currently only runtime config is changed through protocol upgrades. - let runtime_config = RuntimeConfig::from_protocol_version( - &self.genesis_runtime_config, - protocol_version, - self.genesis_config.is_mainnet(), - ); + let runtime_config = + RuntimeConfig::from_protocol_version(&self.genesis_runtime_config, protocol_version); config.runtime_config = (*runtime_config).clone(); Ok(config) } @@ -1546,6 +1544,7 @@ impl node_runtime::adapter::ViewRuntimeAdapter for NightshadeRuntime { epoch_info_provider: &dyn EpochInfoProvider, current_protocol_version: ProtocolVersion, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: u64, + #[cfg(feature = "protocol_feature_add_account_versions")] is_mainnet: bool, ) -> Result, node_runtime::state_viewer::errors::CallFunctionError> { let state_update = self.get_tries().new_trie_update_view(shard_id, state_root); let view_state = ViewApplyState { @@ -1559,6 +1558,8 @@ impl node_runtime::adapter::ViewRuntimeAdapter for NightshadeRuntime { cache: Some(Arc::new(StoreCompiledContractCache { store: self.tries.get_store() })), #[cfg(feature = "protocol_feature_evm")] evm_chain_id, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet, }; self.trie_viewer.call_function( state_update, diff --git a/runtime/runtime-params-estimator/Cargo.toml b/runtime/runtime-params-estimator/Cargo.toml index ba22ba922b9..f460372f350 100644 --- a/runtime/runtime-params-estimator/Cargo.toml +++ b/runtime/runtime-params-estimator/Cargo.toml @@ -54,7 +54,7 @@ no_cache = ["node-runtime/no_cache", "near-store/no_cache"] wasmtime = ["near-vm-logic/wasmtime_default"] lightbeam = ["wasmtime", "near-vm-runner/lightbeam"] nightly_protocol = ["near-primitives/nightly_protocol"] -nightly_protocol_features = ["protocol_feature_alt_bn128", "protocol_feature_evm"] +nightly_protocol_features = ["protocol_feature_alt_bn128", "protocol_feature_evm", "protocol_feature_add_account_versions"] protocol_feature_alt_bn128 = [ "near-vm-logic/protocol_feature_alt_bn128", "near-vm-runner/protocol_feature_alt_bn128", @@ -62,6 +62,11 @@ protocol_feature_alt_bn128 = [ "testlib/protocol_feature_alt_bn128", "neard/protocol_feature_alt_bn128", ] +protocol_feature_add_account_versions = [ + "near-primitives/protocol_feature_add_account_versions", + "neard/protocol_feature_add_account_versions", + "node-runtime/protocol_feature_add_account_versions", +] protocol_feature_evm = ["near-evm-runner/protocol_feature_evm", "near-vm-runner/protocol_feature_evm", "near-chain-configs/protocol_feature_evm", diff --git a/runtime/runtime-params-estimator/src/testbed.rs b/runtime/runtime-params-estimator/src/testbed.rs index 087423c511d..60715398e27 100644 --- a/runtime/runtime-params-estimator/src/testbed.rs +++ b/runtime/runtime-params-estimator/src/testbed.rs @@ -95,6 +95,8 @@ impl RuntimeTestbed { #[cfg(feature = "protocol_feature_evm")] evm_chain_id: near_chain_configs::TESTNET_EVM_CHAIN_ID, profile: Default::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; Self { workdir, diff --git a/runtime/runtime/Cargo.toml b/runtime/runtime/Cargo.toml index cb4ed6246b3..318c6418982 100644 --- a/runtime/runtime/Cargo.toml +++ b/runtime/runtime/Cargo.toml @@ -20,6 +20,9 @@ thiserror = "1.0" borsh = "0.8.1" +csv = "1.1.1" +lazy-static-include = "3" + near-crypto = { path = "../../core/crypto" } near-primitives = { path = "../../core/primitives" } near-store = { path = "../../core/store" } diff --git a/core/primitives/res/storage_usage_delta.csv b/runtime/runtime/res/storage_usage_delta.csv similarity index 100% rename from core/primitives/res/storage_usage_delta.csv rename to runtime/runtime/res/storage_usage_delta.csv diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index ffa205d7763..5c95e6910cb 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -44,6 +44,8 @@ use crate::{ActionResult, ApplyState}; #[cfg(feature = "protocol_feature_add_account_versions")] use near_primitives::account::AccountVersion::{V1, V2}; use near_vm_runner::precompile_contract; +#[cfg(feature = "protocol_feature_add_account_versions")] +use std::collections::HashMap; /// Runs given function call with given context / apply state. /// Precompiles: @@ -272,10 +274,10 @@ pub(crate) fn action_function_call( result.logs.extend(outcome.logs.into_iter()); if execution_succeeded { #[cfg(feature = "protocol_feature_add_account_versions")] - recalculate_usage( + migrate_account( account, account_id, - &apply_state.config, + apply_state.is_mainnet, apply_state.current_protocol_version, ); account.set_amount(outcome.balance); @@ -480,10 +482,10 @@ pub(crate) fn action_deploy_contract( let prev_code = get_code(state_update, account_id, Some(account.code_hash()))?; let prev_code_length = prev_code.map(|code| code.code.len() as u64).unwrap_or_default(); #[cfg(feature = "protocol_feature_add_account_versions")] - recalculate_usage( + migrate_account( account, account_id, - &apply_state.config, + apply_state.is_mainnet, apply_state.current_protocol_version, ); account.set_storage_usage(account.storage_usage().checked_sub(prev_code_length).unwrap_or(0)); @@ -613,10 +615,10 @@ pub(crate) fn action_delete_key( // Remove access key remove_access_key(state_update, account_id.clone(), delete_key.public_key.clone()); #[cfg(feature = "protocol_feature_add_account_versions")] - recalculate_usage( + migrate_account( account, account_id, - &apply_state.config, + apply_state.is_mainnet, apply_state.current_protocol_version, ); account.set_storage_usage(account.storage_usage().checked_sub(storage_usage).unwrap_or(0)); @@ -672,10 +674,10 @@ pub(crate) fn action_add_key( ); let storage_config = &apply_state.config.transaction_costs.storage_usage_config; #[cfg(feature = "protocol_feature_add_account_versions")] - recalculate_usage( + migrate_account( account, account_id, - &apply_state.config, + apply_state.is_mainnet, apply_state.current_protocol_version, ); account.set_storage_usage( @@ -808,10 +810,33 @@ pub(crate) fn check_account_existence( } #[cfg(feature = "protocol_feature_add_account_versions")] -fn recalculate_usage( +lazy_static_include::lazy_static_include_str! { + STORAGE_USAGE_DELTA_CSV => "res/storage_usage_delta.csv" +} + +#[cfg(feature = "protocol_feature_add_account_versions")] +fn read_storage_usage_delta() -> HashMap { + let mut reader = csv::Reader::from_reader(STORAGE_USAGE_DELTA_CSV.as_bytes()); + let mut result = HashMap::new(); + for record in reader.records() { + let record = record.expect("Malformed storage_usage_delta.csv"); + let account_id = &record[0]; + let delta = record[1].parse::().expect("Malformed storage_usage_delta.csv"); + result.insert(account_id.to_string() as AccountId, delta); + } + result +} + +#[cfg(feature = "protocol_feature_add_account_versions")] +lazy_static::lazy_static! { + static ref STORAGE_USAGE_DELTA_FROM_FILE: HashMap = read_storage_usage_delta(); +} + +#[cfg(feature = "protocol_feature_add_account_versions")] +fn migrate_account( account: &mut Account, account_id: &AccountId, - runtime_config: &RuntimeConfig, + is_mainnet: bool, current_protocol_version: ProtocolVersion, ) { if checked_feature!( @@ -821,11 +846,11 @@ fn recalculate_usage( ) && account.version() == V1 { account.set_version(V2); - if runtime_config.storage_usage_delta.contains_key(account_id) { + if is_mainnet && STORAGE_USAGE_DELTA_FROM_FILE.contains_key(account_id) { account.set_storage_usage( account .storage_usage() - .saturating_add(*runtime_config.storage_usage_delta.get(account_id).unwrap()), + .saturating_add(*STORAGE_USAGE_DELTA_FROM_FILE.get(account_id).unwrap()), ); } } @@ -838,6 +863,12 @@ mod tests { use near_store::test_utils::create_tries; use super::*; + #[cfg(feature = "protocol_feature_add_account_versions")] + use near_primitives::account::AccountVersion; + #[cfg(feature = "protocol_feature_add_account_versions")] + use near_primitives::serialize::to_base; + #[cfg(feature = "protocol_feature_add_account_versions")] + use near_primitives::version::ProtocolFeature::AccountVersions; use near_primitives::version::PROTOCOL_VERSION; fn test_action_create_account( @@ -1023,4 +1054,29 @@ mod tests { }) ); } + + #[test] + #[cfg(feature = "protocol_feature_add_account_versions")] + fn test_storage_usage_delta() { + assert_eq!( + to_base(hash(STORAGE_USAGE_DELTA_CSV.as_bytes())), + "6vvz6vHkKekc6sEk2nzzJoWLBsiV7cy7Z5KMGKrzHGy1" + ); + let version = AccountVersions.protocol_version(); + let account_id = "near".to_string() as AccountId; + let mut account = Account::new(0, 0, Default::default(), 0, version - 1); + migrate_account(&mut account, &account_id, false, version - 1); + assert_eq!(account.storage_usage(), 0); + assert_eq!(account.version(), AccountVersion::V1); + migrate_account(&mut account, &account_id, false, version); + assert_eq!(account.storage_usage(), 0); + assert_eq!(account.version(), AccountVersion::V2); + account.set_version(AccountVersion::V1); + migrate_account(&mut account, &account_id, true, version - 1); + assert_eq!(account.storage_usage(), 0); + assert_eq!(account.version(), AccountVersion::V1); + migrate_account(&mut account, &account_id, true, version); + assert_eq!(account.storage_usage(), 4196); + assert_eq!(account.version(), AccountVersion::V2); + } } diff --git a/runtime/runtime/src/adapter.rs b/runtime/runtime/src/adapter.rs index 851ec6112c2..50113771be8 100644 --- a/runtime/runtime/src/adapter.rs +++ b/runtime/runtime/src/adapter.rs @@ -42,6 +42,7 @@ pub trait ViewRuntimeAdapter { epoch_info_provider: &dyn EpochInfoProvider, current_protocol_version: ProtocolVersion, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: u64, + #[cfg(feature = "protocol_feature_add_account_versions")] is_mainnet: bool, ) -> Result, crate::state_viewer::errors::CallFunctionError>; fn view_access_key( diff --git a/runtime/runtime/src/lib.rs b/runtime/runtime/src/lib.rs index 7ca56d6e31e..00ff502ad01 100644 --- a/runtime/runtime/src/lib.rs +++ b/runtime/runtime/src/lib.rs @@ -1558,6 +1558,8 @@ mod tests { #[cfg(feature = "protocol_feature_evm")] evm_chain_id: near_chain_configs::TESTNET_EVM_CHAIN_ID, profile: ProfileData::new_enabled(), + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; (runtime, tries, root, apply_state, signer, MockEpochInfoProvider::default()) diff --git a/runtime/runtime/src/state_viewer/mod.rs b/runtime/runtime/src/state_viewer/mod.rs index 8a55b1a680d..d4ea06dccaf 100644 --- a/runtime/runtime/src/state_viewer/mod.rs +++ b/runtime/runtime/src/state_viewer/mod.rs @@ -224,6 +224,8 @@ impl TrieViewer { #[cfg(feature = "protocol_feature_evm")] evm_chain_id: view_state.evm_chain_id, profile: Default::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: view_state.is_mainnet, }; let action_receipt = ActionReceipt { signer_id: originator_id.clone(), @@ -310,6 +312,8 @@ mod tests { cache: None, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: TESTNET_EVM_CHAIN_ID, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; let result = viewer.call_function( root, @@ -340,6 +344,8 @@ mod tests { cache: None, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: TESTNET_EVM_CHAIN_ID, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; let result = viewer.call_function( root, @@ -375,6 +381,8 @@ mod tests { cache: None, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: 0x99, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; let result = viewer.call_function( root, @@ -409,6 +417,8 @@ mod tests { cache: None, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: 0x99, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; let view_call_result = viewer.call_function( root, @@ -537,6 +547,8 @@ mod tests { cache: None, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: 0x99, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; let mut logs = vec![]; viewer diff --git a/runtime/runtime/tests/runtime_group_tools/mod.rs b/runtime/runtime/tests/runtime_group_tools/mod.rs index 9b738c68528..25ec24bed57 100644 --- a/runtime/runtime/tests/runtime_group_tools/mod.rs +++ b/runtime/runtime/tests/runtime_group_tools/mod.rs @@ -74,6 +74,8 @@ impl StandaloneRuntime { #[cfg(feature = "protocol_feature_evm")] evm_chain_id: near_chain_configs::TESTNET_EVM_CHAIN_ID, profile: Default::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; Self { diff --git a/test-utils/testlib/Cargo.toml b/test-utils/testlib/Cargo.toml index 652f8f792c2..253dfb43303 100644 --- a/test-utils/testlib/Cargo.toml +++ b/test-utils/testlib/Cargo.toml @@ -58,5 +58,10 @@ protocol_feature_evm = ["near-evm-runner/protocol_feature_evm", "near-primitives protocol_feature_tx_size_limit = ["near-primitives/protocol_feature_tx_size_limit", "node-runtime/protocol_feature_tx_size_limit"] protocol_feature_allow_create_account_on_delete = ["near-primitives/protocol_feature_allow_create_account_on_delete"] protocol_feature_access_key_nonce_range = ["node-runtime/protocol_feature_access_key_nonce_range"] +protocol_feature_add_account_versions = [ + "near-primitives/protocol_feature_add_account_versions", + "neard/protocol_feature_add_account_versions", + "node-runtime/protocol_feature_add_account_versions", +] nightly_protocol_features = ["nightly_protocol", "neard/nightly_protocol_features"] nightly_protocol = ["neard/nightly_protocol"] diff --git a/test-utils/testlib/src/user/runtime_user.rs b/test-utils/testlib/src/user/runtime_user.rs index d36901b1d33..908466c0d19 100644 --- a/test-utils/testlib/src/user/runtime_user.rs +++ b/test-utils/testlib/src/user/runtime_user.rs @@ -143,6 +143,8 @@ impl RuntimeUser { #[cfg(feature = "protocol_feature_evm")] evm_chain_id: TESTNET_EVM_CHAIN_ID, profile: Default::default(), + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, } } @@ -250,6 +252,8 @@ impl User for RuntimeUser { cache: apply_state.cache, #[cfg(feature = "protocol_feature_evm")] evm_chain_id: TESTNET_EVM_CHAIN_ID, + #[cfg(feature = "protocol_feature_add_account_versions")] + is_mainnet: false, }; result.result = self .trie_viewer From 854c7596f67bbed1d50571d86afe76da680af82a Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Mon, 26 Apr 2021 13:27:28 +0200 Subject: [PATCH 22/28] Compilation fix --- test-utils/testlib/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-utils/testlib/Cargo.toml b/test-utils/testlib/Cargo.toml index 253dfb43303..b71c43aa601 100644 --- a/test-utils/testlib/Cargo.toml +++ b/test-utils/testlib/Cargo.toml @@ -63,5 +63,5 @@ protocol_feature_add_account_versions = [ "neard/protocol_feature_add_account_versions", "node-runtime/protocol_feature_add_account_versions", ] -nightly_protocol_features = ["nightly_protocol", "neard/nightly_protocol_features"] +nightly_protocol_features = ["nightly_protocol", "neard/nightly_protocol_features", "protocol_feature_add_account_versions"] nightly_protocol = ["neard/nightly_protocol"] From c6c7675b3d4f475fada142b2c16606f60627c8c3 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Mon, 26 Apr 2021 13:47:42 +0200 Subject: [PATCH 23/28] Compilation fix --- runtime/runtime-params-estimator/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/runtime-params-estimator/Cargo.toml b/runtime/runtime-params-estimator/Cargo.toml index f460372f350..e3e79c597c7 100644 --- a/runtime/runtime-params-estimator/Cargo.toml +++ b/runtime/runtime-params-estimator/Cargo.toml @@ -66,6 +66,7 @@ protocol_feature_add_account_versions = [ "near-primitives/protocol_feature_add_account_versions", "neard/protocol_feature_add_account_versions", "node-runtime/protocol_feature_add_account_versions", + "testlib/protocol_feature_add_account_versions", ] protocol_feature_evm = ["near-evm-runner/protocol_feature_evm", "near-vm-runner/protocol_feature_evm", From 54a4335e15e1b24a6fdfdb03f2f9c5afc172f41a Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Mon, 26 Apr 2021 14:10:42 +0200 Subject: [PATCH 24/28] Compilation fix --- runtime/runtime-params-estimator/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/runtime-params-estimator/Cargo.toml b/runtime/runtime-params-estimator/Cargo.toml index e3e79c597c7..df0d6da881d 100644 --- a/runtime/runtime-params-estimator/Cargo.toml +++ b/runtime/runtime-params-estimator/Cargo.toml @@ -53,7 +53,7 @@ required = ["costs_counting", "near-vm-runner/no_cpu_compatibility_checks", "no_ no_cache = ["node-runtime/no_cache", "near-store/no_cache"] wasmtime = ["near-vm-logic/wasmtime_default"] lightbeam = ["wasmtime", "near-vm-runner/lightbeam"] -nightly_protocol = ["near-primitives/nightly_protocol"] +nightly_protocol = ["near-primitives/nightly_protocol", "neard/nightly_protocol"] nightly_protocol_features = ["protocol_feature_alt_bn128", "protocol_feature_evm", "protocol_feature_add_account_versions"] protocol_feature_alt_bn128 = [ "near-vm-logic/protocol_feature_alt_bn128", From 6d96ee07acfd2d631e073bfc736e2a7792f25808 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Mon, 26 Apr 2021 14:45:37 +0200 Subject: [PATCH 25/28] Compilation fix --- Cargo.toml | 2 +- runtime/runtime-params-estimator/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b903904c9fe..99183b81420 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,7 +117,7 @@ protocol_feature_block_header_v3 = ["near-primitives/protocol_feature_block_head protocol_feature_access_key_nonce_range = ["neard/protocol_feature_access_key_nonce_range", "testlib/protocol_feature_access_key_nonce_range"] protocol_feature_tx_size_limit = ["near-primitives/protocol_feature_tx_size_limit", "node-runtime/protocol_feature_tx_size_limit", "neard/protocol_feature_tx_size_limit"] protocol_feature_allow_create_account_on_delete = ["testlib/protocol_feature_allow_create_account_on_delete", "near-primitives/protocol_feature_allow_create_account_on_delete", "node-runtime/protocol_feature_allow_create_account_on_delete", "neard/protocol_feature_allow_create_account_on_delete"] -protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions", "neard/protocol_feature_add_account_versions"] +protocol_feature_add_account_versions = ["near-primitives/protocol_feature_add_account_versions", "neard/protocol_feature_add_account_versions", "runtime-params-estimator/protocol_feature_add_account_versions"] # enable this to build neard with wasmer 1.0 runner # now if none of wasmer0_default, wasmer1_default or wasmtime_default is enabled, wasmer0 would be default diff --git a/runtime/runtime-params-estimator/Cargo.toml b/runtime/runtime-params-estimator/Cargo.toml index df0d6da881d..e3e79c597c7 100644 --- a/runtime/runtime-params-estimator/Cargo.toml +++ b/runtime/runtime-params-estimator/Cargo.toml @@ -53,7 +53,7 @@ required = ["costs_counting", "near-vm-runner/no_cpu_compatibility_checks", "no_ no_cache = ["node-runtime/no_cache", "near-store/no_cache"] wasmtime = ["near-vm-logic/wasmtime_default"] lightbeam = ["wasmtime", "near-vm-runner/lightbeam"] -nightly_protocol = ["near-primitives/nightly_protocol", "neard/nightly_protocol"] +nightly_protocol = ["near-primitives/nightly_protocol"] nightly_protocol_features = ["protocol_feature_alt_bn128", "protocol_feature_evm", "protocol_feature_add_account_versions"] protocol_feature_alt_bn128 = [ "near-vm-logic/protocol_feature_alt_bn128", From 7e68414edad250b45575d61e3a2a6171f1a4d786 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Tue, 27 Apr 2021 13:00:09 +0200 Subject: [PATCH 26/28] Removing unnecessary into --- chain/rosetta-rpc/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chain/rosetta-rpc/src/lib.rs b/chain/rosetta-rpc/src/lib.rs index 8d57001cd36..5d98e69b7ef 100644 --- a/chain/rosetta-rpc/src/lib.rs +++ b/chain/rosetta-rpc/src/lib.rs @@ -383,8 +383,7 @@ async fn account_balance( code_hash: Default::default(), storage_usage: 0, storage_paid_at: 0, - } - .into(), + }, ), Err(err) => return Err(err.into()), }; From b8ad914426551517692278aacb0c12428d1089c5 Mon Sep 17 00:00:00 2001 From: EgorKulikov Date: Tue, 27 Apr 2021 19:55:37 +0200 Subject: [PATCH 27/28] Update runtime/runtime/src/actions.rs Co-authored-by: Vlad Frolov --- runtime/runtime/src/actions.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index 5c95e6910cb..b865f35dc13 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -846,12 +846,14 @@ fn migrate_account( ) && account.version() == V1 { account.set_version(V2); - if is_mainnet && STORAGE_USAGE_DELTA_FROM_FILE.contains_key(account_id) { - account.set_storage_usage( - account - .storage_usage() - .saturating_add(*STORAGE_USAGE_DELTA_FROM_FILE.get(account_id).unwrap()), - ); + if is_mainnet { + if let Some(storage_usage_delta) = STORAGE_USAGE_DELTA_FROM_FILE.get(account_id) { + account.set_storage_usage( + account + .storage_usage() + .saturating_add(*storage_usage_delta), + ); + } } } } From 8e6138074214777359893ba287090938d0a168fa Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Fri, 30 Apr 2021 16:14:16 +0200 Subject: [PATCH 28/28] Compilation fix --- runtime/runtime/src/actions.rs | 8 +++----- runtime/runtime/src/verifier.rs | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/runtime/runtime/src/actions.rs b/runtime/runtime/src/actions.rs index c7b877cddf0..05859f2614d 100644 --- a/runtime/runtime/src/actions.rs +++ b/runtime/runtime/src/actions.rs @@ -650,8 +650,8 @@ pub(crate) fn action_add_key( } if checked_feature!("stable", AccessKeyNonceRange, apply_state.current_protocol_version) { let mut access_key = add_key.access_key.clone(); - access_key.nonce = (apply_state.block_index - 1) - * near_primitives::account::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; + access_key.nonce = + (apply_state.block_index - 1) * AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; set_access_key(state_update, account_id.clone(), add_key.public_key.clone(), &access_key); } else { set_access_key( @@ -838,9 +838,7 @@ fn migrate_account( if is_mainnet { if let Some(storage_usage_delta) = STORAGE_USAGE_DELTA_FROM_FILE.get(account_id) { account.set_storage_usage( - account - .storage_usage() - .saturating_add(*storage_usage_delta), + account.storage_usage().saturating_add(*storage_usage_delta), ); } } diff --git a/runtime/runtime/src/verifier.rs b/runtime/runtime/src/verifier.rs index a3fd859c71f..69120a3047e 100644 --- a/runtime/runtime/src/verifier.rs +++ b/runtime/runtime/src/verifier.rs @@ -134,7 +134,7 @@ pub fn verify_and_charge_transaction( if checked_feature!("stable", AccessKeyNonceRange, current_protocol_version) { if let Some(height) = block_height { let upper_bound = - height * near_primitives::account::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; + height * near_primitives::access_key::AccessKey::ACCESS_KEY_NONCE_RANGE_MULTIPLIER; if transaction.nonce >= upper_bound { return Err(InvalidTxError::NonceTooLarge { tx_nonce: transaction.nonce,