Commit Graph

365 Commits

Author SHA1 Message Date
Maksymilian Pawlak
3066926f0f
Improved classloader closing (#2650)
* Better handling of classloader closing
2018-02-27 11:15:23 +00:00
Maksymilian Pawlak
cc84b34dca
Close classloader to release associated file (#2635)
[CORDA-1113] Close classloader to release associated file
2018-02-26 15:01:57 +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
Patrick Kuo
1552e992e7
ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#2620)
* ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#431)

* Doorman and HSM create certificate base on requested cert role specified in the certificate signing request.

(cherry picked from commit 94f7392)

* remove R3 corda code
2018-02-23 13:38:09 +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
Shams Asari
2af0feee04
Various cleanup of the network map code (#2604) 2018-02-23 09:13:00 +00:00
Katelyn Baker
a223fdb8d3
DOCS - Separate parameter names in exceptions in a clear fashion (#2577) 2018-02-20 16:38:47 +00:00
Andras Slemmer
dc268ebe63
Merge pull request #2477 from corda/aslemmer-corda/issues/2300
Add RPC deduplication to client and server
2018-02-19 16:25:36 +00:00
Andras Slemmer
32bcf0a06c Address more comments 2018-02-19 15:16:12 +00:00
Andras Slemmer
7f1bfac8b0 Write better test for dupes 2018-02-19 14:53:28 +00:00
Matthew Nesbit
fee89c044f
Enhance the pluggability of the bridging and messaging code, so that more complex HA and out of process bridges can be written. (#2558) 2018-02-16 16:13:05 +00:00
Matthew Nesbit
cb7a0229a8
Fix a hang in AMQP protocol code that occurs when pausing in debugger causes protocol timeout, but wasn't driving event procesing to actuially kill the socket. (#2557) 2018-02-16 16:03:39 +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
Andras Slemmer
6a4f783106 Hack around database-with-observables issue 2018-02-14 17:30:32 +00:00
Katelyn Baker
5de1ca7127
CORDA-1032 - unnamed ctor param serialization issue (#2532) 2018-02-14 17:22:08 +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
Andras Slemmer
7924a5a834 Add RPC deduplication to client and server 2018-02-13 18:51:59 +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
Patrick Kuo
ddf0d34147
CORDA-1008 Samples fail to run due to wrongly configured max transaction size in the network bootstrapper (#2509)
* [CORDA-1008] - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper

* address PR issues
2018-02-12 15:33:22 +00:00
Michal Kit
d1627fed5b Backporting introduction of constants for the dev certs from enterprise (#2502) 2018-02-12 12:12:16 +00:00
Katelyn Baker
3c4212a3d6
CORDA-992 - Make the finger printer pluggable for serialization factory (#2479)
Facilitates easier testing
2018-02-12 10:07:25 +00:00
Andras Slemmer
d01b2cbe97 Address comments, fix test 2018-02-09 16:03:36 +00:00
Andras Slemmer
0a88b76e46 r3corda wire compatibility 2018-02-09 14:50:20 +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
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
Katelyn Baker
95f062e8ff
CORDA-904 - Fix evolver to work with setter instantiated classses (#2463)
* CORDA-904 - Make evolver work with classes that use setters

* review comments

* review comments

* small fixs

* don't include systemTest in compiler.xml
2018-02-06 12:55:49 +00:00
Katelyn Baker
69c989478a
CORDA-979 - Make public Java setter accessible within Kotlin (#2464)
* CORDA-979 - Make public Java setter accessible within Kotlin

* Review comments
2018-02-05 16:54:58 +00:00
Katelyn Baker
429da85650
CORDA-946 - Fixes to fingerprinting breaks backward compatibility (#2453)
* CORDA-946 - Fixes to fingerprinting breaks backward compatibility

Demonstrated using the network map parameters signed form as that's
where the problem was first seen

* Review Comments
2018-02-05 12:07:02 +00:00
Katelyn Baker
a08d333d5b
CORDA-978 - Only consider getters that accpet zero parameters (#2462)
* CORDA-978 - Only take getters with zero parameters

* tidy up
2018-02-05 09:48:41 +00:00
Katelyn Baker
57ba9cdf06
CORDA-915 - Replace BEANS introspector with standard reflection (#2400)
* CORDA-915 - Replace BEANS introspector with standard reflection

Removes lib dependency and puts something in place we can better
control

* CORDA-915 - Review comment corrections

* Review Comments
2018-02-02 16:58:43 +00:00
Mike Hearn
38ccd0572c
Use Java reflection for determining if a type is a Kotlin singleton. (#2446)
Kotlin's own reflection has a habit of throwing weird errors and does not work for private objects - thus the unit test which tests this feature has actually never worked properly, but somehow works by accident. An attempt to upgrade to the latest Kotlin revealed the issue so it must have always been unstable.
2018-02-02 17:17:23 +01:00
Katelyn Baker
00b90a98fb CORDA-943 - Cope with multiple generics at str->type conversion in AMQP
Also fixes an odd bug where the inferred type of a getter wasn't
matching the constructor parameter type because that was still unbounded
and seen as T, looking at the raw type allows us to inspect this
properly
2018-02-01 12:19:32 +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
Matthew Nesbit
ceff50d656
Refactor location of bridge code to allow out of process bridging (#2431)
Fix some issues Andras has seen
2018-01-30 16:29:59 +00:00
Matthew Nesbit
0ff9c9e2e3
Move to message based bridge control protocol (#2410)
Tidy up

Remove dead RPCSecurity logic from ArtemisMessageServer

Address PR comments

Address PR comments
2018-01-25 17:53:34 +00:00
Shams Asari
0fa6969d5d
Added various X509 utilities to remove some of the existing boilerplate. (#2416) 2018-01-24 18:07:29 +00:00
Shams Asari
61c7de22d6
Replaced KeyStoreWrapper with X509KeyStore, which is still a wrapper but assumes only X509 certs and has better APIs (#2411) 2018-01-24 07:51:55 +00:00
Michele Sollecito
142f52fa82
[CORDA:936]: Enable RPC layer to work with SSL 2018-01-23 16:23:37 +00:00
Anthony Keenan
70f1fdeb2b
CORDA-939 Make SerializationEnvironmentRule.env private so as not to expose internals. (#2404)
* Make SerializationEnvironment private so as not to expose internals.

* Only expose used parts of api

* Make properties lateinit

* Removing java calls to getEnv

* Initialise properties at declaration

* Tidy up imports
2018-01-23 14:42:30 +00:00
Michal Kit
4a3379ac8a
CORDA-937 adding node key pair to utility/testing methods (#2405) 2018-01-22 13:06:22 +00:00
Andrzej Cichocki
1fc646cfa8 CORDA-716 Move test-utils and node-driver to stable API section in docs (#2335)
* Move test-utils and node-driver to stable section.

* Move FlowStackSnapshotFactory to testing.services package & update docs

* Move SerializationTestHelpers to testing.core package

* Move TestConstants.kt to core namespace

* Move Expect.kt to core namespace

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

* Added some clarification to documents after re-reading them

* Added static imports

* Removing unused import

* Fix merge conflict

* Fixing merge conflict
2018-01-22 11:28:41 +00:00
Katelyn Baker
9df35ae5d3
Merge pull request #2383 from corda/kat/feature/deterministicSerilaizer
CORDA-914 - Deterministic property ordering for AMQP serialization
2018-01-18 10:29:57 +00:00
Andrzej Cichocki
bbcafca959
Retire DatabaseTransactionManager. (#2385) 2018-01-18 10:11:34 +00:00
Katelyn Baker
0e047d9263 CORDA-914 - Deterministic property ordering for AMQP serialization 2018-01-17 17:52:33 +00:00
Matthew Nesbit
6edf95506b
Rename the inbox (#2360)
Add changelog entry

Address review comments

Alternate solution to service queues

Fixup after merge
2018-01-17 16:06:31 +00:00
Andrzej Cichocki
ea57639a37
CORDA-924 Fix IntegrationTestingTutorial (#2349)
i.e. H2 startup bug. also:
* Fix poor connection pool discipline
* Log cleanup failures instead of replacing foreground failure
2018-01-17 14:23:13 +00:00
Andras Slemmer
91779276fc Use single thread per netty eventgroup during testing 2018-01-15 11:18:29 +00:00