Commit Graph

729 Commits

Author SHA1 Message Date
Christian Sailer
687fa81894 ETO-39 Move core tests (#5255)
* Moved core.flows and core.contract tests

* move internal tests

* move node, schemas and serialization tests

* Move transactions tests

* Move test access helper into test package

* Move remaining tests, and create access helpers to test internals.

* Fix test dependencies.

* Delete some cruft that flagged up on the API checker

* Add readme explaing where tests need to go.

* fix typo
2019-07-09 10:09:21 +01:00
Dominic Fox
14a20654bd CORDA-2991 shorten poll intervals for node info file propagation (#5240)
* CORDA-2991 shorten poll intervals for node info file propagation

* Relax minimum poll time constraint

* Relax, not comment out, minimum poll time constraint

* Correct error message
2019-07-03 15:00:55 +01:00
Stefano Franz
88894bc592
add a shared memory port allocator to allow multiple processes to sha… (#5223)
* add a shared memory port allocator to allow multiple processes to share a single allocation pool

* remove dangerous reset function on port allocator

* set forkCount = 2 in node integration test

* only allow one build of a cordapp at any given time for Driver tests

* make all portallocation requests use same starting point

* globally set forks to 6

* tweak forking parameters to allow parallel builds

* tweak unit test parallelism

* 2 workers for integrationTest

* some more tweaks for parallel builds

* some more tweaks for parallel builds

* seems that 49K is not the start of ephemeral ports on all kernels

* tweak parallel settings

* try fix RPC shutdown test in parallel env

* add some logging for RPC shutdown test

* added some logging around PortAllocation tests - try figure out where they are getting stuck

* added some logging around PortAllocation tests - try figure out where they are getting stuck

* fix api-scanner tests

* minimize api changes

* revert to complying with existing API

* add the AtomicInteger for api compatibility reasons

* make sizing script executable

* address review comments pt1

* address review comments pt2

* fix compile errors after review comments

* return to using home dir as temp dir seemed to interact badly with gradle
2019-07-02 18:38:33 +00:00
fowlerrr
ffe328c604 CORDA-2720: Refactor NodeConfiguration out of NodeRegistrationHelper (#5181) 2019-06-27 16:56:03 +01:00
Stefan Iliev
d1e7850dd1 CORDA-2176 - test that logging is not broken. (#5224)
* Initial commit with a test that can detect a logger that isn't initialised with by lazy that gets called during startup.

* Test improvement. Test fix for api stability.

* Added explanatory comment for the test.

* Changes according to PR review. Added empty file check to make test more robust.
2019-06-25 14:35:39 +01:00
James Brown
d7b54ed1f6 ENT-3543 Update okhttp dependency (#5208) 2019-06-21 09:29:43 +01:00
Shams Asari
4e835d5483
CORDA-2333: Updated the majority of the dependencies that were out of date (#5235)
Some where not touched, including the crypto ones, libraries related to messaging and Kotlin.
2019-06-20 16:19:16 +01:00
Dominic Fox
f01f8a129e ENT-3444 create test-db module (#5093)
* ENT-3444 define RequiresDB annotation and junit5 extension

* Move to internal

* info to trace

* Limit exposure of gradle imports

* Enable annotation inheritance, and multiple SQL scripts per class or method

* Get the test context class globally for all groups

* usingRemoteDatabase flag
2019-06-18 10:57:20 +01:00
Shams Asari
df19b444dd
CORDA-2333: Reverting jersey and mockito as it currently causes issues with ENT (#5228) 2019-06-17 19:27:35 +01:00
Shams Asari
2152961d46
CORDA-2333: Dependency update pass for tests and demos (#5211) 2019-06-13 10:15:13 +01:00
Shams Asari
8480d49e7e
CORDA-2333: Bumped ClassGraph version to latest (#5214) 2019-06-12 13:27:51 +01:00
Rick Parker
0c0101948b
CORDA-2981 Disable slow consumers for RPC since it doesn't work. (#5194)
* CORDA-2981 Disable slow consumers for RPC since it doesn't work.
2019-06-05 11:47:38 +01:00
Tudor Malene
a4cd859282 Improve performance of the no-overlap check 2019-05-28 17:49:39 +02:00
Rick Parker
d6ac4e2393
CORDA-2838 Set Artemis memory config. (#5011)
* CORDA-2838 Set Artemis memory config.

* CORDA-2838 Cannot have page size larger than max size.

* CORDA-2838 Use real slow consumers.  Need to see if the old config settings can work with a global limit to avoid this.
2019-05-23 14:30:11 +01:00
Shams Asari
71c316ca5a
CORDA-2954: Upgrade to common-lang3 (#5152)
Utilised Fields.getAllFieldsList where we were doing the equivalent
2019-05-21 17:48:32 +01:00
josecoll
0263650a5f
Revert "Merge pull request #5145 from corda/jdk11-migration-gradle5-upgrade" (#5146)
This reverts commit f46377556c, reversing
changes made to ba675e73b9.
2019-05-20 16:16:49 +01:00
josecoll
a7966e6176 Fix attempt to access boot classpath from runtimeMXBean (in JDK9+) 2019-05-20 15:09:36 +01:00
josecoll
2595dacd7e Fix quasar path for run-time agent instrumentation. 2019-05-20 15:09:36 +01:00
josecoll
077a2f5af6 Remove usage of deprecated URLClassloader (re-coded without scanning and pattern matching on run-time classpath URLs) 2019-05-20 15:09:36 +01:00
josecoll
2f3900140c Move Java unit test into kotlin package to prevent ASM compilation/classloading error (REVISIT) 2019-05-20 15:08:27 +01:00
Chris Rankin
b9f7c1a08a CORDA-2893, ENT-3422: Tweak JUnit 5 configurations to keep vintage engine off compile classpaths. (#5138)
* Tweak JUnit 5 configurations to keep vintage engine off compile classpaths.

* Configure Gradle tests to use JUnit 5.
2019-05-20 11:57:56 +01:00
Dominic Fox
0b63157a4b ENT-3422 Add JUnit 5 dependencies to all projects (#5084)
* ENT-3422 Add JUnit 5 dependencies to all projects

* Remove explicit junit 4 imports where not needed

* Minor PR fixes

* Limit import scope
2019-05-15 16:40:12 +01:00
James Brown
ee3befcc6e ENT-3543 Update okhttp dependency (#5089) 2019-05-15 10:54:44 +01:00
Dimos Raptis
a468bee0ed [CORDA-2473] - Remove AMQP system property (#5112) 2019-05-14 13:22:22 +01:00
JamesHR3
b4e96778bf [CORDA-2517] Whitelist attachments signed by keys that already sign existing trusted attachments (#5068)
This allows a different signed version of the same CorDapp to be automatically trusted.

This reverts "[CORDA-2575] Allow users to whitelist attachments by public key config (#5035)"
2019-05-07 12:55:27 +01:00
Stefan Iliev
1802e48963 CORDA-2586 - explorer exception handling (#4957)
* Initial version of new(old) dialog that won't print a stacktrace for rpc exceptions.

* Decoupled CordaVersionProvider. Moved common files to common-logging to lower dependencies on the node explorer.

* Removed unused import and duplicate documentation comment.

* Moved error code rewrite policy in the new common/logging module according to PR review.

* Removed extra line.

* Updated log4j configurations with new package name where logging policies will be contained.

* Included common-logging module with cliutils.
2019-05-01 13:50:50 +01:00
Dan Newton
cdc29dd4ca CORDA-2477 - Improve Signature Constraints documentation
* CORDA-2477 Improve Signature Constraints documentation (#5041)

The Signature Constraint documentation in `api-contract-constraints`
was very limited and referred to the design doc for most information.
Information was extracted from the design doc and added to the main
documentation.

(cherry picked from commit cb85dd1e92)

* CORDA-2477 Add codesets so backported docs show properly
2019-05-01 11:15:50 +01:00
Dan Newton
cb85dd1e92 CORDA-2477 Improve Signature Constraints documentation (#5041)
The Signature Constraint documentation in `api-contract-constraints`
was very limited and referred to the design doc for most information.
Information was extracted from the design doc and added to the main
documentation.
2019-04-30 11:50:12 +01:00
JamesHR3
7a7c471ebf [CORDA-2575] Allow users to whitelist attachments by public key config (#5035) 2019-04-25 16:55:43 +01:00
Tudor Malene
21adcffd31 CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) (#5015)
(cherry picked from commit 6771386b4b)
2019-04-15 10:25:55 +01:00
Tudor Malene
6771386b4b CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) 2019-04-12 14:03:38 +01:00
Adel El-Beik
367c98ec7c ENT-3482: Move BC crypto service implementation to node api. (#5008)
* ENT-3482: Move BC crypto service implementation to node api.

* ENT-3482: Added missing unit test.
2019-04-12 11:35:12 +01:00
Stefan Iliev
e4615f7f47 CORDA-2586 explorer exception handling (#4957)
* Initial version of new(old) dialog that won't print a stacktrace for rpc exceptions.

* Decoupled CordaVersionProvider. Moved common files to common-logging to lower dependencies on the node explorer.

* Removed unused import and duplicate documentation comment.

* Moved error code rewrite policy in the new common/logging module according to PR review.

* Removed extra line.

* Updated log4j configurations with new package name where logging policies will be contained.

* Included common-logging module with cliutils.
2019-04-09 19:14:37 +00:00
Dominic Fox
c2ad64ccde CORDA-2802 use eventually to wait (#4932)
* CORDA-2802 use eventually to wait

* Catch Exception, not Throwable
2019-03-26 16:01:06 +00:00
Jonathan Locke
dc179d4ea1 ENT-3057: Log hibernate warns and errors in different log (#4889)
* ENT-3057: Log hibernate warns and errors in different log

If a hibernate error occurs (deadlock, for example) that would cause a flow to be sent to the hospital, hibernate logs the warnings and errors before we do. This results in duplication in the logs, and pollutes the log. To solve this, we create a new log appender named diagnostic-{node-name}.log and log any org.hibernate messages of warn and above to that file. This way, messages are not lost, which means that the information can be retrieved if need be.

* Corrected indentation of comment (changed tab to space)

* Updated node-administration document to mention diagnostic logging change

* Fixed integration test. It was breaking because it was fetching the first log file in the folder, assuming there would be only one. This assumption is now invalid because the diagnostic log file that was introduced. Two tests were found that used similar logic to find a log file to examine, hence both were corrected to look for log files beginning with "node"

* Updated documentation as per review comments.
2019-03-18 17:08:13 +00:00
Chris Rankin
1fc8e1d7ae CORDA-2759: Use GlobalTestPortAllocation for Node's integration tests. (#4899) 2019-03-18 14:48:13 +00:00
Chris Rankin
92308021bf CORDA-2629: Configure smoke-test nodes to have validating notaries. (#4881) 2019-03-12 18:32:07 +00:00
Chris Rankin
ea263b3e54 CORDA-2569: Add "flow kill <ID>" command to Corda's shell. (#4861)
* CORDA-2569: Add "flow kill <ID>" command to Corda's shell.

* Add testing and documentation for RPC killFlow operation.
2019-03-08 16:39:22 +00:00
Shams Asari
96b23eea6f
ENT-3266: Do not attempt to overrwite an existing CorDapp jar in tests (#1906) (#4858)
There's a bug with the ServiceLoader which leaks a file handle to the app jar on shutdown. This causes an issue if a mock node is restarted in Windows. To avoid the problem completely we no longer overwrite any existing jars, as the jar to be copied will be same anyway.

(cherry picked from commit 0038a86481)
2019-03-07 11:40:43 +00:00
Andrius Dagys
9d04eccc8a CORDA-2668 - TestCordapp – minor refactoring in jar building (#4805) 2019-02-22 18:26:40 +00:00
Andrius Dagys
b52c7a09a3 CORDA-2668 - TestCordapp – use Gradle tooling API for builds (#4794)
TestCordapp – disable daemon on internal gradle process

The TestCordappImpl runs gradle to build cordapp jars required for tests.
The started gradle process reuses a Gradle daemon that's potentially already
used for running the tests causing the JVM to die with SIGBUS.
2019-02-22 16:48:28 +00:00
JamesHR3
efabab35c4 [CORDA-2636] Ensure states created with contract upgrades can be migrated (#4786)
* Ensure states created with contract upgrades can be migrated

* Remove line from api-current.txt representing an uncallable constructor
2019-02-19 09:48:39 +00:00
Tudor Malene
3d362e066c CORDA-2595 - check that all attachments are trusted before loading (#4763)
CORDA-2595 - Fix test and api.

CORDA-2595 add test

CORDA-2595 fix tests

CORDA-2595 fix test and address code review comments

CORDA-2595 address code review comments
2019-02-15 17:33:14 +00:00
Roger Willis
060bbb0a9d CORDA-2563: Assign external IDs when creating new keys (#4727)
* First pass at fixing 2563.

* In memory KMS now maps keys to IDs.

* CreateDatabaseAndMockServices now creates a persistent key management service and a can take a persistent identity service, so now the external id mapping works for mock services.

* * Created a helper for mock services which allows the creation of a mock services with persistent identity management service key management service and vault.
* MockNode now uses persistent key management service - not sure why it didn't do before?

* * MockNode now uses BasicHSMKeyManagementService
* Updated api-current file

* Little fix required after rebase to master.

* Fixed broken test.

* Added informative error messages to UnsupportedOperationExceptions thrown by E2ETestKeyManagementService.

* Removed redundant private constructor for mock services from api-current.txt.

* Addressed Rick's comments.
2019-02-14 15:18:37 +00:00
JamesHR3
4e2a295eb6
[CORDA-2487] Provide a migration for vault states when moving from V3 to V4.1 (#4699)
* Create a new custom migration for populating the state_party table and the relevancy_status column within the vault_states table when migrating from V3 to V4.

* Add a corresponding unit test suite.

* Small refactorings to expose data required by the migration: the isRelevant function in the NodeVaultService, and the node's legal name from the configuration.
2019-02-12 15:22:15 +00:00
Mike Hearn
02645f7b9e Rework package namespace ownership check to verify every package of every class file.
Previous implementation was in LedgerTransaction and focused only on contract classes,
but every package matters.

Also fixes some exception types and does misc refactorings.
2019-02-11 17:10:50 +01:00
Mike Hearn
0a9f4c68ae Minor refactorings.
Take out a useless parameter from a method that was added to the public
API, document it. Add some comments explaining more about why we are
looking up attachment versions in WireTransaction.toLedgerTransaction.
2019-02-11 17:10:50 +01:00
Katarzyna Streich
f729453fee CORDA-2334 - Net Params non-downgrade verification in transaction resolution / building. (#4351)
* Add FetchParametersFlow

* No downgrade parameters in ResolveTransactionsFlow

Make sure that parameters in the transaction
graph are ordered (this is to prevent the downgrade attack, when the
malicious notary and participants sign transaction that shouldn't be
notarised otherwise). We ensure that by checking that epochs of network
parameters in the transaction chain are ordered.

* Addressed some minor items from RP review feedback.

* Refactoring following rebase from master.

* Address RP PR review comments (round 2)

* Addressed a couple of minor PR review points.

* Renaming of unit tests and cleanup.

* Changes discusses with RP to ensure Network Param checking is applied at txn verify time + resolve order checking gated on existence of tagged NPs in txn and associated minimum platform version.

* Do not fail on missing ServiceHub impl + return nothing if txn not NP tagged.

* Unify HistoricNetworkParametersStorage and
NetworkParametersStorageInternal

* SignedDataWithCert implements NamedByHash

* Cleanup

* Move parameters ordering check to signed transaction resolution

* Fixes after merge, address comments

* Address Andrius comments
2019-02-08 15:29:32 +00:00
Shams Asari
c667df9bec
Port over ENT changes (#4706)
Port of commit 9b55ad2680
2019-02-01 18:10:10 +00:00
Shams Asari
c39c61ecab
CORDA-2467: Moved non-contract things out of finance-contracts and into finance-workflows (#4700)
This includes all of the cash selection logic, JSON support using jackson and a bunch of utilities which are not relevant to contract verification. The exception to this are Interpolator which has been moved to the IRS demo, and PhysicalLocationStructures.kt which is now in explorer.
2019-02-01 17:31:12 +00:00
josecoll
099a747ebf
CORDA-2526 Allow for duplicate signed attachments in devMode (#4691)
* Allow for duplicate (contract class, version) signed attachments in devMode.

* Code clean-up.

* Fix compilation error in test code.

* Additional gating/warning and added Unit test for development mode behaviour.
2019-01-31 14:41:23 +00:00
Rick Parker
7dc7313fb7
ENT-3000 Start pooling classpath scanning and related fixes (#4664)
* Start pooling classpath scanning

Quickly patch synchronisation of attachment class loader cache.  Needs a revisit but more complicated due to DJVM.

Annotate away for DJVM

Take ClassGraph utils into their own file so we can exclude for DJVM

Clean up a little

* Daemonize the threads

* Seems to be some concurrency problems with use of ClassGraph.  Using a mutex for now to work around.
2019-01-30 10:35:20 +00:00
Katarzyna Streich
6efd54fce1
CORDA-2520: Add FetchParametersFlow (#4674)
* CORDA-2520: Add FetchParametersFlow

* Address comments, add test
2019-01-29 18:16:37 +00:00
Shams Asari
88e4b85537
CORDA-2521: Checkpoint verifier no longer cares about the CorDapp jar name (#4669)
The check on the CorDapp hash is sufficient.
2019-01-29 16:32:07 +00:00
Manos Batsis
165520f718 fixed #4648, minor change to support Gradle's Kotlin DSL (#4670) 2019-01-29 11:30:58 +00:00
Shams Asari
e20278fbfd
Made FlowCheckpointVersionNodeStartupCheckTest leaner (#4640)
* Removed `restart node successfully with suspended flow` as it duplicates `TraderDemoTest#Test restart node during flow works properly`
* Removed the need for a notary
2019-01-28 14:08:54 +00:00
Shams Asari
fc7428a40d
CORDA-2503: Added installCordaService to UnstartedMockNode to allow tests with custom test-only services (#4655) 2019-01-28 13:49:01 +00:00
Viktor Kolomeyko
0a039e9094 CORDA-2345: Fix Windows build (#4634) 2019-01-24 21:35:25 +00:00
Shams Asari
5bb5244e55
CORDA-2228: Exceptions emanating from ReceiveFinalityFlow are sent to the flow hospital (#4621) 2019-01-23 16:24:49 +00:00
josecoll
100a6fcb56
CORDA-2475 Adjust attachments query logic to return correct results (#4612)
* CORDA-2475 Adjust attachments query logic to return correct results sets for signed/unsigned jars.

* Updates following PR review feedback by RP.
2019-01-22 22:57:43 +00:00
Shams Asari
c6a7d14f4f
Reducing the size of the CorDapp jars used in tests (#4600)
The helper method enclosedCordapp is a replacement to scanning the current package (which pulls in a lot more into the jar than intended).
2019-01-21 13:54:26 +00:00
Dimos Raptis
22f960fb8c
Remove dependencies from classpath in SIMM valuation integ test (#4603) 2019-01-18 13:02:17 +00:00
Dimos Raptis
e46fdb547d
[CORDA-2349] - Enable methods synthesized by Kotlin in api scanning (#4595) 2019-01-17 10:03:46 +00:00
JamesHR3
6b149f8aad CORDA-2432 - Update documentation for filtering by state relevancy in vault queries (#4577)
* Update changelog with changes to vault queries

* Move choice of relevancy state to QueryCriteria

* Ensure relevancy default is correct for all query types

* Remove superfluous imports

* Update documentation for queries using state relevancy

* Fix merge damage

* Revert change to use RELEVANT as the default and update docs

* Revert missed instance of relevancy change

* Rewrite of upgrade notes for vault state query updates

* Address review comments
2019-01-16 19:53:49 +00:00
Michele Sollecito
05ffb3d101
CORDA-2403: Flagged API issues between 4.0 and 3.3. (#4541) 2019-01-15 14:27:29 +00:00
Tudor Malene
d1575b4031
Exclude more packages from quasar instrumentation. (#4563) 2019-01-14 16:58:04 +00:00
Shams Asari
24a7821dce
CORDA-2434: CordaRPCClient now only has c'tors rather a mix of c'tors and factory methods (#4569) 2019-01-14 16:07:56 +00:00
Shams Asari
1bbcb8722e
CORDA-2418: Fixed inability to use TestCordapp under gradle in Windows if referring to self cordapp (#4562)
The gradle process that runs the tests keeps an exclusive hold on built jars in Windows, which means if a test wants to get hold of the CorDapp, and it's requested from the same module, it will fail. Now instead of deleting the "libs" dir  we just use the latest created jar.
2019-01-14 11:33:52 +00:00
Dimos Raptis
5b34020e59 [CORDA-2390] - Add whitelists and custom serializers from cordapps to serialization … (#4551)
* Add whitelists and custom serializers from cordapps to serialization context

* Remove changes in TransactionBuilder, add caching

* Add whitelists and custom serializers from cordapps to serialization context

* Remove changes in TransactionBuilder, add caching

* Address comments

* Increase node memory for SIMM integration test

* Cache only serialization context

* Increase integ test timeout

* Fix API breakage

* Increase max heap size for web server integ test

* Move classloading utils from separate module to core.internal

* Adjust heap size for more integ tests

* Increase time window for IRS demo transactions

* Fix determinator

* Add parameter in core-deterministic

* Stub out class-loading method for DJVM
2019-01-13 20:15:05 +00:00
szymonsztuka
7a4b6b3e44
CORDA-2405 Update versions of whitelisted attachments (#4549)
The version of contract attachments that are whitelisted should be read from NetworkParameters.whitelistedContractImplementations.
It use the lattes network map from db with the highest epoch.
2019-01-13 11:38:19 +00:00
szymonsztuka
9b8fda0d6d
CORDA-2375 Ensure node has unique attachment contract classname/version from signed JARs (#4535)
Corda Node ensures a given contract class and version can be sourced from only one signed and trusted Attachment (JAR).
An attempt to import a signed JAR as a trusted uploader (or promote to be trusted) with a class and version already present in the other trusted Attachment will raise DuplicateContractClassException.

Minor fixes to Hibernate Attachment Query parser (original query to select attachment without signers would always return no attachments)
2019-01-10 14:13:00 +00:00
Andrius Dagys
fa025dedeb
ENT-2822: Move experimental raft and bft-smart notaries back into node, fix reference state support (#4509)
Move Raft and BFT-Smart notaries back into node to preserve backwards compatibility.

* Allow overriding full node config when using internal mock network parameters.

* Make BFT-Smart notary start up in prod mode as well

* Move raft & bftsmart notaries to net.corda.notary.experimental package

* Make sure Raft notary handles reference state edge cases correctly.

* Make sure BFT-Smart notary handles reference state edge cases correctly.

* Include notary schemas in node internal schemas

* Undo Raft notary table schema changes to maintain compatibility.
2019-01-09 15:52:42 +00:00
josecoll
4530a5e982
CORDA-2395 Add cordapp code signing dev key to production blacklist. (#4519)
* Add cordapp code signing dev key to production blacklist.

* Remove code used to generate the actual PK hash (it is now attached to the JIRA story)

* Remove wiki page reference.

* Remove the non redundant cash transfer.
2019-01-09 15:41:24 +00:00
Shams Asari
8e61d11a49
CORDA-2399: Samples using public TestCordapp API rather than internal one (#4521)
Also moved the contents of TestCordappUtils.kt to InternalTestUtils.kt to make it more obvious they're internal.
2019-01-08 11:55:23 +00:00
Shams Asari
6d2f8fee5f
CORDA-2345: Removed TestCordapp.scanPackage to allow in future different ways of finding CorDapps other can package scanning (#4508) 2019-01-08 09:50:45 +00:00
Tudor Malene
57a70fa1e8
Attempt to fix master (#4517)
* Attempt to fix master

* Attempt to fix master

* Attempt to fix master

* Attempt to fix master

* Ignore failing test

* Ignore failing test
2019-01-08 08:02:38 +00:00
Stefano Franz
119ed61a21 remove unused commercial paper samples 2019-01-04 17:58:43 +00:00
Stefano Franz
e98dbcc2af move back into test-utils 2019-01-04 17:58:43 +00:00
Tudor Malene
24d91c5f89
CORDA-2384 - Fix driver classpath (#4472)
* Fix driver classpath

* Fix tests

* Fix classloader bug.

* Fix tests

* Fix tests

* Fix api

* Disable failing irs test.

* Address code review comments

* Remove @Ignore from test

* Remove @Ignore from tests

* Address code review comments.

* Attempt to fix simm valuation test

* Attempt to fix simm valuation test

* Comment failing functionality.
2019-01-03 20:06:35 +00:00
Shams Asari
f590300cdf
CORDA-2345: Updated docs to use the new TestCordapp API, rather than the old scan cordapp packages (#4491)
Also made some improvements to the API, especially for Java users.
2019-01-03 17:57:28 +00:00
Shams Asari
2622c8fe51
CORDA-1942: Renamed NetworkParametersStorage to NetworkParametersService to match its public usage (#4487)
As a public API it's not a true storage - CorDapps can't add network parameters.
2019-01-03 08:52:39 +00:00
Tudor Malene
ee9251bd25
CORDA-2327 add attachments for missing dependencies (#4456)
* CORDA-2327 first draft - add attachments for missing dependencies

* CORDA-2327 draft - fix unit tests

* CORDA-2327 draft - some cleanup.

* CORDA-2327 fix test

* CORDA-2327 fix test

* CORDA-2327 fix test

* CORDA-2327 Address code review comments

* CORDA-2327 fix api

* Address code review comments

* CORDA-2327 Address code review comments

* CORDA-2327 Address code review comments

* Fix merge

* Address code review comments
2019-01-02 16:16:53 +00:00
Shams Asari
c205bd2a21
CORDA-1942: StartedMockNode.registerResponderFlow simplified (#4483)
The ResponderFlowFactory parameter is not used and so removed. Also, instead of returning a Future it returns an Observable of responder flows, to support multiple invocations. And finally renamed to registerInitiatedFlow to stick with the existing naming strategy.
2019-01-02 12:49:29 +00:00
Shams Asari
9a484998bb No longer using deprecated MockNetwork c'tor (#4481) 2019-01-02 09:51:51 +00:00
Shams Asari
b4c3fa1948
Fixed incorrect attachment loading integration test (#4453)
* Fixed incorrect attachment loading integration test

`AttachmentLoadingTests.test that attachments retrieved over the network are not used for code` was a false-positive - it was incorrect on multiple levels. Fixing it required updating the finance:isolated CorDapp, at which point it was given the new MANIFEST metadata for V4, and moved out of the net.corda.finance namespace to avoid package sealing issues.

The new test exposed a bug in the LedgerTransaction verification logic. This was cleaned up as it was too easy to verify on the wrong instance.
2018-12-31 15:02:11 +00:00
Andrius Dagys
33960070df Minor: make mock configs regular classes 2018-12-28 12:23:58 +00:00
Anthony Keenan
af75a05502
Fix irs-demo dependency issues (#4438)
* Fix irs-demo dependency issues

* Fixed a problem with the IRS demo test JAR.

* Fixed deployNodes problem and log4j info statement.
2018-12-20 12:31:16 +00:00
Shams Asari
830959c9f7
CORDA-2345: Simplified TestCordapp to make it inline with the recent CorDapp versioning changes (#4434)
TestCordapp has now two implementations to clearly separate the two use cases it has in the Corda repo:

* TestCordappImpl which implements the revised public API of TestCordapp; namely that a TestCordapp instance references a real CorDapp jar on the classpath. This is either an external dependency jar in which case it’s taken as is and given to the node, or it’s a local gradle project in which case it’s compiled using the gradle “jar” task to generate the CorDapp jar. This approach means the jar has all the original CorDapp versioning information, which is important that it’s correct when testing. To this end, TestCordapp only needs to expose the ability to specify the app’s config. All the remaining properties have moved to CustomCordapp.

* CustomCordapp for creating arbitrary custom CorDapps, including specifying the jar’s MANIFEST values. This is internal API and only used for testing the platform. Technically this shouldn’t implement TestCordapp but does so to reduce the complexity of the driver and mock network.
2018-12-20 09:49:58 +00:00
Rick Parker
a4037b374d
ENT-2848 More contract attachment caching to avoid database queries slowing the node down (#4433) 2018-12-19 17:53:48 +00:00
Rick Parker
20e5bbf56f
ENT-2848 Add caching to contract attachment versions (#4410)
* Refactor into attachment service

Fix up mock service

First caching version, but with no invalidation currently

Set cache size

Fix up after rebase

Cache invalidation

Formatting tidy up

Sort out some nullability

Add kdocs.

Unit tests

More unit tests

Fix TODO

Unit test fixes

Unit test fixes

Fixed concurrent invalidating transaction support.

* Correct some transaction concurrency bug, including unit test.

* Added some unit tests for the method I added to persistence.

* Remove some blank lines

* Review feedback

* Fix imports
2018-12-17 15:14:14 +00:00
Shams Asari
1a065ef13d
CORDA-1942: Moved minimumPlatformVersion and targetPlatformVersion to Cordapp (#4416)
Otherwise ContractAndWorkflow ends up having these two duplicated three times.
2018-12-14 15:48:01 +00:00
Michele Sollecito
f2b6f96486
Fixed an issue with the port allocation. (#4418) 2018-12-14 13:18:01 +00:00
josecoll
9cdda3bd77
CORDA-2149 CorDapp Contract and Workflow version identifiers (#4363)
* Implementation of Contract and Workflow attribute identifiers.

* Fixes following rebase from master.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Added missing constants.

* Further clean-up.

* Updated documentation.

* Added changelog entry.

* Updated all samples (using new Gradle Plugin 4.0.37 functionality)

* Temporarily resolve gradle plugins from latest published snapshot.

* Temporarily resolve gradle plugins from latest published snapshot.

* Updates following feedback from PR review.

* Move constants into CordappInfo companion object.

* Contract and Workflow attribute `version` to `versionId` (as version is a reserved gradle variable)

* Clarified warning message on incorrect version identifier.

* Align version identifier processing logic with gradle cordapp plugin.

* Updated comment.

* Minor fixes following rebase from master.

* Fixed broken unit test.

* Improved exception reporting.

* Update to use 4.0.37 of Gradle Plugins.

* Added support for combined Contract and Workflow CorDapp info.

* Updated following discussions with Shams + cleanup.

* Updated following Shams PR review.

* Minor API improvements.

* Added missing cordapp info causing deployNodes to fail.
2018-12-14 09:39:23 +00:00
Rick Parker
b70740cf2e
ENT-2785 Create clearer separation between RPC and P2P classes to make it easier to adjust logging levels independently. (P2P remained as is, some internal node RPC classes moved to existing node RPC package from generic messaging package, which is now just for P2P). (#4401) 2018-12-12 17:36:44 +00:00
szymonsztuka
4b14c47319
CORDA-2134 - re-enabling ignored tests due to signature constrains non-downgrade rule (#4398)
1) TwoPartyTradeFlowTests - restructured - saving transaction just after creating a state, as it's needed for the next TransactionState to be verified (for non-downgrade rule), enable more tests which were set as @Ignored, left 3 TODOs as 2 tests were slightly modified, need further investigation
2) MockService method loadContractAttachment always returns a dummy Attachment which means it has a default Contract Class Version number 1 used for signature constraints non-downgrade rule.
3) TransactionSerializationTests - added a fake transaction which created fake stated used as input state and using real (not mocked one) implementation of loadContractAttachment
2018-12-12 15:10:08 +00:00
szymonsztuka
4799df9b80
CORDA-2150 signature constraints non-downgrade rule (#4262)
Contract class version non-downgrade rule is check by LedgerTransaction.verify().
TransactionBuilder.toWireTransaction(services: ServicesForResolution) selects attachments for the transaction which obey non downgrade rule.
New ServiceHub method loadAttachmentConstraint(stateRef: StateRef, forContractClassName: ContractClassName? = null) retrieves the attachment contract related to transaction output states of given contract class name.
2018-12-11 10:23:07 +00:00
Shams Asari
426db6c2f2
CORDA-2128: Moved reference to internal NotaryService class out of public API (#4389) 2018-12-10 12:05:51 +00:00
Viktor Kolomeyko
1f8582e99f
CORDA-2115: Straighten-up @Before invocation chain. (#4379)
Note: similar sort of changes already made in Ent codebase that fix execution against external DBs.
it will make sense to backport those change to OS to avoid merge conflicts in the future.
2018-12-07 11:24:44 +00:00
Shams Asari
991bbb9488
CORDA-2128: makeTestIdentityService no longer declared to return internal InMemoryIdentityService (#4333)
While technically a break in the test API, it has no practical implications as InMemoryIdentityService does not provide any extra APIs.
2018-12-07 10:13:17 +00:00
Shams Asari
92b5900bfa
CORDA-2128: Removed SerializationEnvironmentRule.run (#4334)
It exposed the internal SerializationEnvironment class. It previously documented that the SerializationEnvironmentRule JUnit rule should be used instead.
2018-12-06 15:14:38 +00:00
szymonsztuka
d2d13c1dfc
Attachment query with contract version, related to CORDA-2150, CORDA-2157 (#4357)
TransactionBuilder loads attachment using attachment storage instead of CordappLoader,
contract class version is now Integer (format and stored in db as Integer).
2018-12-06 11:28:53 +00:00
Viktor Kolomeyko
316dc4ab92
CORDA-2157: Fix Windows build (#4361)
Or else tests:
AttachmentsClassLoaderTests.Test valid overlapping contract jar
ConstraintsPropagationTests.Happy path for Hash to Signature Constraint migration
are failing.
2018-12-05 13:33:28 +00:00
Thomas Schroeter
85ca832099 Fix smoke tests after merge of notary whitelist verification (#4356)
* Include notary identity in network parameters in smoke test

* Notary is required for smoketesting

* Address comments

* Cleanup

* Using milliseconds in parent dir name to avoid conflict

* Address comments

* Fix creation of network params

* Address comments

* [WIP] Workaround to enable serialisation of network parameters

* Cleanup

* Address comments
2018-12-05 11:17:37 +00:00
josecoll
63e326aedb
CORDA-2157 - Hash to Signature constraints migration V2 (#4261)
* Hash to signature constraints migration #1

* After rebase from Attachments Classloader commit.

* Simplified implementation without CZ whitelisting and relaxing the no-overlap rule slightly.

* Further simplification.

* Detailed implementation.

* Use fully loaded Cash contract jar for hash to signature constraints migration test.
Additional debug logging.

* Minor cleanup.

* Address PR review feedback.

* Minor fix.

* Fixes following rebase from master.

* Implemented `calculateEntriesHashes` to improve classloader validation performance.

* Address minor PR review comments.

* Added integration tests and some minor fixes.

* Minor fixes following rebase from master.

* Updates and fixes following integration testing.

* Added changelog entry.

* Fix broken unit tests.

* Fix compilation errors in DriverDSL tests after rebase from master.

* Minor fix to test cordapp jar signing using explicit keystore.

* Run hash-to-signature constraints integration test out of process using a non-validating notary.

* Address PR review feedback: contract version from database + other minor changes.

* Address final PR review feedback: remove signed attachment field from attachmentWithContext

* Resolve conflicts following rebase from master.

* Fix failing junit test.

* Fix Kryo serialization error (forgot to write new `version` identifier field)

* Removed redundant query carried over from previous commit.

* Added documentation.

* Fix test case where explicit Hash Constraint input and Signature Constraint output explicitly configured.

* Addressing PR review comments from SA.

* AttachmentQueryCriteria API: added wither methods and Java Unit tests.

* Fixed compilation error caused by Unit tests being in wrong module.

* Added @CordaInternal to canBeTransitionedFrom function.

* Minimized AttachmentClassloader overlap duplicates checking.

* Moved JarSignatureTestUtils and ContractJarTestUtils to internal pending clean-up and documentation before public release.

* Minor fix following rebase from master.

* Removed redundant checkNotNull(networkParameters) checks now that these are always passed into the main (non-deprecated) constructor.

* Remove capitalization.
2018-12-04 18:45:29 +00:00
Andrius Dagys
838c99c6e4 CORDA-2115: Notary whitelist verification changes (#4293)
* CORDA-2115: Notary whitelist verification changes

- For regular and contract upgrade transactions: check that the notary is in the network parameter whitelist
- For notary change transactions: check the the new notary is in the network parameter whitelist. This enabled support for network merging: the old notary doesn't have to be in the current network's notary whitelist for re-pointing old states to another notary.

These checks are done during transaction construction/verification and also by the non-validating notary.

* Address comments

* Remove stale todo

* Use notary whitelist of current network parameters for platform versoin 3

* Cleanup test

* Move `getHistoricNotary` to `HistoricNetworkParameterStorage` in `core.internal`

* Require `newNotary` to be notary on the network map during notary change
2018-12-04 13:54:24 +00:00
Shams Asari
c03ad5abc3
CORDA-2254: Replaced JmxPolicy.httpPort with the original PortAllocation (#4345)
The httpPort parameter is fundamentally wrong as it gives the same monitoring port to each node!

Added JmxPolicy.defaultEnabled() to workaround the (incorrect) default false value of startJmxHttpServer.
2018-12-03 17:25:56 +00:00
Anthony Keenan
fab09c74d5
Node startup minor refactor (#4342)
* Slight refactor

* Move side effect out of method
2018-12-03 09:42:16 +00:00
Michele Sollecito
00865a9456 [CORDA-2282]: Ensure global test port allocation prevents port clashes (#4340)
* Enabled system property / env variable cascade for global test port allocation toggles.

* [CORDA-2282]: Ensure global test port allocation prevents port clashes. (fix)
2018-12-02 08:17:16 +00:00
Michele Sollecito
38438eadcd
Enabled system property / env variable cascade for global test port allocation toggles. (#4336) 2018-11-30 16:40:29 +00:00
Michele Sollecito
a9ff8a0818
[CORDA-2278]: KillFlow RPC operation is not releasing soft locks. (#4332)
* [CORDA-2278]: Seems to be working. Leaving the test to ensure no future regressions.

* [CORDA-2278]: Seems to be working. Leaving the test to ensure no future regressions.

* [CORDA-2278]: Seems to be working. Leaving the test to ensure no future regressions.

* [CORDA-2278]: Seems to be working. Leaving the test to ensure no future regressions.
2018-11-30 13:10:19 +00:00
Anthony Keenan
559932a581
[CORDA-2275] Fix DriverTests for windows (#4325)
* Make enforceSingleNodeIsRunning internal for test purposes.

* Test that the file is deleted or the file lock is released to be sure that the node has stopped.

* Additional test for enforceSingleNodeIsRunnin
2018-11-30 09:41:50 +00:00
Shams Asari
9100636b8c
CORDA-2269: Removed DriverParameters.initialiseSerialization as it's not needed (#4321) 2018-11-29 13:53:22 +00:00
Shams Asari
36fdb858c6 CORDA-2239: DriverDSL.startNode overload cleanup (#4252)
The overload that takes in a bunch of the node parameters with default values has been fixed to the V3 version. New node parameters since V3 now only exist in NodeParameters.

The reason for this is otherwise each new release of Corda that introduces new node parameters will force a new startNode overload to be added to DriverDSL to preserve backwards compatibility.

NodeParameters has been moved to its own file and logLevel is removed as it doesn't do anything.
2018-11-28 14:36:26 +00:00
Shams Asari
fd60c82134
CORDA-2254: JmxPolicy fixed so that it turns on monitoring via the jmxMonitoringHttpPort config (#4298)
* CORDA-2254: JmxPolicy fixed so that it turns on monitoring via the jmxMonitoringHttpPort config

To make the API easier to use, httpPort was introduced and both startJmxHttpServer and jmxHttpServerPortAllocation deprecated.
2018-11-28 09:50:29 +00:00
Michele Sollecito
dc1f5f0ccd
[CORDA-2257]: Enabling optional global test port allocation (#4310) 2018-11-27 16:40:30 +00:00
Katarzyna Streich
5d2ad46553
CORDA-2089 - network parameters tags - part (#4228)
* CORDA-2089 - network parameters tags - part

Data structures changes, storage and notarisation.

Tag transactions with network parameters hash that was in force when tx
was created. Add component group on all core transactions and resolved
parameters on full transactions. The hash should be always visible on
the filtered versions of transactions. Add
notarisation check that the parameters are current.
Implement network parameters storage on services for resolution.

This is only part of the work, next PR will include changes to
ResolveTransactionsFlow to make sure that parameters in the transaction
graph are ordered (this is to prevent the downgrade attack, when the
malicious notary and participants sign transaction that shouldn't be
notarised otherwise).
Probably on network services side we need the default parameters
endpoint for the
transactions that were created before this change - for now it's default
to the current ones.

* Make parameters storage agnostic to cert hierarchy

Test fixes

* Address most PR comments

* Fixes after rebase

* Fixes. Add epoch column to parameters storage.

* Address part of review comments

* Some more comments

* Hopefully fixing what I broke doing rebse

* Address Kostas comments

* Further fixes

* Save all parameters from updates to storage

* Fix integration test

* Address comments

* Fixes after rebase

* Fix test

* Fixes

* Add wrapper for filtering around parameters hash

* API stability fixes

* Add NetworkParametersStorageInternal

* Rename
2018-11-27 15:48:32 +00:00
Milen Dobrinov
88ee343e95 [CORDA-2189] Fix non deterministic manifest file timestamp (#4301) 2018-11-26 17:31:31 +00:00
Anthony Keenan
b7d04b1c6e
[CORDA-2235]: Add overrides for network parameters via command line and file (#4279)
* Temp commit

* Print the error message first by default, makes error output more natural.

* Polishing

* Further modifications after testing

* Documentation updates

* Couple of fixes after review

* Removing unnecessary tests

* Fix broken test

* Add interface to bootstrapper for testign

* Added unit tests

* Remove unused class

* Fix up bootstrapper unit tests and add a couple more

* Refactor the tests slightly

* Review comments

* Couple of minor tweaks
2018-11-26 17:11:05 +00:00
Dominic Fox
88fbb47f67
ENT-2320 state contract identification (#4285)
* Enforce state/contract agreement validation

* Fix some broken tests

* Ascertain targetVersion by inspecting the jar source of the ContractState

* Docs added and rebased against master

* contextLogger doesn't work here

* Java examples in docs

* Label IRSState with owning contract

* Fix rst formatting

* Add @BelongsToContract annotation to PortfolioState
2018-11-26 16:02:32 +00:00
Florian Friemel
b01f278eb3 Use custom overrides in DriverDSLImpl.startNodeRegistration (#4282) 2018-11-26 09:40:45 +00:00
szymonsztuka
4ebca4846c
CORDA-2150 Contract version no downgrade check - add test infrastructure - internalDriver can sign CorDapp JAR, disabled by default (#4289) 2018-11-23 18:17:50 +00:00
Thomas Schroeter
4e55694216 ENT-2356 NotaryServiceFlow backpressure (#4242) 2018-11-23 17:45:36 +00:00
Shams Asari
51adf9b678
LedgerTransaction no longer a data class to prevent more copy methods and fixed serialisation issue (CORDA-2231) (#4287)
LedgerTransaction is not meant to be created directly from client code, but it being a data class means we will expose new copy methods as new properties are added. The existing copy methods that we've exposed since V3 are deprecated, and equals and hashCode have been updated to be based just on id.

The primary c'tor has been clearly marked as the class' wire format, and so the internal stuff has been moved out. The references property cannot be made nullable and so DeprecatedConstructorForDeserialization is used instead.
2018-11-22 22:53:24 +00:00
Shams Asari
49d1cee6d4
Removed crypto service config (#4284) 2018-11-22 20:30:37 +00:00
Tudor Malene
4c8dabc288
ENT-2506 restore the attachment party signers (#4255)
* ENT-2506 restore the attachment party signers

* ENT-2506 restore the attachment party signers

* ENT-2506 restore the attachment party signers

* ENT-2675 Address code review changes.

* ENT-2675 Address code review changes.
2018-11-22 18:35:30 +00:00
szymonsztuka
014f71d36a
CORDA-2150 testing infrastructure for non downgrade contract version rule - TestDSL creates Jar with manifest file (#4274)
This is preliminary addition to test "Implementation-Version" entry from META-INF/MANIFEST.MF in TestDSL.kt. MockCordappProvider was creating JAR without manifest file. Added the manifest file with the obligatory (by JAR spec) attribute "Manifest-Version", other attributes can be added.
2018-11-21 18:36:30 +00:00
Thomas Schroeter
489e719b54
[CORDA-2243] Notary client should sign over NotarisationRequest serialised with object referencing turned off (#4264)
* Sign later to make sure the notary service constructs the same serialized bytes

* Add non validating notary tests

* Revert "Sign later to make sure the notary service constructs the same serialized bytes"

This reverts commit cefba5c350.

* Dereference SecureHashes before creating the notarisation request signature

* Update comment

* Address comments

* Undo accidental renaming
2018-11-21 16:50:32 +00:00
Viktor Kolomeyko
0fe7f513e2
ENT-2653: Introducing CommonCliConstants (#4265) 2018-11-20 17:15:48 +00:00
Oliver Knowles
373d99435c
CORDA-1965 Auto-accept network parameter changes (#4222)
* add auto acceptance of certain network parameters

* Remove incorrect nullification of newNetworkParameters object within NetworkMapUpdater

* Automatically update network parameters if update accepted and flag day occured

* Comment cleanup

* Add node configuration for auto accepting network parameter changes

* Remove hot swapping of network parameters

* Add docs for auto accept config flag

* Minor change to log line

* Remove unrelated fix that was corrected on master

* Minor name change within NetworkParameters class

* Minor doc rewording

* Fix typo in docs

* Address PR comments

* Add node config option to turn off network param auto-accept on a per param basis

* Address PR comments

* Fix failing Network Map update integration test
2018-11-20 09:50:42 +00:00
Michele Sollecito
2762c34ebe
[CORDA-1877]: Ensured Driver fails to start when Notary tried to bind an already bound port. (#4246) 2018-11-19 18:06:27 +00:00
Tudor Malene
2d043828a0
CORDA-2083 verify transaction in AttachmentsClassloader (#4188)
CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 add support for explicit upgrade transactions

CORDA-2083 cleanup

CORDA-2083 cleanup

CORDA-2083 More cleanup

CORDA-2083 More cleanup

CORDA-2083 Clean up tests

CORDA-2083 Address code review comments

CORDA-2083 Fix merge

CORDA-2083 Fix merge

CORDA-2083 Address code review comments

revert file

CORDA-2083 Fix test

CORDA-2083 Add test

CORDA-2083 cleanup

CORDA-2083 Fix test

CORDA-2083 Address code review comments.

CORDA-2083 Remove unused functions.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.
2018-11-19 13:42:12 +00:00
Stefano Franz
8f463c46a9 Add message to uses of require(...) (#4192) 2018-11-16 17:13:55 +00:00
Shams Asari
d138914640
Using epoch for the entries in the test CorDapp jars to remove that non-determinism (#4243) 2018-11-16 12:19:29 +00:00
Shams Asari
e8b6f5f2f2
CORDA-2005: FinalityFlow has been made into an inlined flow to resolve issue with FinalityHandler (#4050)
FinalityHandler is insecure in that it is open to receive any transaction from any party.

Any CorDapp targeting platform version 4 or above is required use the new c'tors which take in FlowSession objects to the counterpart flow. This flow must subcall ReceiveFinalityFlow to receive and record the finalised transaction.

Old CorDapps (with target platform version < 4) will continue to work as previously. However if there are no old CorDapps loaded then the node will disable FinalityHandler.
2018-11-14 14:16:22 +00:00
tudor.malene@gmail.com
1e27f0cbe0 Merge remote-tracking branch 'private/master' into feature/tudor_constraints
# Conflicts:
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
2018-11-14 11:50:19 +00:00
Michele Sollecito
8aaf120881
[CORDA-2224]: Removed field value from Validated. Renamed function orThrow() to value(). (#4231) 2018-11-14 11:19:38 +00:00
Michele Sollecito
dc62b20c5d
[CORDA-1879]: Ensure Node dies on unrecoverable errors. (#4213) 2018-11-12 15:56:04 +00:00
Roger Willis
4684259970
Expose JPA to flows (#4140)
* First pass
* Update test.
* Address review comments.
* Added docs and kdocs.
* Clean-up.
* Add extra test.
* Changes to docsite.
* Added try/catch block as recommended by Andras.
* Removed try catch block. It's not required as the checkpoint serialiser deals with this.
* Re-used existing DB session instead of creating a new session.
* Entity manager auto flushes.
* Added java friendly api.
* Addressed review comments.
2018-11-09 17:47:36 +00:00
Michele Sollecito
6c749889d0
[CORDA-1993]: Replace reflection-based NodeConfiguration parsing with versioned property-based parsing mechanism. (#4132) 2018-11-08 15:56:00 +00:00
Rick Parker
9277042db8
ENT-2695 Restore async logging (#4195)
* Replace error code generation technique with custom event re-writer.
Switch to RandomAccessFile appenders because they supposedly give higher throughput.

* Review feedback
2018-11-08 14:33:45 +00:00
Michal Kit
6f005605aa
CORDA-2187 & CORDA-2038: reverting maxTransactionSize <= maxMessageSize (#4166)
* CORDA-2187 reverting maxTransactionSize <= maxMessageSize

* Addressing review comments

* Increasing the maxTransactionSize for the Bootstrapper

* Updating the testNetworkParameters
2018-11-07 09:28:27 +00:00
szymonsztuka
9efb4121d5
Don't check signers of META-INF/LIST.INDEX file (workaround for CORDA-2116) (#4148)
Temporally treating META-INF/INDEX.LIST as unsignable entry because java.util.jar.JarVerifier doesn't load its signers. https://r3-cev.atlassian.net/browse/CORDA-2177 for further investigation.
2018-11-06 14:34:03 +00:00
Konstantinos Chalkias
106eb9df4a
[CORDA-2011] [CORDA-2057] CryptoService interface and BC HSM simulation (#4099) 2018-11-06 12:57:13 +00:00
josecoll
015a36dad6
CORDA 2131 - Extend Network Bootstrapper to enable registration of Java Package Namespaces. (#4116)
* Package Ownership Network Parameters: add register / unregister CLI options to network bootstrapper.

* Fix 2 failing unit tests.

* Fix failing unit tests.

* Added changelog, documentation and cosmetic changes.

* Fixed exception message.

* Address PR review feedback.

* Fix typo.

* Resolve conflicts.

* Rebase, resolve conflicts and remove PackageOwner class.

* Address latest PR review feedback.

* Fix incorrect imports.

* Fix broken JUnit

* Add support for key store passwords including delimiter characters.

* Updated and improved documentation.

* Minor doc update.

* Documentation changes following PR review feedback

* Replace Bank Of Corda with Example CorDapp.
Remove references to locally built network bootstrapper.
2018-11-06 09:28:55 +00:00
Christian Sailer
3260d9f2c4
CORDA-1489 Exposure of node internals in mock network (#4130)
* Introduce public subset of config to tweak config via mock net work without exposing internal node config.

* Removal of functions exposing (internal) NodeConfiguration from the public test API

* Code review fixes

* Blank lines removed

* Documented mock network API change in upgrade notes.

* Updated documentation and API doc.

* More documentation/API doc
2018-11-05 09:29:05 +00:00
Venelin Stoykov
094eb266a8 [CORDA-2174] Fix demo node startup (#4151)
- Make issuableCurrencies config optional

- Allow additionalCordapps to override cordappsForAllNodes

In driver DSL when passing additionalCordapps to startNode and
one of the CordApps is also in cordappsForAllNodes will lead to confilc.
This commit is resolving the conflict by using the CordApp provided
by additionalCordapps
2018-11-02 11:44:18 +00:00
Andrius Dagys
66116e8d20
ENT-1858: Notary cleanup (#4134)
* Migrated all non-BFT notary implementations to use async commits.

* Mock network: await for async operation completion. When calling runNetwork()
it keeps "pumping" messages between participants until no more messages are generated.
The problem comes in when a flow suspends on an async operation: the mock network
thinks the flow finished the work for the current step, and since no more messages
are generated, completes the runNetwork() function. The message that the flow
generates once it resumes after async operation completion never gets processed.
This change makes runNetwork() wait until all flow async operations finish,
and only then check whether no more messages can be transferred.
2018-11-01 19:03:43 +00:00
Michele Sollecito
6022cecca5
[CORDA-1763]: Add node CLI option for validating configuration. (#4121) 2018-10-29 13:33:43 +00:00
Tudor Malene
469ffe473f Fix merge
Fix merge

Fix merge
2018-10-25 10:44:10 +01:00
tudor.malene@gmail.com
29a8c153ed Merge branch 'master' into tudor_merge_os_24_10
# Conflicts:
#	core/src/main/kotlin/net/corda/core/internal/JarSignatureCollector.kt
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	core/src/test/kotlin/net/corda/core/contracts/PackageOwnershipVerificationTests.kt
#	core/src/test/kotlin/net/corda/core/internal/JarSignatureCollectorTest.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TestDSL.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TransactionDSLInterpreter.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-24 17:09:30 +01:00