Commit Graph

775 Commits

Author SHA1 Message Date
Chris Rankin
f15a22d828 Replace kotlinx-support-jdk8 with kotlin-stdlib-jre8. (#463)
* Replace kotlinx-support-jdk8 with kotlin-stdlib-jre8.
* Add kotlinVersion to constants.properties.

* Remove unused variable.
2017-03-30 16:27:01 +01:00
Andrius Dagys
55af8cff74 Update Copycat (Raft lib) version to 1.2.3 2017-03-30 15:55:47 +01:00
Mike Hearn
577b2c2c22 CORDA-319: Shell: use ExternalResolver to load our commands
This eliminates JIT java compilation and the consequent need for
tools.jar (which doesn't get shipped in DemoBench). It also makes
development more pleasant by avoiding weird IDE integration issues
that came from having java-in-resources.
2017-03-30 14:58:59 +02:00
Mike Hearn
527e571bc3 CORDA-312: Shell: point at our own fork of CRaSH. 2017-03-30 14:58:59 +02:00
Qian Hong
03deffa955 MQSecurityTest: Make sure no actual message is received. 2017-03-30 14:01:29 +02:00
Patrick Kuo
78a0024e00 Fix various deprecated warnings
* Changed deprecated kotlin.reflect.primaryConstructor to kotlin.reflect.full.primaryConstructor
* Changed deprecated kotlin.reflect.memberProperties to kotlin.reflect.full.memberProperties
* Changed deprecated kotlin.reflect.declaredMemberProperties to kotlin.reflect.full.declaredMemberProperties
* Changed deprecated AllComposition to AllOf
* Changed deprecated AnyComposition to AnyOf
* Changed deprecated kotlin.reflect.KotlinReflectionInternalError to kotlin.reflect.jvm.internal.KotlinReflectionInternalError
* Changed deprecated HostAndPort.hostText to HostAndPort.host
* Removed duplicated method net.corda.core.node.recordTransactions
2017-03-30 10:00:46 +01:00
Patrick Kuo
9a7d0a0fb5 Replace unused variables with _ after kotlin 1.1.1 upgrade (#456)
* Replace unused variables with _ after kotlin 1.1.1 upgrade
2017-03-29 13:54:40 +01:00
josecoll
7eada1408e Reduce warning and info messages in node log files (Artemis) (#449)
* Reduce warning and info messages in node log files (Artemis)
Add an additional lof message for conflicting states identified by the Notary.

* Upgraded severity of user login message from trace to debug.

* Suppress Artemis log4j WARNING's for core.server.checkDeadLetterAddressAndExpiryAddress
2017-03-29 11:40:19 +01:00
josecoll
3497e42f7c Upgrade to Requery 1.2.1 with Composite Key support (#443)
* Test SELECT WHERE IN composite key using requery 1.2.0

Upgraded Vault Service code to use Requery 1.2.0 SELECT .. WHERE IN

Updated generated schema code with Requery 1.2.0

Upgrade to Requery 1.2.1

Upgrade to Requery 1.2.1 - converted to use update DSL with composite key
Removed redundant JDBC SQL test cases.

Minor updates following PR review comments from RP.

* Streamline companion object initialisation.
2017-03-29 10:51:02 +01:00
josecoll
bafedc21e2 Display Corda node legal name in JVisualVM Console for MockNode testing. (#444)
* Display Corda node legal name in JVisualVM Console for MockNode testing.

* Removed dash in displayed corda node name.

* Reinstated the dash in displayed corda node name (as JVisualVM does not parse the space correctly)
2017-03-29 09:22:01 +01:00
Patrick Kuo
6ca0dffa6c use sshdPortAllocation for sshdAddress instead of portAllocation to fix broken demos due to port shift. 2017-03-29 10:15:14 +02:00
Matthew Nesbit
b75913c24a Merge pull request #451 from corda/mnesbit-fix-flaky-tests
Fixes some charset encoding and timing tests problems on windows
2017-03-28 18:21:29 +01:00
Rick Parker
8ef1d767c9 Consolidate maven repositories (#445)
* Consolidate repositories into root build.gradle
2017-03-28 17:17:40 +01:00
Matthew Nesbit
8f1d58a508 Fix unit tests causing problems on windows 2017-03-28 16:39:29 +01:00
Clinton Alexander
252195672b Corrected driver documentation. 2017-03-28 16:18:33 +01:00
Clinton Alexander
48832d44fa Added verifier type to JavaDoc for startNode 2017-03-28 12:27:34 +01:00
exfalso
81dcde99bf #340: Factor out jvm process start into utility function 2017-03-27 17:42:51 +01:00
Andras Slemmer
48952dfc02 Add node-api, split minimal node functionality, OutOfProcessTransactionVerifierService 2017-03-27 17:42:51 +01:00
josecoll
0280299104 Soft locking implementation using database coin selection
Fix broken IssuerFlowTest

Fix IssuerFlowTests after rebase.

Resolve conflicts after rebase.

Soft locking converted to use persistent store.
Added additional optional 'includeLockStates' parameter in VaultService states API call.
Added Vault softLocked states query API call.

Fixed commercial paper failing test.
Improved exception handling on soft locking UPDATE statement.

Using SELECT FOR UPDATE to ensure correct soft locking data visibility.
Db query operations moved out of mutex code (as locking managed by underlying DB)

Adjusted logging severity levels.

Adjusted logging severity levels.

GenerateSpending now performing fine grained query for unconsumed states by joining with contract_cash_states table.
Using H2 proprietary cummulative counting feature (using sessioni SET variables)
Refactored and simplified HibernateObserver constructor to enable usage in JUnit tests.

Event generator issues larger random amounts (10,000..1,000,000) to those than are spent (0..10,000)
Adjusted Issue (5:1) and Exit (10:1) generation frequency vs spending.

Minor fixes: added optional lockid into select for spending criteria, set notary, additional trace logging.

Generate Cash Schema by default upon node start-up (as part of NodeSchemaService initialisation).

Explicitly close JDBC statements in finally() blocks.

Tightened HibernateObserver constructor.

Fix CommercialPaper test (was missing auto-generation of CONTRACT_CASH table)

Revert default JVM size back to 200Mb.

Revert default number of iterations in Explorer Node Simulation mode (back to 10000 with .5 sec sleep interval).

Remove redundant setter function.

Added TODO messages indicating Requery / H2 restrictions & caveats.

Consumed states lock updates now performed in general consumed state Update.

Updated/added Soft Locking documentation.

Addressed initial PR comments: use THREAD_LOCAL_KRYO, use AbstractParty, extract helper method, improve readability, address some doc typos

Addressed PR comment: removed lockId from WireTransaction.

Fixed soft locking UPDATE statements.

Improvements to VaultSoftLockManager for auto-registration of soft locks for flows with spendable states (as notifications from vault).
Other optimisations (IssuerFlow no longer explicitly reserve/release issued state) and improvements (soft lock release management of soft locks, docs update)

Performance update: now using Requery for UPDATE in release soft locking (non-composite key statement)

Removed redundant TODO messages (TODO: revisit Kryo bug when using THREAD_LOCAL_KYRO)

Minor fixes following rebase

Fixed failing JUnit following rebase

Addressed MH PR review items (1st pass)

Fix broken JUnit

Significant changes to RDBMS operations within coin selection and soft locking as requested by PR review.
(Removed SELECT FOR UPDATE; added RETRY upon coin selection; reverting partial soft locks)

Addressed a number of PR review requests added by MH (comments/spelling, lockID instantiation, HibernateObserver instantiation, cash schema white-listing usage)

Addressed latest PR review comments from RP.

Minor fixes following rebase from master.

Fixed final failing JUnit (issuer flow concurrent).

Updated TraderDemo to trigger concurrent issuance of cash.

Fixed compiler warning on lockId null check.

Fixed subtle bug in coin selection intermittently surfaced in IntegrationTestTutorial.

Fixed small memory leak.

Removed stray } in logger trace message.

Slight rewording of description of Soft Locking in docs.

Renamed NoStatesAvailableException to StatesNotAvailableException.
generateSpend is now Suspendable (calls sleep method on flow upon coin selection retry).

Added companion function to enable a Strand to sleep but without locking transactional context.

Improved logging, changed to StateNotAvailableException, using Flow sleep upon retry, tweaked SELECT criteria in coin selection, fixed bug when insufficient states selectable, generateSpend is now @suspendable

Improved handling and logging of flow results in Simulation Mode.

Fixed minor error in sleep when not an active flow.

Retry coin selection when unavailable states (as these may become available as new states).
Additional debug logging to highlight and identify H2 coin selection sporadic bug.

Inlined sleep method due to intermittent Quasar error.

Re-introduce selection clause that prevents selection and temporary locking of already locked states (by other flows).
Improved trace logging for coin selection (SQL row level info).
Correctly calling FlowStateMachineImpl sleep (now inlined and working correctly)

Fixed rebase error.

Remove redundant TODO message.
2017-03-27 17:12:33 +01:00
Shams Asari
bb74f0ca34 Merge pull request #427 from corda/shams-consistent-guava-deps
Upgraded both guava and guava-testlib to 21.0 and made sure they shar…
2017-03-24 18:30:11 +00:00
Ross Nicoll
c3cf2226ea Extend identity service tests
RBS report problems with multiple nodes being able to find each other in the identity service. This extends the name
lookup test case to try three nodes, to check all of the stored values, and to use random keys rather than static.

Add trace log of identity registrations to aid with tracking state.
2017-03-24 18:25:49 +00:00
Shams Asari
52ea54f742 Upgraded both guava and guava-testlib to 21.0 and made sure they share the same version variable 2017-03-24 17:17:36 +00:00
Chris Rankin
558a3207e9 Include CordaCaplet$1 to fix WebServer startup. (#430) 2017-03-24 17:14:20 +00:00
Chris Rankin
ad71a48505 Fix merging: (#426)
- :finance and :node-schemas no longer contain junit-quickcheck-*
  and so no longer need to exclude javassist:javassist.
- RPCStructures.kt has been moved to :node-api, and so we no longer
  need the commons-fileupload dependency here.
2017-03-24 13:38:26 +00:00
Mike Hearn
68ff33549a Address review comments 2017-03-24 12:44:54 +01:00
Mike Hearn
ac90fe724e Shell: add support for uploading and downloading attachments. 2017-03-24 12:44:54 +01:00
Mike Hearn
347224c900 Improve attachment checks to ensure that a stream is actually a JAR/ZIP. 2017-03-24 12:44:54 +01:00
Mike Hearn
2cb02c75eb Minor: remove ANSI progress observer, delete some currently dead code in the shell. 2017-03-24 12:44:54 +01:00
Marek Skocovsky
262c87a5c6 Integrate CRaSH shell (SSHD). Joint effort between Mike Hearn and Marek Skocovsky.
The shell is embedded in the node and offers the ability to monitor
and control the node via the launching terminal.

Still to do:

* Switch to a fork of CRaSH that we can maintain ourselves, and merge in Marek's SSH patch so we can enable SSH access.
* Add persistent command history that survives restarts.
* Tab completion for the 'flow' and 'run' commands.
* Remove the 'jul' command and replace it with a command that lets you see and tail the log4j logs instead.
* Fix or remove the other crash commands that have bitrotted since 2015.
2017-03-24 12:44:54 +01:00
Chris Rankin
eaf9dad7c9 Remove junit-quickcheck from Corda because it is only used for testing. (#416) 2017-03-23 17:32:14 +00:00
Andrius Dagys
71fe3e3d3b Record a metric for duration and rate of execution for every flow (#372)
* Record a metric for the duration and rate of execution for every flow. This is useful for task intense scenarios to detect performance degradation.

* Measure both successful and failed flow durations
2017-03-22 16:52:41 +00:00
Chris Rankin
98266da41c Refactor CordaRPCClient into new :client:rpc Gradle module. (#405)
* CORDA-305: Refactor CordaRPCClient into :client:rpc module

* CORDA-305: Remove the Kotlin test framework from the artifacts.

* CORDA-305: Migrate serialisation whitelist into node-api module.

* CORDA-305: Clean up unused RPC observables.

* CORDA-305: Add :client:rpc module to documentation tasks.

* CORDA-305: Include :finance into :client:rpc for its serialisable classes.

* CORDA-305: Move test classes into the correct directory.

* CORDA-305: Migrate :finance dependency from :client:rpc into DemoBench.

* CORDA-305: Update wording of TODO about handling Observables.
2017-03-22 15:52:54 +00:00
Ross Nicoll
7e0e7bc645 Fix warning in NodeAttachmentService 2017-03-22 12:20:29 +01:00
Chris Rankin
9e43df36d3 Refactor :client module into :client:javafx and :client:mock (#388)
* CORDA-304: Refactor :client modules into :client:javafx and :client:mock.

* CORDA-304: Add :client:mock to Dokka tasks, and remove unused integrationTest task.

* CORDA-304: Migrate DriverBasedTest from node into test-utils.

* CORDA-304: Rename .fx. package to .jfx. to prevent confusion with "exchange rate".

* CORDA-304: Rename module to ':client:jfx'.
2017-03-21 19:45:12 +00:00
Andras Slemmer
7a9bc5bfad driver: Add ShutdownManager, make network map service optional 2017-03-21 18:08:21 +00:00
Mike Hearn
1243118aa9 Minor: more banking jokes, surround legal name in quotes 2017-03-21 18:01:17 +01:00
Mike Hearn
4c6548107a Minor: don't repeat the legal name of the node multiple times in the output (which causes indentation issues) 2017-03-21 18:01:17 +01:00
Shams Asari
209f5c8a25 Logging fixes, including broken --logging-level cmd line arg 2017-03-21 15:36:32 +00:00
Mike Hearn
0d54832d88 FlowSessionException is sent over RPC so must be serializable and documented. 2017-03-20 15:17:31 +01:00
Mike Hearn
afbc8f9b5c De-issuerify the cash payment flow. This makes it easier to use the payment flow from the shell. 2017-03-20 15:14:28 +01:00
Andras Slemmer
4f6b44ceff Merge pull request #379 from corda/aslemmer-node-api
Add :node-api, factor out some artemis code
2017-03-20 13:31:21 +00:00
Chris Rankin
64fe92ce34 Upgrade to H2 1.4.194. (#389)
- Timezone related fixes.
- A Turkish case canonicalisation bug.
- Fixes for some scary threading related bugs.
2017-03-20 10:27:45 +00:00
Andras Slemmer
d3f956ab60 Address PR 379 comments 2017-03-17 15:09:04 +00:00
Rick Parker
1de1f9095f Several tests were corrupting Kryo which was then returned to the common pool. (#378)
* We were leaving trailing attachmentStorage on pooled kryo instances after some tests.  Changed attachment storage logic to make it impossible to leave it behind.

* Some low level tests corrupt the Kryo config, so do not return to pool when this is the case.  Also, we discovered that Kryo is caching class name to class resolution.  We don't want to do this where attachments are involved.  The errors raised highlighted a class missing from the whitelist.  Need to write a unit test to test the class loader issue.

* Unit test for attachment class loading with kryo.
2017-03-17 12:43:11 +00:00
Andras Slemmer
c3c1f3d801 Add :node-api, factor out some artemis code 2017-03-17 11:47:05 +00:00
Ross Nicoll
486368d926 Clean up messaging/RPC port configuration and docs (#296)
* Non-ssl artemis acceptor for RPC connection. (#271)

* New non-ssl acceptor in artemis server for RPC connection.

* Rename artemisAddress with messagingAddress

Rename artemisAddress with messagingAddress so that the node configuration file properties match
the code variable names.
Rename artemisPort to messagingPort in Gradle configuration to match node configuration naming.

* Add rpcPort configuration option for Gradle

* Update docs to reflect changes to RPC port configuration

* Renumber ports in example CorDapp to match numbering used elsewhere

* Restructure upgrade guide

* added config file checks on corda startup to make the upgrade path a bit smoother.
2017-03-17 10:32:14 +00:00
Mike Hearn
eb21458885 Some fixes to emoji/ANSI renderer 2017-03-17 10:54:25 +01:00
Shams Asari
f079c05e6a Merge pull request #361 from corda/shams-nms-reg-error-response
Clean up of network map service  and its tests, and added error msg t…
2017-03-16 17:03:42 +00:00
Konstantinos Chalkias
5966610a6e DEFAULT_MAX_BUCKETS based on max heap size
MAX_DEFAULT_BUCKETS is linearly correlated to max heap size with a minimum of 256 buckets.
2017-03-16 16:40:34 +00:00
Shams Asari
5e3e7f6c1c Clean up of network map service and its tests, and added error msg to registration response 2017-03-16 16:37:21 +00:00