Beta release 2.1.3 backports (#9749)
* parity-version: mark 2.1.3 beta as critical * Use signed 256-bit integer for sstore gas refund substate (#9746) * Add signed refund * Use signed 256-bit integer for sstore gas refund substate * Fix tests * Remove signed mod and use i128 directly * Fix evm test case casting * Fix jsontests ext signature * Add --force to cargo audit install script (#9735) * heads ref not present for branches beta and stable (#9741) * aura: fix panic on extra_info with unsealed block (#9755) * aura: fix panic when unsealed block passed to extra_info * aura: use hex formatting for EmptyStep hashes * aura: add test for extra_info
This commit is contained in:
@@ -140,10 +140,10 @@ pub trait Ext {
|
||||
fn depth(&self) -> usize;
|
||||
|
||||
/// Increments sstore refunds counter.
|
||||
fn add_sstore_refund(&mut self, value: U256);
|
||||
fn add_sstore_refund(&mut self, value: usize);
|
||||
|
||||
/// Decrements sstore refunds counter.
|
||||
fn sub_sstore_refund(&mut self, value: U256);
|
||||
fn sub_sstore_refund(&mut self, value: usize);
|
||||
|
||||
/// Decide if any more operations should be traced. Passthrough for the VM trace.
|
||||
fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8, _current_gas: U256) -> bool { false }
|
||||
|
||||
@@ -56,7 +56,7 @@ pub struct FakeExt {
|
||||
pub store: HashMap<H256, H256>,
|
||||
pub suicides: HashSet<Address>,
|
||||
pub calls: HashSet<FakeCall>,
|
||||
pub sstore_clears: U256,
|
||||
pub sstore_clears: i128,
|
||||
pub depth: usize,
|
||||
pub blockhashes: HashMap<U256, H256>,
|
||||
pub codes: HashMap<Address, Arc<Bytes>>,
|
||||
@@ -220,12 +220,12 @@ impl Ext for FakeExt {
|
||||
self.is_static
|
||||
}
|
||||
|
||||
fn add_sstore_refund(&mut self, value: U256) {
|
||||
self.sstore_clears = self.sstore_clears + value;
|
||||
fn add_sstore_refund(&mut self, value: usize) {
|
||||
self.sstore_clears += value as i128;
|
||||
}
|
||||
|
||||
fn sub_sstore_refund(&mut self, value: U256) {
|
||||
self.sstore_clears = self.sstore_clears - value;
|
||||
fn sub_sstore_refund(&mut self, value: usize) {
|
||||
self.sstore_clears -= value as i128;
|
||||
}
|
||||
|
||||
fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8, _gas: U256) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user