core.node.services

Package core.node.services

Types

ArtemisMessagingService class ArtemisMessagingService : MessagingService

This class implements the MessagingService API using Apache Artemis, the successor to their ActiveMQ product. Artemis is a message queue broker and here, we embed the entire server inside our own process. Nodes communicate with each other using (by default) an Artemis specific protocol, but it supports other protocols like AQMP/1.0 as well.

AttachmentStorage interface AttachmentStorage

An attachment store records potentially large binary objects, identified by their hash. Note that attachments are immutable and can never be erased once inserted

DataVendingService class DataVendingService

This class sets up network message handlers for requests from peers for data keyed by hash. It is a piece of simple glue that sits between the network layer and the database layer.

DummyTimestampingAuthority object DummyTimestampingAuthority
E2ETestKeyManagementService class E2ETestKeyManagementService : KeyManagementService

A simple in-memory KMS that doesnt bother saving keys to disk. A real implementation would:

FixedIdentityService class FixedIdentityService : IdentityService

Scaffolding: a dummy identity service that just expects to have identities loaded off disk or found elsewhere.

IdentityService interface IdentityService

An identity service maintains an bidirectional map of Partys to their associated public keys and thus supports lookup of a party given its key. This is obviously very incomplete and does not reflect everything a real identity service would provide.

KeyManagementService interface KeyManagementService

The KMS is responsible for storing and using private keys to sign things. An implementation of this may, for example, call out to a hardware security module that enforces various auditing and frequency-of-use requirements.

MonitoringService class MonitoringService

Provides access to various metrics and ways to notify monitoring services of things, for sysadmin purposes. This is not an interface because it is too lightweight to bother mocking out.

NodeAttachmentService class NodeAttachmentService : AttachmentStorage, AcceptsFileUpload

Stores attachments in the specified local directory, which must exist. Doesnt allow new attachments to be uploaded.

NodeInterestRates object NodeInterestRates

An interest rates service is an oracle that signs transactions which contain embedded assertions about an interest rate fix (e.g. LIBOR, EURIBOR ...).

NodeTimestamperService class NodeTimestamperService

This class implements the server side of the timestamping protocol, using the local clock. A future version might add features like checking against other NTP servers to make sure the clock hasnt drifted by too much.

NodeWalletService class NodeWalletService : WalletService

This class implements a simple, in memory wallet that tracks states that are owned by us, and also has a convenience method to auto-generate some self-issued cash states that can be used for test trading. A real wallet would persist states relevant to us into a database and once such a wallet is implemented, this scaffolding can be removed.

ServiceHub interface ServiceHub

A service hub simply vends references to the other services a node has. Some of those services may be missing or mocked out. This class is useful to pass to chunks of pluggable code that might have need of many different kinds of functionality and you dont want to hard-code which types in the interface.

StorageService interface StorageService

A sketch of an interface to a simple key/value storage system. Intended for persistence of simple blobs like transactions, serialised protocol state machines and so on. Again, this isnt intended to imply lack of SQL or anything like that, this interface is only big enough to support the prototyping work.

TimestamperService interface TimestamperService

Simple interface (for testing) to an abstract timestamping service. Note that this is not "timestamping" in the blockchain sense of a total ordering of transactions, but rather, a signature from a well known/trusted timestamping service over a transaction that indicates the timestamp in it is accurate. Such a signature may not always be necessary: if there are multiple parties involved in a transaction then they can cross-check the timestamp themselves.

Wallet data class Wallet

A wallet (name may be temporary) wraps a set of states that are useful for us to keep track of, for instance, because we own them. This class represents an immutable, stable state of a wallet: it is guaranteed not to change out from underneath you, even though the canonical currently-best-known wallet may change as we learn about new transactions from our peers and generate new transactions that consume states ourselves.

WalletService interface WalletService

A WalletService is responsible for securely and safely persisting the current state of a wallet to storage. The wallet service vends immutable snapshots of the current wallet for working with: if you build a transaction based on a wallet that isnt current, be aware that it may end up being invalid if the states that were used have been consumed by someone else first

Exceptions

TimestampingError sealed class TimestampingError : Exception