* Revert "CORDA-296: added rpc that returns an observable for node state (#2004)"
This reverts commit 7d1f7ab
* Revert "CORDA-296: added rpc that returns an observable for node state (#2004)"
This reverts commit 7d1f7ab
Previously when de-anonymising a Party instance, the name of the Party was used rather than
the key, meaning a Party could be constructed with a random nonsense key and any name, and be treated as corresponding to the well known identity. This is not a security hole in itself as
in any real scenario a party shouldn't be trusted without having been registered, it creates
a significant risk of a security hole depending on how trusted the anonymous identity is, and
the returned identity is considered.
Pass notary identity into flow in `NodeStatePersistenceTests` rather than resolving it from the network map cache, which avoids a race condition between the flow starting and the notary registration being sent to the cache.
* consistent storage of Issuer Reference using `ByteArray` Kotlin type in Schema definition and a custom Hibernate Type to map this to a VARBINARY database type.
Creation of a new Issued type now also validates maximum size permissible (512).
* Clean up identities in CashTests so that the mini/mega corp keys and identities are correctly
paired together throughout. Previously `miniCorpServices` presented the same key as the
MegaCorp identity, but with the name Mini Corp attached.
* Correct key/name matches in VaultWithCashTest
* Split services in CashTests to not have multiple identities per service hub
* Removal of transaction contract state as BLOB in VaultStates table.
Transaction contract state now resolved using StateLoader (from DBTransactionStorage).
Fixed broken JUnits.
* Changes to address review comments by RP
Address logic error.
* Fixed failing JUnit (CashExitFlowTests.exit zero cash).
* Fix VaultQueryTests to respect transaction visibility boundaries.
* Adopt consistent use of "session" using DatabaseTransactionManager.
* Removed redundant transaction demarcation boundaries in Vault Query tests.
* Added explicit table names (mostly for join tables).
* Shorten or alter name of 2 tables backing notaries.
* Change a compound index declaration to one column index.
Detangle issuers in NodeVaultServiceTest, which has been using two keys on a single node, for different
issuing identities, which doesn't work right now because we don't actually have multiple identity support.
Also remove duplicate data in parameters to fillWithSomeTestCash().
Full requires the command to be `closed` before it can be removed from
the log during compaction. We don't close commands, thus and retaining
the log forever, allowing users to increase the cluster size. The
downsize is the unbounded growth of the size of the log.
Cluster membership changes need testing.
* Network map cache using Network map client instead of artemis. -- WIP
* fix up after rebase
* address PR issues, split network map update test, added todos to remove sleeps
* move jimfs and baseDir to field variable
Ensure when registering identities, we store the certificate closest to the trust root, with the same name. This ensures that looking up an identity by name produces the best match, not earliest registered identity (often but not necessarily the same).
* CORDA-296: added rpc that returns an observable for node state; used to let rpc clients know that the know is about to shut down
* replaced node shut down observation String with enum
Most uses where with MockNetwork which recently got a defaultNotaryIdentity property for dealing with the default single notary case. The remaining uses where in flows.
* Extracted out ShutdownManager into its own file
* Moved RPCDriver and ProcessUtilities into internal package
* Made n.c.testing.performance package internal
network-parameters file read in by the node at startup, of which only the list of notaries is used. For now, the driver and MockNetwork have been updated to require notaries to be started first. This is so that the same set of network parameters can be defined for all the nodes.
CN in the legal name is not longer disallowed since it's no longer reserved for distributed notary names.
Single-node notaries now only have one identity, their main identity. Nodes part of a cluster continue to have two.
(Based off Kasia's work)
* [CORDA-446] Clean up other mentions of network map node and logic
* Rename AbstractNetworkMapService to NetworkMapService and remove the empty NetworkMapService
* fix build
* fix artemismessaging tests
* pr comments
approach which assumes a dedicated node for observers: states that are
reported to the node will appear in the database and update feeds as
normal. Apps that expect all updates to be relevant to themselves may
need adjusting if they run on an observer node too, but this is likely
to be rare.
* CORDA-351: force update dependencies and suppress vulnerabilities not affecting corda
* CORDA-351: force update dependencies and suppress vulnerabilities not affecting corda
* Standardisation of Public Keys in Schema entities. (#68)
* Standardisation in usage of Public Keys in Schema entities.
Use PK Hash where optimal, otherwise use ByteArray/LOB representation of PK.
* Redundant after rebase.
* Use .encoded and Crypto.decode<Public|Private>Key(bytes) instead of Corda serialization.
* Optimize DBPartyAndCertificate entity to store and query on ownerKeyHash.
* Updated API stability check for schema attribute change.
* [CORDA-442] make MockNetwork not start a networkmap node
Now MockNetwork will put the appropriate NodeInfos inside each running node networkMapCache.
Tests relating to networkmap node starting and interaction have been removed since they where relaying on MockNetwork
They won't be reported as properties by the introspector and thus we
will fail to find a constructor for them. This makes sense as we will be
unable to serialise an object whose members we cannot read
* Cash selection refactoring such that 3d party DB providers are only required to implement Coin Selection SQL logic.
* Re-added debug logging statement.
* Updated to include PR review feedback from VK
* Refactoring following rebase from master.
* Fix broken JUnits following rebase.
* Use JDBC ResultSet getBlob() and added custom serializer to address concern raised by tomtau in PR.
* Fix failing JUnits.
* Experimental support for PostgreSQL: CashSelection done using window functions
* Moved postgresql version information into corda/build.gradle
* Using a PreparedStatement in CashSelectionPostgreSQLImpl
* Changed the PostgreSQL Cash Selection implementation to use the new refactored AbstractCashSelection
* Enhance the API Scanner plugin to monitor class annotations.
* Implement @DoNotImplement annotation, and apply it.
* Update API definition.
* Update API change detection to handle @DoNotImplement.
* Document the `@DoNotImplement` annotation.
* [CORDA-442] let Driver run without network map
- Nodes started by driver run without a networkMapNode.
- Driver does not take a networkMapStartStrategy anymore
- a new parameter in the configuration "noNetworkMapServiceMode" allows for a node not to be a networkMapNode nor to connect to one.
- Driver now waits for each node to write its own NodeInfo file to disk and then copies it into each other node.
- When driver starts a node N, it waits for every node to be have N nodes in their network map.
Note: the code to copy around the NodeInfo files was already in DemoBench, the NodeInfoFilesCopier class was just moved from DemoBench into core (I'm very open to core not being the best place, please advise)
Move from `chooseIdentity()` to `singleIdentity()` where tests use a single identity, or to fetching by name where multiple identities are present, so we stop using the first identity as special.
* Fixed AbstractNode to load custom notary services properly.
Added a custom notary sample.
* Prevent multiple custom notaries from being loaded
* Throw if more than once custom notary service is loaded
Rework identity usage in tests to extract identity from nodes by name, rather than just arbitrarily choosing the first identity. This better models the intended design for production (future work).
Let NodeInfoWatcher create the directory it wants to poll at startup.
Also log failure in creating the directory, but don't log anything if it can be found at poll time.
Remove all the Kotlin functions with spaces in them since the Android doesn't support them.
See https://github.com/corda/corda/issues/1730 for a more in-depth discussion.
Handle non-standard file systems such as JimFs, in NodeInfoWatcher. Instead of using `toFile()` to convert a Path to a File, open the Path for writing to directly.
* Stop using the watch service, just re-read the whole directory every time. On macOS it's quite unpredictable and the tests are almost always failing.
* Remove local function because it is serialised as a lambda.
* Don't automatically whitelist Kotlin lambdas unless checkpointing.
* Add comment to @CordaSerializable, warning not to allow AnnotationTarget.EXPRESSION.
* Add functions to:
** Return PartyAndCertificate rather than just Party
** Return all NodeInfo entries for a name (rather than just by key)
* General documentation improvements
Update tests
Add a test to show progress tracking works
Include service startable flow in Cordapp data structures.
Respond to PR comments
Fixup change of api inline with PR comments.
Address PR comments