diff --git a/config/src/wasm.rs b/config/src/wasm.rs index 6983a7ac095..cd55fd989af 100644 --- a/config/src/wasm.rs +++ b/config/src/wasm.rs @@ -7,7 +7,7 @@ use self::default::*; /// Module with a set of default values. pub mod default { /// Default amount of fuel provided for execution - pub const DEFAULT_FUEL_LIMIT: u64 = 30_000_000; + pub const DEFAULT_FUEL_LIMIT: u64 = 55_000_000; /// Default amount of memory given for smart contract pub const DEFAULT_MAX_MEMORY: u32 = 500 * 2_u32.pow(20); // 500 MiB } diff --git a/configs/peer/config.json b/configs/peer/config.json index d5533baf83e..649b25f31c4 100644 --- a/configs/peer/config.json +++ b/configs/peer/config.json @@ -70,7 +70,7 @@ "max_wasm_size_bytes": 4194304 }, "WASM_RUNTIME_CONFIG": { - "FUEL_LIMIT": 30000000, + "FUEL_LIMIT": 55000000, "MAX_MEMORY": 524288000 } }, diff --git a/configs/peer/executor.wasm b/configs/peer/executor.wasm index edbf46b4cfb..e326dcecc29 100644 Binary files a/configs/peer/executor.wasm and b/configs/peer/executor.wasm differ diff --git a/configs/peer/genesis.json b/configs/peer/genesis.json index 02ec4b1fa18..c532ef5411b 100644 --- a/configs/peer/genesis.json +++ b/configs/peer/genesis.json @@ -154,7 +154,7 @@ "NewParameter": "?WSVIdentLengthLimits=1,128_LL" }, { - "NewParameter": "?WASMFuelLimit=30000000" + "NewParameter": "?WASMFuelLimit=55000000" }, { "NewParameter": "?WASMMaxMemory=524288000" diff --git a/data_model/src/block.rs b/data_model/src/block.rs index 3ad6900d32d..0526fe33e5b 100644 --- a/data_model/src/block.rs +++ b/data_model/src/block.rs @@ -135,7 +135,6 @@ declare_versioned!(SignedBlock 1..2, Debug, Clone, PartialEq, Eq, PartialOrd, Or impl BlockPayload { /// Calculate block payload [`Hash`](`iroha_crypto::HashOf`). - #[cfg(feature = "std")] pub fn hash(&self) -> iroha_crypto::HashOf { iroha_crypto::HashOf::new(self) } @@ -188,13 +187,11 @@ impl SignedBlock { } /// Calculate block hash - #[cfg(feature = "std")] pub fn hash(&self) -> HashOf { iroha_crypto::HashOf::new(self) } /// Add additional signatures to this block - #[cfg(feature = "std")] #[cfg(feature = "transparent_api")] #[must_use] pub fn sign(mut self, key_pair: &KeyPair) -> Self { @@ -209,7 +206,6 @@ impl SignedBlock { /// # Errors /// /// If given signature doesn't match block hash - #[cfg(feature = "std")] #[cfg(feature = "transparent_api")] pub fn add_signature( &mut self, @@ -224,7 +220,6 @@ impl SignedBlock { } /// Add additional signatures to this block - #[cfg(feature = "std")] #[cfg(feature = "transparent_api")] pub fn replace_signatures( &mut self, @@ -261,9 +256,7 @@ mod candidate { impl SignedBlockCandidate { fn validate(self) -> Result { - #[cfg(feature = "std")] self.validate_signatures()?; - #[cfg(feature = "std")] self.validate_header()?; if self.payload.transactions.is_empty() { @@ -276,7 +269,6 @@ mod candidate { }) } - #[cfg(feature = "std")] fn validate_header(&self) -> Result<(), &'static str> { let actual_txs_hash = self.payload.header().transactions_hash; @@ -296,7 +288,6 @@ mod candidate { Ok(()) } - #[cfg(feature = "std")] fn validate_signatures(&self) -> Result<(), &'static str> { self.signatures .verify(&self.payload) diff --git a/data_model/src/query/mod.rs b/data_model/src/query/mod.rs index 46100020b12..af4cf8b96b1 100644 --- a/data_model/src/query/mod.rs +++ b/data_model/src/query/mod.rs @@ -1149,7 +1149,6 @@ pub mod http { impl SignedQueryCandidate { fn validate(self) -> Result { - #[cfg(feature = "std")] if self.signature.verify(&self.payload).is_err() { return Err("Query signature not valid"); } diff --git a/data_model/src/transaction.rs b/data_model/src/transaction.rs index 59eacb1c9e5..bb80ad2aa79 100644 --- a/data_model/src/transaction.rs +++ b/data_model/src/transaction.rs @@ -230,7 +230,6 @@ impl WasmSmartContract { impl TransactionPayload { /// Calculate transaction payload [`Hash`](`iroha_crypto::HashOf`). - #[cfg(feature = "std")] pub fn hash(&self) -> iroha_crypto::HashOf { iroha_crypto::HashOf::new(self) } @@ -273,13 +272,11 @@ impl SignedTransaction { } /// Calculate transaction [`Hash`](`iroha_crypto::HashOf`). - #[cfg(feature = "std")] pub fn hash(&self) -> iroha_crypto::HashOf { iroha_crypto::HashOf::new(self) } /// Sign transaction with provided key pair. - #[cfg(feature = "std")] #[must_use] pub fn sign(self, key_pair: &iroha_crypto::KeyPair) -> SignedTransaction { let SignedTransaction::V1(mut tx) = self; @@ -294,7 +291,6 @@ impl SignedTransaction { } /// Add additional signatures to this transaction - #[cfg(feature = "std")] #[cfg(feature = "transparent_api")] pub fn merge_signatures(&mut self, other: Self) -> bool { if self.payload().hash() != other.payload().hash() { @@ -326,7 +322,6 @@ impl SignedTransactionV1 { impl TransactionValue { /// Calculate transaction [`Hash`](`iroha_crypto::HashOf`). - #[cfg(feature = "std")] pub fn hash(&self) -> iroha_crypto::HashOf { self.value.hash() } @@ -372,17 +367,11 @@ mod candidate { } impl SignedTransactionCandidate { - #[cfg(feature = "std")] fn validate(self) -> Result { self.validate_signatures()?; self.validate_instructions() } - #[cfg(not(feature = "std"))] - fn validate(self) -> Result { - self.validate_instructions() - } - fn validate_instructions(self) -> Result { if let Executable::Instructions(instructions) = &self.payload.instructions { if instructions.is_empty() { @@ -396,7 +385,6 @@ mod candidate { }) } - #[cfg(feature = "std")] fn validate_signatures(&self) -> Result<(), &'static str> { self.signatures .verify(&self.payload) @@ -739,7 +727,6 @@ mod http { } /// Sign transaction with provided key pair. - #[cfg(feature = "std")] #[must_use] pub fn sign(self, key_pair: &iroha_crypto::KeyPair) -> SignedTransaction { let signatures = SignaturesOf::new(key_pair, &self.payload); diff --git a/torii/src/routing.rs b/torii/src/routing.rs index cc5a7ab590e..b88d05e37f3 100644 --- a/torii/src/routing.rs +++ b/torii/src/routing.rs @@ -428,7 +428,7 @@ pub mod profiling { { // Create profiler guard let guard = pprof::ProfilerGuardBuilder::default() - .frequency(frequency.get() as i32) + .frequency(frequency.get().into()) .blocklist(&["libc", "libgcc", "pthread", "vdso"]) .build() .map_err(|e| {