Commit Graph

1302 Commits

Author SHA1 Message Date
Michele Sollecito
d882f8871e
[CORDA-758]: Permissions are now checked for each RPC method. (#1985)
* Permissions are now checked for each RPC method.

* Fixed NodeMonitorModelTest

* Fixed IRSDemoTest
2017-11-02 15:09:49 +00:00
Andrzej Cichocki
6b2b663ab3
CORDA-716 Retire MockNetwork.Factory (#1937) 2017-10-31 17:10:37 +00:00
Andrzej Cichocki
4b0b13dad4
CORDA-716 Retire TestDependencyInjectionBase (#1939) 2017-10-31 10:21:38 +00:00
Katelyn Baker
bc12f87a24 CORDA-553 - Review Comments 2017-10-27 12:41:13 +01:00
Katelyn Baker
3633624dc6 CORDA-553 - First steps towards evolvability
Define the two transforms that will be useful for enum evolvability (see
design document for more details).

Furthermore, define the generic mechanism by which transform annotations
on classes are encoded into the AMQP envelope

With nothing to check for these annotations at either end, this is
mostly a no op, but an important step toward getting evolvability in
place
2017-10-27 12:40:53 +01:00
Mike Hearn
d7e4aa1783 Add more formal support for observer/regulator nodes. This is a simplistic
approach which assumes a dedicated node for observers: states that are
reported to the node will appear in the database and update feeds as
normal. Apps that expect all updates to be relevant to themselves may
need adjusting if they run on an observer node too, but this is likely
to be rare.
2017-10-26 18:05:24 +02:00
Mike Hearn
b2e8809916 Minor: InitiatedBy is a documented annotation. 2017-10-26 18:05:24 +02:00
josecoll
5349d4f850 Standardisation of Public Keys in Schema entities. (#68) (#1936)
* Standardisation of Public Keys in Schema entities. (#68)

* Standardisation in usage of Public Keys in Schema entities.
Use PK Hash where optimal, otherwise use ByteArray/LOB representation of PK.

* Redundant after rebase.

* Use .encoded and Crypto.decode<Public|Private>Key(bytes) instead of Corda serialization.

* Optimize DBPartyAndCertificate entity to store and query on ownerKeyHash.

* Updated API stability check for schema attribute change.
2017-10-24 22:11:41 +01:00
Andrzej Cichocki
927924498b Introduce MockNodeParameters/Args (#1923) 2017-10-24 11:58:32 +01:00
josecoll
7f6608deb5 Retrofit changes from Enterprise PR #61 (#1934) 2017-10-24 11:41:59 +01:00
Alberto Arri
b04368e36a [CORDA-442] make MockNetwork not start a networkmap node (#1908)
* [CORDA-442] make MockNetwork not start a networkmap node

Now MockNetwork will put the appropriate NodeInfos inside each running node networkMapCache.

Tests relating to networkmap node starting and interaction have been removed since they where relaying on MockNetwork
2017-10-23 16:50:53 +01:00
Katelyn Baker
97f7c9b79d CORDA-435 - Ensure Kryo only tests use Kryo serializatin context
Also correct lambda typos (from lamba)
2017-10-23 10:32:03 +01:00
Andras Slemmer
c66a84bfc6 Interface changes for multi-threading 2017-10-20 11:29:30 +01:00
Andrzej Cichocki
005ce349a7 * Retire MockServiceHubInternal (#1909)
* Introduce rigorousMock
* Add test-utils and node-driver to generated documentation
2017-10-20 10:06:53 +01:00
Chris Rankin
2c84d07e8e CORDA-704: Implement @DoNotImplement annotation (#1903)
* Enhance the API Scanner plugin to monitor class annotations.
* Implement @DoNotImplement annotation, and apply it.
* Update API definition.
* Update API change detection to handle @DoNotImplement.
* Document the `@DoNotImplement` annotation.
2017-10-19 17:18:35 +01:00
Andrzej Cichocki
dfd90701a0 CORDA-599 PersistentNetworkMapCache no longer circularly depends on SH (#1652) 2017-10-19 11:19:55 +01:00
Konstantinos Chalkias
479ab9a36a [CORDA-694] Commands visibility for Oracles (without sacrificing privacy) (#1835)
new checkCommandVisibility feature for Oracles
2017-10-19 10:21:20 +01:00
Andrzej Cichocki
b2454c646c Eliminate circular dependency of NodeSchedulerService on ServiceHub. (#1891) 2017-10-19 09:26:26 +01:00
Viktor Kolomeyko
cac3057877 CORDA-540: Make Verifier work in AMQP mode (#1870) 2017-10-17 10:44:27 +01:00
Ross Nicoll
63b7eb3f70 CORDA-654: Move from chooseIdentity() to singleIdentity() (#1819)
Move from `chooseIdentity()` to `singleIdentity()` where tests use a single identity, or to fetching by name where multiple identities are present, so we stop using the first identity as special.
2017-10-16 15:51:26 +01:00
josecoll
2a68e23e69 Improved Cash Selection interface (#1858)
* Cash selection refactoring such that 3d party DB providers are only required to implement Coin Selection SQL logic.

* Re-added debug logging statement.

* Updated to include PR review feedback from VK

* Refactoring following rebase from master.

* Fix broken JUnits following rebase.

* Use JDBC ResultSet getBlob() and added custom serializer to address concern raised by tomtau in PR.

* Fix failing JUnits.
2017-10-16 13:47:35 +01:00
Andrzej Cichocki
38cf4a489e CORDA-676 Eager cordapp schemas (#1839)
* Retire customSchemas.
* Key cordapp-to-hash map by url as native equality too strict.
2017-10-16 11:35:29 +01:00
Chris Rankin
635ad9ac92 Ensure that the contents of OpaqueBytes cannot be modified. (#1871)
* Ensure that contents of OpaqueBytes cannot be modified.
* Update documentation and restore the signature verification check.
* Update the API definition.
* KDoc fixes.
* Update the changelog for v1.1.
2017-10-13 12:27:42 +01:00
Andrzej Cichocki
ce5b7de718 CORDA-530 Unduplicate code (#1791) 2017-10-13 12:15:52 +01:00
Andrius Dagys
7b10e92819 Fixed AbstractNode to load custom notary services properly (#1720)
* Fixed AbstractNode to load custom notary services properly.
Added a custom notary sample.

* Prevent multiple custom notaries from being loaded

* Throw if more than once custom notary service is loaded
2017-10-13 10:36:25 +01:00
Chris Rankin
d1c5111567 Remove the two header lines from the diff output to simplify the +/- … (#1875)
* Remove the two header lines from the diff output to simplify the +/- check.
* Revert Kt class changes as they alter the public API.
2017-10-12 11:39:22 +01:00
Ross Nicoll
327f0ebd73 CORDA-654: Migrate test APIs to match identity changes (#1744)
Rework identity usage in tests to extract identity from nodes by name, rather than just arbitrarily choosing the first identity. This better models the intended design for production (future work).
2017-10-11 18:26:09 +01:00
Konstantinos Chalkias
ed79db6864 Clean up Crypto (#1866)
clean up Crypto comments + PublicKey.toSHA256Bytes() uses .encoded
2017-10-11 17:47:48 +01:00
Joel Dudley
de391dc9f0 Adds a length method to calculate a time-window's length. 2017-10-11 16:15:24 +01:00
Rick Parker
3fdc69e541 Fix coin selection with Flow-friendly sleep (#1847) 2017-10-11 14:33:20 +01:00
Andrzej Cichocki
4ee250a19b Retire setCordappPackages. (#1860) 2017-10-11 10:35:21 +01:00
Shams Asari
bd53a22efa Removed extraAdvertisedServiceIds config
The remaining use for it was the finance CorDapp for permissioning CCY issuers. Instead this is now taken from a custom config in node.conf.
2017-10-10 13:47:37 +01:00
Ross Nicoll
242b019dc2 CORDA-641: Remove special case handling of notary transactions (#1675)
Move special case handling of notary transactions into `SignedTransaction`
2017-10-10 13:23:31 +01:00
cburlinchon
6166fa8358 Don't generate Kt classes (#1798) 2017-10-10 09:51:01 +01:00
Joel Dudley
d1db35c344 Removes unnecessary @JVMOverloads annotation. 2017-10-10 09:25:45 +01:00
Ross Nicoll
7ad754fe78 Add signature exchange to transaction key flow (#1417)
Require a signature on a deterministic data blob (which includes X.500 name and public key) when exchanging new confidential identities, in order to ensure that the owner of the key pair wants it to represent the specified name, not just that the certificate owner states the key represents the given identity.
2017-10-09 17:03:04 +01:00
Tommy Lillehagen
14f959b4af Code clean-up run 2017-10-09 15:26:40 +01:00
Tommy Lillehagen
a633f8dada Reformat files in core 2017-10-09 15:26:39 +01:00
Michele Sollecito
29a101c378 [CORDA-683] Enable receiveAll() from Flows. 2017-10-09 13:46:37 +01:00
Chris Rankin
689758a71c CORDA-644: Only serialise Kotlin lambdas when checkpointing. (#1801)
* Remove local function because it is serialised as a lambda.
* Don't automatically whitelist Kotlin lambdas unless checkpointing.
* Add comment to @CordaSerializable, warning not to allow AnnotationTarget.EXPRESSION.
2017-10-09 13:02:40 +01:00
Andrzej Cichocki
f83f1b7010 CORDA-599 Fix circular dependency between vault and SH (#1630)
Fix circular dependency between the 2 vault objects and SH.
2017-10-09 12:49:07 +01:00
Shams Asari
727cd0e55c Cleaned up notary configuration by introducing a notary config option.
extraAdvertisedServiceIds is no longer used for this.
2017-10-07 12:52:37 +01:00
Andrzej Cichocki
894f05d84e CORDA-599 Remove dependency of NetworkMapService impls on ServiceHub (#1713) 2017-10-07 10:46:20 +01:00
Ross Nicoll
6562579e8e Extend NetworkMapCache API (#1766)
* Add functions to:
** Return PartyAndCertificate rather than just Party
** Return all NodeInfo entries for a name (rather than just by key)
* General documentation improvements
2017-10-06 15:23:20 +01:00
Matthew Nesbit
2564b7da1d Merge pull request #1803 from corda/mnesbit-CordaServices-startFlows
Start Flows from services
2017-10-06 13:49:18 +01:00
Matthew Nesbit
fe4635a81e Start Flows from services
Update tests

Add a test to show progress tracking works

Include service startable flow in Cordapp data structures.

Respond to PR comments

Fixup change of api inline with PR comments.

Address PR comments
2017-10-06 10:48:30 +01:00
Katarzyna Streich
66d78fcf65 Cleanup of mock network pre-NetworkParameters (#1802)
* MockNode rename overrideServices to notaryIdentity

Permit only one override of service.

* MockNetwork: force creation of NetworkMapNode

Tests cleanup: decouple normal nodes and network map. NetworkMap node is created as first.
2017-10-06 10:32:54 +01:00
Chris Rankin
248c898818 Instantiate Contract classes outside of LedgerTransaction.verify() (#1770)
* Load the contract classes when we create the LedgerTransaction.
* Fix Verifier tests by making ContractResult serialisable.
* Use named parameters to create ContractResult.
* Make the @JvmStatic function private.
* Refactor ContractResult to use Try.on{} instead.
2017-10-05 15:20:21 +01:00
Ross Nicoll
46532ccbcb Don't repackage well known key types (#1545)
* Don't repackage well known key types when converting keys to a well known type
* Remove custom key serializers
* Remove duplicate serializer registration
2017-10-05 09:14:00 +01:00
Ross Nicoll
5b79def791 Add CordaRPCOps.notaryPartyFromX500Name (#1786) 2017-10-03 19:22:10 +01:00