Commit Graph

3338 Commits

Author SHA1 Message Date
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
Chris Rankin
045efbf074 Remove TERM_PROGRAM from environment because JediTerm does not emulate MacOSX. (#436) 2017-03-27 16:41:50 +01:00
Clinton Alexander
a40d55df84 Updated docs to refer to the latest M9.2 release. 2017-03-27 16:33:33 +02:00
Patrick Kuo
dc06d37369 Intellij bug workaround (#434)
* Workaround for `"bound callable references" is only available since language version 1.1` when using kotlin 1.1.1 plugin.
2017-03-27 15:12:01 +01:00
Ross Nicoll
c73a2e6034 Add utility functions for requesting transaction keys
Add utility functions for requesting transaction keys and a small example flow which uses
these functions for testing purposes. These keys are required in for the anonymisation of
transactions, by providing per-transaction keys which cannot be associated with the owning
party's keys without an intermediary certificate.
2017-03-27 14:19:14 +01:00
Chris Rankin
cec4e20bc8 Refactor DemoBench's configuration classes (#429)
* Reuse User class from :node-api module.

* Test that DemoBench can understand the node's configuration file.

* Add return type to User.toMap().
2017-03-25 00:45:01 +00: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
kasiastreich
11cedee211 Size of notary key in vault schema fix. (#414)
Fix in vault schema so notary_key can have more key entries in CompositeKey, as it's kept as Base58 string. Change default varchar field with size 255 to varchar with size 65535.
Add test to VaultSchemaTest.
2017-03-24 15:14:02 +00:00
Ross Nicoll
81b0393766 Add Party type parameter to IRS state
Makes IRS states generic so that the can store anonmyous or full parties depending on use-case (ledger
vs UI).
2017-03-24 13:56:03 +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
Chris Rankin
19ee4f2d7b Create testArtifacts configuration for 'core' module. (#425) 2017-03-24 13:33:54 +00:00
Andrius Dagys
6a21de74b3 NodeRunner: fix OSX script. Add a delay before starting the next node. (#419)
* NodeRunner: fix OSX script. Add a delay before starting the next node.

* Only add delay on macOS
2017-03-24 12:15:57 +00:00
Mike Hearn
e29d41a82a Regen docsite 2017-03-24 12:52:32 +01:00
Mike Hearn
67e6bbc068 Support overloads in the StringToMethodCallParser 2017-03-24 12:44:54 +01: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
Katarzyna Streich
c5966a93e5 Remove duplicated SecureRandom functions in crypto package. 2017-03-24 10:36:05 +00: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
Chris Rankin
9348ec05e7 Use loggerFor() function from :core. (#418) 2017-03-23 16:32:30 +00:00
Chris Rankin
e1bfa6c655 CORDA-267: Set a default name of Notary for the first node. (#417) 2017-03-23 16:28:05 +00:00
Andras Slemmer
660e570b48 Merge pull request #409 from corda/aslemmer-fix-runnodes-add-tmux
Aslemmer fix runnodes add tmux
2017-03-23 16:13:55 +00:00
Ross Nicoll
146641112e Correct format of README.md link to Slack 2017-03-23 14:44:51 +01:00
Chris Rankin
852af27f38 Use platform version of Guava for DemoBench. (#406) 2017-03-23 13:04:31 +00:00
Andrius Dagys
0713baf513 Fix isValidatingNotary check: throw exception if the provided party is not a notary 2017-03-23 12:11:18 +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
Andras Slemmer
5b26d5b454 Bump publish.properties 2017-03-22 16:52:20 +00:00
tomconte
79d133d9d7 Use tmux instead of xterm if available 2017-03-22 16:50:59 +00:00
Andras Slemmer
eb9ae6b6b0 runnodes: Fix runnodes on Linux, fix nodeName 2017-03-22 16:49:10 +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
Clinton
9a5bba9c04 Created a Kotlin node runner (#367)
* Added a cross platform node runner to replace scripts.

* Added runnodes shell and batch files back.

* Node runner supports new webserver format.

* Runnodes now runs correctly on OSX

* Intermediate commit. Squash me.

* Upgdated gradle plugins version number to 0.10.1

* Further inlined more functions.

* Text display changes for noderunner.
2017-03-22 14:08:23 +00:00
Clinton
7532ae763f Upgrade to Kotlin 1.0.7 and Gradle 3.4.1 (#402)
* Upgraded to gradle 3.4.1

* Upgrade to Kotlin 1.0.7 from 1.0.6
2017-03-22 12:05:49 +00:00
Ross Nicoll
4f0e8b73bb Update port numbers in explorer docs 2017-03-22 12:25:36 +01: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
26044e543d Merge pull request #381 from corda/aslemmer-driver-improvements
driver: Add ShutdownManager, make network map service optional
2017-03-21 18:38:18 +00:00
Andras Slemmer
7a9bc5bfad driver: Add ShutdownManager, make network map service optional 2017-03-21 18:08:21 +00:00
Mike Hearn
d281fe82b5 Docs: misc fixes and tweaks to the docsite. 2017-03-21 18:01:17 +01: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
Mike Hearn
1d6fe30f03 Minor: set file mode explicitly so corda.jar is executable on UNIX when copying from a downloaded jar 2017-03-21 18:01:17 +01:00
Shams Asari
dbd0bd7859 Merge pull request #392 from corda/shams-logging-fix
Logging fixes, including broken --logging-level cmd line arg
2017-03-21 15:58:39 +00:00
Clinton
bfdb31e9cf Merge pull request #401 from corda/clint-kaptexplicitidea
Generated files in node-schemas are now correctly identified by IntelliJ
2017-03-21 15:48:37 +00:00
Shams Asari
209f5c8a25 Logging fixes, including broken --logging-level cmd line arg 2017-03-21 15:36:32 +00:00
Clinton Alexander
e32c660a0f Generated files in node-schemas are now correctly identified by IntelliJ 2017-03-21 15:24:21 +00:00