13427 Commits

Author SHA1 Message Date
Shams Asari
2c9a942e1a
CORDA-2088: Simplified the TestCordapp public API (#4064)
The entry point to the API has been simplified to just requireing a list of packages to scan, with sensible defaults provided for the metadata. Because of the wither methods, having parameters for the metadata (with default values) seems unnecessary. Also the ability to scan just individual classes has been made internal, as it seems unlikely app developers would need that level of control when testing their apps.

TestCordappImpl is a data class and thus acts as a natural key for the Jar caching, where previously the key was the package names. This fixes an issue where it was not possible to create two CorDapp Jars of the same package but different metadata.
2018-10-15 10:11:18 +01:00
szymonsztuka
b769ad80bd
CORDA-195 When collecting JAR Signatures allow META-INF/*.EC block signature to follow jarsinger tool capabilities (#4065)
jarsigner can produce META-INF/*.EC block signature for EC algorithm (https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jarsigner.html) even if this is contrary to JAR File spec (https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html). Allow block signature be also in *.EC file.
2018-10-12 16:54:39 +01:00
Andrius Dagys
ff7496ed20 Minor: replace branch name with commit hash for caffeine dependency.
This fixes the issue where Intellij loops for ages to try and resolve it from the artifactory.
2018-10-12 15:13:19 +01:00
Thomas Schroeter
70e24b79fb
Thomas/ent 2510 single column index (#1431) 2018-10-12 15:11:10 +01:00
Andrius Dagys
53473aedba A first iteration benchmark tool for consensus protocols. It lets you generate load
at a specified rate and transaction size.
2018-10-12 14:25:36 +01:00
Viktor Kolomeyko
ad981c7f13
ENT-2569: Integration test to simulate FlowWorker restart. (#1463)
* ENT-2569: Integration test to simulate Rpc/FlowWorker restart.

Initial analysis shows that 15-25 MB cannot be accounted for after RpcWorker restart.
Please see below for stats sample.
I will need to run memory profiler to understand where the memory is going.

Sample 1:
```
Memory stats @Very beginning - Used memory: 66,167 KB, Total memory: 1,158,144 KB, Max memory: 7,414,784 KB
Memory stats @Between restarts - Used memory: 214,952 KB, Total memory: 3,228,160 KB, Max memory: 7,414,784 KB
Memory stats @Very end - Used memory: 231,285 KB, Total memory: 3,226,112 KB, Max memory: 7,414,784 KB
```

Sample 2:
```
Memory stats @Very beginning - Used memory: 65,649 KB, Total memory: 1,125,376 KB, Max memory: 7,414,784 KB
Memory stats @Between restarts - Used memory: 202,542 KB, Total memory: 3,390,976 KB, Max memory: 7,414,784 KB
Memory stats @Very end - Used memory: 217,969 KB, Total memory: 3,387,392 KB, Max memory: 7,414,784 KB
```

* ENT-2569: Repair FlowWorkerTest and make it use signed network parameters.

* ENT-2569: Take flow worker up and down multiple times.

* ENT-2569: Add memory consumption stats.

Sample output for 10 iterations (1 warm-up and 9 subsequent):
```
Memory stats @Very beginning - Used memory: 126,495 KB, Total memory: 1,599,488 KB, Max memory: 7,416,832 KB
Memory stats @After warm-up round - Used memory: 172,411 KB, Total memory: 2,096,128 KB, Max memory: 7,416,832 KB
Memory stats @Testing done - Used memory: 196,912 KB, Total memory: 2,213,376 KB, Max memory: 7,416,832 KB
```
So during 9 iterations/restart cycles we have lost ~25MB.

* ENT-2569: Re-structure the test in preparation for 2nd legal name.

* ENT-2569: Mote test re-structure.

* ENT-2569: Introduce BankB into the test scenario.
2018-10-12 13:51:11 +01:00
bpaunescu
ba271f7adc
Bogdan ent 2295 SNI (#1435)
* ENT-2295: added SNI support to bridge

* ENT-2295: removed unused method args, adde new line

* ENT-2295: fix checking for existing bridges

* ENT-2295: fix AMQPBridgeTest(included source x500 name in messages)

* ENT-2295: fix ProtonWrapperTests (added source id and only check for SNI if bridge is shared)

* ENT-2295: fixed issue with artemis round robin not working when autogrouping was on

* ENT-2295: adapt to use openSSL, added SNI tests

* ENT-2295: server side openSSL now uses SniHandler magic

* ENT-2295: service queues are not exclusive

* ENT-2295: remove check for nodes sharing artemis when resolving targets

* ENT-2516 SNI - Log the requested server name (if any) in the AMQPServer (#1454)

* WIP

* log server name in ssl handshake

* big fix

* handle nullable sslParameters

* ENT-2295: address PR comments

* ENT-2295: remove unused imports

* ENT-2295: fix warnings

* ENT-2295: address PR comments

* ENT-2295: added node to node intergration tests, added openssl dep to bridge capsule

* ENT-2295: message group id is unique for service queues

* ENT-2295: address PR comment
2018-10-12 12:24:54 +01:00
Shams Asari
aced03df54
CORDA-1274: Migrated usage of FastClasspathScanner to ClassGraph (#4060)
FastClasspathScanner was renamed to ClassGraph for the version 4 release
2018-10-11 19:50:26 +01:00
Andrius Dagys
8c41ae208d CORDA-535: Remove BFT-Smart related migration parts 2018-10-11 17:54:00 +01:00
Anthony Keenan
e3685f5e81
Make blobinspector not log to console by default (#4059) 2018-10-11 18:01:54 +02:00
szymonsztuka
89886ce194
Restore separate enterprise implementation of cash selection for SQL server (#1421)
Create Enterprise version of CashSelectionSQLServerImpl and copy the content of CashSelectionSQLServerImpl as of 0c8c914 commit (with relevancy_status added and no copyrights).
The commit a28767343222ab5b7afdb1b546f6204fcaa69103 (OS--> ENT merge) replaced the original enterprise code an community independent version (they had filename in common only). To avoid this clash the original enterprise implementation will be now in EnterpriseCashSelectionSQLServerImpl (and is the default one for ServiceLoader) and  CashSelectionSQLServerImpl remains an empty placeholder in Enterprise.
2018-10-11 15:04:48 +01:00
Rick Parker
78907bd6dc
ENT-2367 Overnight benchmark enhancements (#1470) 2018-10-11 13:58:44 +01:00
Chris Rankin
825c544cac
ENT-1906: Modify the DJVM to wrap Java primitive types. (#4035)
* WIP - sandbox classloading
* Fix handling of Appendable in the sandbox.
* WIP - Load wrapped Java types into SandboxClassLoader.
* Add explicit toDJVM() invocation after invoking Object.toString().
* Add simple ThreadLocal to the sandbox to complete AbstractStringBuilder.
* Add support for Enum types inside the sandbox.
* Simplify type conversions into and out of the sandbox.
* Small refactors and comments to tidy up code.
* Fix Enum support to include EnumSet and EnumMap.
* Fix use of "$" in whitelist regexps.
* Add extra methods (i.e. bridges) to stitched interfaces.
* Rename ToDJVMStringWrapper to StringReturnTypeWrapper.
* Support lambdas within the sandbox.
* Fix mapping of java.lang.System into the sandbox.
* Don't remap exception classes that we catch into sandbox classes.
* Remove unnecessary "bootstrap" classes from the DJVM jar.
* Ensure that Character.UnicodeScript is available inside the sandbox.
* Tweak sandboxed implementations of System and Runtime.
* Ensure that Character.UnicodeScript is loaded correctly as Enum type.
* Disallow invoking methods of ClassLoader inside the sandbox.
* Apply updates after review.
* More review fixes.
2018-10-11 13:48:32 +01:00
Viktor Kolomeyko
0e68f26c0f
ENT-2569: Clean-up content of registeredShutdowns. (#4048)
Please see comment for more info.
2018-10-10 17:52:00 +01:00
Andrius Dagys
9b5b4b62b1
Merge pull request #1473 from corda/andrius/merge-10-10
Andrius/merge 10 10
2018-10-10 17:35:16 +01:00
Andrius Dagys
b8b2cc772d CORDA-535: Remove the old mechanism for loading custom notary service implementations.
All notary service implementations are now assumed to be loaded from CorDapps.
2018-10-10 17:16:57 +01:00
Andrius Dagys
504cefc6f6 CORDA-535: Move MySQL notary into a separate module 2018-10-10 16:07:16 +01:00
Anthony Keenan
09c1e6c079
Align ByteArrays.kt file with O/S to reduce merge conflicts (#1472) 2018-10-10 12:52:09 +02:00
Andrius Dagys
69ae8e5565 CORDA-535: Fix merge issues 2018-10-10 11:22:06 +01:00
Andrius Dagys
b7d59785e7 Merge remote-tracking branch 'open/master' into andrius/merge-10-10 2018-10-10 10:45:21 +01:00
Konstantinos Chalkias
554b1fa371
[CORDA-2084] EdDSA, SPHINCS-256 and RSA PKCS#1 are deterministic, no RNG required. (#4051) 2018-10-10 10:35:18 +01:00
Andrius Dagys
9ebeac1ad8
CORDA-535: Extract notary implementations into CorDapps (#3978)
* Move Raft and BFT notaries into separate modules

* Move schemas

* Fix tests & demos

* Modified logic for creating notary services:

Added a new field 'className' to the notary configuration. The node now
loads the specified implementation via reflection. The default className
value points to the simple notary implementation for backwards compatibility.
Relevant schemas are loaded in a similar fashion.

For backwards compatibility purposes the default SimpleNotaryService will
remain built-in to node, but its cordapp will be generated on startup – so
the loading of notary services is streamlined.

* Move test namedcache factory to test utils
2018-10-10 10:04:22 +01:00
Anthony Keenan
4b9dd514c2
Merge pull request #1469 from corda/anthonyk-os-merge-20181009
O/S Merge 9/10/2018
2018-10-10 11:00:25 +02:00
Anthony Keenan
862626f3a3 Fix another merge conflict 2018-10-09 21:22:24 +01:00
Viktor Kolomeyko
51ef38465c
ENT-2588: Add package net.corda.finance.schemas into the Finance CorDapp deployment. (#1468) 2018-10-09 20:01:39 +01:00
Anthony Keenan
8771784181 Another enterprise only instance 2018-10-09 17:39:34 +01:00
Anthony Keenan
b260f8a60a Another slight change needed here 2018-10-09 16:32:51 +01:00
Anthony Keenan
25ad5d411d Fix merge conflict 2018-10-09 16:28:49 +01:00
Anthony Keenan
a6fd2ba903 Merge remote-tracking branch 'open/master' into anthonyk-os-merge-20181009
# Conflicts:
#	core/src/main/kotlin/net/corda/core/utilities/ByteArrays.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/KryoCheckpointSerializer.kt
2018-10-09 16:15:59 +01:00
Dominic Fox
b6f2532ce6
Corda 1922 serialize states with calculated values (#3938)
* Introduce SerializeForCarpenter annotation

* Apply SerializableComputedProperty annotation to Cash.exitKeys, fix bugs

* info -> trace

* Remove annotation from FungibleAsset, as we do not know whether all implementing classes will provide the property as a calculated value

* Remove redundant import

* Explicit lambda params

* Restore explicit import for Enum valueOf

* Moving and rescoping

* More meaningful error message

* Add java test and documentation

* Fix accidentally broken unit test

* Ignore superclass annotation if property not calculated in implementing class

* Exclude calculated properties from Jackson serialisation

* Fix broken test
2018-10-09 14:54:31 +01:00
Anthony Keenan
9c8a1cd14a
CORDA-2028 - Fix use of required paramers/options on command line (#4040)
* Make required parameters work with --install-shell-extensions and make errors look a bit more errorey

* Make blobinspector required parameter work the way it used to

* Fix compilation Error
2018-10-09 15:49:24 +02:00
Christian Sailer
d8ebde07d4
New jitpacked version of quasar (#1452) 2018-10-09 11:34:29 +01:00
Konstantinos Chalkias
5d84640d1f
Add missing validation in the OpaqueBytesSubSequence.init (#4047) 2018-10-09 09:48:54 +01:00
Chris Rankin
efa990728e
ENT-2576: Fix building Enterprise Corda on Windows. (#1460) 2018-10-08 16:42:59 +01:00
Tommy Lillehagen
d1adb09ca9
NOTICK Python 3 compat, ENM version name, skip closed tests (#4046) 2018-10-08 15:26:44 +01:00
Tommy Lillehagen
b8e88232b4
NOTICK Create semantic version numbers (#4045) 2018-10-08 14:19:56 +01:00
josecoll
d987f18871
Gradle cache friendly Junit test fix. (#4044) 2018-10-08 13:56:02 +01:00
Dominic Fox
d9ea19855f
CORDA-2006: Simplify checkpoint serialization (#4042)
* CORDA-2006: Simplify checkpoint serialization

* Supply rule to KryoTest
2018-10-08 13:39:28 +01:00
Chris Rankin
c88d3d8c1b
CORDA-2030: Resolve build warnings about kotlin-stdlib-jre8 in unit tests too. (#4043) 2018-10-08 12:49:05 +01:00
Chris Rankin
5e0493d9ba
Merge pull request #1462 from corda/chrisr3-os-merge
Merge from Open Source up to 39434dcbe
2018-10-08 12:12:52 +01:00
Chris Rankin
4cb31f4c8b Merge commit '39434dcbecdd2cd656e40622530e84d02443b8e2' into chrisr3-os-merge 2018-10-08 10:42:55 +01:00
Patrick Kuo
48307e6844
make sure the doc saids TLS 1.2 whenever we mention it with AMQP1.0, to avoid confusion. (#1455)
* make sure the doc saids TLS 1.2 whenever we mention it with AMQP1.0, to avoid confussion.

* added missing changes
2018-10-08 09:48:05 +01:00
Shams Asari
39434dcbec
Assorted set of clean ups (#4039) 2018-10-05 18:05:10 +01:00
Konstantinos Chalkias
0621efe7c6
Do not remove entropyToKeyPair from DJVM (it is deterministic anyway and we might use it in tests) (#4036) 2018-10-05 14:11:56 +01:00
Konstantinos Chalkias
fa4c54a080
[CORDA-2063] Ensure signatures and BC operations always use newSecureRandom (#4020)
* special handling for Sphincs due a BC implementation issue

* delete all sign operations from DJVM and stub out BC's default RNG

* copy Crypto signing functions to deterministic.crypto.CryptoSignUtils as they are required for testing transaction signatures.
2018-10-05 12:01:16 +01:00
Rick Parker
06002af81f
ENT-2408 Jitpack version of Caffeine with 50% window size. (#1352)
(cherry picked from commit 722824d)
2018-10-05 11:20:10 +01:00
Chris Rankin
d75fd7bd8a
CORDA-2030: Resolve build warnings created by adding kotlin-stdlib-jre8 to node. (#4033) 2018-10-05 11:01:27 +01:00
Shams Asari
bffac331a3
Moved the PLATFORM_VERSION constant to core and added some missing usages (#4026) 2018-10-05 09:28:00 +01:00
Mike Hearn
962e111389 Make the reference states design doc render better and more consistently with the other design docs. 2018-10-04 18:33:32 +02:00
Shams Asari
85d2a85e85
Safe parsing of min platform version and target version from CorDapp MANIFEST files (#4031)
Also includes some cleanup
2018-10-04 16:00:07 +01:00