Skip to content

Commit

Permalink
fix(chain): Guard protocol upgrade behind EVM feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Feb 19, 2021
1 parent f3a24ee commit f03aca2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions core/primitives/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ pub const SHARD_CHUNK_HEADER_UPGRADE_VERSION: ProtocolVersion = 41;
/// Updates the way receipt ID is constructed to use current block hash instead of last block hash
pub const CREATE_RECEIPT_ID_SWITCH_TO_CURRENT_BLOCK_VERSION: ProtocolVersion = 42;

/// See [#3954: Extend the Math API with EVM precompiles](https://github.com/near/nearcore/pull/3954)
pub const MATH_API_FOR_EVM_ISTANBUL_PROTOCOL_VERSION: ProtocolVersion = 43;

pub struct ProtocolVersionRange {
lower: ProtocolVersion,
upper: Option<ProtocolVersion>,
Expand Down Expand Up @@ -97,7 +94,7 @@ pub enum ProtocolFeature {

/// Current latest stable version of the protocol.
#[cfg(not(feature = "nightly_protocol"))]
pub const PROTOCOL_VERSION: ProtocolVersion = 43;
pub const PROTOCOL_VERSION: ProtocolVersion = 42;

/// Current latest nightly version of the protocol.
#[cfg(feature = "nightly_protocol")]
Expand Down
2 changes: 1 addition & 1 deletion neard/res/genesis_config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"protocol_version": 43,
"protocol_version": 42,
"genesis_time": "1970-01-01T00:00:00.000000000Z",
"chain_id": "sample",
"genesis_height": 0,
Expand Down
6 changes: 3 additions & 3 deletions runtime/near-vm-runner/src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ wrapped_imports! {
sha256<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
keccak256<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
keccak512<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
ripemd160<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
blake2b<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
ecrecover<[hash_ptr: u64, v: u32, r_ptr: u64, s_ptr: u64, register_id: u64] -> []>,
#["protocol_feature_evm", EVM] ripemd160<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
#["protocol_feature_evm", EVM] blake2b<[value_len: u64, value_ptr: u64, register_id: u64] -> []>,
#["protocol_feature_evm", EVM] ecrecover<[hash_ptr: u64, v: u32, r_ptr: u64, s_ptr: u64, register_id: u64] -> []>,
// #####################
// # Miscellaneous API #
// #####################
Expand Down

0 comments on commit f03aca2

Please sign in to comment.