Commit Graph

302 Commits

Author SHA1 Message Date
Michele Sollecito
f4a9a055d9 CORDA-1059 - Fix Driver hanging on duplicate node names. (#2574)
* [CORDA-1059]: Fix bug with Driver hanging on duplicate node names.

* [CORDA-1059]: Code review changes.

* [CORDA-1059]: Code review changes.
2018-02-20 19:59:15 +00:00
Shams Asari
be0758e52f Removed DriverParameters.initialiseSerialization (#2572) (#2576)
(cherry picked from commit 979aef1)
2018-02-20 16:49:46 +00:00
Tudor Malene
60a4bcba5b CORDA-941 - Add Network Parameters contract implementation Whitelist (#2539)
* CORDA-941 Add Network Parameters contract implementation Whitelist

* CORDA-941 fix merge

* CORDA-941 added uploader support to Attachments and added check into the AttachmentClassloader to only allow loading attachments that were uploaded from the local cordapps folder

* CORDA-941 update api spec

* CORDA-941 address some code review changes and fix and add classloader test

* CORDA-941 fix test

* CORDA-941 address code review comments

* CORDA-941 address code review comments - use and update existing whitelist

* CORDA-941 address code review comments

* CORDA-941 fix compile error

* CORDA-941 address code review comments

* CORDA-941 removed: whitelistAllContractsForTest

* CORDA-941 removed: whitelistAllContractsForTest

* CORDA-941 add comment

* CORDA-941 remove toLedgerTransaction

* CORDA-941 add warning when node not using latest CorDapp

* CORDA-941 remove the stubbing approach for cleaning LedgerTransaction

* CORDA-941 Code review changes

* CORDA-941 Fix merge

* CORDA-941 workaround for api scanner bug

* Fixed JacksonSupportTest.
2018-02-20 11:09:23 +00:00
Shams Asari
34e82026f3 Changed the wither methods in DriverParameters and NodeParameters to begin with "with" and not "set" (#2570) (#2571)
(cherry picked from commit ad959c7)
2018-02-20 09:52:13 +00:00
sollecitom
22f6827131 CORDA-961 - Revert the introduction of GlobalProperties.
* Changes to LargeTransactionTests.
 * Code review changes.
 * Code review changes.
 * Code review changes.
 * Reverted to MAX_FILE_SIZE for Artemis.
 * reverted max message size for BridgeControlListener inside Node.kt
 * reverted max message size for BridgeControlListener inside Node.kt
 * Renamed setNetworkParameters to withNetworkParameters in MockNetwork.kt
 * Updated to reflect latest state.
2018-02-19 15:57:21 +00:00
Mike Hearn
c0448a0e3c Minor: reduce the size of the MockNetwork API a bit, add some better documentation 2018-02-16 18:40:43 +01:00
Shams Asari
4bc3f9ffa8 ENT-1519 - Ensure NodeInfo always has at least one address by checking in the c'tor (#2538) (#2542)
Further, the look up of the node's own node-info from its database has been tightened to ensure there isn't more than one.

Also fixed some brittle code which was assuming exactly one address rather than at least one.

(cherry picked from commit 2864ce1)
2018-02-16 16:52:08 +00:00
Anthony Keenan
b24ec9f680 CORDA-939 - Modify Api Scanner to check api for internal exposures (#2534)
* CORDA-939 Modify Api Scanner to check api for internal exposures (#2510)

* Update check api changes to look for internals

* Update several more uses of internal

* Make check-api-changes script filter out internal class usages

* Make CordaClock part of API

* Update api-current.txt

* Remove exclusion of nodeapi.internal

* Remove access to CordaPersistence from public api

* Don't expose DB Connection from StartedMockNode and remove unnecessary transaction from CustomVaultQueryTest

* Make internal tests that use need db access use InternalMockNetwork

* Make test certificates internal

* Address further review comments

* Revert some accidental changes to api-current.txt

* Address Shams' review comments

* Update Api Scanner to filter out CordaInternal attribute

* Update api-current.txt

* Remove superfluous brackets

* Add transaction to StartedMockNode

* More leaky transaction fixes

# Conflicts:
#	.ci/api-current.txt
#	node-api/src/test/kotlin/net/corda/nodeapi/internal/AttachmentsClassLoaderStaticContractTests.kt
#	node-api/src/test/kotlin/net/corda/nodeapi/internal/AttachmentsClassLoaderTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/AttachmentLoadingTests.kt
#	node/src/test/kotlin/net/corda/node/internal/cordapp/CordappProviderImplTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalMockNetwork.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappConfigProvider.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt

* Bump gradle plugins version

* One last internal exposure

* Update constants.properties

* Fix api-current

* Address mikes review comments
2018-02-16 15:22:13 +00:00
Maksymilian Pawlak
b87ca85046 Test driver default parameters removal (#2519) (#2525)
* Removed long parameter list in test driver, replaced with DriverParameters object

(cherry picked from commit b91dd43)
2018-02-14 10:24:16 +00:00
Anthony Keenan
90c8b2a12a CORDA-939 - Remove sslConfiguration from public constructor of CordaRPCClient (#2522) (#2529)
* Remove sslConfiguration from public constructor of CordaRPCClient

* Address review comments

* Update api-current.txt

* sslConfiguration doesn't need to be a property

# Conflicts:
#	.ci/api-current.txt
2018-02-13 22:48:14 +00:00
Katelyn Baker
f0e52e1eed
CORDA-1007 - Tweak the way invocation context is integrated to reduce the pain for devs using the old API (#2447) (#2524)
Minor tweaks to the invocation context code.

1) Un-deprecate FlowInitiator, move the deprecation to the field. This
   eliminates large numbers of warnings and means developers are warned
   only once in the place where they obtain one.

2) Add documentation for StateMachineInfo and create a type alias to give
   it a better name in an ABI compatible way.

3) Improve markup on InvocationContext

4) Rename field from just "context" to "invocationContext" (Context is vague)
2018-02-13 13:12:26 +00:00
Patrick Kuo
7d6f15b7ba CORDA-1008 - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper (#2509) (#2514)
* [CORDA-1008] - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper

* address PR issues

(cherry picked from commit ddf0d34)
2018-02-13 13:11:29 +00:00
Joel Dudley
c9ade00de6 No IdentityServiceInternal as public param. Start nodes without params. Simpler MockServices ctors. (#2521)
* Removes IdentityServiceInternal as a public parameter to MockServices.

* Reorders params to put non-default args first. Creates simpler default constructors.

* Adds constructors for creating mock nodes by passing params.
2018-02-13 11:32:04 +00:00
Michele Sollecito
fbb7f8f019 CORDA-990 - Flows Draining Mode (#2507)
* [CORDA-990]: Flows Draining Mode

* Fixed incorrect disconnect login.

* Code review changes.

* Fixed compilation error about MockNetwork...

* Fixed compilation error about MockNetwork...

* Fixed broken compilation.

* Ignoring an unstable test.
2018-02-13 09:34:10 +00:00
Anthony Keenan
e363090f30 CORDA-939 - Don't expose StartedNode and AbstractNode as part of public test api (#2472) (#2505)
* Don't expose StartedNode via Node Driver

* Dont expose StartedNode/Abstract Node via MockNetwork

* Remove internal var from constructor as it doesn't hide from public api and change to internal initialisation method

* Update api

* Rename MockNode to StartedMockNode to avoid confusion
Update documentation
Update api-current.txt

* Fix typo

* Fix test failure

* Modify flow tests to use internal mock network and remove additional internal exposures from StartedMockNode

* Fix api-current

* Change InProcess and OutOfProcess to interfaces

* Explicitly declare MockNetwork parameters
Dont expose StateMachineManager
Move affected tests to use internal mock network

* Fix api-current

* Changes requested via review

* Fix IRS Demo address

* Fix api

* Remove internal attribute from classes in internal package

* Remove accidentally added code

* Move useHttps into NodeHandleInternal

* Remove duplicated code

* Update api-current

* Make webAddress internal on NodeHandle

* Make sure parameters in public api are explicitly specified

* Use correct address in IRS Demo

* Get webaddress from webserver handle

* Update api-current

# Conflicts:
#	.ci/api-current.txt
2018-02-12 13:26:56 +00:00
Andras Slemmer
10f3c0bcf9 CORDA-995: r3corda wire compatibility (#2497) 2018-02-12 10:09:47 +00:00
Patrick Kuo
c18bc8758f CORDA-961 Wire up and enforce max transaction size (#2465) (#2493)
* wire up and enforce max transaction size

* fixup after rebase
moved network parameter from AbstractNode to NodeProperties

* removed TODO

* fix broken import

* address PR issues

* remove API breaking change
address PR issue

* added max transaction size to driver and mock network.
address PR issues

* fix failing test

* added TODO

* fix verifier test

* fix spring driver build error

(cherry picked from commit c8cf46c)
2018-02-09 17:24:15 +00:00
Katarzyna Streich
af4aba2bfa First approach to network parameters updates (#2412) (#2487)
* Network parameters updates

Add two RPC methods networkParametersFeed and
acceptNewNetworkParameters. Implementation of client handling of network
parameters update event. Partial implementation of accepting new
parameters and installing them on the node as well as node startup with
updated parameters.

Move reading of network parameters on startup to separate
NetworkParametersReader class. Add tests.

Move NetworkParameters and NotaryInfo classes to core.

* Ignore evolvability test - to be fixed later

* Add documentation on update process
2018-02-09 14:55:19 +00:00
Anthony Keenan
e41408d21e CORDA-939 - Dont expose FlowStateMachine via public API (#2438) (#2476)
* CORDA-939 - Dont expose FlowStateMachine via public API (#2438)

* Create CordaInternal attribute for properties on public classes that are not part of the api and apply to FlowLogic.stateMachine

* Remove startFlow from public test api and replace with startFlowAndReturnFuture

* Update api-current with changed signature

* Change test used in documentation to use public test methods

* Remove the rest of the unneccessary usages of the startFlow test utility

* Remove extra whitespace

* Rename startFlowAndReturnFuture back to startFlow

* Update api

* The annotation doesn't appear unless its marked as on the actual getter and setter

* Updated docs and removed pointless attribute

* Deleted whitespace

# Conflicts:
#	.ci/api-current.txt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/NodeTestUtils.kt

* Revert api-current to v1 api

* Adding missing line and missing annotations

* Made changes post review

* Minor text change
2018-02-08 14:40:16 +00:00
Katelyn Baker
9b8fe3a1d4
Merge pull request #2470 from corda/fixes/sollecitom/failfast_rpc_settings
Added basic node configuration validation.
2018-02-06 16:32:26 +00:00
sollecitom
7947bb314f CORDA-988 - Added basic node configuration validation. 2018-02-06 14:47:36 +00:00
Anthony Keenan
7de5b0af61 Remove exposure of internal hibernate configuration from mockservices (#2442) 2018-02-01 11:46:21 +00:00
Patrick Kuo
93054a9590
Add cmdline option for network root truststore and password (#2407)
* add cmdline option for network root truststore and password, instead of using node's truststore configuration to avoid confusion.

* revert line auto format

* fix failing integration test

* address PR issue
2018-01-29 13:43:16 +00:00
Matthew Nesbit
0ff9c9e2e3
Move to message based bridge control protocol (#2410)
Tidy up

Remove dead RPCSecurity logic from ArtemisMessageServer

Address PR comments

Address PR comments
2018-01-25 17:53:34 +00:00
Mike Hearn
17a6f61eba
Simplify CashTests and add some comments/convenience APIs to MockServices (#2241) 2018-01-25 16:29:26 +01:00
Michele Sollecito
9783f11ba8
Exposed RPC SSL settings through Cordformation (#2419) 2018-01-25 14:32:58 +00:00
Shams Asari
0fa6969d5d
Added various X509 utilities to remove some of the existing boilerplate. (#2416) 2018-01-24 18:07:29 +00:00
Ben Wyeth
d17670c747 Provide an API to register callback on app shutdown (#2402)
Provide an API to register callback on app shutdown.
2018-01-24 16:19:24 +01:00
Michele Sollecito
3c0e006456
Reverted incorrect additional advertised RPC address in NodeInfo (#2417) 2018-01-24 14:42:07 +00:00
Shams Asari
61c7de22d6
Replaced KeyStoreWrapper with X509KeyStore, which is still a wrapper but assumes only X509 certs and has better APIs (#2411) 2018-01-24 07:51:55 +00:00
Michele Sollecito
142f52fa82
[CORDA:936]: Enable RPC layer to work with SSL 2018-01-23 16:23:37 +00:00
Anthony Keenan
70f1fdeb2b
CORDA-939 Make SerializationEnvironmentRule.env private so as not to expose internals. (#2404)
* Make SerializationEnvironment private so as not to expose internals.

* Only expose used parts of api

* Make properties lateinit

* Removing java calls to getEnv

* Initialise properties at declaration

* Tidy up imports
2018-01-23 14:42:30 +00:00
Joel Dudley
443afb3515
Rethrows a clearer error message when a test tx in a test ledger does not create a valid tx. 2018-01-22 16:08:26 +00:00
Michal Kit
4a3379ac8a
CORDA-937 adding node key pair to utility/testing methods (#2405) 2018-01-22 13:06:22 +00:00
Andrzej Cichocki
1fc646cfa8 CORDA-716 Move test-utils and node-driver to stable API section in docs (#2335)
* Move test-utils and node-driver to stable section.

* Move FlowStackSnapshotFactory to testing.services package & update docs

* Move SerializationTestHelpers to testing.core package

* Move TestConstants.kt to core namespace

* Move Expect.kt to core namespace

* Move CoreTestUtils to core.TestUtils - rename class and update imports

* Added some clarification to documents after re-reading them

* Added static imports

* Removing unused import

* Fix merge conflict

* Fixing merge conflict
2018-01-22 11:28:41 +00:00
Andrzej Cichocki
d00438b86f
Fix MockNetwork non-daemon thread leak. (#2397) 2018-01-22 11:00:40 +00:00
szymonsztuka
f59560bb06
Database schema changes. (#2389)
Changes compatible with R3.Corda (ENT-794):
1) Added Hibernate corda-wrapper-binary two to to columns.
2) Shorten names of tables in dummy schemas used in tests.
3) Undo removal of compound index of VaultTxnNote (b423fea).
4) Assertions for 2 vault tests don't rely on order of rows.
2018-01-19 17:09:02 +00:00
Mike Hearn
ac7637e2b4 Revert "CORDA-599 RPCSecurityManager is no longer lateinit (#2347)"
This reverts commit 75e74e67a1.
2018-01-19 17:52:59 +01:00
Anthony Keenan
35f89e03ea
Abstract InMemoryMessaging behind an interface so as not expose net.corda.nodeapi.internal.persistence.CordaPersistence in public API (#2390) 2018-01-19 10:57:08 +00:00
Shams Asari
d19eb4a9d7
Removed useHTTPS from NodeConfiguration as it's not needed by the node. (#2375)
It's still expected to be present in node.conf if the web server needs to use SSL.
2018-01-17 17:47:40 +00:00
Andrzej Cichocki
ea57639a37
CORDA-924 Fix IntegrationTestingTutorial (#2349)
i.e. H2 startup bug. also:
* Fix poor connection pool discipline
* Log cleanup failures instead of replacing foreground failure
2018-01-17 14:23:13 +00:00
Anthony Keenan
1367cd4adb
CORDA-912 Stop exposing internal node user, create user in testing infrastructu… (#2361)
* Stop exposing internal node user, create user in testing infrastructure instead

* Update kdocs
2018-01-15 19:30:33 +00:00
Andrzej Cichocki
75e74e67a1
CORDA-599 RPCSecurityManager is no longer lateinit (#2347) 2018-01-15 19:11:00 +00:00
Andrius Dagys
fb1d3087de Raft notaries can share a single key pair for the service identity (in contrast to a shared composite public key, and individual signing key pairs). This allows adjusting the cluster size on the fly. 2018-01-13 16:36:41 +00:00
Andrius Dagys
89b64da12b Increase shutdown action timeout. In some tests using driver, the shutdown
can be invoked before the notary node gets started, and the node disposal action
times out, leading to unclosed message brokers and port conflicts.
2018-01-12 18:19:02 +00:00
Shams Asari
bbfbb08c43
CORDA-881: Signed network parameters has the network map cert attached to it instead of just the public key. (#2346)
Introduced DigitalSignatureWithCert and SignedDataWithCert as internal APIs, with the expectation that they will become public; renamed the network parameters end-point to network-parameters; updated the network-map.rst doc; and did some refactoring.
2018-01-12 07:59:08 +00:00
Tudor Malene
c2bd7403a8
hibernate mapping changes (#2337)
* add foreign key names and move the participants mapping to the subclass so that the table name can be configured

* update api-current file

* fix compilation errors

* PR changes

* PR changes
2018-01-10 11:42:08 +00:00
Anthony Keenan
979d7f2c63
ENT-1226 Improve Network client Error Handling (#2344)
* Improve Network client Error Handling

* Reformatted NetworkMapServer

* Removed line that is now redundant
2018-01-09 16:55:16 +00:00
Andrius Dagys
63e1bdaa94 Revert "Raft notaries can share a single key pair for the service identity (i… (#2269)"
This reverts commit 3e00676851.
2018-01-09 12:20:25 +00:00
Joel Dudley
46d88ed740
Adds JavaDocs for waitForAllNodesToFinish param 2018-01-09 11:56:48 +00:00