Commit Graph

236 Commits

Author SHA1 Message Date
sofusmortensen
fffc049e12 Universal: refactoring, reduction/evaluation with unit test first steps 2016-09-04 22:50:32 +02:00
Ross Nicoll
868b23a923 Move simulations to top level 2016-09-01 11:15:05 +01:00
Ross Nicoll
232db9a1fd Move test utilities into their own package
This moves a lot of the test support code into its own package which is only imported for tests,
so it's not shipped as a part of core Corda. The node currently depends on this support code to
compile, although future work could try to separate this out. This change highlights that parts
of production code is dependent on test elements (i.e. dummy keys), and makes it harder for
such accidental crosses to occur later.

An integration test category is also added as part of this work, to contribute towards COR-345.
2016-08-31 15:40:54 +01:00
sofusmortensen
2680687dcb Universal: Fixing and reduction 2016-08-29 22:29:24 +02:00
sofusmortensen
5daad3580c verify of conditions, timestamp working 2016-08-21 23:40:32 +02:00
sofusmortensen
d5172ea2d0 added timestamp check 2016-08-21 10:39:20 +02:00
Matthew Nesbit
696b9741dd Remove ClashingThreads exception by tightening up unique id on LinearState to be a secure random value, with constraints that it cannot be duplicated. Also, rename to linearId rather than the confusing thread.
Try providing a helper interface to encourage enforcing LinearState rules

Fixup after rebase

Change to using Clauses for verifying LinearState standard properties

Fix whitespace change

Tidy up ClauseVerifier after PR comments

Change from SecureHash to a TradeIdentifier class

Change TradeIdentifier to UniqueIdentifier
2016-08-19 11:52:16 +01:00
Ross Nicoll
8cfc88ed3a Remove unused timestamp from LCApplication 2016-08-12 15:51:04 +01:00
Ross Nicoll
a3d37a4d00 Require notary to be explicitely stated on each transaction 2016-08-12 15:51:04 +01:00
Ross Nicoll
17ae349f4d Remove support for timestamp commands 2016-08-12 13:51:34 +01:00
sofusmortensen
2f7e05ee00 simpler syntax for rollout recursion parameters 2016-08-09 22:46:20 +02:00
Mike Hearn
da63ad57a4 Minor: run intellij "code cleanup" on all but javascript files. 2016-08-08 18:05:02 +02:00
Mike Hearn
701fc853ad Refactor the core transaction types to improve clarity, simplify verification and prepare for sandboxing.
Changes include:
- LedgerTransaction is now much more central: it represents a fully resolved and looked-up tx, with the inputs available.
- TransactionGroup and TransactionForVerification are gone. There is a temporary TransactionForContract class for backwards
  compatibility but it will also be gone soon.
- ResolveTransactionsProtocol is simplified, and now commits a tx to the database as soon as it's determined to be valid.
- ServiceHub is now passed in more consistently to verification code, so we can use more services in future more easily e.g. a sandboxing service.
- A variety of APIs have been tweaked or documented better.
2016-08-04 13:05:50 +02:00
Mike Hearn
c2aee2d4e8 Minor: Replace MockServices with a new class that's in core instead of node, old class becomes MockServiceHubInternal. 2016-08-04 12:53:09 +02:00
Mike Hearn
301d787e45 Fix bugs in the trade finance contracts and tests, where txns weren't being properly verified and thus the lack of timestamping wasn't detected. 2016-08-04 12:52:37 +02:00
sofusmortensen
1e36691b55 experimental syntax for recursion 2016-08-04 12:40:27 +02:00
Clinton Alexander
7d39a101d4 Merged in COR-276 (pull request #239)
Added Jacoco code coverage to gradle.
2016-07-29 13:29:47 +01:00
Richard Green
87bc02d2a8 all tests now pass - but some are commented out 2016-07-28 16:00:19 +01:00
Richard Green
e3f36a4942 Modified tests for new DSL 2016-07-28 15:57:09 +01:00
Richard Green
92e05f07aa Initial checkin for Trade Finance work into experimental module 2016-07-28 15:48:40 +01:00
Richard Green
ac0d0ec0ec Initial checkin for Trade Finance work into experimental branch 2016-07-28 15:47:55 +01:00
Clinton Alexander
188fc29436 Cleaned up build.gradle files. 2016-07-28 09:17:49 +01:00
Ross Nicoll
ea051d57be Move clauses into main 2016-07-13 11:48:51 +01:00
Ross Nicoll
0d78df33f8 Add standard clauses 2016-07-12 11:31:23 +01:00
sofusmortensen
7284896375 RollOut/Continuation 2016-07-12 07:46:40 +02:00
sofusmortensen
84700ce1b9 Notes 2016-07-12 07:46:17 +02:00
sofusmortensen
07c1f8b86a Merge branch 'master' into sofus-generic-contract 2016-07-10 15:28:21 +02:00
sofusmortensen
f0fc8f414f cleanup, testing rollout syntax 2016-07-10 12:12:33 +02:00
Ross Nicoll
23c3112660 Merged in rnicoll-obligation-main (pull request #185)
Move Obligation contract into contracts module
2016-06-27 17:57:31 +01:00
Ross Nicoll
228513671d Move Obligation contract into contracts module 2016-06-27 17:54:04 +01:00
Ross Nicoll
9994d129f2 General cleanup based on first round of feedback
* Rename AggregateCommands to IssuanceCommands
 * Reorder comparisons to be consistent
 * Rename verifyDefaultCommand to verifySetLifecycleCommand
 * Rename currency to issued/product
 * Add note about needing to rethink timestamping
 * Rename issuer to obligor, and owner to beneficiary
 * Move lifecycle inversion code into SetLifecycle command
 * Correct comments regarding cash states
 * Rework description of contractHash parameter
 * Fixes 'netting equal balances due between parties', and add further netting tests
 * Separate calculations involving issued products and the underlying product
 * Use signed transactions in obligation tests
 * Add verification tests for changing lifecycle
2016-06-27 17:49:52 +01:00
Mike Hearn
848b998d26 Suppress compiler warnings in experimental. They are still expected to be fixed in the other modules. 2016-06-27 15:35:27 +02:00
sofusmortensen
f93b5c6502 moved contracts.universal to experimental 2016-06-27 00:30:45 +02:00
Andras Slemmer
040e51ec12 contracts, core: Expose top-level DSL values/functions to Java by wrapping them in an object
core: Add overloads for convenient Java interop

contracts, core: Uniform Java interop for tests, use camelCase
2016-06-24 16:37:43 +01:00
Ross Nicoll
388c26dd35 Add obligation contract
Add a new Obligation contract, modelling an obligation to send an amount
of something (currently limited to cash) by some future point. Obligation
contracts introduce the concept of one contract being aware of other
contracts, and common interfaces for state objects so other contracts can
interpret them meaningfully.
2016-06-23 14:45:45 +01:00
Mike Hearn
809d1c5dcd Add an experimental module. 2016-06-22 18:00:36 +02:00