Commit Graph

387 Commits

Author SHA1 Message Date
Katelyn Baker
940bb3bdbd
CORDA-1812 - fix Postgres db bloat issue (#3614) (#3857) 2018-08-30 12:00:09 +01:00
Stanly Johnson
f9a9bb19a7 CONTRIBUTION - Network bootstrapper check for duplicate node names (#3182) 2018-08-08 11:30:57 +01:00
Katelyn Baker
f44cec5321
CORDA-1789 - Split Doorman / NM config - fix for CORDA-1510 (#3605) 2018-07-17 15:11:31 +01:00
Michele Sollecito
3da07a1105
Merge pull request #3613 from corda/kat/bakport/corda-1804
CORDA-1499, CORDA-1804  (#3607)
2018-07-16 10:39:30 +01:00
szymonsztuka
5f0c8e0707 Backport CORDA-1499 CORDA-1804 - remove unused code. 2018-07-16 10:35:53 +01:00
Katelyn Baker
9865170233 CORDA-1808 - Refactor serialization test infrastructure backport 2018-07-16 10:16:38 +01:00
Katelyn Baker
a47348d52a CORDA-1662 - Post backport fixes 2018-07-16 10:16:38 +01:00
Katelyn Baker
61b8bb4c6b CORDA-1662 - Corda Serialization Evolution breaksdown with Java classes (#3427)
Nullability logic was relying on annotations that Kotlin applies by
default but is left to the developer in Javaland. Change this around
so it works for both.

In Kotlin, the property must be nullable, in Java, it can't be a
primitive.
2018-07-16 10:16:38 +01:00
szymonsztuka
fad90eee8b CORDA-1499, CORDA-1804 (#3607)
* Fix a typo in node_attchments_contracts table name. (#3202)

(cherry picked from commit 57d379597b)

* CORDA-1804 Corda node stops when detecting not migrated node_attachments_contracts table name (#3593)

Database table NODE_ATTACHMENTS_CONTRACT_CLASS_NAME in v3.0 was changed to NODE_ATTCHMENTS_CONTRACTS in v3.1 and then finally NODE_ATTACHMENTS_CONTRACTS on current master. Users may omit the upgrade note and run into errors. After the change the node will not start if the new table name is not found and any other older ones is found.

(cherry picked from commit 208ac49da0)

* Fixes after cherry-pick of 208ac49da0.
2018-07-16 10:06:34 +01:00
Michal Kit
3541a00343 remove CRL url from dev doorman cert (#3555) (#3560) 2018-07-13 12:38:23 +01:00
Shams Asari
9fc108aa1e CORDA-1709 - The MVP blob inspector, able to inspect network service blobs (#3503)
* 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.

(cherry picked from commit 3bb95c3)

* CORDA-1238: Updated JacksonSupport to support SerializedBytes, CertPath, X509Certificate and the signature classes (#3145)

SerializedBytes are first converted to the object it represents before being serialised as a pojo.

These changes will be needed to support the the blob inspector when it will output to YAML/JSON.

(cherry picked from commit b031e66)

* Cherry picked part of commit 824adca to port over *only* the JackSupport refactoring.

* CORDA-1238: Moved the blob inspector out of experimental and wired it to JackonSupport (#3224)

The existing output format was not complete and so was deleted to avoid it becoming a tech debt. We can always resurrect it at a later point.

(cherry picked from commit 4e0378d)

* Added back support for parsing OpaqueBytes as UTF-8 strings in JacksonSupport (#3240)

(cherry picked from commit d772bc8)

* Cleaned up blob inspector doc (#3284)

(cherry picked from commit b7fbebb)

* Blobinspector: trace level logging with --verbose (#3313)

(cherry picked from commit 6a2e50b)

* Cherry picked part of commit 3046843 to fix issue with --version

* Fixes to the api file
2018-07-03 19:58:13 +01:00
Michal Kit
d1409656bc CORDA-1661 - Reverting DEV certificates keys (#3466) 2018-06-29 13:41:03 +01:00
Anthony Keenan
5be8c9a102 CORDA-1498 - serialization multiple transform bug (#3391)
* CORDA-1498: serialization multiple transform bug (#3216)

* Fix issue when evolving enums with transformation chains

* Regenerate test data for deserializeWithRename test and unignore

* Further tweaks / remove debugging

* Formatting tweaks

* Address review comments

* Remove debug

* Add classname to serialization tranform exceptions

* Use direct node links instead of indexes to improve readability

* More readability tweaks

* More readability improvements

* rename require to requireThat to resolve conflict with kotlin libraries

* Add logging of error message

* Change requireThat helper to inline function

* remove unneeded toString

* Further tweaks

* Change NotSerializableException to more generic IOException

* Make exception context clearer

# Conflicts:
#	node-api/src/test/kotlin/net/corda/nodeapi/internal/serialization/amqp/EnumEvolvabilityTests.kt
#	serialization/src/test/resources/net/corda/serialization/internal/amqp/EnumEvolveTests.deserializeWithRename.1.C
#	serialization/src/test/resources/net/corda/serialization/internal/amqp/EnumEvolveTests.deserializeWithRename.2.C
#	serialization/src/test/resources/net/corda/serialization/internal/amqp/EnumEvolveTests.deserializeWithRename.3.C

* Fix merge conflicts

* Fix broken test

* Revert changes to serialized classes
2018-06-22 15:53:18 +01:00
Michele Sollecito
b6339a7fc6 CORDA-1575, CORDA-1341 - Fix logfiles for out of process nodes, Ensure API can be called concurrently wrt transactions.(#3312)
* [CORDA-1575]: Out of process nodes started by the driver do not log to file (fix).

* [CORDA-1341]: Ensure API can be called concurrently wrt transactions.

* [CORDA-1575]: Fixed unstable test.
2018-06-07 11:26:19 +01:00
Katarzyna Streich
f132923b86 CORDA-866, ENT-1933 - Remove stale nodes from Network, Fix NetParam serialization (#3255) (#3128)
*  CORDA-866: Implement removal of stale nodes from network - backport (#3128)

* CORDA-866: Implement removal of stale nodes from network

Backported

* Implement removal of stale nodes from network

Add eventHorizon to NetworkParameters structure. Add republishing of
node info on 1 day intervals - it is treated by network map as heartbeat from node indicating if it's alive or not. Add removal of old node infos on network map signing.

* Add copy method to NetworkParameters data class

Add JvmOverloads annotation to the constructor, because it's data class
exposed in API

* Fix test

* ENT-1933: make NetworkParameters serialization compatible (#3234)

* ENT-1933: make NetworkParameters serialization compatible

* Fixes after cherry-pick
2018-05-31 10:03:51 +01:00
Katelyn Baker
7d9199fd14 CORDA-1545 - Arrays of primitive byte arrays don't deserialize (#3249)
At serialization time we incorrectly encode the type as byte[p][] instead
of binary[]
2018-05-29 14:59:47 +01:00
Katelyn Baker
ba0a94d54d CORDA-1530 - Generics break default evolver (#3232)
* CORDA-1530 - Generics break default  evolver

When selecting an annotated constructor for evolving a type make sure
we treat generics in the same manner we did when serialized. Effectively
throw away the template information and treat lists as lists and maps
as maps
2018-05-29 14:52:23 +01:00
Shams Asari
2729ada251 CORDA-1405 - Integration test for network parameter updates and improved logging (#2865)
(cherry picked from commit 620ba1e)

Also updated the toString() of NetworkParameters and NetworkMap to be better formatted.
2018-05-22 13:57:15 +01:00
Katelyn Baker
839cd04fdc
Merge pull request #3114 from corda/cherrypick-corda-1317
CORDA-1317 - Add cert role to CSR and doorman issue cert according to the cert role
2018-05-18 14:28:41 +01:00
Patrick Kuo
77a138a04e CORDA-1317 - Add cert role to CSR and doorman issue cert according to the cert role (#2620)
Cherrypick from master

* 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-05-10 17:48:48 +01:00
Katelyn Baker
baf5c97e0c
CORDA-1403 - Generics serialization issue (#3030) (#3095)
When implementing a generic interface subtype check fails, need
to compare to the actual raw type
2018-05-09 09:44:08 +01:00
Katelyn Baker
7701dad80b
CORDA-1229 - Fix issue with setter-based serialisation (#3051) 2018-05-01 20:52:39 +01:00
Katelyn Baker
ddec72674c
REVERT - CORDA-1264 - Needs more thought prior to release (#2952)
* REVERT - CORDA-1264 - Needs more thought prior to release

This reverts commit 33af80ac55.

Since this causes regressions in the way errors are propogated to
clients it seems best to not break or hold up 3.1 but revert this commit
and move on

* fix revert
2018-04-10 18:18:57 +01:00
Michele Sollecito
33af80ac55
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2902) 2018-03-29 14:40:40 +01:00
Katelyn Baker
8431616b87
DOCS: Serialization roundtrip removes mutability explanation (#2883)
* DOCS: Serialization roundtrip removes mutability explanation

* review comments

* review comments

* Review comments

* Review comments

* Review comments
2018-03-27 20:21:40 +01:00
Tudor Malene
de40d1dae5 ENT-1564 - add additional uploader check to the HashConstraint (#2845) (#2881)
* ENT-1564 - add additional uploader check to the HashConstraint (#2845)

(cherry picked from commit 1a1cd94)

* ENT-1564 changelog entry

* ENT-1564 ignored tests that were removed in master
2018-03-27 17:09:22 +01:00
Katelyn Baker
190232d1f2
ENT-1665 - Update fast-classpath-scanner version to 2.12.3 (was 2.0.21) (#2880)
Problem manifests now that the classpath scanner is used by the
serialisation framework in factory initialization to locate pluggable
serializers. The actual thrown error is

    java.lang.RuntimeException: Unknown constant pool tag

Given this is a known issue and a fixed bug it makes sense to move the
version forward. Unfortunately at this time we cannot move beyond
2.12.3 as 2.12.4 and later versions (up to the latest 2.18.1) exhibit
some other error that needs investigating. Thus, move to the latest
version that is stable for our current set of use cases.

More information on the nature of the problem exhibited by moving beyond
2.12.3 can be found on the linked Jira (ENT-1665) as well as details on
reproducing the issue moving forward to 2.12.3 fixes.
2018-03-27 16:16:33 +01:00
Katelyn Baker
2d394fc6f6
CORDA-1186 - ACtually move annotaiton into core module, not just core namespace (#2781) 2018-03-11 00:34:23 +00:00
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