Commit Graph

252 Commits

Author SHA1 Message Date
Matthew Nesbit
6bdbc7925b Fix IRS demo by allowing demos to optionally register JAX-RS classes on the node at construction time. 2016-05-14 19:26:20 +01:00
Matthew Nesbit
988e00099d Capture file moves to separate Node implementation code into its own gradle module and leave only demo code in top level src folders.
I have to temporarily break\disable the IRS demo to which has a circular dependency. Will fix next.
2016-05-14 17:57:41 +01:00
Matthew Nesbit
058ac986bd Move contracts base files to namespace to make api aspect clearer in includes.
Move Party to core.crypto as Party is closely aligned with the signing and used in code areas unrelated to the contract code.
2016-05-14 13:47:07 +01:00
Andrius Dagys
422d65cc54 Rearranging interfaces and implementations. Notary fix for the cash tests. 2016-05-13 16:34:25 +01:00
Andrius Dagys
0da604e33b Added another chapter on implementation and usage.
Modified TODO comment.
2016-05-13 16:17:50 +01:00
Andrius Dagys
324b2be06c Added a rendundant condition to a branch for readability 2016-05-13 16:17:50 +01:00
Andrius Dagys
2c422bebd3 Added noneOrSingle extension method, which returns a single element, null if no elements found and throws if more than one element found 2016-05-13 16:17:50 +01:00
Andrius Dagys
fa3f7e7fa6 Added a basic Notary service with protocol for signing transactions 2016-05-13 16:17:50 +01:00
rick.parker
1ce8a64938 File and interface moves to core module 2016-05-13 14:03:28 +01:00
Rick Parker
3ee601360e Merged in plt-141-moves-only-part-2 (pull request #92)
File moves to core module and split of interfaces and implementations in preparation for further moves
2016-05-13 13:22:08 +01:00
Mike Hearn
81c698a260 Minor: fix some compiler warnings 2016-05-13 12:58:17 +02:00
rick.parker
6017179bc0 File moves to core module and split of interfaces and implementations in preparation for further moves 2016-05-13 11:35:45 +01:00
rick.parker
a18e7b06bf File moves to core module and split of interfaces and implementations in preparation for further moves 2016-05-13 10:07:44 +01:00
Shams Asari
4271693b85 peristing psm checkpoints to disk (one per file) 2016-05-10 16:26:07 +01:00
Richard Green
62e7dc583e Expanded the verify() function for the IRS Contract 2016-05-10 15:32:08 +01:00
Shams Asari
2e7b004eb5 logger name moved into protocol state machine 2016-05-09 15:32:30 +01:00
Shams Asari
66eec9c2b2 cleanup of use of messaging service 2016-05-06 10:10:39 +01:00
Ross Nicoll
e433663875 Correct TraderDemo after network map changes
Script to run TraderDemo now specified network map service rather than timestamper service.
TraderDemo now explicitly states the services it needs to run. Previously this was implied by whether a timestamper service was specified, and the code was not updated when that change was made.
2016-05-04 17:45:00 +01:00
Ross Nicoll
7a0300f024 Split internal/external services
This patch splits internal services (to be referred to as "subsystems") from
external services (retaining the label "services"). This makes it clear which
are components of the node for its own use (such as the identity subsystem,
network map cache, wallet, etc.) and which are exposed for other nodes to use.

Further work is needed on consistency in naming, this just introduces the basic
restructuring.
2016-04-28 13:15:14 +01:00
Ross Nicoll
147f8f37ce Enable network map service 2016-04-27 16:39:33 +01:00
Ross Nicoll
00a2088fa5 Add in-node network map service 2016-04-27 16:33:54 +01:00
Ross Nicoll
5134dd4bbc Add advertised services to AbstractNode and subclasses 2016-04-27 16:26:57 +01:00
Ross Nicoll
8a42da5362 Add network map service 2016-04-27 16:26:57 +01:00
Ross Nicoll
44054c47f8 Add InMemoryNetworkMapCache 2016-04-27 16:26:57 +01:00
Shams Asari
0575bcc959 Sending message to self no longer goes into continuous loop 2016-04-27 14:50:07 +01:00
Ross Nicoll
c8865c1b40 Remove deregisterIdentity()
Remove the ability to remove registered identities. Once registered, identities are part
of a permanent record (for example you would want to ensure parties to contracts cannot
"disappear" by removing themselves from the identity service).
2016-04-27 11:43:10 +01:00
Mike Hearn
f3ed5fc9cb Minor: rename SMM._stateMachines to remove underscore. 2016-04-25 18:13:34 +02:00
Mike Hearn
9904d5bb6e Address review comments from Shams.
Also, make ServiceAffinityExecutor subclass ThreadPoolExecutor instead of delegating to ScheduledThreadPoolExecutor. This fixes an issue with exception reporting.
2016-04-25 18:13:34 +02:00
Mike Hearn
e5a0a211da SMM: Better fiber scheduler that always schedules onto the SMM thread. 2016-04-25 16:43:46 +02:00
Mike Hearn
746aca8290 Thread safety and messaging bug fixes.
* Use the new AffinityExecutor code to fix some thread affinity issues where callbacks were running on the wrong threads. Add affinity assertions.
* Remove sleeps from UpdateBusinessDayProtocol.
* Remove a one-shot message handler before the callback is executed.
* Store un-routed messages in memory in ArtemisMessagingService to fix handler registration/message races. This is a temporary kludge until we use Artemis/MQ better.
2016-04-25 15:25:58 +02:00
Mike Hearn
63b8579669 Minor: print more logging in the IRS demo 2016-04-25 15:22:30 +02:00
Mike Hearn
1b3e919df7 Minor: print a bit more info in log lines 2016-04-25 15:22:10 +02:00
Mike Hearn
f6ef1c8071 Add AffinityExecutor: a tool for making it easier to perform thread assertions. 2016-04-25 14:50:28 +02:00
Ross Nicoll
d3011817ed Merged in rnicoll-identity-service (pull request #64)
Add InMemoryIdentityService
2016-04-21 17:57:47 +01:00
Ross Nicoll
b4513e8bec Add InMemoryIdentityService
Move FixedIdentityService to MockIdentityService under testing as it's specialised for use in tests.
Add a new InMemoryIdentityService replacing the fixed identity service in AbstractNode.
2016-04-21 17:10:43 +01:00
Mike Hearn
4c9e4ce637 SMM: Log uncaught top level fiber exceptions as something has changed about how they propagate out of Fiber.unpark 2016-04-21 13:13:52 +02:00
Mike Hearn
3ef6f18203 Merged in delete-unnecessary-service-ids (pull request #63)
Delete unnecessary service IDs. Only services exposed to the wider network need this type of identifier.
2016-04-20 17:36:50 +02:00
Mike Hearn
e88907dd41 Delete unnecessary service IDs. Only services exposed to the wider network need this type of identifier. 2016-04-20 15:28:59 +02:00
Ross Nicoll
78076ace3b Remove TestWithInMemoryNetwork
* Replace use of TestWithInMemoryNetwork by InMemoryMessagingTests with MockNetwork
* Replace use of TestWithInMemoryNetwork by TimestamperNodeServiceTest with MockNetwork
* Remove reference to TestWithInMemoryNetwork from TwoPartyTradeProtocolTests
2016-04-20 13:36:44 +01:00
Ross Nicoll
5ce7580470 Replace forced ID with ID
Replace the forced ID passed into MockNode with the actual ID. This ensures
mock nodes are aware of their ID as the MockNetwork sees it, essentially
always forcing ID to be overriden.
2016-04-20 13:36:44 +01:00
Mike Hearn
804b8bdc6a Minor: Add a TODO about RecordingMap to ServiceHub 2016-04-20 14:28:39 +02:00
Mike Hearn
2de44a516f Switch Kryo serialisation to always include the class name, and avoid overhead from writing out SerializedBytes wrapper data.
This simplifies the serialisation code, reduces the use of inline functions, and ensures that running SerializedBytes<SuperClass>.deserialise() will correctly return SubClass if that's what it contained, efficiently.
2016-04-20 14:27:40 +02:00
Mike Hearn
6968a47a63 Fix a TODO in NodeWalletService by utilising ServiceHub.recordTransactions 2016-04-20 14:27:40 +02:00
Mike Hearn
bfa5e2091c Add a TODO referencing PLT-147 to NodeAttachmentService (randomise attachment JARs) 2016-04-20 14:27:40 +02:00
Mike Hearn
283d9a031c Minor: correct typo in api doc comment 2016-04-20 14:27:40 +02:00
Mike Hearn
964f2b502e Minor: small cleanup in TwoPartyTradeProtocolTests, by using ServiceHub to record the fake transactions 2016-04-20 14:27:40 +02:00
Mike Hearn
70210f3ef9 Minor: rename some fields in Command to be consistent with AuthenticatedObject, just to simplify the next refactor 2016-04-20 14:27:40 +02:00
Ross Nicoll
5d75a661b1 Merged in rnicoll-protocol-request-response (pull request #60)
Refactor common elements in node services
2016-04-19 17:58:55 +01:00
Ross Nicoll
8cdd57e4e0 Refactor common elements in node services 2016-04-19 17:57:04 +01:00
Andrius Dagys
03cab8ba09 IRS demo fixes 2016-04-19 16:00:10 +01:00