* The fancy classloader setup in Cordform.loadCordformDefinition is defeated by certificates in 2 ways
** Class cast when creating a cert (via TestConstants) in a CordformDefinition
** Some issue when persisting a cert in ServiceIdentityGenerator
* This PR is a quickfix to get the demos working again
* Proper fix (not this PR) is to work out why it's not enough for eddsa to be in the project runtime classpath - if it can be removed from the gradle environment that ought to properly fix the above problems
Use the certificate factory directly to build paths rather than assembling them via an interim
API call. After reducing the complexity of the utility API, it's replacing two lines of code,
at which point it seems better to make the behaviour clearer rather than having a function
hide what's actually going on.
* Unify certificate path validation in identity service
* Ensure we won't accept trust root or intermediaries as owner of a transaction certificate
* Fix subject key parsing
Add extremely rough DER format encoding for CompositeKey so that they can be used in X.509 certificates,
and switch service identity generator to using the proper identity cert for signing.
* Fix BFT config that only worked with clusters of size 4
* Shutdown BFT properly so that tests can run back to back in theory
* Wait for initial connection between client and all replicas before touching it
* Add test for non-trivial BFT cluster
* Shutdown NodeBasedTest nodes in parallel, as BFT shutdown time is non-trivial
* Overlapping ports check no longer assumes all on localhost
* Fix overlapping ports test to actually check the messages
* Correct path composition in identity service tests
* Correct identity service certificate path verification to handle the owning certificate being anywhere in the path, rather than expecting it to be trust root
* Remove unused type param
* If we drop Runnable we can use conciser syntax
* Sometimes we need the fully-fledged object, so retire separate handle class
* Implement IntelliJ suggestion
Matching can be done with case insensitive substrings in the identity service, RPC and shell. In future cleverer matching should be possible, e.g. using Lucene or RDBMS free text search features.
Fixed issue where Corda services installed in unit tests were not being marked as serialise as singleton. Also the driver now automatically picks up the scanning annotations. This required moving the NodeFactory used in smoke tests into a separate module.
Core corda publications and JARs now have cord or corda at the start (excluding gradle plugins). Removed an unnecessary dependency on test-utils in node-schemas to prevent an evaluation order bug in gradle.
* Increase max network map request size so the notary can register
* Suppress oracle service installation errors in non-oracle nodes
* Make demos automatically build capsule jars
Change PartyAndCertificate to an aggregate class instead of a subclass of Party. This reduces the changes compared to M11, as well as avoiding risk of accidental serialization of a PartyAndCertificate (which may be very large) where a Party is expected.
Cleaned up initial nodes known to the identity service, in particular mock nodes now know about themselves; previously full nodes registered themselves but mock nodes did not.
* Specifically, DriverTests and WebserverDriverTests
* RPCDriver.startRpcBroker now waits for port to be unbound, as was probably intended
* Explicitly drop network map future while ensuring the error is logged
* Fix bug in demobench. Explorer didn't show correctly location of a node.
There was no nearestCity override in config.
* Remove nearestCity from node configuration. Now information about the location is always taken from
node's legal name. If not present - exception on node startup.
* Add X500Name.locationOrNull that soft fails when location is not in X500 name. Address PR comments.
* Remove unused imports.
* Construct standard flows using PartyAndCertificate, and add support for launching
flows that are constructed with PartyAndCertificate or just Party.
* Store PartyAndCertificate in network map service
* Expand identity service to store certificates along with all identities.
This removes the need to do manual registration using the PluginServiceHub. As a result CordaPluginRegistry.servicePlugins is no longer needed. For oracles and services there is a CorDappService annotation.
I've also fixed the InitiatingFlow annotation such that client flows can be customised (sub-typed) without it breaking the flow sessions.
Replace X509Certificate with X509CertificateHolder for consistency in implementation of how X.509 certificates
are managed. Using the Java standard class entails the actual implementing class being one of several options
depending how a certificate is built, which makes serialization/deserialization with Kryo inconsistent as some
of these forms cannot be directly built from outside restricted classes.
* De-anonymise parties in AbstractStateReplacementFlow flows
* Convert transaction key negotiation to a subflow instead of utility functions
* Add serialization support for CertPath
* Restructure cash flows so that a counterparty flow can be added later
* Rename raft-notary-demo project to notary-demo
* Refactor serialisation filtering to allow BFT SMaRt to work, it no longer relies on the jdk.serialFilter system property
* In NodeBasedTest remove whitespace in node directory names for consistency with cordform and driver
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
* If the p2pAddress provided by the configuration is not public, the node tries to discover the public IP:
- First by checking the network interfaces
- If not found, sends a request to the network map service
* Enable initial connection retry
* Improve error handling
* Update docs
Specifically, make the IDE/driver and gradle/NodeRunner methods of launching the demo behave more similarly, with a view to configuring them the same way.
* Add option to driver to nominate a node as network map, so that the driver-based demo doesn't run an additional node
* Change gradle ports to match those chosen by driver
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.
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.
BFTNotaryServiceTests generates a master node independently of the cluster nodes, so it can put it
at the end of the list of nodes. The calling function however treats the first node in the list as
the master, not the last node. This simplifies the code while maintaining the same behaviour.
* 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.
* 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.
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.