* Add "TLS" to createTlsServerCert() to differentiate it from future work to introduce a non-TLS variant.
*Change to using Java 8 time types for certificate validity - does introduce so unnecessary roundtrips, but makes the code significantly easier to read/follow. In particular avoids opaque integers in the code and replaces them with Duration.
Remove mock identity service and merge it with the in memory identity service. The two services
provide extremely similar functionality, and having two different version for production/test
risks subtle implementation differences. On that note, this patch includes changes to a number
of tests which worked only with mock identity service.
Fixup after rebase
Restore original key property names
Fixup after rebase
Undo extra import that IntelliJ keeps erroneously adding.
Add comments and fix docs for transaction signing.
Fixes after rebase
More fixes after rebase
Address PR requests
Address PR requests
* Raft notary demo now defined in one place that both IntelliJ/driver and gradle/runnodes can run
* New module cordform-common for code common to cordformation and corda
* Add single notary demo
Switch to using AbstractParty as the standard identifier for parties in
states, so that full parties can be used during construction of
transactions and anonymised parties when the transaction is being added
to the ledger.
* Fix: Add missing @StartableByRPC to fix the Raft notary demo
* Make loadConfig take a Config object, for cordformation Node
* Unduplicate User.toMap
* Unduplicate WHITESPACE regex, choose possessive form
* Use slash to make a Path
* Remove Companion where redundant
* Remove unused code
* Initial commit for CollectSignaturesFlow, some tests and associated documentation via a new "Flow Library" section of the docsite.
* Refactored the TwoPartyDealFlow to use the CollectSignaturesFlow.
* Added the subclassed CollectsigsFlow to the trader demo, whitelisted it and added a flow initiator for the responder.
* Minor edits to progress tracker.
* Amended as per Rick's comments.
* Generalised this flow, so it now works if more than one signatures have been collected, initially.
* Minor edits to the IRS demo so it uses the CollectSignaturesFlow.
* For debugging purposes...
* Adding CollectsigsFlow support to SIMM Demo.
* Removing debug logging.
* Amended top level comment: transactions can only have one notary.
* Added TODOs as checkTransaction logic is absent.
* Addressed Mike's review comments.
* Minor edit to flow-library docs.
* Updated flow based on Mike's review comments.
* Added two usage examples and updated the tests.
* Made changes to accommodate new CollectSignaturesFlow approach.
* Made changes to SIMM demo to accommodate new CollectSignaturesFlow approach.
* Added abstract check proposal method to two party deal flow.
* Added missing TODOs.
* Addressed Sham's comments.
* Rebased to M11.
Add functionality for generating certificate paths from identity
certificates to transaction certificates, validating, storing and
retrieving those certificate paths.
Move AbstractParty, AnonymousParty and Party into a new net.corda.core.identity package,
as they're not really cryptography tools, and in preparation for further code coming in
for identity.
Optimize imports on many files to clean up the resulting refactor.
Mark several functions in X509Utilities as @JvmStatic so they're readily accessible from Java.
Add functions for modifying common name of an X.500 name, either direct replacement or adding a postfix.
This removes the need for the shareParentSessions parameter of FlowLogic.subFlow. It also has the flow's version number so FlowVersion is now no longer needed.
Change the legal name of parties to be an X500 name. This ensures that we aren't converting between
common names and X500 names in various places, eliminating substantial scope for error in the conversion
process. As a result, all node names must now be full X500 names, which has impact on most configurations.
* Added queryBy(QueryCriteria) Vault API and Junit tests.
* Minor fix following rebase.
* Spit out Vault Query tests into separate source file.
* WIP
* Enable composition of QueryCriteria specifications.
Additional JUnit test cases to validate API.
* Added Deprecating annotations.
Added QueryCriteria for set of contractStateTypes
* Minor tweaks and additional JUnit test cases (chain of linear id)
* Added Java Junit tests and QueryCriteria builder support.
* Added API documentation (including coding snippets and examples).
* Added @JvmOverloads to QueryCriteria classes for easy of use from Java.
* Refactored QueryCriteria API to use composition via sealed data classes.
* Enable infix notation.
* Fixed typo.
* Clarified future work to enforce DB level permissioning.
* Moved PageSpec and Order from QueryCriteria to become parameters of Query itself.
* Moved PageSpec and Order from QueryCriteria to become parameters of Query itself.
* TokenType now specified as set of <Class> (was non extensible enum).
* Exposed new Vault Query API functions via RPC.
* Fixed compiler error in java test.
* Addressed a couple of minor PR review scomments from MH.
* Major updates following PR discussion and recommendations.
* All pagination and sorting arguments are optional (and constructed with sensible defaults).
Added Java helper functions for queryBy and trackBy interfaces.
Added Java trackBy unit tests.
Miscellaneous cleanup.
* Added Generic Index schema mapping and query support.
* Query criteria referencing Party now references a String (until Identity framework built out).
Added participants attribute to general query criteria.
* Fleshed our IndexCriteria including PR recommendation to define column aliases for index mappings.
* Removed all directly exposed API dependencies on requery.
* Updated documentation.
* Provide sensible defaults for all Query arguments.
Add RPC Java helpers and increase range of Vault Service helpers.
* Further improvements (upgrading notes) and updates to documentation.
* RST documentation updates.
* Updates to address RP latest set of review comments.
* Updates to address MH latest set of review comments.
* Updated to highlight use of VaultIndexQueryCriteria to directly reference a JPA-annotated entity (versus the indirect, explicitly mapped attribute to GenericIndexSchema approach)
* Aesthetic updates requested by MH
* Reverted Indexing approach: removed all references to VaultIndexedQueryCriteria and GenericVaultIndexSchemaV1 scheme.
* Final clean-up and minor updates prior to merge.
* Fixed compiler warnings (except deprecation warnings)
* Reverted all changes to Vault Schemas (except simple illustrative VaultLinearState used in VaultQueryTests)
* Reverted all changes to Vault Schemas (except simple illustrative VaultLinearState used in VaultQueryTests)
* Commented out @Deprecated annotations (as a hedge against us releasing M12 with the work half-done)
* Renamed RPC JavaHelper functions as RPCDispatcher does not allow more than one method with same name.
Clean up X500 names in Corda simulation, and ensure they're consistent with the standard test names.
This includes using the locations present in those test names, which requires updates to the node
config test.
* Fix /attachments endpoint on WebServer, and update demo to use it.
* Add @Throws statements to servlet methods.
* Ensure target entry is not a directory.
* Simplify, because JarInputStream verifies signatures by default.
* Move JarInputStream.extractFile() function into core.
* Don't close the output stream automatically as it commits our response.
This is an intermediary step to introducing X500Names in all Party instances, which adds:
* Party constructor which accepts X500Name and then converts it to string.
* startNode() function which takes in X500Name instead of String
* Numerous legal name fixes to use full distinguished names
Core flows, which are baked into the platform, are also versioned using the platform version of the node. Several core flows, such as the data vending ones, which were provided via plugins are now instead baked into the node.
* Add information on why state machine was removed from StateMachineManager.
There are two cases: normal end of flow or error.
Return flow result as part of state machine remove data.
Make Change a sealed class with Add and Remove.
fiber.actionOnEnd takes ErrorOr<R> parameter.
* Remove unnecessary fields from StateMachineManager.Change.
DemoBench: Misc usability improvements:
- Pre-fill details for some fictional banks when Add Node is pushed.
- Make services a checkbox list rather than one where you have to know how to use the keyboard to do multi-select.
- Make web server launch button spin until server is launched to show activity.
- Suppress an exception that spams the log due to inability to load all the states. It'll get fixed as part of the vault API and serialisation work.
* Add information on who started flow on a node with name where possible.
Add sealed class holding information on different ways of starting a flow: RPC, peer, shell, scheduled.
* Remove invokeFlowAsync from ServiceHub, move it to ServiceHubInternal.
We shouldn't be able to start new state machines from inside flows.
Assuming that Autocomplete will be added, according to JIRA https://r3-cev.atlassian.net/browse/CORDA-367
Note that there are still a few duplicates in the source with slightly different coordinates. I assume the autocomplete will be able to cope, or these can be removed.
Move functions for generating transactions into OnLedgerAsset from various locations in
the code (VaultService, AbstractConserveAmount, etc.) to unify the code paths and reduce
duplication.
* Remove progress Observable from FlowHandle, unless explicitly requested.
* Refactor FlowHandle creation into FlowStateMachine.
* Prevent server-side queue subscription for dummy Observable.
* Refactor so that RPC client does not receive any unused progress Observables. This is the simplest way of ensuring we have no dangling "hot" Observables when the RPC client closes.
* Test flow has correct handle.
* Resolve some compiler warnings.
* Document how starting a flow does not involve progress tracking by default.
* Update changelog and release notes for RPC API.
* Rename new RPC API to startTrackedFlow().
* Remove optimisation because of its affect on the client-side.
* Update documentation.
This introduces new functions for fetching parties by their X.500 name, Kryo serialization support for X500Name objects, an X500Name generator and some X509 utility support in preparation for full X.500 name support.
Add CompositeSignature and CompositeSignatureWithKeys classes as part of preliminary work to make CompositeKey signature validation compatible with java.security classes, so that these keys and signatures can be used readily in X.509 certificates.
Standaridise the identity names of Alice, Bob and Charlie, notary, map service, etc. in order
to ensure consistency across the code base and reduce number of places that have to be changed
to introduce proper X.500 names.
Move Alice, Bob & Charlie identities into the utilities package so they can be used in demos
* Make CompositeKey implement PublicKey
The initial implementation of composite keys as their own distinct class separate from PublicKey
means that the keys cannot be used on standard classes such as Certificate. This work is a beginning
to modifying CompositeKey to being a PublicKey implementation, although significant further work
is required to integrate this properly with the standard Java APIs, especially around verifying
signatures using the new key type.
* First stage of making CompositeKey implement PublicKey interface. Revert to using PublicKey everywhere we expect a key.
* Move algorithm and format into companion object (#432)
Move algorithm and format into companion object so that they can be referenced from other
classes (i.e. the upcoming signature class).
* Add simple invariants to construction of CompositeKey.
Builder emits CompositeKeys in simplified normalised form. Forbid keys with single child node, force ordering on children and forbid duplicates on the same level. It's not full semantical normalisation.
* Make constructor of CompositeKey private, move NodeWeight inside the class.
Add utility function for Kryo deserialization to read list with length constraints.
* Fixed bug whereby Cash Exit was not taking into account the issuer reference.
Added additional JUnit tests for coin selection by issuer.
Added some trace logging in AbstractConserveAmount.
* PR review: added additional state with 3rd issuer reference in test.
Clarify exceptions thrown from loading a key store as a general cleanup. Also tightens the
exceptions caught when loading key stores from AbstractNode, so in case of an unexpected error
we don't silently drop the exception.
Observable.subscribe().unsubscribe() dance to free up the MQ resources server-side.
* remove an unused import
* implement a FlowHandle<Transaction>.finalize method
* Rename finalize() to discard() - remove the collection and run discard individually
* Remove unused imports
* Observable.notUsed helper function
* Tweaks to comments
* FlowHandle implements AutoClosable
* Resolving conflicts and move notUsed to RPC module
* Copy Observable.notUsed in core module.
* delete discard method
Add an AmountTransfer type to express the concept of asset flows.
Unify the currency amount creators and fix a few old style display conversions in teh explorer cash dialogs.
Modifications according to PR comments.
Change TransferAmount display string as it may not always be a payment.
Update docs
* Reduce warning and info messages in node log files (Artemis)
Add an additional lof message for conflicting states identified by the Notary.
* Upgraded severity of user login message from trace to debug.
* Suppress Artemis log4j WARNING's for core.server.checkDeadLetterAddressAndExpiryAddress
* Test SELECT WHERE IN composite key using requery 1.2.0
Upgraded Vault Service code to use Requery 1.2.0 SELECT .. WHERE IN
Updated generated schema code with Requery 1.2.0
Upgrade to Requery 1.2.1
Upgrade to Requery 1.2.1 - converted to use update DSL with composite key
Removed redundant JDBC SQL test cases.
Minor updates following PR review comments from RP.
* Streamline companion object initialisation.
Fix broken IssuerFlowTest
Fix IssuerFlowTests after rebase.
Resolve conflicts after rebase.
Soft locking converted to use persistent store.
Added additional optional 'includeLockStates' parameter in VaultService states API call.
Added Vault softLocked states query API call.
Fixed commercial paper failing test.
Improved exception handling on soft locking UPDATE statement.
Using SELECT FOR UPDATE to ensure correct soft locking data visibility.
Db query operations moved out of mutex code (as locking managed by underlying DB)
Adjusted logging severity levels.
Adjusted logging severity levels.
GenerateSpending now performing fine grained query for unconsumed states by joining with contract_cash_states table.
Using H2 proprietary cummulative counting feature (using sessioni SET variables)
Refactored and simplified HibernateObserver constructor to enable usage in JUnit tests.
Event generator issues larger random amounts (10,000..1,000,000) to those than are spent (0..10,000)
Adjusted Issue (5:1) and Exit (10:1) generation frequency vs spending.
Minor fixes: added optional lockid into select for spending criteria, set notary, additional trace logging.
Generate Cash Schema by default upon node start-up (as part of NodeSchemaService initialisation).
Explicitly close JDBC statements in finally() blocks.
Tightened HibernateObserver constructor.
Fix CommercialPaper test (was missing auto-generation of CONTRACT_CASH table)
Revert default JVM size back to 200Mb.
Revert default number of iterations in Explorer Node Simulation mode (back to 10000 with .5 sec sleep interval).
Remove redundant setter function.
Added TODO messages indicating Requery / H2 restrictions & caveats.
Consumed states lock updates now performed in general consumed state Update.
Updated/added Soft Locking documentation.
Addressed initial PR comments: use THREAD_LOCAL_KRYO, use AbstractParty, extract helper method, improve readability, address some doc typos
Addressed PR comment: removed lockId from WireTransaction.
Fixed soft locking UPDATE statements.
Improvements to VaultSoftLockManager for auto-registration of soft locks for flows with spendable states (as notifications from vault).
Other optimisations (IssuerFlow no longer explicitly reserve/release issued state) and improvements (soft lock release management of soft locks, docs update)
Performance update: now using Requery for UPDATE in release soft locking (non-composite key statement)
Removed redundant TODO messages (TODO: revisit Kryo bug when using THREAD_LOCAL_KYRO)
Minor fixes following rebase
Fixed failing JUnit following rebase
Addressed MH PR review items (1st pass)
Fix broken JUnit
Significant changes to RDBMS operations within coin selection and soft locking as requested by PR review.
(Removed SELECT FOR UPDATE; added RETRY upon coin selection; reverting partial soft locks)
Addressed a number of PR review requests added by MH (comments/spelling, lockID instantiation, HibernateObserver instantiation, cash schema white-listing usage)
Addressed latest PR review comments from RP.
Minor fixes following rebase from master.
Fixed final failing JUnit (issuer flow concurrent).
Updated TraderDemo to trigger concurrent issuance of cash.
Fixed compiler warning on lockId null check.
Fixed subtle bug in coin selection intermittently surfaced in IntegrationTestTutorial.
Fixed small memory leak.
Removed stray } in logger trace message.
Slight rewording of description of Soft Locking in docs.
Renamed NoStatesAvailableException to StatesNotAvailableException.
generateSpend is now Suspendable (calls sleep method on flow upon coin selection retry).
Added companion function to enable a Strand to sleep but without locking transactional context.
Improved logging, changed to StateNotAvailableException, using Flow sleep upon retry, tweaked SELECT criteria in coin selection, fixed bug when insufficient states selectable, generateSpend is now @suspendable
Improved handling and logging of flow results in Simulation Mode.
Fixed minor error in sleep when not an active flow.
Retry coin selection when unavailable states (as these may become available as new states).
Additional debug logging to highlight and identify H2 coin selection sporadic bug.
Inlined sleep method due to intermittent Quasar error.
Re-introduce selection clause that prevents selection and temporary locking of already locked states (by other flows).
Improved trace logging for coin selection (SQL row level info).
Correctly calling FlowStateMachineImpl sleep (now inlined and working correctly)
Fixed rebase error.
Remove redundant TODO message.
Add utility functions for requesting transaction keys and a small example flow which uses
these functions for testing purposes. These keys are required in for the anonymisation of
transactions, by providing per-transaction keys which cannot be associated with the owning
party's keys without an intermediary certificate.
* CORDA-305: Refactor CordaRPCClient into :client:rpc module
* CORDA-305: Remove the Kotlin test framework from the artifacts.
* CORDA-305: Migrate serialisation whitelist into node-api module.
* CORDA-305: Clean up unused RPC observables.
* CORDA-305: Add :client:rpc module to documentation tasks.
* CORDA-305: Include :finance into :client:rpc for its serialisable classes.
* CORDA-305: Move test classes into the correct directory.
* CORDA-305: Migrate :finance dependency from :client:rpc into DemoBench.
* CORDA-305: Update wording of TODO about handling Observables.
* We were leaving trailing attachmentStorage on pooled kryo instances after some tests. Changed attachment storage logic to make it impossible to leave it behind.
* Some low level tests corrupt the Kryo config, so do not return to pool when this is the case. Also, we discovered that Kryo is caching class name to class resolution. We don't want to do this where attachments are involved. The errors raised highlighted a class missing from the whitelist. Need to write a unit test to test the class loader issue.
* Unit test for attachment class loading with kryo.