Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into dp/chore/use-latest-attempt-to-switch-to-u…
Browse files Browse the repository at this point in the history
…pstream

* master:
  Avoid long state queries when serving GetNodeData requests (#11444)
  Cargo.lock: cargo update -p kvdb-rocksdb (#11447)
  rlp_derive: cleanup (#11446)
  chore: remove unused dependencies (#11432)
  update kvdb-rocksdb to 0.4 (#11442)
  Rough architecutre diagram. (#11396)
  ethjson: impl Copy for hash type wrapper (#11423)
  Remove dead bootnodes, add new geth bootnodes (#11441)
  goerli: replace foundation bootnode (#11433)
  Update publish-docker.sh (#11428)
  Revert "[Trace] Distinguish between `create` and `create2` (#11311)" (#11427)
  • Loading branch information
dvdplm committed Feb 4, 2020
2 parents c3a4fa7 + cf6fa63 commit 8040124
Show file tree
Hide file tree
Showing 67 changed files with 421 additions and 502 deletions.
182 changes: 110 additions & 72 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ futures = "0.1"
journaldb = { path = "util/journaldb" }
jsonrpc-core = "14.0.3"
keccak-hash = "0.4.0"
kvdb = "0.2"
kvdb-rocksdb = "0.3.0"
kvdb = "0.3.1"
kvdb-rocksdb = "0.4.1"
log = "0.4"
migration-rocksdb = { path = "util/migration-rocksdb" }
node-filter = { path = "ethcore/node-filter" }
Expand Down
Binary file added docs/architecture-draft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ hash-db = "0.15.0"
itertools = "0.5"
journaldb = { path = "../util/journaldb" }
keccak-hash = "0.4.0"
kvdb = "0.2"
kvdb-memorydb = { version = "0.2.0", optional = true }
kvdb-rocksdb = { version = "0.3.0", optional = true }
kvdb = "0.3.1"
kvdb-memorydb = { version = "0.3.1", optional = true }
kvdb-rocksdb = { version = "0.4.1", optional = true }
lazy_static = { version = "1.3", optional = true }
log = "0.4"
macros = { path = "../util/macros", optional = true }
Expand Down Expand Up @@ -78,8 +78,8 @@ ethcore-builtin = { path = "./builtin" }
ethjson = { path = "../json", features = ["test-helpers"] }
parity-crypto = { version = "0.4.2", features = ["publickey"] }
fetch = { path = "../util/fetch" }
kvdb-memorydb = "0.2.0"
kvdb-rocksdb = "0.3.0"
kvdb-memorydb = "0.3.1"
kvdb-rocksdb = "0.4.1"
lazy_static = "1.3"
machine = { path = "./machine", features = ["test-helpers"] }
macros = { path = "../util/macros" }
Expand Down
2 changes: 1 addition & 1 deletion ethcore/account-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ ethereum-types = "0.8.0"
hash-db = "0.15.0"
keccak-hash = "0.4.0"
keccak-hasher = { path = "../../util/keccak-hasher" }
kvdb = "0.2"
kvdb = "0.3.1"
rlp = "0.4"
3 changes: 1 addition & 2 deletions ethcore/account-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ hash-db = "0.15.0"
journaldb = { path = "../../util/journaldb" }
keccak-hash = "0.4.0"
keccak-hasher = { path = "../../util/keccak-hasher" }
kvdb = "0.2"
kvdb = "0.3.1"
log = "0.4"
lru-cache = "0.1.2"
memory-db = "0.18.0"
Expand All @@ -26,7 +26,6 @@ parking_lot = "0.9"
pod = { path = "../pod" }
rlp = "0.4.0"
serde = { version = "1.0", features = ["derive"] }
trace = { path = "../trace" }
trie-db = "0.18.0"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions ethcore/blockchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ethereum-types = "0.8.0"
keccak-hash = "0.4.0"
parity-util-mem = "0.3.0"
itertools = "0.5"
kvdb = "0.2"
kvdb = "0.3.1"
log = "0.4"
parity-bytes = "0.1"
rand = "0.7"
Expand All @@ -32,4 +32,4 @@ env_logger = "0.5"
parity-crypto = { version = "0.4.2", features = ["publickey"] }
rustc-hex = "1.0"
tempdir = "0.3"
kvdb-memorydb = "0.2.0"
kvdb-memorydb = "0.3.1"
2 changes: 1 addition & 1 deletion ethcore/builtin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ethereum-types = "0.8.0"
ethjson = { path = "../../json" }
keccak-hash = "0.4.0"
log = "0.4"
macros = { path = "../../util/macros" }
num = { version = "0.1", default-features = false, features = ["bigint"] }
parity-bytes = "0.1"
parity-crypto = { version = "0.4.2", features = ["publickey"] }

[dev-dependencies]
hex-literal = "0.2.1"
macros = { path = "../../util/macros" }
2 changes: 1 addition & 1 deletion ethcore/client-traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ common-types = { path = "../types" }
ethcore-db = { path = "../db" }
ethcore-miner = { path = "../../miner" }
ethereum-types = "0.8.0"
kvdb = "0.2"
kvdb = "0.3.1"
registrar = { path = "../../util/registrar" }
stats = { path = "../../util/stats" }
trace = { path = "../trace" }
Expand Down
2 changes: 1 addition & 1 deletion ethcore/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2018"
[dependencies]
common-types = { path = "../types" }
ethereum-types = "0.8.0"
kvdb = "0.2"
kvdb = "0.3.1"
parity-util-mem = "0.3.0"
parking_lot = "0.9"
rlp = "0.4.0"
Expand Down
4 changes: 2 additions & 2 deletions ethcore/engine/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use machine::{
Machine,
executed_block::ExecutedBlock,
};
use vm::{EnvInfo, Schedule, ActionType, ActionValue};
use vm::{EnvInfo, Schedule, CallType, ActionValue};

use crate::signer::EngineSigner;

Expand Down Expand Up @@ -82,7 +82,7 @@ pub fn default_system_or_code_call<'a>(machine: &'a Machine, block: &'a mut Exec
Some(ActionValue::Apparent(U256::zero())),
U256::max_value(),
Some(data),
Some(ActionType::StaticCall),
Some(CallType::StaticCall),
)
},
};
Expand Down
2 changes: 1 addition & 1 deletion ethcore/engines/validator-set/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ethereum-types = "0.8.0"
ethjson = { path = "../../../json" }
executive-state = { path = "../../executive-state" }
keccak-hash = "0.4.0"
kvdb = "0.2"
kvdb = "0.3.1"
lazy_static = "1.3.0"
log = "0.4.8"
machine = { path = "../../machine" }
Expand Down
2 changes: 1 addition & 1 deletion ethcore/engines/validator-set/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::sync::Weak;
use parity_bytes::Bytes;
use ethabi_contract::use_contract;
use ethereum_types::{H256, U256, Address};
use log::{info, warn, trace};
use log::{warn, trace};
use machine::Machine;
use parking_lot::RwLock;
use common_types::{
Expand Down
29 changes: 10 additions & 19 deletions ethcore/evm/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use ethereum_types::{U256, U512, H256, Address, BigEndianHash};


use vm::{
self, ActionParams, ParamsType, ActionValue, ActionType, MessageCallResult,
self, ActionParams, ParamsType, ActionValue, CallType, MessageCallResult,
ContractCreateResult, CreateContractAddress, ReturnData, GasLeft, Schedule,
TrapKind, TrapError
};
Expand Down Expand Up @@ -133,8 +133,8 @@ struct InterpreterParams {
pub value: ActionValue,
/// Input data.
pub data: Option<Bytes>,
/// Type of action
pub action_type: ActionType,
/// Type of call
pub call_type: CallType,
/// Param types encoding
pub params_type: ParamsType,
}
Expand All @@ -152,7 +152,7 @@ impl From<ActionParams> for InterpreterParams {
gas_price: params.gas_price,
value: params.value,
data: params.data,
action_type: params.action_type,
call_type: params.call_type,
params_type: params.params_type,
}
}
Expand Down Expand Up @@ -532,9 +532,7 @@ impl<Cost: CostType> Interpreter<Cost> {
let init_size = self.stack.pop_back();
let address_scheme = match instruction {
instructions::CREATE => CreateContractAddress::FromSenderAndNonce,
instructions::CREATE2 => CreateContractAddress::FromSenderSaltAndCodeHash(
BigEndianHash::from_uint(&self.stack.pop_back())
),
instructions::CREATE2 => CreateContractAddress::FromSenderSaltAndCodeHash(BigEndianHash::from_uint(&self.stack.pop_back())),
_ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"),
};

Expand All @@ -555,14 +553,7 @@ impl<Cost: CostType> Interpreter<Cost> {

let contract_code = self.mem.read_slice(init_off, init_size);

let create_result = ext.create(
&create_gas.as_u256(),
&endowment,
contract_code,
&self.params.code_version,
address_scheme,
true,
);
let create_result = ext.create(&create_gas.as_u256(), &endowment, contract_code, &self.params.code_version, address_scheme, true);
return match create_result {
Ok(ContractCreateResult::Created(address, gas_left)) => {
self.stack.push(address_to_u256(address));
Expand Down Expand Up @@ -616,14 +607,14 @@ impl<Cost: CostType> Interpreter<Cost> {
return Err(vm::Error::MutableCallInStaticContext);
}
let has_balance = ext.balance(&self.params.address)? >= value.expect("value set for all but delegate call; qed");
(&self.params.address, &code_address, has_balance, ActionType::Call)
(&self.params.address, &code_address, has_balance, CallType::Call)
},
instructions::CALLCODE => {
let has_balance = ext.balance(&self.params.address)? >= value.expect("value set for all but delegate call; qed");
(&self.params.address, &self.params.address, has_balance, ActionType::CallCode)
(&self.params.address, &self.params.address, has_balance, CallType::CallCode)
},
instructions::DELEGATECALL => (&self.params.sender, &self.params.address, true, ActionType::DelegateCall),
instructions::STATICCALL => (&self.params.address, &code_address, true, ActionType::StaticCall),
instructions::DELEGATECALL => (&self.params.sender, &self.params.address, true, CallType::DelegateCall),
instructions::STATICCALL => (&self.params.address, &code_address, true, CallType::StaticCall),
_ => panic!(format!("Unexpected instruction {:?} in CALL branch.", instruction))
};

Expand Down
2 changes: 1 addition & 1 deletion ethcore/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod instructions;
mod tests;

pub use vm::{
Schedule, CleanDustMode, EnvInfo, ActionType, ActionParams, Ext,
Schedule, CleanDustMode, EnvInfo, CallType, ActionParams, Ext,
ContractCreateResult, MessageCallResult, CreateContractAddress,
GasLeft, ReturnData
};
Expand Down
2 changes: 1 addition & 1 deletion ethcore/executive-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ common-types = { path = "../types" }
ethereum-types = "0.8.0"
hash-db = "0.15.0"
keccak-hasher = { path = "../../util/keccak-hasher" }
kvdb = "0.2"
kvdb = "0.3.1"
log = "0.4.8"
machine = { path = "../machine" }
trace = { path = "../trace" }
Expand Down
Loading

0 comments on commit 8040124

Please sign in to comment.