Commit Graph

72 Commits

Author SHA1 Message Date
Michele Sollecito
0d1d7daedc
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2892) 2018-03-29 13:01:41 +01:00
Michele Sollecito
36f02ff4b4 [CORDA-1267]: Making Corda's JPA classes non-final and Serializable. (#2882)
* Making Corda's JPA classes non-final and Serializable.

* Making Corda's JPA classes non-final and Serializable.

* Making Corda's JPA classes non-final and Serializable.

* Making Corda's JPA classes non-final and Serializable.
2018-03-28 08:40:28 +01:00
Chris Rankin
a4242b5805
CORDA-1224: Remove @JvmStatic annotations. (#2847) 2018-03-19 20:11:50 +00:00
Michele Sollecito
7a077e76f0
CORDA-1099: Orchestrated clean shutdown from Shell (#2831) 2018-03-19 14:20:10 +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
Chris Rankin
1407f01600
Upgrade to corda-gradle-plugins 4.0.8 (#2815)
* Add missing @DoNotImplement annotations.
* Upgrade to corda-gradle-plugins 4.0.8
2018-03-14 12:47:38 +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
Andrius Dagys
a3bf4577f3 CORDA-696 - Ensure deterministic transaction id calculation for contra… (#2676)
The problem with the previous implementation is that the transaction would be deserialized with the schema specified
in the serialized form, but the calculation of the id would involve re-serializing properties using a local serialization context
which might produce a different result.
2018-03-09 14:39:31 +00:00
Anthony Keenan
84e930d52a
[CORDA-991] - Update committed api from v3 release branch (#2734)
* Update from v3

* Remove CordaInternal attribute as this is removed by v4 api-scanner plugin

* Make SerializationContext @DoNotImplement

* Addition of CordappConfig to contstructor of CordappContext

* Alteration of getOffset/getSize properties in ByteSequence, OpaqueBytes & OpaqueBytesSubSequence

* Make network parameters on MockServices final
2018-03-07 16:13:16 +00:00
Chris Rankin
f682503396
Sort field annotations in public API and remove unnecessary @JvmField. (#2752) 2018-03-06 18:12:04 +00:00
Chris Rankin
382b424810
Merge pull request #2727 from corda/chrisr3-vararg-apis
Fix public API definition for Gradle Plugin 4.0.4
2018-03-05 16:43:40 +00:00
Anthony Keenan
cd3beabcc0 Finalise API stabilty 2018-03-05 14:34:18 +00:00
Chris Rankin
17dd7b964d [CORDA-1162] Write API class/interface/method annotations in ascending order. 2018-03-05 12:12:16 +00:00
Chris Rankin
d27fabc0df [CORDA-1148] Include all of the vararg methods in our public API. 2018-03-05 12:12:16 +00:00
Mike Hearn
80c00b920b
Fix another non-serializable exception, add docs, fix a possible security issue. (#2707)
* Fix another non-serializable exception, add docs, fix a possible security issue.

* Update API definition to reflect methods added to make more exceptions serializable
2018-03-02 15:10:54 +01: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
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
Michele Sollecito
5be0e4b39e
[CORDA-941]: Add NetworkParameters contract implementation whitelist. (#2580) 2018-02-23 14:29:02 +00:00
Andrzej Cichocki
c8672d373f
CORDA-973 Compression support for serialization (#2473)
* Serialization magic is now 7 bytes
* Introduce encoding property and whitelist
2018-02-23 13:07:51 +00:00
Andras Slemmer
31c278d460 Update API 2018-02-21 16:03:00 +00:00
Shams Asari
979aef1308
Removed DriverParameters.initialiseSerialization (#2572) 2018-02-20 12:57:59 +00:00
Shams Asari
ad959c7af1
Changed the wither methods in DriverParameters and NodeParameters to begin with "with" and not "set" (#2570) 2018-02-19 18:11:20 +00:00
Shams Asari
71c94f8a9d
Reversing the introduction of GlobalProperties (by CORDA-961), and added NetworkParameters to ServicesForResolution instead. (#2563)
Also, replaced the maxTransactionSize parameter of the driver and MockNetwork with NetworkParameters.
2018-02-19 12:23:59 +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
Anthony Keenan
308d70c0d1
CORDA-939 One last internal exposure (#2537)
* One last internal exposure

* Fix api-current.txt

* Reformat class
2018-02-15 13:21:20 +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
Anthony Keenan
117f4a721e
CORDA-939 Remove sslConfiguration from public constructor of CordaRPCClient (#2522)
* Remove sslConfiguration from public constructor of CordaRPCClient

* Address review comments

* Update api-current.txt

* sslConfiguration doesn't need to be a property
2018-02-13 21:39:31 +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
Joel Dudley
e5118fedaf
Updates API stability file. 2018-02-13 11:21:48 +00:00
Michele Sollecito
da591363fd
CORDA-990: Flows Draining Mode (#2483)
[CORDA-990]: Flows draining mode.
2018-02-12 16:13:43 +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
70399eb2ac API changes 2018-02-09 15:20:06 +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
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
Mike Hearn
eb99a7d775
Refresh API/ABI definition file (#2449) 2018-02-01 17:26:54 +01: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
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
Andrzej Cichocki
8a3299fa2a
CORDA-716 Configure api scanner for test modules (#2259) 2018-01-04 10:09:04 +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
Katelyn Baker
c4d5d3817c CORDA-553 - Update api checker
With the addition of the CordaCustomSerializer class for third part
serializers we need to update the ci reference file
2017-12-07 21:15:33 +00:00
Andrzej Cichocki
b0ebf3d7e0
CORDA-654 Various MockServices refactorings (#2167)
* Remove MockServices.stateMachineRecordedTransactionMapping which does nothing
* Inline StateLoaderImpl
* Remove unused MockServices
* MockServices well-known identities not needed in a place
* A few things don't need a full-blown ServiceHub
2017-12-05 16:22:53 +00:00
bpaunescu
c467a056ae
Revert CORDA-296: added rpc that returns an observable for node state (#2091)
* Revert "CORDA-296: added rpc that returns an observable for node state (#2004)"

This reverts commit 7d1f7ab

* Revert "CORDA-296: added rpc that returns an observable for node state (#2004)"

This reverts commit 7d1f7ab
2017-11-21 09:52:17 +00:00
Shams Asari
953a4a3790 Revert "Introducing network parameters."
This reverts commit d04e487
2017-11-17 10:04:38 +00:00
Michele Sollecito
92c8861802
[CORDA-760]: Propagate invocation context across the codebase. (#2016) 2017-11-15 14:58:43 +00:00
Maksymilian Pawlak
1a02c9a74f
AttachmentCriteriaQuery class and infrastructure (#2022)
* Attachments metadata support
2017-11-14 10:22:02 +00:00
Andrzej Cichocki
052124bbe0
CORDA-716 Make serialization init less static (#1996) 2017-11-10 15:44:43 +00:00