[stable] Backports (#8133)
* updater: apply exponential backoff after download failure (#8059)
* updater: apply exponential backoff after download failure
* updater: reset backoff on new release
* Limit incoming connections. (#8060)
* Limit ingress connections
* Optimized handshakes logging
* Max code size on Kovan (#8067)
* Enable code size limit on kovan
* Fix formatting.
* add some dos protection (#8084)
* more dos protection (#8104)
* Const time comparison (#8113)
* Use `subtle::slices_equal` for constant time comparison.
Also update the existing version of subtle in `ethcrypto` from
0.1 to 0.5
* Test specifically for InvalidPassword error.
* revert removing blooms (#8066)
* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"
This reverts commit 1bf62038678295e5586f02a38a0c5aab9a9efe62.
* Revert "fixed broken logs (#7934)"
This reverts commit f8a2e53f3e.
* fixed broken logs
* bring back old lock order
* remove migration v13
* revert CURRENT_VERSION to 12 in migration.rs
* Fix compilation.
* Check one step deeper if we're on release track branches
* add missing pr
* Fix blooms?
* Fix tests compiilation.
* Fix size.
This commit is contained in:
committed by
Marek Kotewicz
parent
3c15a501ca
commit
feef2f8791
@@ -119,8 +119,8 @@ pub struct Schedule {
|
||||
|
||||
/// Wasm cost table
|
||||
pub struct WasmCosts {
|
||||
/// Arena allocator cost, per byte
|
||||
pub alloc: u32,
|
||||
/// Default opcode cost
|
||||
pub regular: u32,
|
||||
/// Div operations multiplier.
|
||||
pub div: u32,
|
||||
/// Div operations multiplier.
|
||||
@@ -135,17 +135,20 @@ pub struct WasmCosts {
|
||||
pub initial_mem: u32,
|
||||
/// Grow memory cost, per page (64kb)
|
||||
pub grow_mem: u32,
|
||||
/// Memory copy cost, per byte
|
||||
pub memcpy: u32,
|
||||
/// Max stack height (native WebAssembly stack limiter)
|
||||
pub max_stack_height: u32,
|
||||
/// Cost of wasm opcode is calculated as TABLE_ENTRY_COST * `opcodes_mul` / `opcodes_div`
|
||||
pub opcodes_mul: u32,
|
||||
/// Cost of wasm opcode is calculated as TABLE_ENTRY_COST * `opcodes_mul` / `opcodes_div`
|
||||
pub opcodes_div: u32,
|
||||
|
||||
}
|
||||
|
||||
impl Default for WasmCosts {
|
||||
fn default() -> Self {
|
||||
WasmCosts {
|
||||
alloc: 2,
|
||||
regular: 1,
|
||||
div: 16,
|
||||
mul: 4,
|
||||
mem: 2,
|
||||
@@ -153,6 +156,8 @@ impl Default for WasmCosts {
|
||||
static_address: 40,
|
||||
initial_mem: 4096,
|
||||
grow_mem: 8192,
|
||||
memcpy: 1,
|
||||
max_stack_height: 64*1024,
|
||||
opcodes_mul: 3,
|
||||
opcodes_div: 8,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user