Commit Graph

10 Commits

Author SHA1 Message Date
Mike Hearn
c3f86f6557 Integrate a simple progress tracking system into the protocol framework.
The progress tracker API lets you model a tree of steps, along the same structure as protocols and subprotocols. Each step has an (optionally changing) label, and thus progress trackers can be arranged in a tree. Updates to the progress at each level flow up the tree via an RxJava observable (I guess we will use this more in future).

A simple console renderer is provided that uses ANSI escapes and Emoji to show animated progress through a protocol.

The trader demo is enhanced to use this framework, when run outside of Gradle.
2016-02-24 12:58:37 +01:00
Mike Hearn
02f5dc5948 Update the protocol framework documentation 2016-02-18 17:47:05 +01:00
Mike Hearn
9f4897f7c4 Simplifies two-party trade protocol to return SignedTransaction instead of a pair of other forms. 2016-02-12 15:49:18 +01:00
Mike Hearn
6deef5b598 Minor: rename SignedWireTransaction to just SignedTransaction 2016-02-12 15:47:23 +01:00
Mike Hearn
d98a3871da Refactor the 2-party trading protocol
- Fix a security bug/TODO by having seller send back the signatures rather than a full blown transaction (which would allow a malicious seller to try and confuse the buyer by sending back a completely different TX to the one he proposed)
- Introduce an UntrustworthyData<T> wrapper as an (inefficient) form of taint tracking, to make it harder to forget that data has come from an untrustworthy source and may be malicious.
- Split the giant {Buyer, Seller}.call() methods into a set of smaller methods that make it easier to unit test various kinds of failure/skip bits in tests that aren't needed.
2016-02-10 17:59:28 +01:00
Mike Hearn
d9c6df51f4 Update docs for new simpler protocol framework API. 2016-01-13 13:54:10 +01:00
Mike Hearn
049f0aa3b3 Rename PartialTransaction -> TransactionBuilder. The term "partial transaction" should be reserved to mean a transaction that is lacking some signatures as it's in the process of being built up by multiple parties. 2015-12-22 15:28:38 +00:00
Mike Hearn
e3cfe0ae49 Docs: fix a few typos and rewrap a few code samples in the state machines article. 2015-12-15 15:52:07 +01:00
Mike Hearn
06ee9db3f6 Minor: provide a random63BitValue() function and use it instead of the previously duplicated code. Update docs. 2015-12-15 13:16:13 +01:00
Mike Hearn
4198de7ff0 Messaging: add docs on the messaging and protocol state machine systems. 2015-12-14 18:22:21 +01:00