Commit Graph

1890 Commits

Author SHA1 Message Date
aa41120f6c Disable unstable test on Windows (#1899) 2017-10-18 11:20:51 +01:00
c2ff4b74e4 Make const MAX_HASH_HEX_SIZE internal 2017-10-18 10:04:19 +01:00
c621c7d123 Attempt to make NodeStatePersistenceTests more stable (#1895)
By ensuring that the nodes are properly started and aware of each other before firing any flows through them.
Also minor refactoring.
2017-10-18 09:14:03 +01:00
698b91bc5e Fix after rebase. 2017-10-17 15:25:01 +01:00
b861f4b7cb Standardise Public Key hash size as per discussions with KC. 2017-10-17 14:31:21 +01:00
cda3ecbc0a Revert DBPartyAndCertificate change: PK should be party name (not owningKeyHash). 2017-10-17 14:30:34 +01:00
72ad9a51fe Use SecureHash extension method. 2017-10-17 14:30:03 +01:00
744f2c658a Explicitly set length of key hash to 64. 2017-10-17 14:29:38 +01:00
0e5346caa1 Updated DB schemas from using string'ified key to use hash of key. 2017-10-17 14:29:36 +01:00
20e0e63eed Change string of PublicKey to hash as database primary key. 2017-10-17 14:27:20 +01:00
3372e49898 Fixed the node shell to work with the DataFeed class 2017-10-17 12:27:01 +01:00
c436984462 Merge from Corda master - fix compilation errors 2017-10-16 19:08:51 +01:00
db0969ebda Merge from Corda master 2017-10-16 18:03:07 +01:00
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
83b9080502 Adding an option to override the default isolation level on per transaction basis (#1886) 2017-10-16 14:03:51 +01:00
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
2680361696 Renamed "plugins" dir to "cordapps" (#1644)
* Renamed plugins dir to cordapps dir while maintaining backwards compatibility with the plugins dir.
Bumped gradle plugins to 2.0.4
2017-10-13 15:01:24 +01:00
ce5b7de718 CORDA-530 Unduplicate code (#1791) 2017-10-13 12:15:52 +01:00
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
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
899f7f9d0d Change the serialization/deserialization code of SessionMessage data to add more validation.
Address PR comments

As pointed out by Shams the SessionInit must be well formed at this point.
2017-10-11 15:17:48 +01:00
3fdc69e541 Fix coin selection with Flow-friendly sleep (#1847) 2017-10-11 14:33:20 +01:00
d0d0f132df Create nodeInfoDirectory in NodeInfoWatcher initialization, and make NodeInfoWatcher logging less verbose and less frequent (#1857)
Let NodeInfoWatcher create the directory it wants to poll at startup.
Also log failure in creating the directory, but don't log anything if it can be found at poll time.
2017-10-11 12:54:30 +01:00
ef0f0acc4a Make integration tests pass in AMQP mode, part 1 (#1855) 2017-10-11 11:13:46 +01:00
4ee250a19b Retire setCordappPackages. (#1860) 2017-10-11 10:35:21 +01:00
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
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
0e47e53b60 Make AttachmentLoadingTests more stable (#1810) 2017-10-10 12:28:19 +01:00
7af1f02a2d Add a configuration option to set how often should a node check for new nodeinfos on disk (#1851)
* Add a configuration option to set how often should a node check for new NodeInfo files in additional-node-infos
2017-10-10 09:55:20 +01:00
22b1dead32 Remove functions with spaces in their name (#1850)
Remove all the Kotlin functions with spaces in them since the Android doesn't support them.

See https://github.com/corda/corda/issues/1730 for a more in-depth discussion.
2017-10-10 09:32:43 +01:00
7340a2e32f CORDA-654: Handle non-standard file systems in NodeInfoWatcher (#1818)
Handle non-standard file systems such as JimFs, in NodeInfoWatcher. Instead of using `toFile()` to convert a Path to a File, open the Path for writing to directly.
2017-10-09 16:15:27 +01:00
e1458a40cb Revert code transformation; use of deprecated method 2017-10-09 15:26:40 +01:00
14f959b4af Code clean-up run 2017-10-09 15:26:40 +01:00
cb9e27a84a Reformat files in node 2017-10-09 15:26:39 +01:00
69ad52cf5c Deflake node infoWatcherTest (#1836)
* Stop using the watch service, just re-read the whole directory every time. On macOS it's quite unpredictable and the tests are almost always failing.
2017-10-09 13:53:36 +01:00
29a101c378 [CORDA-683] Enable receiveAll() from Flows. 2017-10-09 13:46:37 +01:00
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
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
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
894f05d84e CORDA-599 Remove dependency of NetworkMapService impls on ServiceHub (#1713) 2017-10-07 10:46:20 +01:00
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
3afe855042 Update to match MockNetwork API change (#1831) 2017-10-06 14:50:54 +01:00
2564b7da1d Merge pull request #1803 from corda/mnesbit-CordaServices-startFlows
Start Flows from services
2017-10-06 13:49:18 +01:00
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
fde30d0181 removed unused variable in PersistentNetworkMapCache (#1813)
val publicKey in unused in PersistentNetworkMapCache, removed.
2017-10-06 10:45:17 +01:00
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
e8d21f2311 Deflake NodeInfoWatcherTest (#1811)
* Deflake NodeInfoWatcherTest

* Moved to integration tests, added eventually to check the validity
2017-10-05 17:15:40 +01:00
cf83328d5d Add filesystem polling to nodes (#1623)
Add the logic in node to poll for new serialized nodes to appear on disk.

Newly discovered nodes are automatically added to the PersistentNetworkMapCache
2017-10-05 14:11:10 +01:00
2ca140d7f7 CORDA-540: Allow AMQP switch for storage context (#1799) 2017-10-04 08:51:26 +01:00
f5784f718d Remove database transaction from notaryPartyFromX500Name (#1786)
Remove database transaction from notaryPartyFromX500Name as it doesn't touch the database
2017-10-03 19:22:10 +01:00