Commit Graph

359 Commits

Author SHA1 Message Date
Katelyn Baker
38ab78c07e
CORDA-1192 - Quieten message when reflecting on kotlin builtin (#2769) 2018-03-08 20:44:53 +00:00
Andrius Dagys
da74263f42 CORDA-696 - Ensure deterministic transaction id calculation for contra… (#2676)
* CORDA-696: Ensure deterministic transaction id calculation for contract upgrade and notary change transactions.

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.

* Support forwards compatibility for new hidden or visible properties

* Some refactoring and updating api docs

* Fix tests & add custom serializer in case the transaction is captured in a checkpoint

* Update id calculation for notary change transactions as well - no filtering is involved

* Use computeNonce

* More refactoring

* Use helper for computing component hashes

* Optimise id calculation
2018-03-08 17:59:25 +00:00
Katelyn Baker
8c541b3b7e
CORDA-1186 - Move ConstructorForDeserialization out of internal (#2760)
Backport from master
2018-03-07 16:57:46 +00:00
Katelyn Baker
41edc88dd6
CORDA-1140 - RPC Client's P2P Context should use AMQP (#2741) 2018-03-06 09:25:55 +00:00
Tudor Malene
87c5ad8b88 CORDA-1150 - better log messages (#2721)
* CORDA-1150 better log messages

* CORDA-1150 better log messages

* CORDA-1150 better log messages
2018-03-05 16:27:50 +00:00
Katelyn Baker
40fe6531ee
CORDA-1115 - Cannot serialize private nested objects (#2709)
* CORDA-1115 - Cannot serialize private nested objects

Backport from master

* Fix backport issue
2018-03-02 18:14:23 +00:00
Katelyn Baker
9e9fab7e1a
CORDA-1134 - Don't use private serializers for all CAPS properties (#2708)
Whilst it does currently work it only does so by going down an incorrect
code path. A property THING that is public and has a getter should
be fetched using that getter, not trip into the private property
accessor.
2018-03-02 13:49:30 +00:00
Shams Asari
bf712a893e CORDA-1048 - Making it simpler to move an existing local deployment of nodes to across different machines (#2697)
* Various cleanup of the network map code (#2604)

(cherry picked from commit 2af0fee)

* CORDA-1048: Making it simpler to move an existing local deployment of nodes to across different machines. (#2672)

This was achieved by having the hash in the node-info file to be just of the node's X.500 name. This also solves existing duplicate node-info file issues that we've been having.

Also updated the docsite.

(cherry picked from commit 8616f24)
2018-03-02 08:22:25 +00:00
Tudor Malene
d4f9b10469 Added exclude whitelist to Network Bootstrapper to enable fine grained testing (#2666)
* Added exclude whitelist to Network Bootstrapper to enable fine grained testing.

* code review change
2018-03-01 16:32:36 +00:00
Maksymilian Pawlak
4285000ff8 CORDA-1113 - Close classloader (#2637)
* Close classloader after use

(cherry picked from commit 6070bc0)

* Better handling of classloader closing

(cherry picked from commit 2f6413b)
2018-02-28 08:37:42 +00:00
Andrius Dagys
659d6c03ef 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.
2018-02-22 17:51:41 +00:00
Andras Slemmer
adf9d50940 CORDA-984 - Add RPC deduplication to client and server (#2582) 2018-02-21 16:43:07 +00:00
Katelyn Baker
3fe2aa24b6
DOCS - Separate parameter names in exceptions in a clear fashion (#2578) 2018-02-20 15:37:21 +00:00
Tudor Malene
60a4bcba5b CORDA-941 - Add Network Parameters contract implementation Whitelist (#2539)
* CORDA-941 Add Network Parameters contract implementation Whitelist

* CORDA-941 fix merge

* CORDA-941 added uploader support to Attachments and added check into the AttachmentClassloader to only allow loading attachments that were uploaded from the local cordapps folder

* CORDA-941 update api spec

* CORDA-941 address some code review changes and fix and add classloader test

* CORDA-941 fix test

* CORDA-941 address code review comments

* CORDA-941 address code review comments - use and update existing whitelist

* CORDA-941 address code review comments

* CORDA-941 fix compile error

* CORDA-941 address code review comments

* CORDA-941 removed: whitelistAllContractsForTest

* CORDA-941 removed: whitelistAllContractsForTest

* CORDA-941 add comment

* CORDA-941 remove toLedgerTransaction

* CORDA-941 add warning when node not using latest CorDapp

* CORDA-941 remove the stubbing approach for cleaning LedgerTransaction

* CORDA-941 Code review changes

* CORDA-941 Fix merge

* CORDA-941 workaround for api scanner bug

* Fixed JacksonSupportTest.
2018-02-20 11:09:23 +00:00
Matthew Nesbit
9a339fbac7 CORDA-1064 - 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) (#2559) 2018-02-16 17:43:03 +00:00
Shams Asari
4bc3f9ffa8 ENT-1519 - Ensure NodeInfo always has at least one address by checking in the c'tor (#2538) (#2542)
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.

(cherry picked from commit 2864ce1)
2018-02-16 16:52:08 +00:00
Katelyn Baker
3606cef0a1
CORDA-1032 - unnamed ctor param serialization issue (#2535) 2018-02-15 09:00:48 +00:00
Patrick Kuo
7d6f15b7ba CORDA-1008 - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper (#2509) (#2514)
* [CORDA-1008] - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper

* address PR issues

(cherry picked from commit ddf0d34)
2018-02-13 13:11:29 +00:00
Joel Dudley
c9ade00de6 No IdentityServiceInternal as public param. Start nodes without params. Simpler MockServices ctors. (#2521)
* Removes IdentityServiceInternal as a public parameter to MockServices.

* Reorders params to put non-default args first. Creates simpler default constructors.

* Adds constructors for creating mock nodes by passing params.
2018-02-13 11:32:04 +00:00
Michele Sollecito
fbb7f8f019 CORDA-990 - Flows Draining Mode (#2507)
* [CORDA-990]: Flows Draining Mode

* Fixed incorrect disconnect login.

* Code review changes.

* Fixed compilation error about MockNetwork...

* Fixed compilation error about MockNetwork...

* Fixed broken compilation.

* Ignoring an unstable test.
2018-02-13 09:34:10 +00:00
Andras Slemmer
10f3c0bcf9 CORDA-995: r3corda wire compatibility (#2497) 2018-02-12 10:09:47 +00:00
Katarzyna Streich
af4aba2bfa First approach to network parameters updates (#2412) (#2487)
* 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-09 14:55:19 +00:00
Katelyn Baker
f16e45abe9 CORDA-904 - Fix evolver to work with setter instantiated classses (#2463)
- Cherry pick to backport from master

* 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 13:24:18 +00:00
Katelyn Baker
f8359a74fd CORDA-915 - small bug fix 2018-02-05 18:06:07 +00:00
Katelyn Baker
ac416690e0 CORDA-979 - Make public java setter accessible from within Java
Backport from master
2018-02-05 17:03:48 +00:00
Katelyn Baker
98b091a0eb CORDA-904 - Fix evolver to work with setter instantiated classes
Backport from master
2018-02-05 17:02:05 +00:00
Katelyn Baker
b32b6b6d29 CORDA-946 - Correct backward compatibility issue with fingerprinting
Backport from Corda master
2018-02-05 16:01:45 +00:00
Katelyn Baker
7ca83eba0b CORDA-978 - Getter selection fix
Backport from master - only select getters that take no parameters
2018-02-05 10:05:03 +00:00
Katelyn Baker
e04296464d 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 17:41:05 +00:00
Katelyn Baker
e5627622db CORDA-943 - Deterministic serialization order breaks object ref cache 2018-02-02 10:40:14 +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
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
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
Katelyn Baker
97793447d5 CORDA-855 - Adding tests for wild card generics
Can't actually get something to go through the serializer with a
wild card in place as it seems that's an impossible situation

    * Review Changes
    * CORDA-855 - Review Comments
    * Review Comments
    * Review comments
2018-01-10 15:53:28 +00:00
Katelyn Baker
41220de816 CORDA-855 - Fix for fingerprinting generics in AMQP
* Undo refactor
2018-01-10 15:36:54 +00:00
Katelyn Baker
017f865fa3 CORDA-852 - Fix AMQP serialisation of nested generic 2018-01-10 15:35:47 +00:00
Katelyn Baker
cacdba872e
CORDA-908 - Support private properties in AMQP serialization (#2336)
CORDA-908 - Support private properties in AMQP serialization

* Review comments

* Fix tests

* Review Comments

* review comments

* review comments
2018-01-10 11:41:49 +00:00