Require that a cash Issue command is the only cash command in a transaction.
Although no problems are anticipated with other commands being present, they
could theoretically confuse other verification tools.
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.
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.
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).
Also, make ServiceAffinityExecutor subclass ThreadPoolExecutor instead of delegating to ScheduledThreadPoolExecutor. This fixes an issue with exception reporting.
* 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.
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.
* Replace use of TestWithInMemoryNetwork by InMemoryMessagingTests with MockNetwork
* Replace use of TestWithInMemoryNetwork by TimestamperNodeServiceTest with MockNetwork
* Remove reference to TestWithInMemoryNetwork from TwoPartyTradeProtocolTests
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.
Better usage of generics in groupStates so the group exposes the grouping key that was used, this avoids constructs like `val issuer = outputs[0].deposit.party` which is a bit ugly.
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.
* Move advertisedServices parameter in NodeInfo up one in the parameter order
* Change ServiceType away from being an enum
* Tweaked wording around what a NodeInfo is
* Renamed LocationStructures to PhysicalLocationStructures
* Move generator outside of function parameters
Rename LegallyIdentifiableNode to NodeInfo, to represent that legally identifiable is not a single concept.
Rename NetworkMapService to NetworkMapCache, as the API exposed is suited to a local cache, not a remote service.
Renamed to AttachmentsClassLoader + autoformat
Added unit test to validate exception being throw when deserializing WireTransaction without contract jar in attachments.
This will be useful for various things in future, such as approximating the nearest consensus service (approximate because physical distance doesn't always match network distance), visualisation, simulation, etc.
LegallyIdentifiableNode now lists a physical place for the node to be in (which might not be totally accurate one day if we have super distributed mega-nodes, but will do for now).
The config file allows the admin to specify their nearest city.
There is a city database that can map such names through to coordinates, when known.
There is support for Mercator projection.
Global Clock as part of ServiceHub to offer source of time in transactions, protocols, time stamping service etc (can be replace for demos and testing with a Clock that can be externally manipulated)
Edited with Mike's feedback
Edited with Mike's feedback