Commit Graph

1438 Commits

Author SHA1 Message Date
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
Shams Asari
2864ce1384
ENT-1519: Ensure NodeInfo always has at least one address by checking in the c'tor (#2538)
Further, the look up of the node's own node-info from its database has been tightened to ensure there isn't more than one.

Also fixed some brittle code which was assuming exactly one address rather than at least one.
2018-02-15 14:06:41 +00:00
cburlinchon
311475a81c Switch to using our own quasar fork with thread leak fix (#2443)
* Switch to using our own quasar fork with thread leak fix

* Update quasar.jar in lib

* Review changes

* Bump to 3.0.7
2018-02-14 17:32:00 +00:00
Anthony Keenan
3e8d76334e
CORDA-939 Modify Api Scanner to check api for internal exposures (#2510)
* Update check api changes to look for internals

* Update several more uses of internal

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

* Make CordaClock part of API

* Update api-current.txt

* Remove exclusion of nodeapi.internal

* Remove access to CordaPersistence from public api

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

* Make internal tests that use need db access use InternalMockNetwork

* Make test certificates internal

* Address further review comments

* Revert some accidental changes to api-current.txt

* Address Shams' review comments

* Update Api Scanner to filter out CordaInternal attribute

* Update api-current.txt

* Remove superfluous brackets

* Add transaction to StartedMockNode

* More leaky transaction fixes
2018-02-14 16:42:56 +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
Andrius Dagys
a702d792a7 Make NotaryFlow.Client more modular and easier to customise 2018-02-13 16:10:15 +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
Michele Sollecito
da591363fd
CORDA-990: Flows Draining Mode (#2483)
[CORDA-990]: Flows draining mode.
2018-02-12 16:13:43 +00:00
Konstantinos Chalkias
fa4b5d16ba
CORDA-1009 Remove X509EdDSAEngine dependency on X509Key (#2506) 2018-02-12 16:13:04 +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
Konstantinos Chalkias
86fb1ed852
CORDA-967 Multi-tx signature verification (#2488) 2018-02-09 15:33:48 +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
Andrzej Cichocki
1902a4f11e
CORDA-973 Refactoring for serialization compression support (#2466)
* Use constant for empty byte array
* Less byte array copying
* Fix InputStreamSerializer trailing garbage
* More OO kryo streams
* Introduce SerializationMagic
* Introduce non-copying slice on ByteSequence
2018-02-09 11:54:07 +00:00
Konstantinos Chalkias
ff972508bd
CORDA-986 and CORDA-985 CompositeKey and Signature verification performance fixes (#2467) 2018-02-08 15:49:33 +00:00
Katarzyna Streich
6acff3a7df
First approach to network parameters updates (#2412)
* Network parameters updates

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

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

Move NetworkParameters and NotaryInfo classes to core.

* Ignore evolvability test - to be fixed later

* Add documentation on update process
2018-02-08 14:31:43 +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
Mike Hearn
82ece34ac8
Tweak the way invocation context is integrated to reduce the pain for devs using the old API (#2447)
Minor tweaks to the invocation context code.

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

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

3) Improve markup on InvocationContext

4) Rename field from just "context" to "invocationContext" (Context is vague)
2018-02-02 17:09:08 +01:00
Katelyn Baker
18fa226da7
Merge pull request #2440 from corda/kat/bug/CORDA-943
CORDA-943 - Fix trader demo
2018-02-02 09:56:44 +00:00
Patrick Kuo
941429d3a7
Remove word restriction in corda x500 name (#2439)
* Remove word restriction in x500 name https://github.com/corda/corda/issues/2326

* remove unused const

* address PR issue

* address PR issue

* address PR issue
2018-01-31 17:05:52 +00:00
Katelyn Baker
222c5b9db8 CORDA-943 - Fix trader demo
This is a multi issue problem
1. Fingerprinting of generics treats <T> and <?> differently, forcing
the evolver to be used when not needed

2. However, the evolver is required sometimes as generics are not
guaranteed to fingerprinting bi-directionally (thanks to type erasure of
deeply nested generic types). However, with serialization now writing
properties in a specific order, we need to ensure they're read back in
that order before applying them to an evolved constructor so as to
not corrupt the object reference cache
2018-01-31 14:58:00 +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
Mike Hearn
17a6f61eba
Simplify CashTests and add some comments/convenience APIs to MockServices (#2241) 2018-01-25 16:29:26 +01:00
Andrzej Cichocki
242d9cf7ad
CORDA-692 Don't include internal packages in API documentation (#2415)
* Use G1 for gradle daemon
2018-01-25 15:26:13 +00:00
Michele Sollecito
9783f11ba8
Exposed RPC SSL settings through Cordformation (#2419) 2018-01-25 14:32:58 +00:00
Shams Asari
0fa6969d5d
Added various X509 utilities to remove some of the existing boilerplate. (#2416) 2018-01-24 18:07:29 +00:00
Ben Wyeth
d17670c747 Provide an API to register callback on app shutdown (#2402)
Provide an API to register callback on app shutdown.
2018-01-24 16:19:24 +01:00
Shams Asari
61c7de22d6
Replaced KeyStoreWrapper with X509KeyStore, which is still a wrapper but assumes only X509 certs and has better APIs (#2411) 2018-01-24 07:51:55 +00:00
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
Mike Hearn
ac7637e2b4 Revert "CORDA-599 RPCSecurityManager is no longer lateinit (#2347)"
This reverts commit 75e74e67a1.
2018-01-19 17:52:59 +01:00
Joel Dudley
7427d63bbc
Prevents checkSignatures from failing if tx also contains unrecognised sigs. 2018-01-18 18:08:22 +00:00
Katarzyna Streich
af081a7170
Remove primary key constraint on DBHostAndPort (#2318)
Remove primary key constraint on DBHostAndPort

Return always first node if more are matching by address.
2018-01-18 16:23:41 +00:00
Andrius Dagys
55b7035a44
Don't propagate internal notary service errors to the client (#2368) 2018-01-16 09:58:23 +00:00
Anthony Keenan
1367cd4adb
CORDA-912 Stop exposing internal node user, create user in testing infrastructu… (#2361)
* Stop exposing internal node user, create user in testing infrastructure instead

* Update kdocs
2018-01-15 19:30:33 +00:00
Andrzej Cichocki
75e74e67a1
CORDA-599 RPCSecurityManager is no longer lateinit (#2347) 2018-01-15 19:11:00 +00:00
Shams Asari
bbfbb08c43
CORDA-881: Signed network parameters has the network map cert attached to it instead of just the public key. (#2346)
Introduced DigitalSignatureWithCert and SignedDataWithCert as internal APIs, with the expectation that they will become public; renamed the network parameters end-point to network-parameters; updated the network-map.rst doc; and did some refactoring.
2018-01-12 07:59:08 +00:00
Tudor Malene
c2bd7403a8
hibernate mapping changes (#2337)
* add foreign key names and move the participants mapping to the subclass so that the table name can be configured

* update api-current file

* fix compilation errors

* PR changes

* PR changes
2018-01-10 11:42:08 +00:00
Mike Hearn
38fd99792f Minor: add some discussion to the JavaDocs about why attachments are zip files. 2018-01-08 17:36:47 +01:00
Rick Parker
c5149bab9f
Backport of ENT-1303 applied to 3.0-RC3 (#2332) 2018-01-08 12:11:55 +00:00
Konstantinos Chalkias
48be562a2a
ECDSA entropyToKeyPair + no idempotent signatures (#2210) 2018-01-04 17:52:31 +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
Shams Asari
d84105b60e
Using X509Certificate consistently throughout, rather than BC's X509CertificateHolder. (#2305)
The later is now only used where needed. This has reduced the amount of converting we have to do back and forth.
2018-01-03 22:00:39 +00:00
Andrzej Cichocki
fe3c2b3983
CORDA-891 Refactoring for #2273 (#2306)
* Make FlowLogicRefFactoryImpl a class.

* Replace instanceof with polymorphism.

* Fix out-of-scope spelling error.
2018-01-02 13:11:43 +00:00
Konstantinos Chalkias
a9f9bf2c0b
Adding tests to check EdDSA compatibility with RFC8032 (#2302) 2018-01-02 10:47:57 +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
Anthony Keenan
cb703476a0
CORDA-880 Make contractsdsl java interop functions behave same as inline functions (#2275)
* Make java interop functions same as inline functions and add tests

* Fixing docs

* Move unspecifiedCountry to internal. (#2274)

* Review changes

* Call java interop functions from inline functions

* Use correct test assertion
2017-12-21 09:42:09 +00:00
Andrzej Cichocki
313d21f068
Move unspecifiedCountry to internal. (#2274) 2017-12-19 12:09:31 +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
Ross Nicoll
21f0892deb
CORDA-831: Add roles to X509 certificates (#2180)
* Add roles to X509 certificates so that the identity service can always determine which certificate in a hierarchy is the well known identity
* Rename CLIENT_CA certificate type to NODE_CA
* Rename DOORMAN role to INTERMEDIATE_CA
* Correct issue in CashTests where instead of providing a well known identity to generateSpend(), a confidential identity was passed in and a confidential identity generated from it.
* Enforce role hierarchy in PKI
* Enforce that party certificates must be well known or confidential identities
* Add network map certificate role
2017-12-18 16:23:34 +00:00
Shams Asari
e9cead9055 CORDA-833: SignedNodeInfo object for holding a list of signatures, one for each identity in the NodeInfo. This forms part of the network map. 2017-12-17 19:45:58 +00:00
Andrzej Cichocki
8114a20abd
CORDA-716 Move non-API things to internal (#2256) 2017-12-17 18:44:35 +00:00