Commit Graph

1112 Commits

Author SHA1 Message Date
Viktor Kolomeyko
86fdbb9f22 Make OpaqueBytesSubSequence AMQP serializable (#1303) 2017-08-23 08:40:09 +01:00
Viktor Kolomeyko
66e6f90140 Make WireTransaction @CordaSerializable (#1299)
And do everything necessary for AttachmentClassLoaderTests to be passing in AMQP mode

* Changes following code review by @fenryka and @rick-r3
2017-08-22 16:53:55 +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
Viktor Kolomeyko
5864a22d05 Move dependency on "proton-j" library from "core" sub-project to "node-api" 2017-08-18 09:49:46 +01:00
Patrick Kuo
ae85759067 Added notifyVault flag to recordTransaction and skip notify for irrelevant TX (#1250)
* Add notifyVault flag to recordTransaction to skip notifying the vault for transactions from ResolveTransactionFlow.

* added methods for use in Java

* reverted format changes

* addressed PR issues
changed recordTransaction method signature
2017-08-18 09:46:59 +01:00
Andrzej Cichocki
e49d3aa834 Use native VisibleForTesting everywhere. (#1189) 2017-08-17 18:05:19 +01:00
mkit
204b2fc556 Use String instead of Class for the flowClass (#1270) 2017-08-17 12:59:24 +01:00
Chris Rankin
1672b4aa0a Simple deserialisation fixes. (#1243)
* Fix typo: prefered -> preferred
* Simplify KryoVerifierSerializationScheme and resolve warning.
* Add a custom serialiser for PrivacySeed so that we can avoid invoking RNG.
2017-08-17 11:15:04 +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
Shams Asari
dc8d232480 Creating a PartyAndCertificate only requires a CertPath 2017-08-16 16:36:03 +01:00
Shams Asari
3860b22339 Made all the members of Crypto.kt static so that Java users aren't forced to use Crypto.INSTANCE. 2017-08-16 13:47:11 +01:00
Andrius Dagys
1e0a26e8e5 Ensure transactions in tests have commands (#1200)
* Ensure transactions in tests have commands
2017-08-16 10:06:46 +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
3138e2b6de Cleaned up the flow stack snapshot API 2017-08-15 18:37:39 +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
Ross Nicoll
1a44f98379 Correct behaviour of anonymousToParty()
Correct behaviour of anonymousToParty() in identity API; it previously presumed any Party was a well known
identity, now it tries to look up the well known identity irrespective of whether it's been given a full
party or not.
2017-08-15 15:40:44 +01:00
Alberto Arri
d575e5a4ab Merge pull request #1218 from corda/arri_update_collectSignaturesFlow_Docs
update collect signatures flow docs
2017-08-15 11:39:55 +01:00
Andrius Dagys
43adbfd66c Remove junit-quickcheck and redundant generators 2017-08-15 11:12:02 +01:00
Matthew Nesbit
e546b554fc Remove DealState dependency inside Vault. Use the linearId.externalId for all ref data uses.
Rename as per PR comments

Correct a comment
2017-08-15 09:25:44 +01:00
mkit
3ba42b4ccd Flow stack snapshot feature (#1094)
* flows: Add StackDump, debugStackDump, test (doesnt work)

* Polishing Quasar dump feature, extending it with persisting to a file, adding integration tests

* Addressing review comments

* Addressing 2nd round of review comments

* Refactoring implementation according to Shams suggestion

* Reverting changes and restoring the feature to be the part of the core API

* Switching to ServiceLoader
2017-08-15 08:22:37 +01:00
Ross Nicoll
8f8a5ff774 Remove deprecated code
*Remove dummy public keys in preference for EdDSA keys generated from fixed entropy sources, as a more accurate reflection of real uses. Also eliminates a serialization format issue with dummy keys which would have to be resolved otherwise.
* Remove deprecated 'by' keyword from contracts DSL
* Remove deprecated parts of CordaPluginRegistry
2017-08-15 01:17:36 +01:00
Ross Nicoll
62576b12b3 Simplify identity registration API
* Merge identity registration of well known and confidential identities
* Move verification logic into PartyAndCertificate from IdentityService
* Add note about why PartyAndCertificate exists
2017-08-15 00:17:21 +01:00
Rick Parker
2f08425c43 Refactor KryoAMQPSerializer to go through generic APIs to access AMQP serialization (#1225) 2017-08-14 17:24:04 +01:00
szymonsztuka
a6bf8e35dd rewrite few services to use Hibernate
* DBTransactionMappingStorage
* DBTransactionStorage
* DBCheckpointStorage
* PersistentUniquenessProvider
* PersistentKeyManagementService
2017-08-14 15:06:06 +01:00
Shams Asari
008301c4e8 Introduced FlowLogic.getFlowContext which provides the flow version and app name of the other side. 2017-08-11 18:01:16 +01:00
Ross Nicoll
f0c7d7665a Remove deprecated signing functions
* Remove TransactionBuilder.signWith()
* Remove TransactionBuilder.addSignatureUnchecked()
* Rename signInitialTransaction to toSignedTransaction
* Remove checkAndAddSignature()
* Require all unit tests sign transactions via services
2017-08-11 17:37:50 +01:00
Alberto Arri
4deea43b98 Merge branch 'master' into arri_update_collectSignaturesFlow_Docs 2017-08-11 15:17:43 +01:00
Ross Nicoll
f9552a0d3e Correct exceptions thrown from checkSignaturesAreValid()
checkSignaturesAreValid() calls TransactionSignature.verify(), which throws InvalidKeyException but
checkSignaturesAreValid() did not indicate it could throw InvalidKeyException.
2017-08-11 13:40:39 +01:00
Rick Parker
31df43bd76 Some preparation work for AMQP serialization integration & a refactor fix (#1214) 2017-08-11 13:23:00 +01:00
Matthew Nesbit
af13371510 Move certificate builder code from core to node utilities.
Address PR comments

Fixup dead reference
2017-08-11 12:02:38 +01:00
Alberto Arri
6c02b7d18a Updated docs to remove the deprecated toSignedTransaction 2017-08-11 10:14:39 +01:00
josecoll
54cf46952c JPA Hibernate AbstractParty converter (#1205)
* Added JPA AbstractParty converter (using IdentityService to resolve anonymous parties).

* Use partyFromX500Name. Add meaningful exception messages.

* AutoApply the JPA AbstractParty converter.

* Entity attribute still needs the Convert annotation.

* Fix incorrect registration of custom attribute converter.

* Deal with non-resolvable anonymous parties (eg. store as null and ignore)

* Updates following PR review feedback.

* Added documentation.

* Added entry to changelog.

* Added code documentation as per RN PR feedback request.

* Updates required following rebase from master.

* Renamed converter for clarity.
2017-08-10 17:17:12 +01:00
mkit
c8bbe453f5 Removing clauses from the core module (#1203) 2017-08-10 17:09:08 +01:00
Matthew Nesbit
3bc7914a09 Merge pull request #1184 from corda/mnesbit-generic-generatespend
Move generateSpend onto Cash contract. Add fully generic replacement.
2017-08-10 15:25:40 +01:00
Matthew Nesbit
f4f2d35375 Make a generic generate spend. Tests pass.
Fixup after rebase

Fixup after rebase

Make node have only test compile dependency against finance module.

Use original query code.

Fixup after rebase

Update docs

Edit docs

Add to changelog

Follow recommendations from PR

Follow recommendations from PR

Make a re-usable helper function to create MockServices with database for tests

Tweak a few comments

Don't include tryLockFungibleStateForSpending in soft lock docs.

Respond to PR comments

Fix whitespace error

Fix compile error

Fixup after rebase
2017-08-10 13:29:08 +01:00
Ross Nicoll
d86cb1ac64 Remove deprecated partyFromName() function 2017-08-10 13:25:53 +01:00
Ross Nicoll
fdb63b7611 Add RPC operation for resolving well known identity 2017-08-10 13:25:53 +01:00
mkit
0b33214fea Removing clauses (#1195)
* Removing clauses

* Removing clauses from JavaCommercialPaper

* Addressing review comments
2017-08-09 15:25:31 +01:00
Rick Parker
28610868c4 Remove Kryo from core module completely, including gradle dependencies (#1161) 2017-08-09 14:53:46 +01:00
Clinton
32ee332d16 Fixed publishing to artifactory for core (#1183)
Test common needs to be published by artifactory.
2017-08-09 11:06:25 +01:00
Katelyn Baker
41040af757 Boolean primitive type is missing 2017-08-08 16:17:52 +01:00
Matthew Nesbit
bc4223712b Remove kotlin.Pair from Public APIs 2017-08-08 14:44:04 +01:00
Shams Asari
fa7c2b71f7 Removed Kt suffix of Strutures in Java 2017-08-07 17:12:32 +01:00