Commit Graph

263 Commits

Author SHA1 Message Date
ad8ffca0b4 Add CommitTransactionProtocol
Add new protocol which manages the entire process of taking a signed transaction ready
for notarisation, through notarisation and onto recording it both locally and informing
remote nodes.

This protocol also optionally can include the ClientToServiceCommand which triggered a transaction
being created, to give the remote nodes context on why a change occurred (i.e. "You are being sent
£100")
2016-08-25 16:30:39 +01:00
089ba2cb69 Only NetworkMapServer addresses can be publicly manufactured. Use identity publick key as addressing, with only bridges using the HostAndPort information
Fixup after rebase and fix issue with checking previous deployment of bridges

Correct comments on ArtemisMessagingClient constructor

Fixup rates fix demo

Get rid of when statements

Make NetworkMapCache send modify as well as add//remove events. Make inboxes for nodes persistent.

Suppress warnings

Fix message acknowledgement so that it actually consumes messages properly.

Change queueName to SimpleString to stop lots of wasted conversions

Get rid of spurious import

Tidy up and add comments

Update to include comments on PR

Remove unnecessary import
2016-08-25 15:56:50 +01:00
f9880a4990 Pre-filter states passed to generateSpend()
Pre-filter states passed to generateSpend(), so that requests from the UI to spend cash only ever
spend cash with the correct issuer.
2016-08-25 13:20:12 +01:00
c8323099bb Minor: cleanup the commercial paper contracts.
There's no need for the notary to be specified in commands. A few other tweaks and additions found whilst refreshing the docsite.
2016-08-25 11:30:25 +02:00
3e330a2d36 Merged in mike-fix-walletfiller (pull request #277)
Rewrite the test wallet filler code to not be buggy.
2016-08-23 17:59:19 +02:00
dc2f4055fc Restrict cash exit commands to working on cash held by the issuer
Remove the ability to exit cash not held by the cash issuer; this solves a number of problems:

* Ensuring owner of the cash is aware of the funds being destroyed
* Determining where to send any change resulting from partial exiting of funds
* Auditing the destruction of funds
2016-08-22 17:17:19 +01:00
668fecfea7 Merged in clint-no-notary-error (pull request #283)
Fixed bug when incorrect notary service type is specified.
2016-08-22 16:41:38 +01:00
097bb033c4 Rewrite the test wallet filler code to not be buggy. 2016-08-22 16:26:32 +02:00
1a2c712a48 node-driver: Make debugging optional and off by default 2016-08-19 17:05:00 +01:00
9d22d66548 node-driver: Fix some kdocs. Also, full stops! 2016-08-19 17:05:00 +01:00
f4577b743e node-driver: Add startClient, startLocalServer 2016-08-19 17:05:00 +01:00
5f33bedc13 node-driver: Polling doesn't timeout, just prints warning 2016-08-19 17:05:00 +01:00
9cbdf001fb node-driver: Return Futures instead of waiting for full node startup 2016-08-19 17:05:00 +01:00
7b3003ea04 Added TODO for further work 2016-08-19 16:41:49 +01:00
696b9741dd Remove ClashingThreads exception by tightening up unique id on LinearState to be a secure random value, with constraints that it cannot be duplicated. Also, rename to linearId rather than the confusing thread.
Try providing a helper interface to encourage enforcing LinearState rules

Fixup after rebase

Change to using Clauses for verifying LinearState standard properties

Fix whitespace change

Tidy up ClauseVerifier after PR comments

Change from SecureHash to a TradeIdentifier class

Change TradeIdentifier to UniqueIdentifier
2016-08-19 11:52:16 +01:00
6adebd3fa8 Clarify exception handling in the SMM add method a bit. 2016-08-18 18:19:46 +01:00
db3aa1491c Upgrade Quasar to 0.7.6 and fix an exception handling bug in SMM that it revealed (if an exception was thrown immediately on protocol startup we let it leak instead of capturing it in the future. 2016-08-17 14:43:45 +01:00
a9ec3c253e Merged in rnicoll-notify-tx (pull request #282)
Add observable for transactions being stored
2016-08-16 14:50:55 +01:00
77f5689468 Renamed variable for clarity. 2016-08-16 13:54:08 +01:00
5d68210355 Driver now correctly resolves quasar path on Windows. 2016-08-16 13:26:38 +01:00
85dce390f4 makeNotaryService now enforces post condition with type system. 2016-08-16 09:21:29 +01:00
a74c491745 Fixed a bug where if NotaryService.Type is used as an advertised service no notary is created and no obvious error occurs. 2016-08-16 09:18:33 +01:00
9d9164980e Merged in andrius-driver-fix (pull request #280)
DriverTest fix: get quasar.jar location from the classpath
2016-08-15 17:31:02 +01:00
c5a6d11976 Merged in clint-node-driver-conf-fix (pull request #275)
Config will error earlier if the reference.conf file is missing.
2016-08-15 15:53:50 +01:00
a451000623 Merged in mike-fix-artemis-threading (pull request #276)
Messaging layer improvements
2016-08-12 19:07:54 +02:00
3d391ec8c2 Add unit tests for the resolve transactions protocol 2016-08-12 17:14:54 +02:00
a3d37a4d00 Require notary to be explicitely stated on each transaction 2016-08-12 15:51:04 +01:00
17ae349f4d Remove support for timestamp commands 2016-08-12 13:51:34 +01:00
cba0427e01 Make ArtemisMessagingClient blocking and require the user to directly enter a message loop. This cleans up a few things and ensures we can't get caught out by messages being arbitrarily re-ordered as they pass through any Artemis thread pools. 2016-08-12 14:06:03 +02:00
8346c58d4c Add observable for transactions being stored
Add observable for transactions being stored, so the UI can show transactions as they're received, rather than being
limited to the summarised version available from the wallet service.
2016-08-12 11:58:17 +01:00
cd344058d2 Driver: get quasar.jar location from the classpath instead of a constructor parameter 2016-08-12 11:41:15 +01:00
ac81d2aa32 Messaging layer improvements:
- Fix thread safety issues in ArtemisMessagingClient. The Artemis API isn't thread safe, but that isn't well documented and it will happily invoke callbacks in parallel.
- Add discussion of how we tackle threading currently in the codebase and make a few other improvements.
- Add a shutdown hook so we stop properly when the user presses ctrl-c
2016-08-11 14:16:05 +02:00
475322b14f Config will error earlier if the reference.conf file is missing. 2016-08-10 17:22:20 +01:00
00b439802b node-driver: Write node.conf explicitly 2016-08-10 14:35:23 +01:00
1b98c32579 Merged in node-driver (pull request #253)
Node driver
2016-08-10 14:21:16 +01:00
cf40e0db70 Add WalletMonitorService 2016-08-09 18:24:14 +01:00
8386100677 Remove BriefLogFormatter as the formatting is now handled by Log4j configuration. Introduce LogHelpers which now handles the custom log level setting for specific loggers. 2016-08-09 17:31:27 +01:00
d883b3f134 First working hand-rolled persistent wallet
First working Exposed-assisted persistent wallet

Cleaned up Exposed-based persistent wallet

Cleaned up warnings

Fixed up some generic types

Improved comments

Fix up TODO comment

Hikari and config integration

Fix existing tests

Clean up after looking at PR

Clean up commented out lines

Fix initialisation of IRS demo leaving database open

Fix up after rebase

Review feedback.  Main change is lazy wallet iteration.

Rebased and incorporated config changes.

Use standardised config loading.  Make wallet cash test use persistent wallet.

Added test to ensure wallet retains state in database across instance creation.

Tidy up whitespace and fix bug in test.
2016-08-09 16:41:32 +01:00
f20322136f Revert "Merged in node-driver (pull request #253)"
This reverts commit af893e0af5, reversing
changes made to 7357597501.
2016-08-09 16:19:18 +01:00
9df7a0faf0 node-driver: Fix compile error 2016-08-09 15:38:33 +01:00
5b2c687c64 node-driver: Hacky fix of startup race condition 2016-08-09 15:27:27 +01:00
9e3220671c node: stop() ClientFactory and ServerLocator when shutting down and ArtemisMessagingClient 2016-08-09 15:27:27 +01:00
d0385c420e node-driver: Remove parameter and DriverHandle, expose waitForAllNodesToFinish to dsl 2016-08-09 15:27:27 +01:00
c9527a2cdd node-driver: Only stop() artemis if it started fine 2016-08-09 15:27:27 +01:00
20fc200771 node: Fix checking of lateinited networkMapNodeInfo 2016-08-09 15:27:27 +01:00
df4413ab68 node: Add extra Driver checks for node shutdown, extend try/finally scope of cleanup 2016-08-09 15:27:27 +01:00
2e6de61ad0 node: Fix compiler error due to rebase 2016-08-09 15:27:27 +01:00
a5e8c86928 node: Increase poll timeout in driver 2016-08-09 15:27:27 +01:00
feecc36661 node: Address PR comments, better resource releasing, add kdoc 2016-08-09 15:27:27 +01:00
9d071809ef node: Expose port allocation in Driver 2016-08-09 15:27:27 +01:00