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

New jsonrpc-core with futures and metadata support #3859

Merged
merged 21 commits into from
Jan 11, 2017
Merged

Conversation

tomusdrw
Copy link
Collaborator

  • jsonrpc-core was rewritten to use Futures to handle async code.
  • Metadata is now part of jsonrpc-core, so there is no need to do middlewares and augmentation

This will allow us to handle requests coming from different transports in a more elegant way (for instance eth_accounts can return all accounts for HTTP and IPC and only alter the list for dapps).

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Dec 15, 2016
Conflicts:
	Cargo.lock
	rpc/src/v1/impls/eth.rs
	signer/src/tests/mod.rs
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 4f494d5 on rpc-futures into ** on master**.

@gavofyork
Copy link
Contributor

looks reasonable to me.

@gavofyork
Copy link
Contributor

will need rebase...

Conflicts:
	Cargo.lock
	Cargo.toml
	parity/rpc_apis.rs
	parity/run.rs
	rpc/Cargo.toml
	rpc/src/lib.rs
	rpc/src/v1/tests/mocked/parity_set.rs
	rpc/src/v1/traits/parity_set.rs
@gavofyork
Copy link
Contributor

still some conflicts...

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 85.888% when pulling 9595998 on rpc-futures into 14a9942 on master.

#[derive(Clone, Debug, PartialEq)]
pub enum Origin {
/// RPC server
Rpc,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does an origin of Rpc signify? All requests are RPC requests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's JSON-RPC over HTTP coming from standalone JSON-RPC server (not dapps). It's initialized in crate rpc and also parity/rpc.rs so I thought that it makes sense to use this name to indentify it.

@tomusdrw tomusdrw added the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Dec 19, 2016
@tomusdrw
Copy link
Collaborator Author

IMHO it shouldn't go to 1.5.0 release, it doesn't really bring any new functionality and we need some more cross-platform testing.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 06c9be9 on rpc-futures into ** on master**.

@arkpar arkpar added the A7-looksgoodcantmerge 🙄 Pull request is reviewed well, but cannot be merged due to conflicts. label Dec 22, 2016
@arkpar arkpar removed the A0-pleasereview 🤓 Pull request needs code review. label Dec 22, 2016
Conflicts:
	Cargo.lock
	Cargo.toml
	dapps/src/lib.rs
	dapps/src/tests/helpers.rs
	parity/dapps.rs
	parity/rpc_apis.rs
	parity/run.rs
	rpc/Cargo.toml
	rpc/src/lib.rs
	rpc/src/v1/impls/parity_set.rs
@gavofyork gavofyork added A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. and removed A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. labels Dec 23, 2016
Tomasz Drwięga added 2 commits December 23, 2016 22:25
Conflicts:
	Cargo.lock
	dapps/src/rpc.rs
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 969f5c0 on rpc-futures into ** on master**.

@tomusdrw tomusdrw mentioned this pull request Dec 28, 2016
@rphmeier rphmeier mentioned this pull request Jan 4, 2017
@rphmeier rphmeier added A0-pleasereview 🤓 Pull request needs code review. and removed A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. labels Jan 10, 2017
@arkpar arkpar removed the A0-pleasereview 🤓 Pull request needs code review. label Jan 10, 2017
@arkpar
Copy link
Collaborator

arkpar commented Jan 11, 2017

requires rebase

Conflicts:
	Cargo.lock
	dapps/src/lib.rs
	dapps/src/tests/helpers/mod.rs
	parity/dapps.rs
	parity/rpc.rs
	parity/run.rs
	rpc/src/lib.rs
	rpc/src/v1/impls/eth.rs
	rpc/src/v1/impls/traces.rs
	rpc/src/v1/tests/mocked/signer.rs
	stratum/src/lib.rs
	util/fetch/src/client.rs
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A7-looksgoodcantmerge 🙄 Pull request is reviewed well, but cannot be merged due to conflicts. labels Jan 11, 2017
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 11, 2017
@gavofyork gavofyork merged commit 41da1a0 into master Jan 11, 2017
@gavofyork gavofyork deleted the rpc-futures branch January 11, 2017 19:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants