Commit Graph

727 Commits

Author SHA1 Message Date
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