Commit Graph

528 Commits

Author SHA1 Message Date
Michal Kit
377d980c99
Fixing filename typo (#3358) 2018-06-14 16:35:42 +01:00
Michal Kit
d97f4f58be
CORDA-1624 updating the DEV certificate with CRL distribution point (#3353)
* CORDA-1624 updating DEV certificates with CRL distribution points implying R3 owned endpoints

* Keeping old keys but updating certificates
2018-06-13 12:01:15 +01:00
Matthew Nesbit
4bf5d809a5
If the Artemis connectionTTL configuration is not set then some of the cleanup actions do not happen on client kill. This prevents durable messages being replayed (#3351)
and may prevent cleanup of other resources.

Undo spurious code
2018-06-13 10:32:29 +01:00
Michal Kit
02884e6c81
CORDA-1593 Extracting the whitelist logic and making it public (#3317)
* CORDA-1539 Extracting the whitelist logic and making it public

* Addressing review comments
2018-06-12 09:31:06 +01:00
Tudor Malene
c474c04503
ENT-1837 better error message on db failure (#3318) 2018-06-07 14:05:28 +01:00
Tudor Malene
5f2c3d175d
ENT-2036 Handle ClosedChannelException during SSL handshake (#3314) 2018-06-06 13:08:33 +01:00
Mike Hearn
468c0c7404
CORDA-1349: Docs: improve docs on permissioning, doorman and network map. (#3277)
* Docs: improve docs on permissioning, doorman and network map.

* Add a convenience serialization API for Java users, marked as
internal for now with a TODO to make it public after we start work on
Corda 4.0. Otherwise serializing arbitrary objects to AMQP is awkward.
2018-06-06 13:57:25 +02:00
Matthew Nesbit
d86ae5fc0b
I set the max retry time for AMQP at 5 minutes. This is just too long for any kind of sensible testing, so drop back to 1 minute. (#3294) 2018-06-05 10:30:35 +01:00
Thomas Schroeter
4bc9151d5d
Limit concurrency of the bootstrapper (#3271) 2018-06-01 11:55:46 +01:00
Shams Asari
7b09795795
CORDA-1383: Cleaned up the JSON format of WireTransaction and SignedTransaction (#3248)
In particular correctly outputs the custom state and command objects in the txs. Also fixed up deserialisation back into the transaction objects.
2018-05-30 16:37:41 +01:00
szymonsztuka
ed70fea3a7
CORDA-1548 Hibernate session not flushed before handing over raw JDBC session to user code (e.g. coin selection) (#3266)
* Hibernate session flushed before handing over raw JDBC session to user code + test - inserting and selecting cash in the same transaction
* Additional two tests copied from Enterprise repo
2018-05-30 16:19:06 +01:00
Matthew Nesbit
202bd6603b
Simplify the toString, so that printing ConnectionChange events into the log output only gives a summary and reduce logging. (#3247) 2018-05-29 18:18:31 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
Rick Parker
59fdb3df67
CORDA-1475 CORDA-1465 Allow flows to retry from last checkpoint (#3204) 2018-05-25 13:26:00 +01:00
Matthew Nesbit
7ff008d4e3
Prevent bridge reconnection attempts on targets that present invalid/misconfigured/different certificates to protect nodes from dead identities. (#3225) 2018-05-24 16:53:09 +01:00
Michele Sollecito
61fedb5fd2
[CORDA-1528]: Node configuration not containing property "rpcSettings.address" fails with error "No configuration setting found for key 'address'" (fix). (#3229) 2018-05-24 13:20:04 +01:00
Shams Asari
3136e973a7
CORDA-1511: Kryo only used for node checkpoints and so moved out of serialization module and into node (#3228) 2018-05-24 12:18:07 +01:00
Katelyn Baker
cba83aca13
Move RxNotification serializer into the serialization package (#3214) 2018-05-22 15:17:18 +01:00
Michele Sollecito
48b126321b
Reverting API breaking change in PermissionException. (#3209) 2018-05-22 09:48:29 +01:00
Michele Sollecito
5de2c2aa4b
[CORDA-1264}: Complete obfuscation of exceptions to client side. (#3155) 2018-05-21 13:34:37 +01:00
Tudor Malene
455221629b
CORDA-1343 Make the RPCClient ssl constructors public. Clean up broke… (#3039)
* CORDA-1343 Make the RPCClient ssl constructors public. Clean up broker authentication logic

* CORDA-1343 small fix

* CORDA-1343 cleanup

* CORDA-1343 fixed api changes script

* CORDA-1343 fixed merge

* CORDA-1343 removed unused property

* CORDA-1343 add separate p2p and rpc node users

* CORDA-1343 remove test configuration

* CORDA-1343 fix tests

* CORDA-1343 address core review comments

* CORDA-1343 some documentation and adding createWithSsl method for a haAddressPool

* CORDA-1343 clean up the CordaRPCClient interface

* CORDA-1343 add internal shell test

* CORDA-1343 address code review comments

* CORDA-1343 split the internalShell user from the System Rpc user

* CORDA-1343 fix test

* CORDA-1343 Add warning when certificateChainCheckPolicies is being configured

* CORDA-1343 Address code review changes

* CORDA-1343 fix merge

* CORDA-1343 added test, docs, clarify comments

* CORDA-1343 clean up docs

* CORDA-1343 fix api

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge
2018-05-21 13:05:08 +03:00
Thomas Schroeter
acefe4261c Bootstrap HA and BFT notaries 2018-05-18 18:33:49 +01:00
Stanly Johnson
ae5bacb4b4 Network bootstrapper check for duplicate node names (#3182) 2018-05-18 10:31:24 +01:00
Shams Asari
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
Kat Baker
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
Kat Baker
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
Patrick Kuo
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
Chris Rankin
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
Katarzyna Streich
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
Chris Rankin
84d94d44ad
ENT-1463: Hide more AMQP ConcurrentHashMaps behind interfaces. (#3147) 2018-05-15 12:03:33 +01:00
Chris Rankin
4f9bbc8820
ENT-1463: Isolate more non-deterministic code from AMQP serialisation. (#3138) 2018-05-14 16:50:43 +01:00
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
Matthew Nesbit
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
Chris Rankin
a2de18b63c
ENT1463: Turn ClassCarpenter and SerializerFactoryFactory into interfaces. (#3121) 2018-05-11 15:42:12 +01:00
Chris Rankin
36d13124d5
ENT-1463: Refactor serialisation slightly for determinisation. (#3110) 2018-05-10 12:42:01 +01:00
Chris Rankin
3f21c47f39
Remove lingering Kryo reference from AMQP. (#3107) 2018-05-09 20:20:43 +01:00
Chris Rankin
fe88e9907c
ENT-1463: Replace getStackTraceAsString() with Throwable.initCause(). (#3101) 2018-05-09 16:36:17 +01:00
szymonsztuka
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
Chris Rankin
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
Katelyn Baker
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
Matthew Nesbit
0494e45037
Remove debug logging left over from earlier AMQP development. (#2867) 2018-05-03 13:44:05 +01:00
Katelyn Baker
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
Katelyn Baker
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
Viktor Kolomeyko
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
Katelyn Baker
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
Michele Sollecito
5565b3e80d
[CORDA-1411]: Prevent MappedSchema caching from leaking memory. (#3042) 2018-05-01 19:32:29 +07:00
Shams Asari
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
Michal Kit
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
bpaunescu
c3e6b39e59
artemis upgrade to 2.5.0 (#3029) 2018-04-27 19:54:08 +01:00
Michele Sollecito
235df69efe
[CORDA-1379]: Allow soft trapping of unknown config keys. (#3011) 2018-04-27 15:33:13 +07:00
Joel Dudley
efa69ce959
Whitelists Triple. 2018-04-27 08:57:28 +01:00
Thomas Schroeter
2ff3939e2e
Add exponential backoff to P2P messaging retry (#2975) 2018-04-26 13:58:41 +01:00
Chris Rankin
8e507d0b88
CORDA-1263: Replace deprecated kotlin-stdlib-jre8 with kotlin-stdlib-jdk8. (#2992) 2018-04-24 14:03:41 +01:00
Shams Asari
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
bpaunescu
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
Shams Asari
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
Viktor Kolomeyko
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
Viktor Kolomeyko
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
bpaunescu
be083d6763 Added helper method for creating tcp transports from a list of host:port 2018-04-22 15:04:19 +01:00
Shams Asari
a684507553
Better cert path validation exception message for PartyAndCertificate.verify (#2976) 2018-04-18 17:27:03 +01:00
Shams Asari
60323cca15
CORDA-1312: Network bootstrapper copies any CorDapp jars into each nodes' cordapps dir (#2974) 2018-04-17 15:38:25 +01:00
Tudor Malene
9d2b7f0b7b
CORDA-1313 RPC whitelist TransactionVerificationException (#2965) 2018-04-16 13:29:36 +01:00
Christian Sailer
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
Katarzyna Streich
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
Shams Asari
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
Patrick Kuo
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
Patrick Kuo
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
Kat Baker
e6d352e446 Review comments 2018-04-12 12:09:17 +01:00
Kat Baker
03850dabc2 Review comments 2018-04-12 11:58:56 +01:00
Kat Baker
c783c431b1 Fix broken comment 2018-04-12 11:23:13 +01:00
Kat Baker
84914aa5c8 Remove commented out code 2018-04-12 11:18:39 +01:00
Katelyn Baker
f19bcea82f CORDA-1229 - Setter serialization fails with lists
Looks like the super / sub type inference of setter param vs
getter param is the wrong way around. Also, Setter Type should
be the generic type, not just the type

the property must be a supertype of the setter parameter

the getter must be a supertype of the setter parameter
2018-04-12 11:17:26 +01:00
Shams Asari
1b37cef822
Minor: use of ByteArray.inputStream() and introduced PublicKey.hash (#2931) 2018-04-05 17:18:27 +01:00
Michal Kit
c8b58a601f
Adding CRL support in the generated certificates. (#2932) 2018-04-05 16:39:41 +01:00
Shams Asari
53a0aae489
Introduced a few helper methods around InputStream.readBytes (#2928) 2018-04-05 14:27:42 +01:00
Michal Kit
71fa61020e
Adding a unit test for SignedNodeInfo verification (#2925) 2018-04-05 11:25:41 +01:00
Matthew Nesbit
0af42bda44
Fix a bug in the AMQP protocol wrapper code which gives incorrect reply address information on received packets. (#2914) 2018-04-04 11:23:09 +01:00
Michal Kit
2f1b8ff23e
Fixing SignedNodeInfoe security issue (#2908) 2018-04-03 15:49:06 +01:00
Michele Sollecito
0d1d7daedc
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2892) 2018-03-29 13:01:41 +01:00
Shams Asari
768dd32417
ENT-1663 - Inclusion of the cert path and root cert in the exception message when cert path validation fails. (#2890)
Also, added check to node startup that --initial-registration cannot occur in devMode
2018-03-28 15:18:50 +01:00
Katelyn Baker
6c9a39ae44
DOCS: Serialization roundtrip removes mutability explanation (#2888) 2018-03-28 09:40:21 +01:00
Katelyn Baker
e43b12c203
CORDA-1236 - Don't let Carpenter exceptions escape the serializer (#2852)
* CORDA-1236 - Don't let Carpenter exceptions escape the serializer

* Review comments

* Merge branch 'kat/bug/master/nestedCArpenterException' of https://github.com/corda/corda into kat/bug/master/nestedCArpenterException
2018-03-27 10:11:39 +01:00
Katelyn Baker
0f99efa768
CORDA-1213 - Explicitly disallow serialization of non static nested classes (#2824)
* CORDA-1213 - Explicitly disallow serialization of non static nested classes

WIP

* Review comments
2018-03-27 10:06:46 +01:00
Katelyn Baker
91cdcc6752
CORDA-1258 - Only register custom serializers once (#2862)
* CORDA-1258 - Only register custom serializers once

* Review comments

* Fix test
2018-03-26 19:09:03 +01:00
Katelyn Baker
c3031b182b
ENT-1665 - Update fast-classpath-scanner version to 2.12.3 (was 2.0.21) (#2877)
Problem manifests now that the classpath scanner is used by the
serialisation framework in factory initialization to locate pluggable
serializers. The actual thrown error is

    java.lang.RuntimeException: Unknown constant pool tag

Given this is a known issue and a fixed bug it makes sense to move the
version forward. Unfortunately at this time we cannot move beyond
2.12.3 as 2.12.4 and later versions (up to the latest 2.18.1) exhibit
some other error that needs investigating. Thus, move to the latest
version that is stable for our current set of use cases.

More information on the nature of the problem exhibited by moving beyond
2.12.3 can be found on the linked Jira (ENT-1665) as well as details on
reproducing the issue moving forward to 2.12.3 fixes.
2018-03-26 14:24:43 +01:00
Shams Asari
620ba1e8a2
Integration test for network parameter updates and improved logging (#2863) 2018-03-22 14:08:07 +00:00
bpaunescu
ac9cb59a6e
Fix RPC flaky test (#2849)
* fix rpc reconnect flaky test; remove obsolete rpcproxy log message

* rpc client proxy: replace lock with atomic variable

* rpc client proxy: removed volatile property

* RPCStabilityTests: used eventually() method to test async response

* RPCStabilityTests: remove unused import
2018-03-20 16:23:29 +00:00
Michal Kit
144632818c
Adding the X509CRL custom serializer. (#2844)
CORDA-1233

* Adding the X509CRL custom serializer.

* Addressing review comments
2018-03-20 15:42:25 +00:00
Tudor Malene
1a1cd94161
ENT-1564 - add additional uploader check to the HashConstraint (#2845) 2018-03-20 10:17:44 +00:00
igor nitto
8591ae2dc9
CordApps back in node classpath (#2843) [CORDA-1232] 2018-03-19 14:34:02 +00:00
Shams Asari
327d7d8acf
Added sign helper method to CertificateAndKeyPair for producing SignedDataWithCert objects (#2841) 2018-03-19 12:47:23 +00:00
Michal Kit
15e4449b38
Adding BigInteger serialization support (#2804)
* Adding BigInteger serialization support

* Addressing review comments
2018-03-15 10:11:01 +00:00
Michal Kit
27e45bc865
Adding public key verification to the X509Utilities.createCertificateSigningRequest (#2784) 2018-03-15 08:42:36 +00:00
igor nitto
2cff495553
Remove CordApps JARs from node classpath [CORDA-1135] (#2691) 2018-03-14 16:42:23 +00:00
Rick Parker
a24a2105b1
CORDA-1217 Replace Guava caches with Caffeine (#2818) 2018-03-14 16:07:31 +00:00
Michal Kit
1a6f7bc2c0
Whitelisting CRLReason class (#2803) 2018-03-14 08:05:00 +00:00
Shams Asari
9afcbb16a2
Unwrapping InvocationTargetException during config parsing (#2811) 2018-03-14 07:04:25 +00:00
Katelyn Baker
6fbc6a55cf
CORDA-1186 - Actually move annotation into core module, not just core namespace (#2789) 2018-03-12 11:47:58 +00:00
Andrius Dagys
a3bf4577f3 CORDA-696 - Ensure deterministic transaction id calculation for contra… (#2676)
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.
2018-03-09 14:39:31 +00:00
Katelyn Baker
198fb4f264
CORDA-1192 - Quieten message when reflecting on a builtin Kotlin type (#2767)
* CORDA-1192 - Quieten message when reflecting on a builtin Kotlin type

* review comments
2018-03-08 23:07:41 +00:00