Commit Graph

778 Commits

Author SHA1 Message Date
Emanuel Russo
f20e0e7cf1 Add missing suspendable (#3711)
Add missing suspendable to flow
2018-07-27 17:23:35 +01:00
Roger Willis
8207ac3222
CORDA-1332 Reference input states (#3525)
* * First commit for reference input states feature.

* Added docs.
* Added additional test.

* Fixed whitespace.

* Rebased to master.
* Updated Raft and persistent notary implementations.

* Updated changelog.

* Updated topo sort to handle reference states.
* Stubbed out with referenced states flow.

* Added WithReferencedStatesFlow.
* Added Tests for WithReferencedStatesFlow.
* Added ReferenceState type.
* Rebased to latest version of master.

* Added better comments.
* Updated unit test.

* Added comment to explain a little hack.
* Fixed broken contract upgrade RPC test.

* Added minimum platform version check.
* Updated mock network so that notary nodes inherit the platform version set by the network's minimum platform version.
* References states can now only be used when minimum platform version >= 4.

* Created a new file to hold async operations as "WaitForStatesToUpdate" is broadly reusable.
* Refactored WithReferenceStatesFlow

* Updated javadoc for WaitForStatesToUpdate aysnc operation.

* Added network parameters property to InternalMockNetwork.

* Added min platform version capability to mock services.

* Removed erroneous chars from file.

* Made async operation internal and now call it from FlowLogic.
* Moved some transaction checking code around.

* Removed serializable annotation from referenced state and ref.
* Added reference states design doc.
* Added missing KDocs.
* Updated with reference states flow to handle consecutive update races.
* Made platform version info an inheritable thread local.
* Fixed various typos.
* Updated docs.

* Fixed race.

* Removed min platform version checks as API needs more thought.

* Added deprecation to method and supressed warnings.

* Renamed WaitForStatesToUpdate to WaitForStateConsumption.
* Fixed race in WaitForStateConsumption.

* Addressed PR comments and updated comments / KDocs.

* Reverse vault bugfixes.

* * Vault bug fixes.

* * Fixed broken test.
* Moved WaitForStateConsumption to internal package.
2018-07-25 14:06:56 +01:00
Chris Rankin
e879de70f3
CORDA-1800: Shrink the Simm Valuation Demo's contract states using ProGuard. (#3586)
* Shrink the Simm Valuation Demo's contract states CorDapp using ProGuard.
* Remove CordFormation from CorDapp modules, which unbundles Jolokia from the CorDapps.
* Preserve directory structure for CorDapp's own classes.
* Remove unwanted transitive dependencies from Simm Valuation CorDapps.
* Use allprojects {} to set Strata version property.
2018-07-17 12:31:44 +01:00
Shams Asari
dc3bd8de7a Retired BankOfCordaRPCClientTest as it's mostly duplicated by BankOfCordaCordformTest (#3565) 2018-07-13 10:37:51 +01:00
Stefano Franz
9503c9684e
CORDA-1747 - Client RPC classloader and Java Generics fixes (#3553)
* fix for spring boot rpc and  it work with deterministic serialization

* really really fix tests

* up log level

* reenable allWarningsAsErrors
2018-07-11 13:28:01 +01:00
Viktor Kolomeyko
d481c55b82
CORDA-1743: Remove isDebug = true from Node driver to speed-up integration tests execution. (#3535)
* CORDA-1743: Remove `isDebug = true` from Node driver to speed-up integration tests execution.

* CORDA-1743: Undo removal of "isDebug = true" from the test that specifically checks for this condition.

* CORDA-1743: Address input from @shamsasari
2018-07-09 16:37:01 +01:00
Shams Asari
aefd90f062
Minor: ProcessUtilities clean up (#3533) 2018-07-09 12:29:33 +01:00
Maksymilian Pawlak
f7dd4f7880
Use in-memory H2 for integration test (#2508)
* Default integration tests running with in-memory H2
2018-07-05 14:58:51 +01:00
Shams Asari
244167d3e9
Enabled warnings as errors (#3514) 2018-07-04 17:17:27 +01:00
Chris Rankin
d634cdcbac
Clear some cut-and-paste cruft out of our Gradle files. (#3511) 2018-07-04 15:42:43 +01:00
Stefano Franz
f19564f9f8
add simple network verification cordapp (#3412)
* add simple network verification cordapp

* add ability to filter checked counterparties to specific x500
2018-07-04 11:33:21 +01:00
Mike Hearn
3e98efe04b Delete the network visualiser sample. It's very old and the build is strange and breaks in odd ways when Gradle runs in parallel. We haven't used it for a long time and have better demos these days anyway 2018-06-15 09:49:57 +01:00
Andras Slemmer
768d9309dc Various tests and fixes related to CORDA-1191 2018-06-07 16:51:04 +01:00
Michele Sollecito
fc020bca4b
[CORDA-1575]: Out of process nodes started by the driver do not log to file (fix). (#3286) 2018-06-01 16:16:23 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
bpaunescu
bff419e9af
Corda-1505 catch connection failure exception and re-throw as RPCException (#3203)
* CORDA-1505: catch connection failure exception and rethrow as RPCException

* CORDA-1443: remove incorrect import

* CORDA-1443: fix some failing tests

* CORDA-1505: fix broken CordaRPCClient test

* fix tests

* CORDA-1505: catch connection failure exception and rethrow as RPCException

* CORDA-1443: remove incorrect import

* CORDA-1443: fix some failing tests

* CORDA-1505: fix broken CordaRPCClient test

* fix tests

* CORDA-1505: changed exception handling to RPCException

* CORDA-1505: changed exception handling to RPCException
2018-05-21 18:01:31 +01:00
Thomas Schroeter
acefe4261c Bootstrap HA and BFT notaries 2018-05-18 18:33:49 +01:00
Shams Asari
3cdd908714
Moved the serialisation logic in nodeapi.internal.serialization into its own module: serialization (#3179)
node-api now depends on this module and upcoming changes will use this as well rather than having to depend on node-api.

EnumEvolveTests.deserializeWithRename and EnumEvolveTests.multiOperations are temporarily ignored since their test resources can't be regenerated due to bugs.
2018-05-17 16:18:07 +01:00
Thomas Schroeter
3d50e73271 Add configuration notary.serviceLegalName for clustered notaries 2018-05-16 15:19:14 +01:00
Andrzej Cichocki
65b782c206
ENT-933 Add spectator and participant profiles of rigorousMock (#3157) 2018-05-16 13:56:41 +01:00
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
Tudor Malene
543491c7df
CORDA-1461 improve devMode (#3100)
* CORDA-1461 improve devMode

* CORDA-1461 set devMode=true for driver

* CORDA-1461 fix tests and improve UI

* CORDA-1461 Address code review changes

* CORDA-1461 Missing developer emoji

* CORDA-1461 use latest cordform that sets devMode=true

* CORDA-1461 fix test and add driver overrides for notary

* CORDA-1461 fix tests, fix api-scanner version

* CORDA-1461 fix api

* CORDA-1461 formatting

* CORDA-1461 comment style
2018-05-11 17:48:02 +01:00
Shams Asari
3bb95c3ed1
Cleanup and improvements to the serialisation format of JacksonSupport (needed for CORDA-1238) (#3102)
Also deprecated all the public members that shouldn't have leaked into the public API.
2018-05-09 21:42:55 +01:00
Tudor Malene
5b26fd6551
CORDA-1346 split the simm valuation demo to reduce the size of the contract jar (#3078) 2018-05-08 16:19:35 +01:00
josecoll
493b8a99a0
Added missing dependency on finance cordapp. (#3059) 2018-05-08 11:20:30 +01:00
Andrius Dagys
3bf1e803d9
Move notary service related classes and interfaces in core to interna… (#2827)
* Move notary service related classes and interfaces in core to internal, since we won't be able to stabilise the APIs for writing custom notary services any time soon (the docs already mention it). I left out the wire protocol related classes so we don't accidentally break it.
2018-05-02 12:21:38 +01:00
Chris Rankin
8e507d0b88
CORDA-1263: Replace deprecated kotlin-stdlib-jre8 with kotlin-stdlib-jdk8. (#2992) 2018-04-24 14:03:41 +01:00
Andras Slemmer
ce5fb66260 StateMachine rewrite 2018-04-23 15:36:16 +01:00
Shams Asari
d3446e213c
Introduced a few more extension methods to Path, which are clearer than the static methods in Files. (#2985)
Also migrated code away from the old File API.
2018-04-23 14:31:49 +01:00
Viktor Kolomeyko
3aaa176dd4
CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning (#2977)
* CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning

* CORDA-1355: Update change log

* CORDA-1355: Minor change to improve readability.

* CORDA-1355: Custom serializers documentation update to mention new system property.
2018-04-23 13:55:40 +01:00
Anthony Keenan
247a97f1a5
Remove superfluous registerInitiatedFlow calls from tutorial and example tests (#2944) 2018-04-20 16:56:27 +01:00
Shams Asari
1288f63998
Fixed the CorDapp configuration demo (#2967) 2018-04-16 17:23:11 +01:00
Shams Asari
f88542faa2
CORDA-1095: Fixed rare race where the startNode future completes before the default notary is visible (#2947) 2018-04-11 15:33:55 +01:00
Anthony Keenan
ec09188559
[CORDA-1292] Add CordaService testing documentation and improve tests in irs-demo (#2929)
* Add CordaService testing documentation and improve tests in irs-demo

* Addressed review comments
2018-04-06 09:22:58 +01:00
Viktor Kolomeyko
d5317e074c
Remove errorLogPath parameter which is not used anyway. (#2934)
StdErr is always written to working directory if such path specified.
2018-04-05 18:10:47 +01:00
Joel Dudley
7deb802547
Adds link from changelog to upgrade notes. 2018-04-03 18:03:07 +01:00
Michele Sollecito
36d403dd7d
[CORDA-1262]: Added integration test for Cash Selection. (#2874) 2018-03-26 14:07:17 +01:00
szymonsztuka
fb37a5bcf1
CORDA-792 Fix local shell in trader demo and SIMM valuation demo. (#2837)
Added rpcSettings to start RPC so the local shell can connect to the node.
2018-03-16 16:41:34 +00:00
Viktor Kolomeyko
64871ac024
Fix IRSSimulationTest test (#2821)
* Fix `IRSSimulationTest` test

Since prod class `IRSSimulation` loading `trade.json` as resource, `trade.json` should be located in prod resources folder of a dependant project to be successfully loaded.

Also improve error reporting.

* Change of Json trades samples locations
2018-03-15 14:40:22 +00:00
Andrius Dagys
e31d2b0cad
CORDA-1208: Notary service should persist the notarisation request si… (#2823)
* CORDA-1208: Notary service should persist the notarisation request signature along with the committed input states.

This required modifying the uniqueness provider interface to accept the signature in addition to input states.
Until now the committed state log used to be stored as a map of (state reference -> (tranasction id, consuming party)).
Adding the serialized signature would mean inflating each state entry by around 700 bytes, which would be grossly inefficient.
Instead, two tables are now used: one for storing (state referece -> transaction id) map, and another for storing the notarisation
request details (transaction id, consuming party, date, signature).

* Update api - all of these changes are only related to custom notaries
2018-03-15 13:29:42 +00:00
igor nitto
2cff495553
Remove CordApps JARs from node classpath [CORDA-1135] (#2691) 2018-03-14 16:42:23 +00:00
Andrius Dagys
2d31247da2 CORDA-1171: When a double-spend occurs, do not send the consuming transaction id and requesting party back to the client - this might lead to privacy leak. Only the transaction id hash is now returned. 2018-03-09 16:00:52 +00:00
Konstantinos Chalkias
4121f70da3
CORDA-1175 Docs numbering issue and counterparty consistency. (#2744) 2018-03-06 14:22:38 +00:00
Katelyn Baker
06a6eace67
CORDA-1115 - Cannot serialize private nested objects (#2665)
* CORDA-1115 - Cannot serialize private nested objects

Shown up by the simm-valuation-demo the problem was where a private
object field of an object was being serialised within the outer objects
context (see tests added for example)

Fix is to switch from Kotlin reflection back to Java.

Additional fix to the test where it was comparing two lists of state
references in a flow and they weren't equal because they weren't in the
same order... This I assume is just an oversight (in that them being
in a different order but otherwise the same is actually fine) so
converting to set comparison

* Fix forward port issue where fingerprinting has moved

* Review Comments

* Review Comments

* Review Comments

* Gran -> Grab
2018-03-02 13:13:00 +00:00
Michele Sollecito
b580a2ac30
[CORDA-926]: Parsing NodeConfiguration will now fail if unknown properties are present. (#2484) 2018-03-01 14:57:36 +00:00
Anthony Keenan
577033441a
[CORDA-1035] Testing api KDoc Updates (#2584)
* Testing api KDoc Updates

* Update after code review

* Update api-current

* Revert changes to compiler.xml

* Made comment changes from review

* Fixing merge conflict

* Don't expose net.corda.node through test API (first pass)

* Fixing merge conflicts

* Update api-current

* Addressing review commits

* Fix exposure of internal implementation of MessageHandlerRegistration

* Make InProcess expose ServiceHub instead of internal StartedNodeServices

* Move InternalMockMessaginService interface to internal namespace

* Move MOCK_VERSION_INFO to internal namespace to avoid exposing VersionInfo

* Don't expose WritableTransactionStorage via testing api

* Create public VerifierType enum

* Update api-current and modify check-api-changes to check for net.corda.node exposures

* Fix merge conflicts

* Fixing another merge conflict

* Fix accidentally broken unit tests

* Make getInternalServices a property

* Fix failing unit tests

* Add todo to check-api-changes

* Fix rpc sender thread busy looping

* Fix tests

* Fixing tests

* Address mike's comments

* Fixing tests

* Make random port allocation internal

* Update api
2018-02-28 13:26:49 +00:00
Tommy Lillehagen
a542c0185d CORDA-1103 - Fix JAR paths in IRS demo launcher 2018-02-28 11:39:31 +00:00
Tommy Lillehagen
3572ce05fa CORDA-1102 - Fix IRS demo README 2018-02-28 10:03:15 +00:00
Katelyn Baker
ce4392ef31
CORDA-1080 - Doc update to make instructions clearer (#2599) 2018-02-27 14:09:45 +00:00
Maksymilian Pawlak
b91ef43e0f
Remove the debug helper which should never make it into master (#2633)
* Remove IRS Docker demo helpers
2018-02-26 15:47:04 +00:00
Andrius Dagys
0edfef2409 CORDA-696 - Create separate transaction types for contract upgrade transactions (#2589)
* CORDA-986 and CORDA-985 CompositeKey and Signature verification performance fixes (#2467)

* CORDA-696: Create separate transaction types for contract upgrade transactions.

Add rationale around upgrade transactions

Move contract upgrade transaction resolution logic into internal until it's stabilised.

Throw a better exception when contract attachment not found

Default legacy contract constraint to always accepting - needs to be changed to whitelist constraint before merging

Introduce a new upgraded contract interface that allows specifying the legacy constraint.

Remove StateLoader, make all tx resolution functions take in ServicesForResolution

Contract upgrade transactions can handle whitelist by zone constraints

When creating a contract upgrade transaction, make sure the attachment of the old cordapp gets attached when using hash constraints.
Attachment lookup for a given contract class name only scans currently loaded cordapps, and we don't load old versions of cordapps.

CORDA-696: Update upgrade docs
2018-02-26 11:29:25 +00:00
Mike Hearn
4f0c692831 Minor: reduce the size of the MockNetwork API a bit, add some better documentation 2018-02-19 16:58:28 +01:00
Matthew Nesbit
b8fa44d721
The IRS demo has a clash between web server ports and the regulator node on port 10010. This bumps the ports up by 1 to fix the issue. (#2562) 2018-02-16 18:17:15 +00:00
Andrius Dagys
5b93abdc57
CORDA-1010: Send a request signature in addition to a transaction to the notary (#2527)
CORDA-1010: Notary flow - clients now send a signature over a notarisation
request in addition to the transaction. This will be logged by the notary
to be able to prove that a particular party has requested the consumption
of a particular state.
2018-02-16 16:14:06 +00:00
Maksymilian Pawlak
fa34a16f27
IRS Docker nomenclature fix (#2531)
* We check properties, so why I named them variables?
2018-02-15 12:05:10 +00:00
Clinton
174ed3c64b
CORDA-556: Added Cordapp Config and a sample (#2469)
* Added per-cordapp configuration 
* Added new API for Cordformation cordapp declarations to support per-cordapp configuration
* Added a cordapp configuration sample
2018-02-14 14:49:59 +00:00
Maksymilian Pawlak
b91dd43a83
Test driver default parameters removal (#2519)
* Removed long parameter list in test driver, replaced with DriverParameters object
2018-02-13 13:15:05 +00:00
Maksymilian Pawlak
e5857b8e45 Windows curl warning (#2324)
* Windows curl warning

(cherry picked from commit abb48b1)

* Enhanced message

(cherry picked from commit 5b0fe7c)

* Ninja-character removal

(cherry picked from commit 821a672)
2018-02-12 17:39:20 +00:00
Joel Dudley
ad1be79900
Reorders params to put non-default args first. Creates simpler default constructors. 2018-02-12 17:02:34 +00:00
Anthony Keenan
7b65b7971a
CORDA-939 - Don't expose StartedNode and AbstractNode as part of public test api (#2472)
* 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
2018-02-12 10:09:59 +00:00
Andras Slemmer
d072f6c275
Merge pull request #2490 from corda/aslemmer-r3corda-compatibility
CORDA-995: r3corda wire compatibility
2018-02-09 17:12:18 +00:00
Andras Slemmer
0a88b76e46 r3corda wire compatibility 2018-02-09 14:50:20 +00:00
Patrick Kuo
c8cf46c657
CORDA-961 Wire up and enforce max transaction size (#2465)
* 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
2018-02-09 14:48:45 +00:00
Mike Hearn
cbe947694d Minor: upgrade some Spring Boot deps and tweak the Jackson version it uses to avoid a conflict with Kotlin 1.2.20 2018-02-08 13:31:47 +00:00
Mike Hearn
058e694d31 Minor: fix a couple of Kotlin build file issues that cropped up whilst upgrading 2018-02-08 13:31:47 +00:00
Anthony Keenan
8081ee42ad
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
2018-02-07 11:55:06 +00:00
Maksymilian Pawlak
a9856b9ce6
Docker system (end-to-end) test (#2437)
* System test for IRS Demo utilizing docker, docker-compose and PhantomJS to automate full-stack testing
2018-02-05 11:42:20 +00:00
Andras Slemmer
37e207eaf3
Merge pull request #2271 from corda/aslemmer-fix-irsdemo
Fix non-visible IRS demo bug
2018-01-29 11:03:08 +00:00
Andras Slemmer
fca3d565ac Add 'Regulator' node for AutoOfferFlow, fixing IRS 2018-01-26 14:29:35 +00:00
Andras Slemmer
58f76ee2da Put IRS spring whatever back on classpath 2018-01-26 11:21:38 +00:00
Andrius Dagys
e357a88181
Deprecate TimeWindowChecker, make TimeWindowInvalid report exact current time and transaction time window (#2280)
* Make notary service return the current time and the transaction time window
along with the TimeWindowInvalid error.

Deprecate TimeWindowChecker.
Add a static method for validating transaction time window to reduce code duplication.
2018-01-26 09:32:11 +00:00
Andras Slemmer
69bfc9b437 Comment out lines breaking IRS demo 2018-01-25 19:59:24 +00:00
Michele Sollecito
9783f11ba8
Exposed RPC SSL settings through Cordformation (#2419) 2018-01-25 14:32:58 +00:00
Michele Sollecito
142f52fa82
[CORDA:936]: Enable RPC layer to work with SSL 2018-01-23 16:23:37 +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
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
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
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
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
Andrius Dagys
3e00676851
Raft notaries can share a single key pair for the service identity (i… (#2269)
* 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-09 08:17:59 +00:00
Ross Nicoll
412fead02e
CORDA-785: Add functions for constructing FlowLogicRef without the class (#2134)
Add functions for constructing `FlowLogicRef` from class name, rather than requiring the class itself. This avoids requiring that schedulable states have access to the scheduled flow to instantiate, but instead can require it only actually scheduling the flow. This reduces the size of the JAR required to validate transactions containing these states.
2018-01-04 13:32:10 +00:00
Tommy Lillehagen
dd329c860c CORDA-878 - Update IRS demo instructions 2018-01-03 14:19:03 +00:00
Maksymilian Pawlak
5c85e80b17 Restoring apparently missing SIMM demo documentation (#2293)
(cherry picked from commit 2e84bad)
2018-01-02 16:48:08 +00:00
Maksymilian Pawlak
b8421e5028
Increase memory allowance for SIMM demo to pass with external DB on MacOS (#2303) 2018-01-02 09:56:26 +00:00
Shams Asari
4a2f157118
Validating the entire cert path in node registration, rather just checking the root cert. (#2298)
Also reduced duplicate code when creating the node CA cert path for testing, and renamed IdentityGenerator to DevIdentityGenerator.
2017-12-29 14:38:30 +00:00
Shams Asari
39d25958e2
Fixed identity generation of single node notaries as used by the driver and MockNetwork. (#2296)
The identity cert generated used to be of type SERVICE_IDENTITY when it should have been a LEGAL_IDENTITY.
2017-12-28 15:32:09 +00:00
Maksymilian Pawlak
5ce873a6e4 Removed unparseable % sign (#2294)
(cherry picked from commit f05de54)
2017-12-28 09:13:57 +00:00
Maksymilian Pawlak
f8f5639b38 More descriptive error message (#2295) 2017-12-28 09:12:06 +00:00
Shams Asari
e1e715ee81 Removed all remaining special treatment of the X500 common name.
With network parameters the CN is no longer needed to identify notaries. This frees it up to be used in the node's name alongside the other attributes.

Also, the identity generation logic has been simplified, removing the need to have magic string values for storing distributed identities in the keystore. Now there are just two alias prefixes: "identity" as it was previously, and "distributed-notary".
2017-12-18 21:39:11 +00:00
Andrzej Cichocki
8114a20abd
CORDA-716 Move non-API things to internal (#2256) 2017-12-17 18:44:35 +00:00
Andrzej Cichocki
2652ae111a
CORDA-716 Devrel feedback (#2266)
* * Document TestIdentity entropy and enforce that it actually works
* Ledger/transaction DSL default notary with fresh key
* MockServices default identity with fresh key
* makeTestIdentityService now takes vararg
* Require cordappPackages for MockServices
* DSL automatic serialization init
* Improve error when two MockNetworks used

* * Make cordappPackages required by MockNetwork
* Default identity service in MockServices
* Make notarySpecs Java-friendly
2017-12-15 19:18:31 +00:00
Katelyn Baker
8dfe377ae1 Corda-862 - Fix notary demo for AMQP 2017-12-15 10:13:18 +00:00
Andrzej Cichocki
05bc05a936
CORDA-716 Retire withTestSerialization (#2240) 2017-12-14 12:42:18 +00:00
Shams Asari
2319bf396c Renamed TestIdentity.key to keyPair and pubkey to publicKey (#2249) 2017-12-14 11:30:55 +00:00
Andrzej Cichocki
c3b9955344
CORDA-716 Fix split packages in testing (#2232) 2017-12-12 19:37:01 +00:00
Andrzej Cichocki
905c8252a6
CORDA-654 Remaining key constants (#2226) 2017-12-12 18:03:06 +00:00
Andrzej Cichocki
08bbf9061e
Introduce TestIdentity. (#2217) 2017-12-12 15:52:05 +00:00
Maksymilian Pawlak
537e304536
IRS demo permissions fix (#2231) 2017-12-12 13:56:12 +00:00
Tommy Lillehagen
64c0d41a5d ENT-1237 Fix run script for IRS Demo web apps 2017-12-12 11:47:14 +00:00
Shams Asari
6d6393d984 Merge branch 'feature-network-parameters' into shams-merge-feature-network-parameters 2017-12-11 21:10:34 +00:00
Andrzej Cichocki
d8c7f0ae23
Inline DUMMY_CASH/OBLIGATION_ISSUER. (#2214) 2017-12-11 16:17:20 +00:00
Andrzej Cichocki
544e19e277
CORDA-654 Remove key constants from NodeTestUtils (#2205)
* DUMMY_NOTARY was hiding in a couple more places
2017-12-11 11:44:01 +00:00
Katelyn Baker
4b5c60637c
Merge pull request #2017 from corda/kat/feature/enableAMQP
CORDA-780 - Enable AMQP for P2P and Storage Contexts
2017-12-11 11:37:16 +00:00
Shams Asari
41bfd7a971 Merge fixes 2017-12-10 20:15:33 +00:00
Shams Asari
65ff931f53 Merge branch 'master' into shams-master-merge-081217
# Conflicts:
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreWrapper.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt
#	node/src/test/kotlin/net/corda/node/services/identity/InMemoryIdentityServiceTests.kt
#	node/src/test/kotlin/net/corda/node/services/identity/PersistentIdentityServiceTests.kt
#	samples/irs-demo/src/integration-test/kotlin/net/corda/test/spring/SpringDriver.kt
#	testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/DriverDSL.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/DriverDSLImpl.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/NodeBasedTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/RPCDriver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/demorun/DemoRunner.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt
#	verifier/src/integration-test/kotlin/net/corda/verifier/VerifierDriver.kt
2017-12-08 16:03:16 +00:00
Shams Asari
db9eb8a63f Preliminary work to make merge with master manageable 2017-12-08 13:39:05 +00:00
Andrzej Cichocki
32ea59d085
Inline some DUMMY constants. (#2200) 2017-12-08 10:45:22 +00:00
Katelyn Baker
8878fa99a0 CORDA-553 - Remove CordaCustomSerializer annotation
It isn't actually needed as we can scan the jar for classes implementing
the interface.
2017-12-07 21:15:33 +00:00
Katelyn Baker
fcec60e232 CORDA-786 - Use reflection to infer proxy and proxied types in CorDapp custom serializers
This removes any need for the user implement and override types from the
super class

    * CORDA-786 - Docs update
    * CORDA-786 - Remove unneeded second annotation on the proxy objects
    * Fix merge conflicts
2017-12-07 21:15:14 +00:00
Katelyn Baker
d25b7f560c CORDA-786 - Genericise the CorDapp Proxy 2017-12-07 21:15:14 +00:00
Katelyn Baker
81eb0c1898 CORDA-780 / CORDA-786 - Enable AMQP for P2P and Storage Contexts
Add plugable mechanism for CorDapps such that they can add their own
custom serializers
2017-12-07 21:13:59 +00:00
Andrzej Cichocki
c36bea3af5
CORDA-654 MockServices no longer has hard-coded identities (#2192)
* Resurrect a test
* Fix a broken test
* Pass in the initial identity
* Make IdentityService easier to mock
2017-12-07 11:55:18 +00:00
Shams Asari
8461837f1a Cleaned up Driver.kt so that only the relevant bits are exposed as public API 2017-12-05 23:52:15 +00:00
Andrzej Cichocki
e4d76204c1
Pass some key constants into MockServices. (#2173) 2017-12-05 14:50:56 +00:00
Shams Asari
4374c32a75 HttpUtils methods now throw an IOException when a request isn't successful, rather than returning a Boolean. This has been the cause of previous bugs as people forget to check for the false case. 2017-12-04 21:50:19 +00:00
Shams Asari
66515d24b5 Merge fixes and fix to attachment demo 2017-12-04 14:35:03 +00:00
Shams Asari
6a1aa59e3e Merge branch 'master' into shams-merge-master-041217
# Conflicts:
#	node/src/integration-test/kotlin/net/corda/node/services/DistributedServiceTests.kt
#	samples/bank-of-corda-demo/src/main/kotlin/net/corda/bank/BankOfCordaCordform.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/NodeTestUtils.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/NodeBasedTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/NotarySpec.kt
#	verifier/src/integration-test/kotlin/net/corda/verifier/VerifierDriver.kt
2017-12-04 13:39:32 +00:00
Shams Asari
5264072752 Renamed n.c.nodeapi.config to n.c.nodeapi.internal.config as that config code is not public API. For the same reason, also moved User into the same internal package. 2017-12-03 17:20:30 +00:00
Katarzyna Streich
6958cbbc44
Fix demobench as part of network parameters work (#2148)
* Fix demobench - network parameters

Demobench uses ServiceIdentityGenerator to pregenerate notary identity
for network parameters.
2017-12-01 16:14:03 +00:00
Andrzej Cichocki
a314a6a125
CORDA-654 Simplify TransactionDSL API (#2152) 2017-11-30 16:28:44 +00:00
Shams Asari
fdc31091a6 Merge branch 'feature-network-parameters' into shams-master-merge-291117
# Conflicts:
#	constants.properties
#	gradle-plugins/cordformation/src/main/kotlin/net/corda/plugins/Cordform.kt
#	gradle-plugins/cordformation/src/main/kotlin/net/corda/plugins/Node.kt
2017-11-30 12:05:42 +00:00
Shams Asari
2f0bc249ad Merge fixes and getting tests to pass 2017-11-30 11:59:39 +00:00
Katarzyna Streich
c9f3e98795
Another approach to fixing deployNodes task and network parameters generation (#2066)
* Generate networkParameteres for Cordformation.

Fix deployNodes task in Cordformation to generate NetworkParameters before running the nodes.
Add TestNetworkParametersGenerator utility loaded after node infos generation step.

* Get rid of bouncy castle provider dependency
For cordform-common. It caused problems with loading our custom
X509EdDSAEngine for generation of network parameters in deployNodes
task.
2017-11-30 10:39:29 +00:00
Shams Asari
71763ff1d3 Merge branch 'master' into shams-master-merge-291117
# Conflicts:
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapCache.kt
#	node/src/test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTests.kt
#	samples/notary-demo/src/main/kotlin/net/corda/notarydemo/BFTNotaryCordform.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/demorun/DemoRunner.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt
2017-11-29 18:00:16 +00:00
Shams Asari
b638b30d2a Moved CordaPersistence and dependent classes into internal package in node-api. This is so that the doorman can make use of them without needing a compile dependency to node. 2017-11-29 17:14:05 +00:00
Shams Asari
5c53a91785 Overhaul of the Bank of Corda demo to fix two problems it had:
1. The runRPCCashIssue and runWebCashIssue gradle tasks didn't work because they were using the wrong ports
2. Notary lookup was failing because the lookup name didn't include the correct CN for the notary name (this slipped through when reverting the network parameters)

The ports change occurred in #1922 which was attempting the fix the runIssuer gradle task. This is actually a misleading and redundant task as all it does is start up the nodes, which is what the documented deployNodes already does. The ports runIssuer allocated to the nodes were different to the ones specified in deployNodes.

To make sure we have integration tests which closely match deployNodes, the BoC demo has been updated to make use of CordformDefinition. This keeps the node definitions in one place, removing the need to have disparate files in sync. runIssuer has been removed.
2017-11-29 14:48:05 +00:00
Andrzej Cichocki
dbe2dca7b9
CORDA-654 Make VaultFiller a class so I can change its hardcoded bits (#2141) 2017-11-29 09:49:34 +00:00
Andrzej Cichocki
4bd6fef0f9
StateMachineManager is no longer lateinit. (#2123) 2017-11-27 17:55:08 +00:00
Shams Asari
9fefabbb88 Merge branch 'master' into shams-master-merge-271117 2017-11-27 17:08:13 +00:00
Shams Asari
1705df4d1f Made the database config option typesafe, rather than relying on String properties 2017-11-27 13:51:53 +00:00
Andrzej Cichocki
449155cea3
IdentityService is no longer obtained lazily. (#2130) 2017-11-27 12:34:33 +00:00
Shams Asari
9097107d2e Revert "Revert "Introducing network parameters.""
This reverts commit 953a4a3790.
2017-11-21 15:05:24 +00:00
Michele Sollecito
37b4d0e939
Fixed some permission issues with demos. (#2099) 2017-11-21 11:20:17 +00:00
Andrzej Cichocki
f26aa33553
Introduce contextLogger (#2085)
* Revert with comment, probably lazy for a reason.
2017-11-20 11:31:08 +00:00
Ross Nicoll
19aba62fc6
Move tests to using named identities (#1879)
Move tests to using named identities in preparation for multiple identities work. Includes:

* NetworkMapCacheTest
* NodeInterestRatesTest
* NodeVaultServiceTest
* ContractUpgradeFlowTest
* Cash tests
* AttachmentSerializationTest
* CordaRPCOpsImplTest
* VaultWithCashTest
* ScheduledFlowTests
2017-11-17 14:16:17 +00:00
Shams Asari
953a4a3790 Revert "Introducing network parameters."
This reverts commit d04e487
2017-11-17 10:04:38 +00:00
Ross Nicoll
e4f5e16bf4
Clean up identities in tests, stage 1 (#2059)
* Clean up identities in CashTests so that the mini/mega corp keys and identities are correctly
paired together throughout. Previously `miniCorpServices` presented the same key as the
MegaCorp identity, but with the name Mini Corp attached.
* Correct key/name matches in VaultWithCashTest
* Split services in CashTests to not have multiple identities per service hub
2017-11-16 17:17:45 +00:00
Michele Sollecito
92c8861802
[CORDA-760]: Propagate invocation context across the codebase. (#2016) 2017-11-15 14:58:43 +00:00
Shams Asari
2fe41715cc On exit, the driver will automaticallly shutdown any nodes which weren't waited for.
The motivation for this came with the recent change that a default notary is started by the driver, which if ignored will leak the notary process.

Also, waitForAllNodesToFinish() has been replaced by a driver parameter.
2017-11-14 20:20:00 +00:00
Andrzej Cichocki
6a569fb3f1
Retire findTokenizableService. (#2036) 2017-11-10 16:40:18 +00:00
Andrzej Cichocki
052124bbe0
CORDA-716 Make serialization init less static (#1996) 2017-11-10 15:44:43 +00:00
Christian Sailer
449a714478
Merge pull request #1999 from corda/christians_fix_irs-demo-deploy
IRS demo gradle files
2017-11-10 11:26:40 +00:00
Andrzej Cichocki
6b71c6cf75
Retire some initialiseSerialization booleans. (#2019) 2017-11-10 10:15:55 +00:00
Shams Asari
e26e41a384 Various structural cleanups of node-driver:
* Extracted out ShutdownManager into its own file
* Moved RPCDriver and ProcessUtilities into internal package
* Made n.c.testing.performance package internal
2017-11-07 16:58:40 +00:00
Shams Asari
a4be26a296 Removed unnecessary calls to MockNetwork.runNetwork (b/c there is no more P2P node registration) and removed redundant entries in cordappPackages 2017-11-06 21:28:20 +00:00
Konstantinos Chalkias
4e1578c19a
Remove retired IntegrationTestCategory reference (#2007) 2017-11-06 18:36:19 +00:00
Christian Sailer
1b332e2cb3 Add extra version pinning for spring.boot gradle plug-in 2017-11-06 14:34:09 +00:00
Andrzej Cichocki
00a9014852
CORDA-716 Rename one TestClock to DemoClock, and unduplicate code (#1988) 2017-11-06 11:13:56 +00:00
Andrzej Cichocki
9baa9037ae
Retire marker interface. (#1997) 2017-11-06 10:53:02 +00:00
Shams Asari
3bb018a5ce Removed the ability to manually start notary nodes from the driver and MockNetwork. Instead by default a single notary is automatically started. This can be customised at creation time of the driver and MockNetwork. This more accurately models the concept of network parameters in a CZ.
Also added helper methods to retrieve this default notary.
2017-11-05 22:55:33 +00:00
Christian Sailer
68481765e1 Clean up build gradle files 2017-11-03 16:16:23 +00:00
Alberto Arri
9be37c2b88
Remove useless call to waitUntilNetworkReady within driver started nodes (#1998)
Remove usages of waitUntilNetworkReady in conjunction with driver
2017-11-03 14:27:46 +00:00
Shams Asari
d04e48740b Introducing network parameters.
network-parameters file read in by the node at startup, of which only the list of notaries is used. For now, the driver and MockNetwork have been updated to require notaries to be started first. This is so that the same set of network parameters can be defined for all the nodes.

CN in the legal name is not longer disallowed since it's no longer reserved for distributed notary names.

Single-node notaries now only have one identity, their main identity. Nodes part of a cluster continue to have two.

(Based off Kasia's work)
2017-11-03 09:46:10 +00:00
Alberto Arri
5490465750
[CORDA-446] Remove entities from netmap cache & friends (#1980)
* Remove PersistentNetworkMapService and related classes. They were part of the old network map node code.
2017-11-03 09:28:52 +00:00
Michele Sollecito
d882f8871e
[CORDA-758]: Permissions are now checked for each RPC method. (#1985)
* Permissions are now checked for each RPC method.

* Fixed NodeMonitorModelTest

* Fixed IRSDemoTest
2017-11-02 15:09:49 +00:00
Alberto Arri
00e682a544
[CORDA-446] Clean up other mentions of network map node and logic (#1974)
* [CORDA-446] Clean up other mentions of network map node and logic

* Rename AbstractNetworkMapService to NetworkMapService and remove the empty NetworkMapService

* fix build

* fix artemismessaging tests

* pr comments
2017-11-01 14:25:48 +00:00
Andrzej Cichocki
6b2b663ab3
CORDA-716 Retire MockNetwork.Factory (#1937) 2017-10-31 17:10:37 +00:00
Shams Asari
6ebba9dea1 Removed the startNotary methods from NodeBasedTest, and moved it into an internal package
This commit is in preparation for the upcoming network parameters work.
2017-10-31 11:49:33 +00:00
Andrzej Cichocki
4b0b13dad4
CORDA-716 Retire TestDependencyInjectionBase (#1939) 2017-10-31 10:21:38 +00:00
Maksymilian Pawlak
02a5ddb7df
Remove Bower dependencies from repo and download them on demand (#1959)
Bower dependencies installed by Gradle as a part of deployment
2017-10-30 16:51:38 +00:00
Andrzej Cichocki
05d6fb91c7
Reinstate Simulation config overrides for notary. (#1947) 2017-10-30 11:41:53 +00:00
Alberto Arri
a0b9768be7 Retire FullNodeConfiguration (#1954)
* Retire FullNodeConfiguration

* Moved logic and tests for Artermis user names in RPCUserServiceImpl
2017-10-27 14:30:10 +01:00
Mike Hearn
d7e4aa1783 Add more formal support for observer/regulator nodes. This is a simplistic
approach which assumes a dedicated node for observers: states that are
reported to the node will appear in the database and update feeds as
normal. Apps that expect all updates to be relevant to themselves may
need adjusting if they run on an observer node too, but this is likely
to be rare.
2017-10-26 18:05:24 +02:00
Maksymilian Pawlak
44a7d872d8 IRS Demo - split IRS Demo into two separate applications to showcase … (#1638)
* IRS Demo - split IRS Demo into two separate applications to showcase the separation and usage of RPC client
2017-10-25 16:40:21 +01:00
Andrzej Cichocki
ba75146446 CORDA-716 Unpollute MockNode with Simulation-specific code (#1945) 2017-10-25 14:33:36 +01:00
Joel Dudley
5bb4601812 Reflects V1.0 changes on Master re: internal samples and identity sync flow API. 2017-10-25 09:29:32 +01:00
Andrzej Cichocki
927924498b Introduce MockNodeParameters/Args (#1923) 2017-10-24 11:58:32 +01:00
Alberto Arri
b04368e36a [CORDA-442] make MockNetwork not start a networkmap node (#1908)
* [CORDA-442] make MockNetwork not start a networkmap node

Now MockNetwork will put the appropriate NodeInfos inside each running node networkMapCache.

Tests relating to networkmap node starting and interaction have been removed since they where relaying on MockNetwork
2017-10-23 16:50:53 +01:00
Viktor Kolomeyko
cbb5135097 Fixing Bank-Of-Corda Demo in master (#1922)
* Fix-up: Bank Of Corda sample

Use correct CorDapp packages to scan

(cherry picked from commit 2caa134)

* Set adequate permissions for the nodes such that NodeExplorer can connect

(cherry picked from commit ae88242)

* Set adequate permissions for the nodes such that NodeExplorer can connect

(cherry picked from commit ae88242)

* Correct run configuration

* Fix-up port numbers
2017-10-23 15:04:25 +01:00
Andras Slemmer
c66a84bfc6 Interface changes for multi-threading 2017-10-20 11:29:30 +01:00
Viktor Kolomeyko
11db199b7b Fix-up: Bank Of Corda sample (#1912)
In the previous version when running with `--role ISSUER` the application failed to start.
The reason was that in spite of `quantity` and `currency` were optional,
un-necessary `requestParams` been constructed regardless.
2017-10-20 11:00:48 +01:00
Clinton
3dd09fd69b Cordformation in Kotlin (#1873)
Cordformation rewritten in kotlin.
2017-10-19 15:41:25 +01:00
Andrzej Cichocki
12fa945077 CORDA-680 Update cordapp packages documentation (#1901)
* Introduce MockNetworkParameters
2017-10-19 15:06:51 +01:00
Konstantinos Chalkias
479ab9a36a [CORDA-694] Commands visibility for Oracles (without sacrificing privacy) (#1835)
new checkCommandVisibility feature for Oracles
2017-10-19 10:21:20 +01:00
Andrzej Cichocki
b2454c646c Eliminate circular dependency of NodeSchedulerService on ServiceHub. (#1891) 2017-10-19 09:26:26 +01:00
szymonsztuka
6a00df322b reference to finance module via not hardcoded group ID (#1515)
*  generic way to reference to group id when loading finance.jar via cordapp
2017-10-17 11:03:49 +01:00
Andrzej Cichocki
38cf4a489e CORDA-676 Eager cordapp schemas (#1839)
* Retire customSchemas.
* Key cordapp-to-hash map by url as native equality too strict.
2017-10-16 11:35:29 +01:00
Andrius Dagys
7b10e92819 Fixed AbstractNode to load custom notary services properly (#1720)
* Fixed AbstractNode to load custom notary services properly.
Added a custom notary sample.

* Prevent multiple custom notaries from being loaded

* Throw if more than once custom notary service is loaded
2017-10-13 10:36:25 +01:00
Ross Nicoll
327f0ebd73 CORDA-654: Migrate test APIs to match identity changes (#1744)
Rework identity usage in tests to extract identity from nodes by name, rather than just arbitrarily choosing the first identity. This better models the intended design for production (future work).
2017-10-11 18:26:09 +01:00
Andrzej Cichocki
4ee250a19b Retire setCordappPackages. (#1860) 2017-10-11 10:35:21 +01:00
Matthew Nesbit
f19ff141dd Update code to use AppServiceHub in services and support for services when using MockServices hub. 2017-10-10 17:11:32 +01:00
Alberto Arri
3bee830604 [CORDA-442] Removed the NetworkMap option from Cordform, changed all the examples… (#1827)
[CORDA-442]
Removed the option for Cordformation to specify a networkMap.

All the samples have been migrated to not specify a networkMap.
2017-10-10 15:45:42 +01:00
Shams Asari
bd53a22efa Removed extraAdvertisedServiceIds config
The remaining use for it was the finance CorDapp for permissioning CCY issuers. Instead this is now taken from a custom config in node.conf.
2017-10-10 13:47:37 +01:00
Alberto Arri
22b1dead32 Remove functions with spaces in their name (#1850)
Remove all the Kotlin functions with spaces in them since the Android doesn't support them.

See https://github.com/corda/corda/issues/1730 for a more in-depth discussion.
2017-10-10 09:32:43 +01:00
Clinton
484cf75420 CORDA-686 - Split Cordapp gradle plugin from cordformation (#1817)
Added CorDapp gradle plugin written in Kotlin and bumped the version of gradle plugins to 2.0.0 to reflect that this backwards incompatible change is a part of the on going stabilisation of the Corda gradle plugin suite.
2017-10-09 20:08:08 +01:00
Tommy Lillehagen
14f959b4af Code clean-up run 2017-10-09 15:26:40 +01:00
Tommy Lillehagen
fcc4bdae7e Reformat files in testing 2017-10-09 15:26:40 +01:00
Shams Asari
727cd0e55c Cleaned up notary configuration by introducing a notary config option.
extraAdvertisedServiceIds is no longer used for this.
2017-10-07 12:52:37 +01:00
Michele Sollecito
0b35a99c5a [CORDA-682]: Claim Jigsaw module names (#1824)
[CORDA-682] Specify Jigsaw module names for all JAR projects.
2017-10-06 15:37:33 +01:00
Katarzyna Streich
66d78fcf65 Cleanup of mock network pre-NetworkParameters (#1802)
* MockNode rename overrideServices to notaryIdentity

Permit only one override of service.

* MockNetwork: force creation of NetworkMapNode

Tests cleanup: decouple normal nodes and network map. NetworkMap node is created as first.
2017-10-06 10:32:54 +01:00
josecoll
dd3d8ba626 Merge release-v1 onto master (mostly documentation changes) (#1797)
* Updated corda release version to 1.0.0.RC2 (#1641)

* Fixed Simm Valuation Demo Test and enable serializabe java 8 lambdas. (#1655)

* [CORDA-624] Node Explorer on Issuing cash throws MissingContractAttachements exception (#1656)

(cherry picked from commit 27fea4d)

* BIGINT fix for H2 coin selection. (#1658)

* BIGINT fix for H2 coin selection.

* Review feedback

* CORDA-637 Node Explorer shows Network Map Service in Cash Issue dropdown (#1665)

* [CORDA-637] Node Explorer shows Network Map Service in Cash Issue dropdown

* add TODO to remove the hack

* Declare this internal message string as "const". (#1676)

* Merge "A variety of small fixes" into the 1.0 release branch (#1673)

* Minor: improve javadocs in NodeInfo

* Minor: use package descriptions in Kotlin build of api docs too, not just javadocs.

* RPC: make RPCConnection non-internal, as it's a core API. Move docs around so they're on public API not internal API.

* Add an IntelliJ scope that covers the currently supported Corda API.

This is useful when used in combination with the "Highlight public
declarations with missing KDoc" inspection.

* Ironic: upgrade the version of the Gradle plugin that checks for upgraded versions of things.

It had broken due being incompatible with the new versions of Gradle
itself.

* Docs: flesh out javadocs on ServiceHub

* Docs: add @suppress to a few things that were polluting the Dokka docs.

* Docs: mention RPC access in NodeInfo javadoc

* IRS Fixes to bring UI closer to declared financial types (#1662)

* Made problematic CordaRPCClient c'tor private (with internal bridge methods) and added correct c'tors for public use. (#1653)

initialiseSerialization param has also been removed.

* Fixing flow snapshot feature (#1685)

* Fix validating notary flow to handle notary change transactions properly. (#1687)

Add a notary change test for checking longer chains involving both regular and notary change transactions.

* Unification of VaultQuery And VaultService APIs (into single VaultService interface) to simplify node bootstrapping and usability. (#1677) (#1688)

* Identity documentation (#1620)

* Sketch initial identity docs

* Restructure confidential identity docs to better fit structure

* Split confidential identities into API and concepts

* Further expansion on basic identity conceptS

* Merge Party type into api-identity.rst

* Address feedback on written content

* Rework inline code with literalinclude

* Start addressing feedback from Richard

* Clarify use of "counterparty"

* Address comments on key concepts

* Correct back to US english

* Clarify distribution/publishing of identities

* Update changelog around confidential identities

* CORDA-642 Notary demo documentation fixes (#1682)

* Notary demo documentation fixes.

* One of the tables is prefixed.

* CORDA-641: A temporary fix for contract upgrade transactions (#1700)

* A temporary fix for contract upgrade transactions:
during LedgerTransaction verification run the right logic based on whether
it contains the UpgradeCommand.

* Move ContractUpgradeFlowTest away from createSomeNodes()

* Remove assembleBareTx as it's not used

* Update corda version tag to 1.0.0-RC3 (#1705)

* Hide SerializationContext from public API on TransactionBuilder (#1707)

* Hide SerializationContext from public API on TransactionBuilder

(cherry picked from commit 6ff7b7e)

* Hide SerializationContext from public API on TransactionBuilder

(cherry picked from commit 6ff7b7e)

* Address feedback on confidential identities docs (#1701)

* Address minor comments on confidential identities docs

* Expand on implementation details of confidential identities

* Cleanup

* Clarify details of the data blob in the swap identites flow

* Add that certificate path is not made public for confidential identities

* FlowSession docs (#1693)

* FlowSession docs (#1660)

* FlowSession docs

* PR comments

* Milder example flow name

* Fixes bugs with contract constraints (#1696)

* Added schedulable flows to cordapp scanning

Fixed a bug where the core flows are included in every cordapp. Added a test to prove the scheduled flows are loaded correctly. Added scheduled flow support to cordapp.

Renabled broken test.

Fixed test to prove cordapps aren't retreived from network.

Review fixes.

Fixed a test issue caused by gradle having slightly different paths to IntelliJ

* Fixed test for real this time.

* Consistent use of CordaException and CordaRuntimeException (#1710)

* Custom exceptions in corda, should either derive from an appropriate closely related java exception, or CordaException, or CordaRuntimeException. They should not inherit just from Exception, or RuntimeException.

Handle PR comments

Add nicer constructors to CordaException and CordaRuntimeException

* Fix ambiguous defaulted constructor

* Add @suppress (#1725)

* Git-ignore Node Explorer config. (#1709)

* add message warning windows users they might need to manually kill explorer demo nodes started by gradle (#1717) (#1726)

* Misc documentation fixes (#1694)

(cherry picked from commit 592896f)

* Document -parameters compiler arg for Java CorDapps. (#1712)

* Correct non-anonymous two party trade flow (#1731)

* Parameterize TwoPartyTradeFlowTests to confirm deanonymised functionality works.
* Correct handling of counterparty using well known identity in TWoPartyTradeFlow

* CORDA-594 - SIMM Demo doc update (#1723) (#1735)

* CORDA-594 - SIMM Demo doc update

For V1 write a series of JSON / curl commands a user can follow to run
the demo

* Review Comments

* Updated the rationale behind as to why SIMM was introduced.

* typo

* Cordapps now have a name field. (#1664)

Corrected cordapp name generation.

Added changelog entry.

* Small API fixes against M16 (#1737)

* Move CompositeSignaturesWithKeys into net.corda.core.crypto package.

(cherry picked from commit 8f29562)

* Rename and move CordaPluginRegistry to reflect its real purpose now.
Simplify serialization code a bit.

(cherry picked from commit e2ecd3a)

* Docs: docsite improvements

* Remove discussion of webserver from 'writing a cordapp' page.
* Fixup some flow docs.
* Add a couple more package descriptions.

(cherry picked from commit 2aedc43)

* Review comments

(cherry picked from commit ba1d007)

* Review comments - always apply default whitelist and no longer load it via ServiceLoader

(cherry picked from commit 7d4d7bb)

* Added wording about renaming services resource file

* Update corda version tag to 1.0.0-RC4 (#1734)

* Update corda version tag to 1.0.0-RC3

* Update corda version tag to 1.0.0-RC4

* Update build.gradle

* V1 tests and fixes for the ContractConstraints work (#1739)

* V1 tests and fixes for the ContractConstraints work

* More fixes.

* Added a contract constraints section to the key concepts doc. (#1704)

Documentation for contract constraints.

Added to index.

Review fixes round 1.

More review fixes.

Review fixes.

Explained package contents.

review fixes.

Addressed RGB's final review comments.

Updated source code type to 'java'

* Fixes dead links. (#1749)

* Update gradle plugins version to 1.0.0 (#1753)

* Update Readme (#1756)

* Update Readme

Minor tweaks to Readme -- consistent capitalisation and more descriptive list of features (also reordered to put the important things first)

* Copied master readme.

* Update Readme

Minor tweaks to Readme -- consistent capitalisation and more descriptive list of features (also reordered to put the important things first)

* Fixes .rst formatting. (#1751)

* Updates tutorials. (#1649)

* Updates tutorials.

* Addresses review comments.

* Tutorial refresh for v1.0 and moving of code into separate files. (#1758)

* Moves code sections in tutorials to code files.

* Removes wallet references.

* Updates repo layout doc.

* Removes remaining cordapp-tutorial references, replaced with cordapp-example.

* Fixes broken link.

* Misc docs fixes.

* Refreshes the ServiceHub and rpc ops api pages.

* Updates the cheat sheet.

* Updates cookbooks.

* Refreshes the running-a-notary tutorial.

* Updates flow-testing tutorial

* Updates tear-offs tutorial.

* Refreshes integration-testing tutorial.

* Updates to contract tutorial and accompanying code to bring inline with V1 release.

* Refreshes contract-upgrade tutorial.

* Fixed broken code sample in "writing a contract" and updated contracts dsl.

* Added contract ref to java code. Fixed broken rst markup.

* Updates transaction-building tutorial.

* Updates the client-rpc and flow-state-machines tutorials.

* Updates the oracles tutorial.

* Amended country in X500 names from "UK" to "GB"

* Update FlowCookbook.kt

* Amended cheatsheet. Minor update on contract upgrades tutoraial.

* Added `extraCordappPackagesToScan` to node driver.

* Changes to match new function signature.

* Update to reflect change in location of cash contract name.

* CORDA-670: Correct scanned packages in network visualiser (#1763)

* Add CorDapp dependency of IRS to network visualiser

* Set CorDapp directories

* Checking out the latest milestone will no longer be required. (#1761)

* Updated documentation indices (#1754)

* Update documentation indices.

* Reference a moveable tag for V1 docs.
Remove redundant warning text.

* Reverted proposed usage of new docs release tag

* Minor: print a deprecation warning when the web server starts. (#1767)

* Release and upgrade notes for V1.0 (#1736)

* Release and upgrade notes for V1.0

* Update changelog.rst

* Update changelog.rst

* Formatting.

* Incorporating review feedback from KB and MN.

* "guarantee" instead of "promise"

* Updated with final review comments from KB and RGB.

* Updated upgrade notes to describe migration from removed CordaPluginRegistry.

* Minor clarification.

* Minor updates following final RGB feedback.

* Kat's further pedantic feedback

* Minor changes following feedback from KB.

* Incorporating review feedback from MH.

* killed 'patent-pending'

* Made the visualiser into a regular JVM module - not a CorDapp. (#1771)

* Docs: more package descriptions and take non-stabilised APIs out of the docs build. (#1775)

* Update corda version tag to 1.0.0

* Updated release notes to fix minor typos (#1779)

Fixed bold type on simplified annotation driven scanning bullet and added bold type to module name bullets

* Fixed drop down.. probably. (#1780)

* fixed formatting for release notes. (#1782)

* Improve API page wording (#1784)

* Removed "unreleased" sections from the release notes and change log.

* Merge remote-tracking branch 'origin/release-V1' into colljos-merge-v1-docs

# Conflicts:
#	build.gradle
#	client/jfx/src/main/kotlin/net/corda/client/jfx/model/NodeMonitorModel.kt
#	client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt
#	client/rpc/src/main/kotlin/net/corda/client/rpc/PermissionException.kt
#	constants.properties
#	core/src/main/kotlin/net/corda/core/flows/FlowSession.kt
#	core/src/test/kotlin/net/corda/core/contracts/DummyContractV2Tests.kt
#	core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt
#	docs/source/api-flows.rst
#	docs/source/api-index.rst
#	docs/source/changelog.rst
#	docs/source/example-code/src/main/java/net/corda/docs/java/tutorial/testdsl/CommercialPaperTest.java
#	docs/source/example-code/src/main/kotlin/net/corda/docs/FlowCookbook.kt
#	docs/source/example-code/src/main/kotlin/net/corda/docs/tutorial/contract/TutorialContract.kt
#	docs/source/example-code/src/main/kotlin/net/corda/docs/tutorial/testdsl/TutorialTestDSL.kt
#	docs/source/hello-world-state.rst
#	docs/source/key-concepts-contract-constraints.rst
#	docs/source/serialization.rst
#	docs/source/tut-two-party-flow.rst
#	docs/source/tutorial-tear-offs.rst
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/CordaClassResolver.kt
#	node-api/src/test/java/net/corda/nodeapi/internal/serialization/ForbiddenLambdaSerializationTests.java
#	node-api/src/test/java/net/corda/nodeapi/internal/serialization/LambdaCheckpointSerializationTest.java
#	node/src/integration-test/kotlin/net/corda/node/services/AttachmentLoadingTests.kt
#	node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityTest.kt
#	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
#	node/src/test/kotlin/net/corda/node/internal/cordapp/CordappLoaderTest.kt
#	node/src/test/kotlin/net/corda/node/services/NotaryChangeTests.kt
#	samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt
#	samples/trader-demo/src/main/kotlin/net/corda/traderdemo/TraderDemo.kt
#	testing/node-driver/src/integration-test/kotlin/net/corda/testing/FlowStackSnapshotTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt
#	webserver/src/main/kotlin/net/corda/webserver/internal/NodeWebServer.kt
2017-10-03 17:32:11 +01:00
Clinton
e6e3c29d74 Fixed a few instances of waitUntilNetworkReady() to fix flaky tests. (#1785) 2017-10-03 14:31:36 +01:00
Shams Asari
457f95f188 Removed the network map service type as it's no longer needed.
The absence or presence of the networkMapService config is what determines if a node is the network map or not.
2017-10-03 11:32:37 +01:00
Rick Parker
9a16011448 * Move CompositeSignaturesWithKeys into net.corda.core.crypto package.
* Rename and move CordaPluginRegistry to reflect its real purpose now.
* Docs: docsite improvements
* Remove discussion of webserver from 'writing a cordapp' page.
* Fixup some flow docs.
* Add a couple more package descriptions.
* Review comments - always apply default whitelist and no longer load it via ServiceLoader
* Added wording about renaming services resource file
2017-10-02 16:03:07 +01:00
Viktor Kolomeyko
383eb2bef8 CORDA-540: Fix to make IRS demo code pass in AMQP mode (#1769)
* CORDA-540: Do not use concrete instance of an ArrayList as wire representation of it may be different

* CORDA-540: Make data structures suitable for AMQP serialization

* CORDA-540: Use "name" instead of "toString()"

Classes like "net.corda.finance.contracts.DayCountBasisDay" override "toString()" which leads to error behaviour
2017-10-02 15:59:31 +01:00
Joel Dudley
4641d3c4dd Moves code sections in tutorials to code files. 2017-10-01 23:33:15 +01:00
Viktor Kolomeyko
c2b0ed6ed5 CORDA-650: Eliminate unnecessary dependency on "graphstream" library (#1732)
This library has one usage in ClientRPC example and:
* Uses Scala 2.10 - which is quite dated
* Has a transitive dependency on JUnit
2017-09-29 13:43:42 +01:00
Katelyn Baker
ddee4b94e2 CORDA-594 - SIMM Demo doc update (#1723)
* CORDA-594 - SIMM Demo doc update

For V1 write a series of JSON / curl commands a user can follow to run
the demo

* Review Comments

* Updated the rationale behind as to why SIMM was introduced.

* typo
2017-09-29 12:27:48 +01:00
Matthew Nesbit
5fa7381883 Custom exceptions in corda, should either derive from an appropriate closely related java exception, or CordaException, or CordaRuntimeException. They should not inherit just from Exception, or RuntimeException.
Handle PR comments

Add nicer constructors to CordaException and CordaRuntimeException

(cherry picked from commit 89478c8)

Fix ambiguous defaulted constructor

(cherry picked from commit ec9bafe)

Address PR comment

Update a few more custom exceptions
2017-09-29 09:37:22 +01:00
Ross Nicoll
89ef4034c0 Clean up of Dokka comments (#1632)
* Remove use of @see as a cross-reference to actual docs; this is inappropriate (it reflects "See Also", not "See Other"), and often longer than having the actual documentation in place.
* Correct syntactical errors in docs
* Correct "@returns" to "@return"
* Add note about currencies with 3 decimal places
2017-09-28 17:42:32 +01:00