Commit Graph

254 Commits

Author SHA1 Message Date
josecoll
3110c75847
Network bootstrapper tool: optional configuration setting to specify the minimum plat… (#4005)
* Provide an optional configuration setting to specify the minimum platform version to use in the network params file.

* Leave Cordform signature intact.

* Leave previous Gradle Plugin called signature intact.

* Incorporating feedback from PR review.

* Added minimum platform version validation check.

* Removed final 2 references to "default"

* Added changelog entry.
2018-10-03 13:41:52 +01:00
josecoll
7edc18f85d
CORDA-1997 Added constraint type information to vault states table. (#3975)
* Added constraint type information to vault states table.

* Added Vault Query criteria support for constraint data.

* Added documentation and changelog entry.

* Added missing @CordaSerializable.

* Fix minor bug in test setup and parsing code.

* Use binary encoding data types instead of serialize/deserialize.

* Optimized storage of constraints data.
Additional assertions on Vault Query constraint data contents (to validate encoding/decoding).
Tested with CompositeKey containing 10 keys.

* Addressing PR review feedback.

* Query by constraints type and data.

* Revert back accidentally removed code for contractStateType filtering.

* Incorporating final PR review feedback. Use @JvmOverloads on constructor.

* Make sure constraintInfo is class evolution friendly.
2018-10-03 13:41:25 +01:00
Florian Friemel
842eac5c43
[CORDA-1926] Implement target version and min platform version (#3899)
https://r3-cev.atlassian.net/browse/CORDA-1926
2018-09-28 09:46:06 +01:00
Shams Asari
c79dd8017d
CORDA-1264: Mask internal errors if devMode is false (#3942) 2018-09-17 15:44:51 +01:00
Viktor Kolomeyko
49adf55397
ENT-2489: Additional optional parameter to specify target for RPC invocation. (#3915)
This is a split-out change from an enterprise feature, but since we do have: `RPCApi.RPC_TARGET_LEGAL_IDENTITY` header constant even in OS, it would make sense to extend RPC client API to populate this.
2018-09-11 16:32:17 +01:00
Dan Newton
db6c7f38a5 Support for case insensitive vault queries (#3853)
* Make the criteria builder functions case insensitive

Add IGNORE_CASE versions of the comparison operator enums
Add exactMatch argument to criteria builder functions where strings can be passed in and set its default value to true
Use JvmOverrides to provide the default true version to java without needing to specify a value manually
If exactMatch is true then the original enums will be used, if false the IGNORE_CASE enums will be used instead
HibernateQueryCriteriaParser.columnPredicateToPredicate now takes into account the IGNORE_CASE versions of the enums

* Tidy up QueryCriteriaUtils and HibernateQueryCriteriaParser

Split HibernateQueryCriteriaParser.columnPredicateToPredicate into smaller functions
Reduce duplicated code in QueryCriteriaUtils

* Tidy up QueryCriteriaUtils and HibernateQueryCriteriaParser

Split HibernateQueryCriteriaParser.columnPredicateToPredicate into smaller functions
Reduce duplicated code in QueryCriteriaUtils (missed some code here)

* update changelog and api-vault-query docs with new API functions

* reorder Operator enums so that the ignore case enums are at the end

In case anyone is depending on the order of the enums, to keep compatibility with existing CorDapps the enums should be added at the end to prevent ordinals from breaking.
2018-09-07 10:20:21 +01:00
Shams Asari
be45096082
CORDA-1864: Added getter for network parameters to RPC (#3892) 2018-09-05 11:17:13 +01:00
Mike Hearn
33f5aa4190 RPC: make the client library require the platform version it is built for.
Remove an unnecessary override on the CordaRPCOps interface.
2018-09-03 19:05:47 +02:00
Mike Hearn
c68134ad60 Minor: fix changelog markup errors. 2018-08-29 15:05:18 +02:00
Clinton
3594ccd89b
CORDA-1924: Remove references to Cordform definition and cordform-common (#3842) 2018-08-24 16:29:14 +01:00
josecoll
8b501b1b80
CORDA-1858 - Vault query fails to find a state if it extends from class (#3722)
* Included Contract State parent classes in list of queryable types.

* Added changelog entry.
2018-07-31 17:16:27 +01:00
Shams Asari
dfafdbcb9f
Added checks against the use of the special uploader tokens (#3724)
"app", "rpc", "p2p" and "unknown" have security implications (see isUploaderTrusted method) and thus they are not allowed to be used in the uploader field when importing attachments via the public API.
2018-07-31 17:01:39 +01:00
Shams Asari
994fe0dbdc
CORDA-1845: Check for min plaform version of 4 when building transactions with reference states (#3705)
Also includes some minor cleanup brought up in a previous PR.
2018-07-31 16:07:35 +01:00
Dominic Fox
4542e0cd06
CORDA-916: Add registerFlowFactory method to public test API (#3720)
* Add registerFlowFactory method to public test API

* Return CordaFuture rather than a plain Future

* Rename method

* Improve KDoc

* Hide internal interface with public wrapper

* Modify API current to include ResponderFlowFactory interface

* Take API definition change from generated file

* Note API change in changelog
2018-07-31 13:33:18 +01:00
Roger Willis
8207ac3222
CORDA-1332 Reference input states (#3525)
* * First commit for reference input states feature.

* Added docs.
* Added additional test.

* Fixed whitespace.

* Rebased to master.
* Updated Raft and persistent notary implementations.

* Updated changelog.

* Updated topo sort to handle reference states.
* Stubbed out with referenced states flow.

* Added WithReferencedStatesFlow.
* Added Tests for WithReferencedStatesFlow.
* Added ReferenceState type.
* Rebased to latest version of master.

* Added better comments.
* Updated unit test.

* Added comment to explain a little hack.
* Fixed broken contract upgrade RPC test.

* Added minimum platform version check.
* Updated mock network so that notary nodes inherit the platform version set by the network's minimum platform version.
* References states can now only be used when minimum platform version >= 4.

* Created a new file to hold async operations as "WaitForStatesToUpdate" is broadly reusable.
* Refactored WithReferenceStatesFlow

* Updated javadoc for WaitForStatesToUpdate aysnc operation.

* Added network parameters property to InternalMockNetwork.

* Added min platform version capability to mock services.

* Removed erroneous chars from file.

* Made async operation internal and now call it from FlowLogic.
* Moved some transaction checking code around.

* Removed serializable annotation from referenced state and ref.
* Added reference states design doc.
* Added missing KDocs.
* Updated with reference states flow to handle consecutive update races.
* Made platform version info an inheritable thread local.
* Fixed various typos.
* Updated docs.

* Fixed race.

* Removed min platform version checks as API needs more thought.

* Added deprecation to method and supressed warnings.

* Renamed WaitForStatesToUpdate to WaitForStateConsumption.
* Fixed race in WaitForStateConsumption.

* Addressed PR comments and updated comments / KDocs.

* Reverse vault bugfixes.

* * Vault bug fixes.

* * Fixed broken test.
* Moved WaitForStateConsumption to internal package.
2018-07-25 14:06:56 +01:00
Tudor Malene
40fc56f2ea
Feature/corda 1813/change postgres column type (#3631)
* CORDA-1813 fix Postgres db bloat issue

* CORDA-1813 merge fixes

* CORDA-1813 change column type and size to a standard corda type

* CORDA-1813 docs

* CORDA-1813 create custom hibernate type for the checkpoint blob and align with enterprise

* CORDA-1813 Remove max col size

* CORDA-1813 Remove max col size

* CORDA-1813 Fix merge

* CORDA-1813 Remove buggy :serverNameTablePrefix: configuration
2018-07-25 09:52:57 +01:00
Michele Sollecito
abc1d99eaa
[CORDA-1799]: Avoid generating test CorDapp JARs from each out of process node started by the driver (#3641) 2018-07-23 11:18:11 +01:00
Shams Asari
921b132658
Deprecated freeLocalHostAndPort, freePort and getFreeLocalPorts of TestUtils (#3630)
They're prone to cause flaky tests due to the "allocated" ports already being taken by the system when eventually needed. Replaced usages with PortAllocation.Incremental.

Affected unit tests made into integration tests to avoid any issues in the future when unit tests are made to run in parallel.
2018-07-17 14:42:30 +01:00
Rick Parker
ed25d8f1be
ENT-1565 Upgrade Artemis version to latest. (#3557)
* ENT-1565 Upgrade Artemis version to latest.

* Fix compiler errors.

* Add to changelog

* Additional commentary on Proton-J version
2018-07-13 10:10:26 +01:00
Dan Newton
7b4ace16e1 Remove duplicated code between PersistentIdentityService and InMemoryIdentityService (#3428) 2018-07-10 08:35:14 +01:00
Tudor Malene
2ab5a4cf12
CORDA-1392 Make Hibernate entities non-Serializable (#3458)
* CORDA-1392 Make Hibernate entities non-Serializable

* CORDA-1392 Make Hibernate entities non-Serializable - fix api

* CORDA-1392 Fix determinise

* CORDA-1392 Add changelog entry

* CORDA-1392 Address code review changes
2018-07-05 09:37:30 +01:00
Tudor Malene
9be4c5dca4
CORDA-1567 Remove all traces of the out-of-process verifier (#3424) 2018-06-25 13:01:33 +01:00
Shams Asari
b97af477b2
CORDA-1603: Class carpenter able to synthesis Cash.State objects (#3400)
This requires the class carpenter to be able to run in a "lenient" mode where it permits synthesised classes to implement interfaces with unimplemented methods.
2018-06-25 11:33:37 +01:00
Shams Asari
3046843d40
CORDA-1602: Added cmd line flags to the network bootstrapper (#3419)
The list of CorDapps jars is no longer passed in via the cmd line but is now expected to be placed in the bootstrapped directory.

Ended up being a bit of a refactor to cater for unit testing, and also tidied up the bootstrapper docs.
2018-06-23 11:36:10 +01:00
Anthony Keenan
3125ec9f73 [ENT-1955] Documentation fixes (#3417) 2018-06-21 16:57:30 +01:00
Michele Sollecito
af93ff8d1c
[CORDA-1638]: Node crashes in --initial-registration polling mode if doorman returns a transient HTTP error (fix). (#3403) 2018-06-19 16:43:46 +01:00
Michele Sollecito
20aca788ce
[CORDA-1605]: When one node in a transaction fails to respond, operator of initiating node needs to understand which node it is waiting for (fix) (#3393) 2018-06-18 17:59:00 +01:00
James Brown
026a4864b1
ENT-1387 h2port config changes with new h2Settings block
* Introduce new h2Settings config block which overrides h2Port
* H2 server listens on localhost by default
* Change is backward compatible and old h2Port option can still be used but that always listens  on localhost now
* Update changelog and docs with H2 changes
2018-06-13 16:23:39 +01:00
Michele Sollecito
e2701e69d6
[CORDA-1612]: Fix truncated code snippets in docs PDF (#3347) 2018-06-13 09:43:16 +01:00
Stefano Franz
0f3453d1c7
add configuration option to enable compatibility zone whilst running devMode
* add configuration option to enable compatibility zone whilst running devMode

* add documentation about allowCompatibilityZone

* address review comments

* remove extra doc lines

* add changelog entry

* Update changelog.rst
2018-06-12 11:03:32 +01:00
Andrius Dagys
8087f3c5d3
CORDA-1494: Update changelog (#3344) 2018-06-12 08:50:26 +01:00
Dan Newton
5ceb61606a VaultTrack returns undesired states #3276 (#3336)
* filter by contract state in _trackBy

* write tests to check that _trackBy is filtering the states correct and tidy up filtering functions

* remove un needed function

* add change log message for filtering unrelated ContractStates from trackBy
2018-06-11 17:53:31 +01:00
szymonsztuka
baa6479575
ENT-1712 Warning on cross-reference between JPA entities from different mapped schemas (#3282)
At startup node warns about any MappedSchema containing a JPA entity referencing to another JPA entity from a different MappedSchema. Cross reference between JPA entities across different MappedSchema objects can cause operational issues while evolving one MappedSchema object or migrating it's data. Doc API: Persistence documentation no longer suggests mapping between different schemas.
2018-06-08 10:25:50 +01:00
Shams Asari
f6a23a0216
CORDA-1546: Updated the flow hospital to suspend FinalityHandler if it errors (#3304)
It will re-run automatically from last checkpoint on node restart, allowing the opportunity to resolve the issue, something required when dealing with contract constraint failures.
2018-06-07 16:18:00 +01:00
Michele Sollecito
fc020bca4b
[CORDA-1575]: Out of process nodes started by the driver do not log to file (fix). (#3286) 2018-06-01 16:16:23 +01:00
szymonsztuka
57d379597b
Fix a typo in node_attchments_contracts table name. (#3202) 2018-06-01 16:08:19 +01:00
Tudor Malene
9efb1ecfe0
CORDA-1477 add check for code version in checkpoints (#3256)
* CORDA-1477 add check for code version in checkpoints

* CORDA-1477 Comment style

* CORDA-1477 address code review comments

* CORDA-1477 add changelog entry

* CORDA-1477 attempt to fix tests

* CORDA-1477 attempt to fix tests and address code review comments

* CORDA-1477 attempt to fix tests
2018-06-01 13:37:39 +01:00
Michele Sollecito
e44b6c6f4a
[CORDA-1356]: CashException is unable to derisalize with AMQP through RPC. (fix). (#3274) 2018-05-30 17:15:50 +01:00
Shams Asari
7b09795795
CORDA-1383: Cleaned up the JSON format of WireTransaction and SignedTransaction (#3248)
In particular correctly outputs the custom state and command objects in the txs. Also fixed up deserialisation back into the transaction objects.
2018-05-30 16:37:41 +01:00
Michele Sollecito
26ef294d8d
[CORDA-1356]: OOM when using Demobench + Explorer (fix). (#3268) 2018-05-30 15:04:24 +01:00
Michele Sollecito
1c1b492532
[CORDA-1542]: Ctrl-C in the shell no longer aborts the flow (fix). (#3260) 2018-05-30 10:29:10 +01:00
Konstantinos Chalkias
ac212972ea
[CORDA-1539] Minimum RSA key of 2048 bits on validatePublicKey (#3239) 2018-05-29 17:11:00 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
Maksymilian Pawlak
7d69bc664a [CORDA-1297] Columns nullability (#3112)
JPA/Hibernate entities need to impose the correct NULL/NOT NULL constraints on the database - whatever these correct values actually are.
API change: net.corda.core.schemas.PersistentStateRef fields (index and txId) are now non-nullable. Rationale: The fields were always effectively non-nullable - values were set from non-nullable fields of other objects. The class is used in context of database table Primary Key of for other entities and a database already imposes those columns as non-nullable (even if JPA annotation nullable=false was absent).
2018-05-25 19:03:24 +02:00
Katelyn Baker
a3d88f752d
CORDA-1510 - Allow Doorman and NetworkMap to be configured independently (#3220)
* CORDA-1510 - Allow Doorman and NetworkMap to be configured independently

Currently only one compatabilityZoneURL can be specified, however the
two services can be run on as separate servers. Allow nodes to be
configured in this manner

* Partial review comments

* Review comments

* review comments
2018-05-25 11:37:20 +01:00
Shams Asari
4e0378de9c
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.
2018-05-24 18:26:55 +01:00
Michele Sollecito
d1e147b1c1
[CORDA-1638]: Audit log of failed transactions MVP. (#3231) 2018-05-24 16:06:14 +01:00
Michele Sollecito
1137a0cc8f
[CORDA-1458]: Prevent passwords from being logged as part of node's configuration. (#3223) 2018-05-23 13:51:40 +01:00
Michele Sollecito
48f89e9ff8
[CORDA-1526]: Ensure MDC is printed in logs only if not empty. (#3222) 2018-05-23 13:23:02 +01:00
Shams Asari
fb70c4b69c
Marked createComponentGroups as @CordaInternal (#3193) 2018-05-22 11:38:56 +01:00