* CORDA-1510 - Allow Doorman and NetworkMap to be configured independently
Currently only one compatabilityZoneURL can be specified, however the
two services can be run on as separate servers. Allow nodes to be
configured in this manner
* Partial review comments
* Review comments
* review comments
node-api now depends on this module and upcoming changes will use this as well rather than having to depend on node-api.
EnumEvolveTests.deserializeWithRename and EnumEvolveTests.multiOperations are temporarily ignored since their test resources can't be regenerated due to bugs.
It's no longer used as we've switched over to AMQP for RPC calls so
remove it from everywhere and only use it for checkpointing
* Wire up demo bench post Kryo removal
* Test Fixes
* rebase and fix tests
* Test Fix
* wip
* revert changes to api now we don't need to add annotations
* Client and server support for amqp
* Observable (and supporting) serialisers
Unit Tests
* Fixing tests
* Test fixes
* CORDA-847 - Update api doc with additon of @CordaSerializable annotation
* TestFixes
* review comments
* TestFixes
* Test Fix
* Test Fix
* Test Fix
* Test Fix
* Test Fix
* Test Fix
* TestFix
* Test Fix
* Review Comments
* add checks on message size
* added size check in AMQP bridge
* passing maxMessageSize to AMQPClient and server
* added Interceptor to enforce maxMessageSize on incoming messages
* CORDA-866: Implement removal of stale nodes from network
Backported
* Implement removal of stale nodes from network
Add eventHorizon to NetworkParameters structure. Add republishing of
node info on 1 day intervals - it is treated by network map as heartbeat from node indicating if it's alive or not. Add removal of old node infos on network map signing.
* Add copy method to NetworkParameters data class
Add JvmOverloads annotation to the constructor, because it's data class
exposed in API
* Fix test
* Pagination relies on a recursive call to count total results, this sub-query should NOT perform pagination checks.
* Fix using defaulted parameter.
* Make internal method private.
* CORDA-1001 - Remove peristent map in NodeSchedulerService (#763)
* Add scheduled flow test that uses multithreaded node
* Replace use of PersistentMap in NodeSchedulerService
* Correct class name and remove duplicate test
* Address initial PR comments
* Remove debugging code
* Remove acidentally added line
* Move Scheduled State contracts to internal module
* Put things in the right places
* Add changelog message
* Fix countdown issue
* Addressing PR comments
* Remove unused class
Vault queries: 'order by' function aggregation e.g. 'order by sum(col)' is replaced by the position of the selected column (e.g. 'order by 1').
Rationale: A database may be unable to support aggregation function in order by clause e.g. 'order by (sum col_x)' and Hibernate can't produce alias in this case e.g. ' select sum(col_x) as alias_x... order by also_x ...', the best universal solution is to use positional parameter e.g. 'select sum(col_x) as alias_x... order by 1 ...'
(cherry picked from commit 416d4ec)
Just as we did for the RPC CLient, refactor kryo specific elements into
their own sub module. Also move kryo specific components out of generic
RPC files.
Thus, adding AMQP support will be a much smoother operation
* Move notary service related classes and interfaces in core to internal, since we won't be able to stabilise the APIs for writing custom notary services any time soon (the docs already mention it). I left out the wire protocol related classes so we don't accidentally break it.
* fix a bug where registration tool will refuse to register for a service identity if the keystore contain NODE_CA key already.
some refactoring
(cherry picked from commit 5ed60ab)
* ENT-1540: Make sure transactions with "expired" time windows get re-notarised correctly.
Currently the time window is checked before states are being passed to a uniqueness provider. If the time window is
invalid, the transaction will be rejected even if it has already been notarised, which violated idempotency.
For this reason the time window verification was moved alongside state conflict checks.
* Update API - this only affects custom notary interfaces
VaultQuery tests wrapped inside transaction which gets rolled back rather then recreating DB from scratch for each test
Moved Missing schema test to separate class, as it modifies global test class state
* CORDA-1335: Scan attachment Jar only to speed-up the process.
* CORDA-1335: Explicitly mention other types of contracts to scan.
* CORDA-1335: Refactor to eliminate listing different subclasses of Contract in two separate places.
* ENT-1323 Network map service to check all identities in submitted node info
* fixup after rebase
* address PR issues, refactored createValidNodeInfo
* address PR issues
(cherry picked from commit f9ed55b)
Change conversion to toStringShort() instead of toBase58String() - as done for H2 Cash Selection.
Fix withIssuerRefs case - iterate via list of IssuerRefs and setBytes instead of setArray of BYTEA.
Add test for Cash Selection with issuerRef.
Since we are running web-server and different handling methods will be called from
different threads, it is more appropriate to use concurrent data structures
for exchanging information between threads.
Prior to this change I observed the following exception which is likely to be due `certPaths` not synchronized between threads:
```
Caused by: kotlin.KotlinNullPointerException
at net.corda.node.utilities.registration.RegistrationHandler$reply$1.invoke(NodeRegistrationTest.kt:151) ~[integrationTest/:?]
at net.corda.node.utilities.registration.RegistrationHandler$reply$1.invoke(NodeRegistrationTest.kt:122) ~[integrationTest/:?]
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:221) ~[corda-core-corda-4.0-snapshot.jar:?]
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:213) ~[corda-core-corda-4.0-snapshot.jar:?]
at net.corda.node.utilities.registration.RegistrationHandler.reply(NodeRegistrationTest.kt:149) ~[integrationTest/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
```
Packages re-jig was meant to reduce the size of the jars that are being produced by the
node driver. E.g. previously `MessageState` was in package `net.corda` which resulted in jar file
of around 2MB to be created. Same for `NodeStatePersistenceTests` which was in `net.corda.node`
* Improve logging for NetworkMap requests
* Allow interrupt in polling if the process started successfully
* Put `advertiseNewParameters` back
* Additional log line to indicate when all the nodes are started
* Improve logging and use concurrent map since it is updated from multiple threads
* Change NetworkMap response validity duration and rename parameter accordingly
* Changes following code review from @shamsasari
* Making Corda's JPA classes non-final and Serializable.
* Making Corda's JPA classes non-final and Serializable.
* Making Corda's JPA classes non-final and Serializable.
* Making Corda's JPA classes non-final and Serializable.
* CORDA-1208: Notary service should persist the notarisation request signature along with the committed input states.
This required modifying the uniqueness provider interface to accept the signature in addition to input states.
Until now the committed state log used to be stored as a map of (state reference -> (tranasction id, consuming party)).
Adding the serialized signature would mean inflating each state entry by around 700 bytes, which would be grossly inefficient.
Instead, two tables are now used: one for storing (state referece -> transaction id) map, and another for storing the notarisation
request details (transaction id, consuming party, date, signature).
* Update api - all of these changes are only related to custom notaries
Old code failed with:
```
11:34:01.536 [main] ERROR net.corda.node.internal.Node - Exception during node startup
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Program%20Files/JetBrains/IntelliJ%20IDEA%20Community%20Edition%202017.3.1/lib/idea_rt.jar
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) ~[?:1.8.0_144]
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:1.8.0_144]
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[?:1.8.0_144]
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) ~[?:1.8.0_144]
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) ~[?:1.8.0_144]
at java.nio.file.Paths.get(Paths.java:84) ~[?:1.8.0_144]
at net.corda.node.utilities.JVMAgentRegistry.resolveAgentJar(JVMAgentRegistry.kt:46) ~[classes/:?]
at net.corda.node.internal.AbstractNode.initialiseJVMAgents(AbstractNode.kt:785) ~[classes/:?]
at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:199) ~[classes/:?]
at net.corda.node.internal.Node.start(Node.kt:335) ~[classes/:?]
at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:146) ~[classes/:?]
at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:120) [classes/:?]
at net.corda.node.Corda.main(Corda.kt:16) [classes/:?]
```
The problem with the previous implementation is that the transaction would be deserialized with the schema specified
in the serialized form, but the calculation of the id would involve re-serializing properties using a local serialization context
which might produce a different result.