Commit Graph

798 Commits

Author SHA1 Message Date
Viktor Kolomeyko
50c51493c3 CORDA-540: AMQP-forge "example-code" (#1439) 2017-09-07 11:17:55 +01:00
Ross Nicoll
8d261faac0 Correct outInputState -> ourInputState (#1435) 2017-09-06 17:50:21 +01:00
Andrzej Cichocki
579abda044 Group test scope modules in testing dir (#1419) 2017-09-05 18:27:26 +01:00
Clinton Alexander
3ccddf91ea Addressed release comments. 2017-09-05 17:38:53 +01:00
Clinton Alexander
ccf231440f Added a page to explain testing. 2017-09-05 17:21:07 +01:00
josecoll
ebc9cacb53 Contract Upgrade API improvements + persistence (#1392)
* All Contract Upgrade functionality performed within a corresponding flow.
Removed RPC API calls for contract upgrade authorisation / de-authorisation.
Added persistence using AppendOnlyPersistentMap.

* Changed to using a PersistentMap to ensure entries can be removed (was causing failing de-authorisation tests).
Fixed all warnings.

* Added mandatory @Suspendable annotations to flows.

* Do not instantiate object unless overridden.

* Updated changelog and CordaDocs.

* Persistence simplification: only store upgrade contract class name (not serialized object)

* Remove nullability from contract_class_name DB column.
2017-09-05 13:23:19 +01:00
Maksymilian Pawlak
377ca95387 Fix steps references. Small text fixes. 2017-09-05 13:11:58 +01:00
joeldudleyr3
17f7e39183 Makes set-up instructions clearer. Addresses a zsh-related bug. 2017-09-05 12:33:52 +02:00
Varun Mathur
81d83d707f fix typo in notary docs 2017-09-05 12:32:28 +02:00
Ross Nicoll
8076983e2e Add missing finance CorDapp depdendency to example code (#1413)
The example code uses cash flows and contracts, but doesn't depend on the finance CorDapp. This happens to work at the moment but should be corrected anyway.
2017-09-05 10:22:34 +01:00
mkit
cbf89ba98b Deprecating verifiedTransactions from the public API (#1418) 2017-09-05 10:07:55 +01:00
Andrzej Cichocki
15f741f315 Spinoff driver into own project with demorun (#1401) 2017-09-05 09:50:51 +01:00
Joel Dudley
b990fedd80 Adds a builder for configuring nodes in the driver for Java interop. 2017-09-04 15:51:46 +01:00
Søren Sjørup
314a88e13a Update using-a-notary.rst 2017-09-04 11:52:20 +02:00
Konstantinos Chalkias
39e44382be Helper SignedTransaction.buildFilteredTransaction(filtering) (#1394) 2017-09-01 19:26:00 +01:00
joeldudleyr3
83d0095142 Adds a builder for configuring nodes in the driver for Java interop. 2017-09-01 16:45:00 +01:00
joeldudleyr3
76b46e4e4e Addresses review feedback. 2017-09-01 14:50:29 +01:00
joeldudleyr3
d1ee84044d Renames AuthenticatedObject to CommandWithParties for clarity. 2017-09-01 14:10:35 +01:00
Konstantinos Chalkias
62c64ace23 Adding createSignature(filteredTransaction) to serviceHub (#1380) 2017-09-01 10:45:01 +01:00
Konstantinos Chalkias
8d29c78073 changelog additions, mainly for crypto and finance related tasks 2017-08-31 16:56:24 +01:00
szymonsztuka
bbebea234d remove reference to repository with JetBrains/Exposed library 2017-08-31 13:42:08 +01:00
Rick Parker
35dec9abdc Make addToWhitelist vararg for compactness. (#1361) 2017-08-31 13:24:45 +01:00
Katarzyna Streich
472ecc65c6 NetworkMapCache database backed (#1135)
Work on database backed NetworkMapCache

Make NodeInfo JPA entity.

Enable node startup with it's database network map cache. Fix schema.
Make node not wait for finishing network map service registration if it
successfully loaded data from database.

Add tests for startup without NetworkMapService.

* Rename networkMapRegistrationFuture

Change networkMapRegistrationFuture to nodeReadyFuture, it no longer
indicates the NetworkMapService registration, because we are able to run
network without map service configured.

* Partially integrate database into NetworkMapCache

Full integrtion will come with service removal.

Move MockServiceHubInternal to net.corda.node.testing

* Add workaround to transaction scope race

Temporary workaround to force isolated transaction (otherwise it causes race conditions when processing
network map registration on network map node).

* Remove WorldMapLocation from NodeInfo

Infer the node's location based on X500 name

Add serial number on NodeInfo

For tests of running without NetworkMap, start nodes with nonexistent NetworkMap address

Make clearNetworkMapCache callable via RPC.
2017-08-31 11:00:11 +01:00
Joel Dudley
3e5fa9ee6a Update api-flows.rst. 2017-08-31 10:09:31 +01:00
Patrick Kuo
9bd4342039 Removed is relevant from LinearState (#1294) 2017-08-30 16:26:34 +01:00
Joel Dudley
e50052aeb1 Update getting-set-up.rst. 2017-08-30 13:20:11 +01:00
Joel Dudley
d2a2e2c419 Update tut-two-party-introduction.rst. 2017-08-30 11:18:28 +01:00
josecoll
a2a3f51689 Updated vault query api documentation. (#1338)
* Updated vault query api documentation.

* Readability improvement following PR review feedback.
2017-08-29 16:51:42 +01:00
mkit
a84cd567d8 Removing Kt suffixed Java class (#1344) 2017-08-29 13:41:17 +01:00
Joel Dudley
701c4f3c60 Updates the transaction API page and cookbook. 2017-08-25 17:15:39 +01:00
josecoll
a3dbbc173b Vault query criteria default attribute handling. (#1322)
* Performance fix: prevent self joins on VaultStates table (was occurring when Sort specified).

* Enrichment and overriding of Common attributes (eg. Vault.StateStatus and Contract State Types) using composite query criteria.
Remove unnecessary QueryEditor implementation from NodeVaultService.

* Updated documentation and changelog.

* Misc fixes to broken documentation code snippets.

* Incorporating changes from PR review feedback.
2017-08-25 08:38:12 +01:00
Clinton Alexander
ac26b7d1c6 Fixed issues detecting tests caused by changes to directory structures in gradle. 2017-08-24 16:46:54 +01:00
josecoll
458d2e32c0 Pluggable cash selection using H2 as default implementation. (#1300)
* Pluggable cash selection using H2 as default implementation.

* Refactor to use own CashSelection service loader and associated isCompatible() check.

* Determine Cash Selection algorithm to use based on JDBC Driver loaded.
Lazily load JDBC Driver metadata and class implementation.

* Rebased and adjusted package naming to include `finance`

* Rebased and adjusted package naming to include `finance`

* Added some documentation.
Minor fixes and changes following PR review.

* Return cashSelectionAlgo.
Throw exception rather than setting in atomically referenced object.
2017-08-22 18:09:23 +01:00
mkit
dce17ed272 Fixing trader demo docs. After recent refactoring they've become out of sync. (#1298) 2017-08-22 17:42:07 +01:00
Matthew Nesbit
c86e78599f Rename finance module to own package
Fixup after rebase

Correct bad merges

Fixup docs

Fix integration test

Correct doc references to finance
2017-08-22 13:25:31 +01:00
Konstantinos Chalkias
1a4d908b63 Remove grouping from FungibleAsset (Issue and Move) (#1185)
Clean-up FungibleAsset - remove Command grouping and get rid of IssueCommand as no nonce is required anymore.
2017-08-21 16:14:04 +01:00
josecoll
a2ede0fc73 Requery removal (#1276)
* Removed Requery object relational mapping usage (and associated schemas including node-schemas module)

* Fixed issues with NodeAttachmentService tests.
Cannot use JPA custom converters with Primary Key fields.
Hibernate entities require explicit call to flush() to persist to disk.

* Removed redundant requery converters (equivalents not even required in Hibernate).

* Removed remaining gradle requery dependency definitions.

* Fixed broken tests.

* Fixes for failing NodeVaultService tests:
- Dynamic SQL updates (in soft locking code)
- Explicit request by session to participate in transaction (causing "TransactionRequiredException" Executing an update/delete query)
- Explicit flush() required to persist to disk

* Updated changelog.
Fixed compiler warning.

* Fixed WHERE clause AND/OR condition.
Enforced immediate data visibility through transaction commit.

* Final fixes to address failing tests.

* Deferred all hibernate session/txn management to DatabaseTransactionManager.

* Fixed transaction boundaries in failing Cash tests.

* Fixes to address failing tests (transaction boundaries, merge detached object, config clean-up).

* Final adjustment to transaction boundaries in JUnit tests.

* Refactored AttachmentSchemaV1 into NodeAttachmentService itself and referenced from NodeServicesV1.

* Refactored HSQL UPDATE statements to use CriteriaUpdate API.

* Updated all criteria API getters to reference attribute names by type.

* Remove redundant VaultSchema entity name (required when previously using HSQL UPDATE syntax)

* Fix compiler warnings.

* Minor changes following rebase from master.

* Fixed suppress warning type.
2017-08-21 10:42:59 +01:00
Matthew Nesbit
8ec33d67e4 Remove finance dependencies
Re-enable code now DealState PR is in.

Add plugable JSON serialisation

Add docs for new plugin api.

Move parseCurrency back to core to prevent dependency issues with crash shell parsing.

Use :finance module as a proper CorDapp

Move parseCurrency back onto Amount companion.

Fix smoke tests

Fixup after merge.
2017-08-18 14:27:49 +01:00
Andrzej Cichocki
2829faa01f Retire legalContractReference (#1188)
* Add LegalProseReference annotation
* Migrate code from autogenerated javascript to TypeScript source
* Add instructions to rebuild the web resources
* Make installWeb more reproducible
2017-08-18 13:30:39 +01:00
Mike Hearn
d22cdac2dd Move some extension methods for summing to new locations.
This improves the Java API and makes it more idiomatic. The methods
were not moved to be static methods of the relevant types in all cases
due to a bad interaction with a Kotlin auto-completion bug, and because
static methods on interfaces are new in Java 8 and Kotlin is not yet
emitting Java 8 bytecode.

Also, introduce a packages.md file so packages can be documented.
2017-08-18 12:39:12 +02:00
Joel Dudley
734b48bad1 Fixes indentation of note box. 2017-08-17 17:26:10 +01:00
Joel Dudley
4eb58b874a Additional fixes to the tutorial. 2017-08-17 12:02:44 +01:00
josecoll
48e8aa55fa Vault identity cleanup (#1194)
* Removed notary_key (and all references) from vault schema.
Fixed incorrect NOTARY usage in certain tests (cash consumption)

* Fixed broken test.

* Replace CommonSchemaV1.Party in all VaultSchema tables (and associated queries) with string'ified X500Name's only.

* Fix broken tests.

* Completely remove CommonSchemaV1.Party and all references (in favour of X500Name's)

* Updated all schema attribute identity references to use AbstractParty.

* Updated all schema attribute identity references to use AbstractParty.

* Standarised attribute naming for parties (removed 'Name')

* Updated deprecate identity API references following rebase.

* Configurable IdentityService as a lambda in JUnit tests.

* Additional WARNING logging to enable troubleshooting of identity lookup failures.

* Final identity updates to sample schemas.
Cleaned up several compiler warnings.
2017-08-17 09:30:27 +01:00
Joel Dudley
435dcf6af4 Fixes the hello, world tutorial. 2017-08-16 08:36:00 +01:00
Ross Nicoll
b76d036843 Change CashIssueFlow to always issue to ourselves
Change CashIssueFlow to always issue to ourselves, and require the cash is then moved in a separate payment
operation. This more closely models actual operation inside banks, and is a step towards making all move-like
operations go through a uniform verification process.
2017-08-15 22:32:30 +01:00
Ross Nicoll
89476904fc Remove IssuerFlow
* Remove IssuerFlow as it is dangerous and its presence in the finance module risks accidental use in non-test code. As written it will issue arbitary amounts of currency on request from any node on the network, with no validation barring that the currency type is valid.
* Unify interface to CashIssueFlow to match the previous IssuerFlow
2017-08-15 22:32:30 +01:00
Shams Asari
62b26bcd89 Moved Currency stuff in ContractsDSL out of core and into finance 2017-08-15 18:08:02 +01:00
Joel Dudley
ccdab6af4d For convenience, creates RPC snapshot methods for feeds. 2017-08-15 16:18:15 +01:00
Clinton
9149900938 Fixed a warning caused by an incorrect configuration. (#1227) 2017-08-15 12:29:04 +01:00
Joel Dudley
4c351ca803 Updates cheatsheet to reflect API changes up to M14. 2017-08-15 11:35:11 +01:00