Commit Graph

657 Commits

Author SHA1 Message Date
acefe4261c Bootstrap HA and BFT notaries 2018-05-18 18:33:49 +01:00
ae5bacb4b4 Network bootstrapper check for duplicate node names (#3182) 2018-05-18 10:31:24 +01:00
3cdd908714 Moved the serialisation logic in nodeapi.internal.serialization into its own module: serialization (#3179)
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.
2018-05-17 16:18:07 +01:00
0c3a30edc8 Corda-847 - Remove Kryo for RPC
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
2018-05-17 12:55:45 +01:00
f850daa582 CORDA-847 - AMQP RPC
* 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
2018-05-17 12:53:38 +01:00
0b76a12637 CORDA-864 Wire up max message size (#3057)
* 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
2018-05-17 09:59:30 +01:00
d0d07287e7 Remove duplicate Netty classes from Node. (#3142)
* Remove duplicate Netty classes from Node.
* Force all Netty modules to our given version.
2018-05-15 12:35:00 +01:00
24fa695ca0 CORDA-866: Implement removal of stale nodes from network - backport (#3128)
* 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
2018-05-15 12:10:04 +01:00
84d94d44ad ENT-1463: Hide more AMQP ConcurrentHashMaps behind interfaces. (#3147) 2018-05-15 12:03:33 +01:00
4f9bbc8820 ENT-1463: Isolate more non-deterministic code from AMQP serialisation. (#3138) 2018-05-14 16:50:43 +01:00
d027b5b8f2 [CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
3c005789c0 ENT-1850: Improve reporting of connection problems (#3124)
* Add nicer logging for SSL handshake problems

* Just in case let people see the horrid netty exception traces at trace level
2018-05-14 09:14:09 +01:00
a2de18b63c ENT1463: Turn ClassCarpenter and SerializerFactoryFactory into interfaces. (#3121) 2018-05-11 15:42:12 +01:00
36d13124d5 ENT-1463: Refactor serialisation slightly for determinisation. (#3110) 2018-05-10 12:42:01 +01:00
3f21c47f39 Remove lingering Kryo reference from AMQP. (#3107) 2018-05-09 20:20:43 +01:00
fe88e9907c ENT-1463: Replace getStackTraceAsString() with Throwable.initCause(). (#3101) 2018-05-09 16:36:17 +01:00
bb95156262 ENT-1447 Database transaction optional ability to retry on nested SQLException. (#3046)
Database transaction can be set to retry failure due to any exception with a cause or a nested cause of SQLException type.
Rationale: By the default transaction is retried only for SQLException. It may happen that SQL Exception is wrapped by Hibernate exception, allow to retry such cases if requested  e.g. database.transaction(recoverableFailureTolerance = 3, recoverAnyNestedSQLException = true) { .... }
2018-05-09 15:45:31 +01:00
781b50642a ENT-1463: Prepare node-api for determination. (#3080)
* Prepare node-api for determination.
* Disentangle Kryo and AMQP classes.
* Add version properties for fast-classpath-scanner, proton-j and snappy.
* Remove String.jvm extension function.
* Refactor Cordapp reference out of AMQP serialisers' primary constructors.
2018-05-09 13:37:04 +01:00
a61aa5d645 CORDA-847 - Pass serialization context down serialization call stack (#3062)
* CORDA-847 - Pass serialization context down serialization call stack

Needed for later work on AMQP RPC where we need to set per-thread
elements on a context. Could use some magic thread local but I'd rather
it was explicit on the stack and thus easier to reason about.

Additionally, now we're passing this around we can make better use of it
in the future

* Test Fix

* Test fixes

* REVIEW COMMENTS / CODE FORMAT

* Fix build issues
2018-05-03 16:09:03 +01:00
0494e45037 Remove debug logging left over from earlier AMQP development. (#2867) 2018-05-03 13:44:05 +01:00
20570d72cf CORDA-1238 - Move blob inspector initial work into experimental (#3058)
* CORDA-1238 - Initial blob inspector tool commit

Note this is WIP and not ready for prime time but it's time it moved off
of a personal branch and into the main code base, especially if I'm
passing the serialization code onto someone else's shoulders

* CORDA-1238 - Move blob inspector into experimental

It was developed locally in tools (as it's a tool), but it's no
where near production ready, so lets just ship it in experimental
for now

* CORDA-1238 - Tidyup and bug fixes
2018-05-03 13:25:29 +01:00
0d3c7e7762 CORDA-847 - RPC Server lib refactoring (#3056)
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
2018-05-02 15:48:41 +01:00
884928c956 CORDA-1416: Upgrade version of Proton-J library (#3050)
* CORDA-1416: Upgrade version of Proton-J library

* CORDA-1416: Compilation fixes following Proton-J upgrade

Reflects:
https://issues.apache.org/jira/browse/PROTON-1712
and
https://issues.apache.org/jira/browse/PROTON-1672

* CORDA-1416: Add an integration test to prove that data saved by from previous version can be read.

* CORDA-1416: Add additional check validate serialized form.
2018-05-02 15:14:45 +01:00
0c680ae530 CORDA-1403 - Generics serialization issue (#3030)
When implementing a generic interface subtype check fails, need
to compare to the actual raw type
2018-05-01 16:27:54 +01:00
5565b3e80d [CORDA-1411]: Prevent MappedSchema caching from leaking memory. (#3042) 2018-05-01 19:32:29 +07:00
adef57f127 Including FlowException in the RPC exception whitelist (CORDA-1264) (#3037)
These exceptions are designed to be propagated in P2P and so makes sense to keep them visible if the recipient is an RPC user.
2018-05-01 07:48:50 +01:00
ab80df342a CORDA-1319 Adding CRL checking for nodes (#2987)
* Adding CRL support for nodes

* Addressing review comments
2018-04-30 09:26:26 +01:00
c3e6b39e59 artemis upgrade to 2.5.0 (#3029) 2018-04-27 19:54:08 +01:00
235df69efe [CORDA-1379]: Allow soft trapping of unknown config keys. (#3011) 2018-04-27 15:33:13 +07:00
efa69ce959 Whitelists Triple. 2018-04-27 08:57:28 +01:00
2ff3939e2e Add exponential backoff to P2P messaging retry (#2975) 2018-04-26 13:58:41 +01:00
8e507d0b88 CORDA-1263: Replace deprecated kotlin-stdlib-jre8 with kotlin-stdlib-jdk8. (#2992) 2018-04-24 14:03:41 +01:00
65525d74e7 CORDA-1325: Bootstrapper unable to whitelist two versions of the same contract simultaneously (#2980)
Also added unit tests
2018-04-24 10:51:24 +01:00
c4ceca3787 Merge pull request #2989 from corda/ENT-1775-PR759
ENT-1775: reworked client to handle failover in HA mode instead of Artemis
2018-04-23 17:15:00 +01:00
d3446e213c Introduced a few more extension methods to Path, which are clearer than the static methods in Files. (#2985)
Also migrated code away from the old File API.
2018-04-23 14:31:49 +01:00
3aaa176dd4 CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning (#2977)
* CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning

* CORDA-1355: Update change log

* CORDA-1355: Minor change to improve readability.

* CORDA-1355: Custom serializers documentation update to mention new system property.
2018-04-23 13:55:40 +01:00
bf4d8ba08c CORDA-1335: Scan attachment Jar only to speed-up the process. (#2982)
* 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.
2018-04-23 09:17:43 +01:00
be083d6763 Added helper method for creating tcp transports from a list of host:port 2018-04-22 15:04:19 +01:00
a684507553 Better cert path validation exception message for PartyAndCertificate.verify (#2976) 2018-04-18 17:27:03 +01:00
60323cca15 CORDA-1312: Network bootstrapper copies any CorDapp jars into each nodes' cordapps dir (#2974) 2018-04-17 15:38:25 +01:00
9d2b7f0b7b CORDA-1313 RPC whitelist TransactionVerificationException (#2965) 2018-04-16 13:29:36 +01:00
d8bf1019b6 CORDA-1336: Turn off direct delivery in Artemis via config (#2961)
* CORDA-1336: Turn off direct delivery in Artemis via config - this can
deadlock when the server gets busy and switches back and forth between
direct and async delivery if it can't keep up.

* CORDA-1336: put in a comment explaining the config setting.
2018-04-13 16:17:24 +01:00
91c52af5ac ENT-1584: Subscribe to private network maps using UUIDs (#2922)
Client private network map implementation

Add private network maps UUIDs to config as extraNetworkMapKeys. Adjust NetworkMapServer implementation accordingly.
Change NetworkMapUpdaterTest to use NetworkMapServer instead of mock
2018-04-13 10:52:45 +01:00
02913b284e CORDA-1312: Removed the need to have whitelist.txt for updating the contracts whitelist using the bootstrapper. (#2954)
Instead the current whitelist is read in from the existing network parameters file.
2018-04-12 17:03:06 +01:00
80c075b19e Merge pull request #2958 from corda/pat/ent-1323-cherrypick
ENT-1323 Network map service to check all identities in submitted node info
2018-04-12 14:04:47 +01:00
b5f304a104 ENT-1323 Network map service to check all identities in submitted node info (#499)
* 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)
2018-04-12 13:11:30 +01:00
e6d352e446 Review comments 2018-04-12 12:09:17 +01:00
03850dabc2 Review comments 2018-04-12 11:58:56 +01:00
c783c431b1 Fix broken comment 2018-04-12 11:23:13 +01:00
84914aa5c8 Remove commented out code 2018-04-12 11:18:39 +01:00