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

Commit

Permalink
Beta backports (#4569)
Browse files Browse the repository at this point in the history
* Fixing evmbin compilation and added standard build. (#4561)

* Alias for personal_sendTransaction (#4554)

* Fix console dapp (#4544)

* Fixing linting issues. Better support for console as secure app

* Fixing linting issues

* Fix no data sent in TxQueue dapp (#4502)

* Fix wrong PropType req for Embedded Signer

* Fix wrong data for tx #4499
  • Loading branch information
tomusdrw authored and gavofyork committed Feb 16, 2017
1 parent 1952044 commit 0732479
Show file tree
Hide file tree
Showing 14 changed files with 608 additions and 465 deletions.
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ darwin:
export PLATFORM=x86_64-apple-darwin
cargo build -j 8 --features final --release #$CARGOFLAGS
cargo build -j 8 --features final --release -p ethstore #$CARGOFLAGS
cargo build -j 8 --features final --release -p evmbin #$CARGOFLAGS
rm -rf parity.md5
md5sum target/release/parity > parity.md5
export SHA3=$(target/release/parity tools hash target/release/parity)
Expand Down Expand Up @@ -500,7 +501,7 @@ test-windows:
- git submodule update --init --recursive
script:
- set RUST_BACKTRACE=1
- echo cargo test --features json-tests -p rlp -p ethash -p ethcore -p ethcore-bigint -p ethcore-dapps -p ethcore-rpc -p ethcore-signer -p ethcore-util -p ethcore-network -p ethcore-io -p ethkey -p ethstore -p ethsync -p ethcore-ipc -p ethcore-ipc-tests -p ethcore-ipc-nano -p parity %CARGOFLAGS% --verbose --release
- echo cargo test --features json-tests -p rlp -p ethash -p ethcore -p ethcore-bigint -p ethcore-dapps -p ethcore-rpc -p ethcore-signer -p ethcore-util -p ethcore-network -p ethcore-io -p ethkey -p ethstore -p evmbin -p ethsync -p ethcore-ipc -p ethcore-ipc-tests -p ethcore-ipc-nano -p parity %CARGOFLAGS% --verbose --release
tags:
- rust-windows
allow_failure: true
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ethcore-ipc-hypervisor = { path = "ipc/hypervisor" }
ethcore-logger = { path = "logger" }
ethcore-stratum = { path = "stratum" }
ethcore-dapps = { path = "dapps", optional = true }
evmbin = { path = "evmbin" }
rpc-cli = { path = "rpc_cli" }
parity-rpc-client = { path = "rpc_client" }
ethcore-light = { path = "ethcore/light" }
Expand Down
2 changes: 1 addition & 1 deletion dapps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl Server {

let special = Arc::new({
let mut special = HashMap::new();
special.insert(router::SpecialEndpoint::Rpc, rpc::rpc(handler, panic_handler.clone()));
special.insert(router::SpecialEndpoint::Rpc, rpc::rpc(handler, cors_domains.clone(), panic_handler.clone()));
special.insert(router::SpecialEndpoint::Utils, apps::utils());
special.insert(
router::SpecialEndpoint::Api,
Expand Down
8 changes: 6 additions & 2 deletions dapps/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ use jsonrpc_core::{IoHandler, ResponseHandler, Request, Response};
use jsonrpc_http_server::{ServerHandler, PanicHandler, AccessControlAllowOrigin, RpcHandler};
use endpoint::{Endpoint, EndpointPath, Handler};

pub fn rpc(handler: Arc<IoHandler>, panic_handler: Arc<Mutex<Option<Box<Fn() -> () + Send>>>>) -> Box<Endpoint> {
pub fn rpc(
handler: Arc<IoHandler>,
cors_domains: Vec<String>,
panic_handler: Arc<Mutex<Option<Box<Fn() -> () + Send>>>>,
) -> Box<Endpoint> {
Box::new(RpcEndpoint {
handler: Arc::new(RpcMiddleware::new(handler)),
panic_handler: panic_handler,
cors_domain: None,
cors_domain: Some(cors_domains.into_iter().map(AccessControlAllowOrigin::Value).collect()),
// NOTE [ToDr] We don't need to do any hosts validation here. It's already done in router.
allowed_hosts: None,
})
Expand Down
4 changes: 2 additions & 2 deletions evmbin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "evm"
name = "evmbin"
description = "Parity's EVM implementation"
version = "0.1.0"
version = "1.5.0"
authors = ["Parity Technologies <admin@parity.io>"]

[lib]
Expand Down
6 changes: 3 additions & 3 deletions evmbin/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub struct FakeExt {
impl Default for FakeExt {
fn default() -> Self {
FakeExt {
schedule: Schedule::new_homestead_gas_fix(),
schedule: Schedule::new_post_eip150(usize::max_value(), true, true, true),
store: HashMap::new(),
depth: 1,
}
Expand All @@ -51,8 +51,8 @@ impl Ext for FakeExt {
unimplemented!();
}

fn exists_and_not_null(&self, address: &Address) -> bool {
unimplemented!();
fn exists_and_not_null(&self, _address: &Address) -> bool {
unimplemented!();
}

fn origin_balance(&self) -> U256 {
Expand Down
1 change: 0 additions & 1 deletion evmbin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
extern crate ethcore;
extern crate rustc_serialize;
extern crate docopt;
#[macro_use]
extern crate ethcore_util as util;

mod ext;
Expand Down
2 changes: 1 addition & 1 deletion js/src/dapps/localtx/Transaction/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export class LocalTransaction extends BaseTransaction {
to: transaction.to,
nonce: transaction.nonce,
value: transaction.value,
data: transaction.data,
data: transaction.input,
gasPrice, gas
};

Expand Down
Loading

0 comments on commit 0732479

Please sign in to comment.