Commit Graph

28 Commits

Author SHA1 Message Date
Mike Hearn
4cec5dac02 Minor: remove ambiguous c'tor in PartialTransaction and rename addItems -> withItems 2015-12-16 16:25:58 +01:00
Mike Hearn
ab9e026053 Minor: some small serialisation type safety improvements 2015-12-16 15:24:52 +01:00
Mike Hearn
5863d489bc Minor: misc comment/whitespace fixes. 2015-12-15 18:54:22 +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
020a594a60 State machines: thread safety and a few more comments. 2015-12-15 13:01:57 +01:00
Mike Hearn
3c578550a9 State machines: don't leak references to completed state machines. Add an extension function for working with futures. 2015-12-14 21:41:57 +01:00
Mike Hearn
d43bbe8faa Trading: move session ID into the initial args to avoid possible confusion at the start. 2015-12-14 18:22:00 +01:00
Mike Hearn
f15e24e7be Messaging: Rename MessagingSystem to MessagingService for consistency with other interfaces. 2015-12-14 17:39:48 +01:00
Mike Hearn
3f19e68b3f Messaging: another minor simplification to the state machines framework. This is not the end! 2015-12-14 17:35:20 +01:00
Mike Hearn
9720d4e404 Messaging: more huge simplifications to the state machine framework.
The usage now looks straightforward enough to document and put into a tutorial.
2015-12-11 20:21:22 +01:00
Mike Hearn
89ba996a3c Two party trading: big changes to support and test serialisation, refactorings ... 2015-12-11 15:19:13 +01:00
Mike Hearn
65c5fa7502 Messaging: (mock) in memory network implementation improvements.
- Now supports simulated restart of nodes
- Messages sent to non-running nodes are queued for delivery
- Messages received by a node that don't match any topics are queued until handlers are registered

These improvements help us unit test various robustness features and ensure things work in truly concurrent context where there can be race conditions like receiving a message before the node had a chance to register the right handlers.
2015-12-11 15:19:13 +01:00
Mike Hearn
0ca47156bc Trading protocol work in progress 2015-12-11 15:19:13 +01:00
Mike Hearn
fed0ae5629 Add placeholder interfaces for various service submodules. 2015-12-11 15:17:44 +01:00
Mike Hearn
2df8153cda Minor: rename wallet -> cashStates in the Cash contract spending function. 2015-12-11 15:17:28 +01:00
Mike Hearn
f13b9b00e4 Minor: fix Arrays.asList serialisation by adding the extra serialisers lib as a dependency 2015-12-10 17:14:49 +01:00
Mike Hearn
4c87dc2981 First draft of a basic messaging module interface (VERY ROUGH). Ideally, is something that can have an e.g. Kafka backend, with a full P2P implementation later. 2015-12-10 15:08:11 +01:00
Mike Hearn
7881be07ed Delete a lot of Kryo/serialisation related boilerplate.
This is/was an attempt to be secure against malicious streams, but as Kryo is just a temporary bit of scaffolding and isn't intended to be actually used in any real product, it was just a waste of time and the registration requirement was getting increasingly awkward.
2015-12-10 15:03:34 +01:00
Mike Hearn
951912f8e7 Minor: rename Kryo.registerDataClass to Kryo.registerImmutableClass 2015-12-10 14:27:53 +01:00
Mike Hearn
67c810e315 Make Amount use 64 bit precision and overflow checked operations. 2015-12-08 14:58:16 +01:00
Mike Hearn
73cbd41a09 Misc fixes:
- Use the OpaqueBytes wrapper (a box for byte[]) inside TimestampedWireTransaction to avoid array comparison issues.
- Introduce a few utility functions to make OpaqueBytes less painful.
- Make StateAndRef serialisable
- Introduce the notion of an OwnedState which abstracts out the owner field.
2015-12-07 17:53:01 +01:00
Mike Hearn
a656e210c4 Merged in crowdfund-tweaks (pull request #7)
Crowdfunding contract: some cleanups and add some discussion at the top of the different possible models.
2015-12-04 12:34:03 +00:00
Mike Hearn
41f54b8555 Crowdfunding contract: some cleanups and add some discussion at the top of the different possible models. 2015-12-04 12:33:42 +00:00
Mike Hearn
ea4a6d8f06 Add logging utilities using slf4j 2015-12-03 18:24:26 +00:00
Mike Hearn
2193dced0a Minor: add docs for the cash DSL extensions 2015-12-03 11:07:25 +00:00
Mike Hearn
0e34779fce Merged in mod-crowdfund-close (pull request #5)
Updated close method
2015-12-03 10:20:18 +00:00
Mike Hearn
f98ebce58b Update copyrights 2015-12-02 18:53:16 +00:00
Mike Hearn
a95cd056ea Implement a simple transaction graph visualiser tool. 2015-12-02 09:50:45 +00:00