State diffing, exposed through JSONRPC.

This commit is contained in:
Gav Wood
2016-05-31 21:03:44 +02:00
parent 2d604324b9
commit 34edecd59d
20 changed files with 278 additions and 350 deletions

View File

@@ -47,6 +47,15 @@ use receipt::LocalizedReceipt;
use trace::LocalizedTrace;
use evm::Factory as EvmFactory;
/// Options concerning what analytics we run on the call.
#[derive(Eq, PartialEq, Default, Clone, Copy, Debug)]
pub struct CallAnalytics {
/// Make a VM trace.
pub vm_tracing: bool,
/// Make a diff.
pub diffing: bool,
}
/// Blockchain database client. Owns and manages a blockchain and a block queue.
pub trait BlockChainClient : Sync + Send {
/// Get raw block header data by block id.
@@ -165,7 +174,7 @@ pub trait BlockChainClient : Sync + Send {
/// Makes a non-persistent transaction call.
// TODO: should be able to accept blockchain location for call.
fn call(&self, t: &SignedTransaction, vm_tracing: bool) -> Result<Executed, ExecutionError>;
fn call(&self, t: &SignedTransaction, analytics: CallAnalytics) -> Result<Executed, ExecutionError>;
/// Returns EvmFactory.
fn vm_factory(&self) -> &EvmFactory;