Remote transaction execution (#4684)

* return errors on database corruption

* fix tests, json tests

* fix remainder of build

* buffer flow -> request credits

* proving state backend

* generate transaction proofs from provider

* network messages for transaction proof

* transaction proof test

* test for transaction proof message

* fix call bug

* request transaction proofs from on_demand

* most of proved_execution rpc

* proved execution future
This commit is contained in:
Robert Habermeier
2017-03-08 14:39:44 +01:00
committed by Gav Wood
parent 5bbcf0482b
commit 8a3b5c6332
25 changed files with 993 additions and 253 deletions

View File

@@ -19,7 +19,7 @@
use rlp::{DecoderError, RlpDecodable, RlpEncodable, RlpStream, Stream, UntrustedRlp, View};
use util::{H256, U256};
use super::buffer_flow::FlowParams;
use super::request_credits::FlowParams;
// recognized handshake/announcement keys.
// unknown keys are to be skipped, known keys have a defined order.
@@ -207,7 +207,7 @@ impl Capabilities {
/// Attempt to parse a handshake message into its three parts:
/// - chain status
/// - serving capabilities
/// - buffer flow parameters
/// - request credit parameters
pub fn parse_handshake(rlp: UntrustedRlp) -> Result<(Status, Capabilities, Option<FlowParams>), DecoderError> {
let mut parser = Parser {
pos: 0,
@@ -300,7 +300,7 @@ pub struct Announcement {
pub serve_chain_since: Option<u64>,
/// optional new transaction-relay capability. false means "no change"
pub tx_relay: bool,
// TODO: changes in buffer flow?
// TODO: changes in request credits.
}
/// Parse an announcement.
@@ -372,7 +372,7 @@ pub fn write_announcement(announcement: &Announcement) -> Vec<u8> {
#[cfg(test)]
mod tests {
use super::*;
use super::super::buffer_flow::FlowParams;
use super::super::request_credits::FlowParams;
use util::{U256, H256, FixedHash};
use rlp::{RlpStream, Stream ,UntrustedRlp, View};