Commit Graph

8227 Commits

Author SHA1 Message Date
Chris Rankin
545a463a5b NOTICK: Remove buildscript block from Node's build.gradle. (#5809) 2019-12-16 16:24:47 +00:00
Viktor Kolomeyko
91cdffd429 ENT-4382: Core module changes to support multi-RPC work (#5814)
* ENT-4382: Move `InvocationHandlerTemplate` into `core`

This is an internal helper which is general enough and does not have any Node specific code.

* ENT-4382: Make @CordaInternal applicable to classes

And apply it on `AttachmentTrustCalculator` which is `core/internal` interface anyway.
2019-12-16 16:03:48 +00:00
Chris Rankin
5d47466051 NOTICK: Refactor Gradle script for building Docker images. (#5813) 2019-12-16 14:34:51 +00:00
Christian Sailer
4a35b99283 CORDA-3479: Added timestamp to the node_transactions table. (#2660) (#5812)
* ENT-4237: Added timestamp to the node_transactions table.

* ENT-4237: Clock for timestamp now retrieved from ServiceHub. And now record verification time as well.

* ENT-4237: Fixed tests. Also enabled stream output in allParallelIntegrationTest.

* ENT-4237: Changed timestamp to a val.

* ENT-4237: Changed streamOutput to false for allParallelIntegrationTest

* ENT-4237: Unit tests added for new timestamp column. Also now passing a clock into DBTransactionStorage.

* ENT-4237: Added more unit tests to check timestamp

* ENT-4237: Fix test to actually change clock time when testing transaction time does not change.
2019-12-13 15:14:21 +00:00
Katelyn Baker
8f7346f84c
NOTICK - Add C++ Serialiser Support for Maps and Arrays (#5775)
Adds support for understanding both Maps and Arrays

Irritatingly, whilst arrays are mostly serialized as lists, we cannot simply use a restricted List reader to deserialize them because there are subtle differences in the way we need to work out if its actually a restricted type or not. Rather than add a bunch of random logic into the factory method I've isolated it in the class hierarchy. So a little bit more code makes the implementations a lot neater. We also need to deal with the fact arras of unboxed primitives exist, which whilst Java really gets excited about, we don't need to care about. An int, is an int, is an int!.

Map support required we add a slightly better Value dumper, essentially the "key" component of the KV pair needs to be more flexible than a simple string when we're dumping out param:value pairs.

Testing
Added a lot more unit tests to both the ordered type notation code to ensure we build up the schema dependency struct in the correct order. Quite important as we rely on that in the composite factory to be strictly ordered to ensure we're not constructing a reader for a type we don't yet understand... and there were some small bugs in the version that predates this PR

Also added a lot higher level tests to ensure actual reading out of the blob works
2019-12-13 00:32:25 +00:00
Chris Rankin
79b41fe5ed ENT-4595: Don't change existing archive classifiers for test artifacts. (#5803) 2019-12-12 17:12:55 +00:00
Chris Rankin
f9eda81b4d ENT-4595: Delete SgxSupport from core-deterministic. (#5804) 2019-12-12 17:12:16 +00:00
Jonathan Locke
1df0ba3aa2
OS 4.3 to 4.4 merge 2019-12-11 (#5806)
OS 4.3 to 4.4 merge 2019-12-11 (#5806)
2019-12-12 08:40:43 +00:00
Jonathan Locke
6edf4d64d0 Merge branch 'release/os/4.3' into jlocke/20191211_4.3_4.4
Conflicts:
	constants.properties
2019-12-11 17:56:10 +00:00
Christian Sailer
b80d1b3009 ENT-4595 Add git based version (#5799)
* ENT-4595 Allow publishing a version with a git based version string

* ENT-4595 rename option and add comment

* ENT-4595 Fix groovy/Java string incompatibility

* Remove Constants.kt so it gets regenerated on a fresh check-out.

* Add Constants.kt to .gitignore

* Reverted deletion of Constants.kt as it would cause problems for IntelliJ users

* Reverted logging Constants.kt file to how it was before

* Undid template change too

* Reverted template file properly this time.
2019-12-11 17:50:27 +00:00
Kyriakos Tharrouniatis
b0903efa50 CORDA-3202 Add a specific exception for flows to hospitalise themselves (#5767)
* Introducing a new type of exception and a new hospital staff member to pause flows by immediately hospitalising them.

* Renaming exception to "HospitalizeFlowException".

* Making HospitalizeFlowException an open class.

* Overloading constructors of HospitalizeFlowException to be available in Java.

* Using Throwable#mentionsThrowable.

* Moving HospitalizeFlowException in its own file.

* Update kdocs for HospitalizeFlowException and StaffedFlowHospital#SedationNurse.

* Added tests, testing various HospitalizeFlowException types thrown.

* Fix Detekt issues.

* Imports optimizing.

* Add safe casting.

* Update api-flows and node-flow-hospital docs.

* Minor code comment change.

* Add DOCSTART-DOCEND signs in HospitalizeFlowException for makeDocs. It is referenced by api-flows.rst.

* Minor change in note.

* Code formatting.

* Remove comment.

* Remove if statement that makes example worse.

* Remove redundant comment.

* Moving 'Internal Corda errors' at the bottom.

* Changing node-flow-hospital.rst as per review.

* Change HospitalizeFlowException description as per review.

* Adding an example for FlowException.

* Minor indentation fix.

* Update FlowException example label as per review.

* Correcting handling of custom exception.
2019-12-11 10:35:58 +00:00
Katelyn Baker
0d7c10a846 NOTICK - fix cpp serialiser under linux (#5801) 2019-12-11 10:35:45 +00:00
Christian Sailer
ce4bbfc422 Christian/ent 4595 publish test artifacts (#5795)
* ENT-4595 Publish test artifacts for core and serialization

* Revert changes to Project.xml
2019-12-09 17:34:23 +00:00
Stefano Franz
20bd5d9647
Merge pull request #5793 from corda/ramzi/43-44-merge
OS 4.3 -> OS 4.4 Merge
2019-12-09 15:43:32 +00:00
Christian Sailer
14050826e9 ENT-4595 harmonize core and serialization (#5792)
* Harmonize serialization/core and deterministic counterparts

* Fix test for changed private alias key behaviour

* Detekt errors

* roll back project.xml
2019-12-09 14:17:48 +00:00
Ramzi El-Yafi
74c4bd6a3d Merge remote-tracking branch 'origin/release/os/4.3' into ramzi/43-44-merge 2019-12-09 13:37:50 +00:00
Ed Prosser
87b39bf515
ENM-866: Link to correct endpoints
ENM-866: Link to correct endpoints
2019-12-05 16:22:55 +00:00
Ed Prosser
0ca97d2d96 ENM-866: Link to CENM docs 2019-12-05 13:27:52 +00:00
Viktor Kolomeyko
43205e1f1a CORDA-3471: Create CordaTransactionSupport and make it accessible through AppServiceHub (#5768)
* CORDA-3471: Create `CordaTransactionSupport` and use wherever possible instead of `CordaPersistence`

* CORDA-3471: Address comments by @mnesbit
- Relocate `CordaTransactionSupport` to `core`
- Create a lighter version of transaction - `VaultTransaction` that gives access to `session` object only.

* CORDA-3471: More changes after discussion with  @mnesbit
- Rename `VaultTransaction` into `SessionScope`.

* CORDA-3471: Revert changes to most of the files after conversation with @mnesbit and @rick-r3

* CORDA-3471: Introduce `CordaTransactionSupportImpl` and make it accessible via `AppServiceHub`.

* CORDA-3471: Minor change (comment).

* CORDA-3471: Address input from @mnesbit

* CORDA-3471: Address input from @rick-r3

* CORDA-3471: Make Detekt happier

* CORDA-3471: Add a new test that proves transactions can be started from client threads

As requested by @mnesbit

* CORDA-3471: Change log and documentation update.

As requested by @mnesbit
2019-12-04 17:18:40 +00:00
Ramzi El-Yafi
3fc916fb6c Add Allure report generation (#5776)
* Add Allure report generation

* change test artifact path for allure
2019-12-04 14:49:44 +00:00
Chris Rankin
5a41ec9b82 CORDA-3464: Also scan attachment:// URLs for custom serializers. (#5769)
* CORDA-3464: Also scan attachment:// URLs for custom serializers.

* Only scan the given classloader - ignore this classloader's parents.

* Upgrade to ClassGraph 4.8.58 - for "robustness fixes".

* Register the attachment:// URL scheme using AttachmentsClassLoader.

* Add integration test for custom serializer in contract state.

* Rename Currancy -> Currantsy, just to make the point.
2019-12-03 15:50:21 +00:00
Ryan Fowler
2abf22ccf9 ENT-4513: Add checks for closing the RPC client (#5781) 2019-12-03 11:59:00 +00:00
Nick Dunstone
e6f9b46584 https://r3-cev.atlassian.net/browse/ENT-3829 (#5763)
Open Source
2019-12-03 10:28:00 +00:00
Anthony Keenan
96e6313fbd
CORDA-3477: Update node database documentation to be correct (#5782)
* Update node database documentation to be correct

* Couple more discrepancies
2019-12-02 16:37:31 +00:00
thorgilman
ee74963235 Update node.conf template to remove single quotes (#5652)
The single quotes surrounding the jvm arguments in the empty node.conf cause an error when trying to perform initial registration.
2019-12-02 14:58:56 +00:00
Anthony Keenan
e28478c983
CORDA-3386: Improve node configuration override documentation (#5777)
* Update docs for environment variables

* Typo corrections

* More tweaks

* Address review comments
2019-12-02 14:42:23 +00:00
Rick Parker
6e467f20b3
CORDA-3470 Fix flow async operations (#5780) 2019-12-02 14:40:07 +00:00
Anthony Keenan
1caeeb01de
CORDA-3476: Fix typo in node database table documentation (#5779) 2019-12-02 11:58:55 +00:00
Christian Sailer
06f97cfed5 ENT-4610 Move tx signing to the Uniqueness provider (#5773)
* ENT-4610 Move tx signing to the Uniqueness provider

* Make detekt happy

* Remove unused imports

* Address review comment
2019-11-29 17:30:33 +00:00
Stefano Franz
81a60377fa
Merge pull request #5774 from corda/EdP/typo-merge-4.4
OS 4.3 -> OS 4.4 Merge
2019-11-29 14:44:06 +00:00
Ed Prosser
63b7f2093e Merge branch 'release/os/4.3' into EdP/typo-merge-4.4
# Conflicts:
#	buildSrc/build.gradle
2019-11-29 13:53:06 +00:00
Jonathan Locke
04eec1de46
DOCS: Typo fix in getting started (#5772)
DOCS: Typo fix in getting started (#5772)
2019-11-29 13:18:00 +00:00
CaisManai
6487844ed5 Fixing small typo
"Double-click the new contract file to open it" should read "Double-click the new flow file to open it" as we're now working on flows.
2019-11-29 10:55:32 +00:00
Chris Rankin
5ce1535ea5 CORDA-3469: Allow EvolutionSerializer to handle boxed types becoming primitive. (#5766) 2019-11-28 16:39:45 +00:00
Razvan Codreanu
d33dbb2ea9 TM-104 Switching the distributed testing plugin to the one released in artifactory (#5764)
* TM-104 switch to using the published plugin

* TM-104 switching to artifactory plugin

* TM-104 remove unused plugin

* TM-104 adding docker plugin

* TM-104 adding docker plugin take 2

* add dependencies-dev and set distributed build plugin to changing
2019-11-28 14:49:39 +00:00
Amol Pednekar
f7328f18f4 [Issue #5746] Update cities.txt (#5747) 2019-11-27 17:55:32 +00:00
Roman Plášil
200f39de97 fix: warning when @NoConstraintPropagation used needs to use the correct class loader (#5690) 2019-11-27 15:35:09 +00:00
Stefano Franz
d604820de9
put podlogs into folder with taskName to support parallel jenkins unit and integration test run (#5759) 2019-11-26 13:05:02 +00:00
Dan Newton
45d6d3ead4 CORDA-3356 Subflow ledger consistency tests + move statemachine tests to slow integration tests (#5722)
* CORDA-3356 Subflow ledger consistency tests + move statemachine tests to slow integration tests

Add tests for subflows that fail during transitions.

Split out `StatemachineErrorHandlingTest` into a series of smaller tests.

Move these tests into the `integration-test-slow` category so they are
not run against every PR.

* CORDA-3356 Fix detekt issue

* CORDA-3356 Tidy test names
2019-11-25 17:11:54 +00:00
Dimos Raptis
10e9340871 [ENT-4483] - Make shell welcome message generic (#5758) 2019-11-25 17:09:47 +00:00
Kyriakos Tharrouniatis
21a075b727 CORDA-3197 Fix flow has been waiting message (#5660)
* Added a timestamp property to Checkpoint getting a new Instant.now() value at every Checkpoint instantiation/ copy instantiation. FlowMonitor is now using this new property (Checkpoint#timestamp) and StateMachineState#isFlowResumed to determine which flows are actually suspended. It leaves out flows that are doing work in their FlowLogic#call method.

* Cleaner comment

* Broke FlowMonitor#logFlowsWaitingForParty into logFlowsWaitingForParty and waitingFlowsToDurations. This way waitingFlowsToDurations is modular and can be tested.

Made FlowMonitor constructor get StateMachineManager instead of the retrieveFlows lamda. This way FlowMonitor is more consistent as a service, and entire flow filtering process is now being done in FlowMonitor#waitingFlowsToDurations.

Removed "smm as? StateMachineManagerInternal" in AbstractNode#start as it made no sense.

Updated CheckpointDumper to mention the Checkpoint#timestamp when writing the checkpoint as json.

* Added tests for FlowMonitor service.

* Remove old comment

* 1. FLowMonitor#waitingFlowDurations now returns a Sequence to have an iteration less.
It used to be, one iteration from returning a Set from FLowMonitor#waitingFlowDurations plus one iteration from FlowMonitor#logFlowsWaitingForParty.

2. Code reformattings

* 1. Remove constructor keyword from FlowMonitor

2. Code reformattings

3. Update detekt baseline

* Resolve conflict in Detekt baseline
2019-11-25 16:49:35 +00:00
Stefano Franz
0f92c96d15
Merge pull request #5745 from corda/EdP/CORDA-3446-4.4
Merge OS 4.3 -> OS 4.4
2019-11-25 12:47:21 +00:00
stefano
40b1a188f1 Merge remote-tracking branch 'origin/release/os/4.3' into EdP/CORDA-3446-4.4
# Conflicts:
#	docs/source/changelog.rst
2019-11-25 09:41:50 +00:00
stefano
75b68a57e4 Merge remote-tracking branch 'origin/release/os/4.4' into EdP/CORDA-3446-4.4 2019-11-25 09:40:55 +00:00
Stefano Franz
16eb2fce78
Allow taints on kubernetes nodes to determine scheduling of tests (#5755)
* allow a test group to specify taints for the nodes

* specify "effect" of toleration
modify test groups to use taints
modify preallocation to use taints

* add extra command line flags for unit test run
2019-11-25 09:39:37 +00:00
Rodrigo Vieira
76e0054482 NOTICK - Fix typo "transcation" => "transaction" (#5749) 2019-11-22 17:52:17 +00:00
rui-r3
ab3c4ac7f8 CORDA-2491: Ability to specify Java package namespace from Cordform (#5075) (#5115)
Add entry point with generic extra configuration options. Move configuration verification code to avoid circular dependencies.
2019-11-21 13:10:04 +00:00
James Higgs
6dbde1172d [CORDA-3442] Update app upgrade notes for gradle version for PV5 (#5740)
* [CORDA-3442] Update app upgrade notes for gradle version for PV5

* [CORDA-3442] Adjust a link and add some backticks
2019-11-21 11:52:11 +00:00
James Higgs
001c2cbdc4 [CORDA-3373][CORDA-3374] Update Cordform docs to discuss setting Jolokia version, update version number (#5748)
* [CORDA-3374] Update Cordform docs to discuss setting Jolokia version

* [CORDA-3373] Update Jolokia version in command for node-administration
2019-11-20 16:39:28 +00:00
Ryan Fowler
b5beb6119c CORDA-3158: Update docs with info about CAPSULE_CACHE_DIR (#5735)
* CORDA-3158: Update docs with info about CAPSULE_CACHE_DIR for capsule cache home

* CORDA-3158: Update docs with info about CAPSULE_CACHE_DIR for capsule cache home
2019-11-20 14:39:29 +00:00