Mike Hearn
fc133de902
Minor: small changes to progress tracking in the IRS protocols
2016-04-13 15:20:27 +02:00
Mike Hearn
24cc56334b
Minor: bugfix to simulation code (bug introduced during merging)
2016-04-13 15:20:27 +02:00
Mike Hearn
745f6251a6
Minor: better error message when an attempt is made to project coordinates with bad extents
2016-04-13 15:20:25 +02:00
Andrius Dagys
9a8b3bd1ef
Added interpolation functionality for the rates oracle. The oracle can be set up with different interpolation mechanisms, currently supported are: linear and cubic spline
2016-04-13 12:32:04 +01:00
Ross Nicoll
265948dcee
Clean up code based on feedback from Mike
...
* Move advertisedServices parameter in NodeInfo up one in the parameter order
* Change ServiceType away from being an enum
* Tweaked wording around what a NodeInfo is
* Renamed LocationStructures to PhysicalLocationStructures
* Move generator outside of function parameters
2016-04-11 16:09:15 +01:00
sofusmortensen
d05e6bb6a4
Merge branch 'master' into dynamic-loading
2016-04-09 01:01:36 +02:00
sofusmortensen
6fe8107d27
Merge branch 'master' into dynamic-loading
2016-04-08 22:40:18 +02:00
Ross Nicoll
ca1db997ab
Move node identity structures into core.node package
...
While node identity is used by services, it is not intrinsically part of services,
so moved it to the core.node package instead.
2016-04-08 15:19:56 +01:00
Ross Nicoll
81b2935285
Move MockNetworkMapCache to core.testing
2016-04-08 15:18:43 +01:00
Ross Nicoll
acee02f876
Add advertised services to NodeInfo
2016-04-08 15:15:54 +01:00
Mike Hearn
49d5fb33c4
Remove copyright headers from the files and put the text in the README instead, per feedback from Jacob and external counsel.
2016-04-08 11:46:07 +02:00
Mike Hearn
caf48b65c9
Run auto-formatter over the code.
2016-04-07 20:16:28 +02:00
Mike Hearn
931ce4a749
Minor: remove ugly bug workaround code now the issue has been fixed in Quasar upstream.
2016-04-07 20:03:46 +02:00
Mike Hearn
f3863ac5ef
Minor: eliminate compiler warnings
2016-04-07 20:00:29 +02:00
Mike Hearn
1633ff1ef7
Add simulation classes, which build on top of the MockNetwork infrastructure but set up a group of nodes and performs scenarios between them. Currently there's a base class and two subclasses, one that does the trader demo scenario and one that does an IRS with fixings scenario.
2016-04-07 19:32:06 +02:00
Mike Hearn
a41524fc6a
Add a reified inlined variant of WalletService.linearHeadsOfType
2016-04-07 19:32:06 +02:00
Mike Hearn
cd52ca21ce
Minor: expose the rates oracle service (if the node provides one) as a property
2016-04-07 19:32:06 +02:00
Mike Hearn
10ee49d994
Minor: refactoring to reduce dependencies of the JSON object mapper. Clean up how mock identities are handled a little. This assists with the simulation code.
2016-04-07 19:32:06 +02:00
Mike Hearn
a2bd9f63a4
Move JSON objectmapper and serialiser code into a separate file.
2016-04-07 19:32:06 +02:00
Mike Hearn
a67267f562
Minor: add an SMM todo
2016-04-07 19:32:06 +02:00
Ross Nicoll
345738f7de
Rename classes
...
Rename LegallyIdentifiableNode to NodeInfo, to represent that legally identifiable is not a single concept.
Rename NetworkMapService to NetworkMapCache, as the API exposed is suited to a local cache, not a remote service.
2016-04-07 15:33:13 +01:00
Rick Parker
34940c903b
Merged in plt-17-api-server-merge5 (pull request #51 )
...
IRS related protocols and scripts
2016-04-07 15:01:25 +01:00
rick.parker
55265e6115
IRS related protocols and scripts
...
Additional changes based on feedback
Additional changes based on feedback
2016-04-07 14:56:30 +01:00
Ross Nicoll
c1ebf45834
Merged in rnicoll-typos (pull request #46 )
...
Minor: Fix typo ('amounnt' to 'amount')
2016-04-06 13:16:31 +01:00
sofusmortensen
9561013b65
Replaced class Kryo2 with extension method on Kryo
2016-04-05 01:02:54 +02:00
sofusmortensen
bba0a4a55d
Fixed bug in Kryo.useClassLoader
...
Renamed to AttachmentsClassLoader + autoformat
Added unit test to validate exception being throw when deserializing WireTransaction without contract jar in attachments.
2016-04-05 00:34:46 +02:00
sofusmortensen
88a7406ec9
Merge branch 'master' into dynamic-loading
2016-04-03 13:59:36 +02:00
Mike Hearn
420ecf80a0
Minor: fix a typo in a variable name, spotted by Rick
2016-03-30 18:50:12 +02:00
Mike Hearn
3adfd02e31
Support injection of latency into the mock (simulated) network.
2016-03-30 18:50:12 +02:00
Mike Hearn
d1e62c27c4
Unit testing: minor refactoring of MockNetwork
2016-03-30 18:50:12 +02:00
Mike Hearn
d1b5ada423
Add a notion of physical location.
...
This will be useful for various things in future, such as approximating the nearest consensus service (approximate because physical distance doesn't always match network distance), visualisation, simulation, etc.
LegallyIdentifiableNode now lists a physical place for the node to be in (which might not be totally accurate one day if we have super distributed mega-nodes, but will do for now).
The config file allows the admin to specify their nearest city.
There is a city database that can map such names through to coordinates, when known.
There is support for Mercator projection.
2016-03-30 18:50:11 +02:00
Ross Nicoll
366860b2d8
Minor: Fix typo ('amounnt' to 'amount')
2016-03-30 16:13:33 +01:00
rick.parker
e122a57bf2
First working commit
...
First working commit
Formatting clean up
Revert All_tests.xml
Remove extra space
Feedback from code review
2016-03-30 15:04:08 +01:00
sofusmortensen
c0e2322414
Added comment on how to handle accidental gradle import in IDEA
2016-03-25 14:56:09 +01:00
sofusmortensen
58a509de63
Merge branch 'master' into dynamic-loading
2016-03-24 13:10:36 +00:00
sofusmortensen
e5dbf5d2a8
WireTransaction deserialization using AttachmentStorage
2016-03-24 12:06:41 +00:00
sofusmortensen
1344bfd6bb
Replaced programRef in ContractState with a simple reference to contract
2016-03-23 17:51:14 +00:00
Mike Hearn
5b7fb86b6b
Use TypeSafe Config library instead of Java properties files for the config file format. The default formats are compatible so this should not be disruptive.
2016-03-23 16:49:28 +00:00
rick.parker
9f7ae4c61d
Basic JSON API with servertime call exposed at GET /api/servertime
...
Global Clock as part of ServiceHub to offer source of time in transactions, protocols, time stamping service etc (can be replace for demos and testing with a Clock that can be externally manipulated)
Edited with Mike's feedback
Edited with Mike's feedback
2016-03-23 09:34:45 +00:00
sofusmortensen
5d5bcbfb00
Merge branch 'master' into dynamic-loading
2016-03-22 13:37:33 +00:00
sofusmortensen
527b0f4817
Improved unit tests.
...
Cleaned up project structure a bit.
2016-03-22 12:15:47 +00:00
Richard Green
6c0e696107
Updated with new Tenor class that verifies string during construction.
...
Now uses new Tenor class for Interest Rate Oracle
2016-03-22 11:46:06 +00:00
Richard Green
d7d05a2f70
Merged in PLT-15-b (pull request #36 )
...
Neater branch with IRS code.
2016-03-22 11:42:08 +00:00
Richard Green
a78c5b11d1
IRS Contract example
2016-03-22 11:36:40 +00:00
Mike Hearn
b1694e2d0d
Move MockNode/InMemoryNetwork to the main sourceset, as these are useful not only for unit testing, but also simulation tools.
2016-03-22 10:54:35 +00:00
sofusmortensen
3675675277
Custom ClassLoader created from collection of attachments
2016-03-20 20:41:46 +01:00
Mike Hearn
7ef8397920
Use new Quasar API to skip serialisation of TLS slots.
2016-03-17 16:53:01 +01:00
Mike Hearn
3c4ce0a8fe
Minor: fix a regression introduced by a bad merge that broke the rate fix demo
2016-03-17 13:07:19 +01:00
Richard Green
8ab5efe4a7
Quick fix for previous merge; missed fixing the tests for NodeInterestRates when the String.d function renamed to .bd
2016-03-15 18:42:59 +00:00
Vibhu Mohindra
11d14001cd
Unified the various StorageService implementations. Made getMap() private. Made the nested tables into instance variables. Moved StorageServiceImpl out into its own file to avoid merge conflicts in the future.
2016-03-15 17:08:28 +00:00
Mike Hearn
77fd6071a1
Merged in jmx-mbeans (pull request #32 )
...
Export various ledger stats via JMX
2016-03-11 18:27:12 +01:00
Mike Hearn
3533e87953
Take out the fake signing delay in the trader demo.
2016-03-11 18:12:18 +01:00
Mike Hearn
07eee0233f
Export wallet balances via JMX.
2016-03-11 17:55:03 +01:00
Mike Hearn
28869ad85d
Export attachment count via JMX
2016-03-11 17:26:17 +01:00
Mike Hearn
730b7949ea
Export stats to JMX from the state machine manager.
2016-03-11 17:26:17 +01:00
Mike Hearn
139bf1e450
Minor: fix trader demo
2016-03-11 17:02:35 +01:00
Mike Hearn
87e8562675
Make Jolokia return data as application/json
2016-03-11 11:57:38 +01:00
Mike Hearn
c436841461
Restrict Jolokia JMX access
2016-03-11 11:49:50 +01:00
Mike Hearn
fce799726f
Minor: rename NetworkMap -> NetworkMapService for consistency
2016-03-11 11:49:50 +01:00
rick.parker
429ac589df
Clean integration of Jersey & Jackson for JAX-RS support, with Config for setting up custom marshalling. No API classes configured by default
...
Enable Jersey monitoring JMX MBean
Updates based on Mike's feedback
2016-03-11 08:37:53 +00:00
Mike Hearn
a03352e6cd
Export JMX statistics via JSON REST endpoints using Jolokia.
2016-03-09 15:53:32 +01:00
Mike Hearn
b2f9aa64d5
RatesFixProtocol: add progress tracking
2016-03-09 14:38:03 +01:00
Mike Hearn
4e15755883
RatesFixProtocol: add an empty, overridable beforeSigning method that lets you customise the logic of the protocol.
2016-03-09 14:08:37 +01:00
Mike Hearn
0f208d8b4d
Check in a demo of how to get an interest rate fix from an oracle.
2016-03-08 17:31:35 +01:00
Mike Hearn
d63a3a8923
Minor: add a toString for the UnknownFix exception
2016-03-08 17:31:35 +01:00
Mike Hearn
6ac05c2edb
Minor: don't check the file name in an upload if there isn't one
2016-03-08 17:31:35 +01:00
Mike Hearn
29e58ce3db
Allow upload of interest rate fixes to the oracle over HTTP.
2016-03-08 17:31:35 +01:00
Mike Hearn
2b4a1eedc3
Generalise support for file uploads over HTTP to allow reuse of the upload servlet.
2016-03-08 17:29:56 +01:00
Mike Hearn
a7fec047ed
Add an interest rates oracle.
...
Currently lacking the following useful things:
- Progress reporting
- Ability to upload new rates
- Demo app[s]
2016-03-08 17:29:56 +01:00
Mike Hearn
8d3c9643e9
Minor: Move TraderDemo to demos package
2016-03-08 17:29:23 +01:00
Mike Hearn
92a7363c83
Minor: add a couple more utilities for converting strings into the type safe endpoint address objects
2016-03-08 17:29:08 +01:00
Mike Hearn
5aaa6bd204
Minor: rename NodeAttachmentStorage -> NodeAttachmentService
2016-03-08 17:29:08 +01:00
Mike Hearn
ffcc0507c4
Return the hashes of newly uploaded attachments to the uploader.
2016-03-08 15:41:44 +01:00
Mike Hearn
5eda0e066e
Minor: add a TODO about a little rpc framework to StateMachineManager
2016-03-08 15:19:44 +01:00
Mike Hearn
dc6ef73b6b
Minor: more code motion ... TimestampingProtocol now split to top level class and moved to same location as the other protocols. Few other timestamping related classes reorganised.
2016-03-08 12:17:07 +01:00
Mike Hearn
2c4475b0d9
Minor: TimestamperNodeService -> NodeTimestamperService for consistency
2016-03-08 12:01:49 +01:00
Mike Hearn
8d041a6b1a
Minor: yet another small move
2016-03-08 11:12:45 +01:00
Mike Hearn
bf3aed11e7
Minor: another small move
2016-03-08 11:10:31 +01:00
Mike Hearn
e9fddbc709
Reorganise the file hierarchy a bit.
2016-03-08 11:06:16 +01:00
Mike Hearn
d26b06c35c
Allow download of attachments, and files within attachments, over HTTP.
2016-03-04 15:56:25 +01:00
Mike Hearn
6cb86ab840
Plumb attachments through to the contract verify functions (no contract uses them yet).
...
The right way to do this is probably to put the contracts onto the classpath before execution of the contract. However, this interacts closely with the sandboxing work, which isn't yet started, so for now this will do.
2016-03-02 15:35:46 +01:00
Mike Hearn
1123c28f02
Make the trader demo attach a PDF to the commercial paper self-issuance and then scan for it on the buyer side, print out the path on the filesystem where the PDF can be found.
2016-03-02 15:08:55 +01:00
Mike Hearn
8d906c703d
Support auto-expansion of attachment jars on disk.
2016-03-02 14:51:42 +01:00
Mike Hearn
f0fa9e3097
Resolve and insert attachments to the local store when resolving transactions. Attachments aren't yet exposed to contract code.
2016-03-02 14:51:42 +01:00
Mike Hearn
7f5eb5bf2f
Minor: make TwoPartyTradeProtocolTests use the new MockNode infrastructure
2016-03-02 14:51:42 +01:00
Mike Hearn
dc0925840a
Make AbstractNode more customisable and upgrade the MockNode implementation.
2016-03-02 14:51:42 +01:00
Mike Hearn
1bd63c030c
Minor: delete dead test-related code from Services.kt
2016-03-01 15:20:03 +01:00
Mike Hearn
3f19842632
Minor: logging, two more utility methods.
2016-03-01 15:13:43 +01:00
Mike Hearn
1330f33aba
First pass trivial wallet: basic tracking of relevant states.
2016-02-29 22:14:25 +01:00
Mike Hearn
e2deea598e
Minor: tweak the mock key management service a bit.
2016-02-29 22:06:18 +01:00
Mike Hearn
49b20df6cd
Minor: add a couple of utilities to BriefLogFormatter to help cut down on unit test log spew.
2016-02-29 22:06:18 +01:00
Mike Hearn
620116b01b
Minor: use UNIX config for JimFS, to fix unit test build on Windows.
2016-02-29 19:05:06 +01:00
Mike Hearn
48b2e561b7
Minor: make NodeAttachmentStorage open streams lazily to avoid resource leaks and to make checking for attachment existence fast.
2016-02-29 19:05:06 +01:00
Mike Hearn
a6835c4c04
Add unit tests for attachment fetch.
2016-02-29 19:05:06 +01:00
Mike Hearn
cb52ff09b8
Add a mock Node implementation to simplify unit testing.
2016-02-29 19:05:06 +01:00
Mike Hearn
5bd8a3408b
Minor: rename InMemoryNetwork/Node to talk more about messaging, to deconflict with the new mock node (which ties together all the various node services).
2016-02-29 19:05:06 +01:00
Mike Hearn
6bdfbb2a4f
Refactor Node into AbstractNode+Node, to make it easier to introduce a MockNode for unit testing purposes.
2016-02-29 19:05:06 +01:00
Mike Hearn
37f1de8a4d
Refactor FetchTransactionsProtocol into FetchDataProtocol and add support for fetching attachments.
2016-02-29 19:05:05 +01:00
Mike Hearn
0224bca1a9
Add a simple file backed attachment store, with tests.
2016-02-29 19:04:41 +01:00
Mike Hearn
0064f7c254
Minor: add a unit testing utility to unwrap exceptions to their root cause.
2016-02-26 15:47:12 +01:00
Mike Hearn
c3f86f6557
Integrate a simple progress tracking system into the protocol framework.
...
The progress tracker API lets you model a tree of steps, along the same structure as protocols and subprotocols. Each step has an (optionally changing) label, and thus progress trackers can be arranged in a tree. Updates to the progress at each level flow up the tree via an RxJava observable (I guess we will use this more in future).
A simple console renderer is provided that uses ANSI escapes and Emoji to show animated progress through a protocol.
The trader demo is enhanced to use this framework, when run outside of Gradle.
2016-02-24 12:58:37 +01:00
Mike Hearn
c35d7794d8
Minor: make BriefLogFormatter.initVerbose take a set of flags saying what logging to activate vs silence.
2016-02-23 18:28:06 +01:00
Mike Hearn
9de104df7b
Refactor the protocol framework out into separate files.
2016-02-23 18:28:06 +01:00
Richard Green
bc8962b0dc
Minor: Moved JavaCommercialPaper.java from src/main... to contracts/src/main
2016-02-23 14:14:01 +00:00
Mike Hearn
adda2bbe6b
Minor: move ExcessivelyLargeTransactionGraph exception into the right place
2016-02-18 17:29:44 +01:00
Mike Hearn
1243ca2066
Trading: in the two party trade protocol, check that the proposed transaction is contract-valid, and that the missing signatures are what is expected.
2016-02-17 18:38:24 +01:00
Mike Hearn
cd28733360
Major: Separate out the dep resolution protocol into a couple of sub protocols and use on both sides of the trade.
...
* Dependency resolution/checking is now working on both sides of the two party trading protocol.
* The commercial paper contract was changed to check timestamping authority identities by name instead of key.
* The trader demo has been rewritten to use the protocol framework, which simplifies the code.
2016-02-17 18:11:37 +01:00
Mike Hearn
eb47d8af4d
Minor: Unit testing: allow a subset of transactions in a group to be signed.
2016-02-17 17:19:37 +01:00
Mike Hearn
bdadaffbc0
Minor: Logging of how many transactions were validated in TransactionGroup.verify()
2016-02-17 17:19:37 +01:00
Mike Hearn
58e84fbeca
Minor: Unit testing: InMemoryNetwork.Node.stop, running = false after thread shutdown not before.
2016-02-17 17:19:36 +01:00
Mike Hearn
55989a8e92
Minor: add logging to the RecordingMap unit test utility
2016-02-17 17:19:36 +01:00
Mike Hearn
b2b51183b8
Minor: logging - allow multiple package specs to be passed to BriefLogFormatter.initVerbose()
2016-02-17 17:19:36 +01:00
Mike Hearn
299e1af15e
Protocol frameworks: separate the fiber object from the logic object to make it easier to compose subprotocols together.
2016-02-17 17:19:36 +01:00
Mike Hearn
dc520392b8
Protocol framework: tweak error handling a bit and add unit test for it.
2016-02-17 17:19:36 +01:00
Mike Hearn
df4d926bca
First pass at implementing dependency resolution and checking in the two-party trade protocol.
...
This commit is incomplete: only the seller side currently checks. The code will be refactored out into subprotocols in further commits.
Note that timeouts are currently unhandled.
2016-02-17 17:19:36 +01:00
Mike Hearn
f92455442d
Minor: Unit testing: don't always require a lambda when running the network synchronously.
2016-02-17 17:19:36 +01:00
Mike Hearn
ed72e9b997
Unit tests: fix a couple of threading issues for async unit tests that use the in memory network
2016-02-16 17:39:08 +01:00
Mike Hearn
de4427c240
Minor: add a few utilities for working with listenable futures
2016-02-16 17:39:02 +01:00
Mike Hearn
8c72f68736
Minor: fix a minor merge issue that broke pretty output in the trader demo
2016-02-16 17:17:15 +01:00
Sofus Mortensen
994abb3edb
Added new project core.
...
Project Contracts depends only on core.
2016-02-16 17:14:17 +01:00
Mike Hearn
a01746a04b
Minor: use DummyTimestampingAuthority key/identity in the InMemoryNetwork
2016-02-12 16:50:44 +01:00
Mike Hearn
b7fd0ce0ed
Minor: move InMemoryNetwork to tests directory
2016-02-12 16:47:45 +01:00
Mike Hearn
9f4897f7c4
Simplifies two-party trade protocol to return SignedTransaction instead of a pair of other forms.
2016-02-12 15:49:18 +01:00
Mike Hearn
6deef5b598
Minor: rename SignedWireTransaction to just SignedTransaction
2016-02-12 15:47:23 +01:00
Mike Hearn
a42d7e64ef
Minor: add a TODO to Kryo.kt about lazy properties.
2016-02-12 15:41:36 +01:00
Mike Hearn
ea18e239d9
Testing: rework TransactionGroupDSL to work with WireTransactions instead of LedgerTransactions and simplify original hash/serialised bits tracking.
2016-02-12 15:41:22 +01:00
Mike Hearn
fc000ec03c
Testing: more utilities on Transaction and TransactionGroupForTest to help with testing signed transactions.
2016-02-12 14:55:11 +01:00
Mike Hearn
5b473be79c
Minor: fix test breakage under Gradle due to some horrible stuff Gradle does with injecting things into our environment.
2016-02-10 17:59:28 +01:00
Mike Hearn
ae6309a113
Minor: make SecureHash c'tor private so it's not possible to instantiate directly.
2016-02-10 17:59:28 +01:00
Mike Hearn
31964f8695
Introduce ContractFactory to replace Map<SecureHash, Contract>. It allows for lazy loading of contracts.
2016-02-10 17:59:28 +01:00
Mike Hearn
2ccbd5db3e
Minor: code cleanup on ArtemisMessagingService.
...
- Use fixes in Kotlin 1.0 RC to clean up property access a bit (fewer set* calls)
- Note that we currently won't notice if Artemis throws an exception during startup, as it happens async. There is a fix to Artemis pending.
2016-02-10 17:59:28 +01:00
Mike Hearn
d98a3871da
Refactor the 2-party trading protocol
...
- Fix a security bug/TODO by having seller send back the signatures rather than a full blown transaction (which would allow a malicious seller to try and confuse the buyer by sending back a completely different TX to the one he proposed)
- Introduce an UntrustworthyData<T> wrapper as an (inefficient) form of taint tracking, to make it harder to forget that data has come from an untrustworthy source and may be malicious.
- Split the giant {Buyer, Seller}.call() methods into a set of smaller methods that make it easier to unit test various kinds of failure/skip bits in tests that aren't needed.
2016-02-10 17:59:28 +01:00
Mike Hearn
28daae5bd4
Minor: in CashTests make editIssuedBy into an infix fun with a space in the name, like owned by
.
...
Makes the code read a bit more like English.
2016-02-10 16:30:21 +01:00
Mike Hearn
bd8d056466
Minor: remove duplicated copyright header from CashTests.kt
2016-02-10 16:30:21 +01:00
Mike Hearn
52172c5f95
Minor: in TraderDemo comments point to docsite instead of duplicating
2016-02-10 16:30:21 +01:00
Mike Hearn
e426e784b4
Minor: Use exitProcess rather than System.exit, as the former interacts better with flow typing.
2016-02-10 16:30:21 +01:00
Mike Hearn
55646104b4
Minor: tweak StateMachineManager to work around a cosmetic issue in Quasar, where it prints exception details to stderr twice. We'd rather log it ourselves.
2016-02-10 16:30:21 +01:00
Mike Hearn
0665492645
Minor: introduce a generateKeyPair() function that wraps the Java API, so we can switch algorithm more easily later.
2016-02-10 16:30:21 +01:00
Mike Hearn
8d1b318370
Minor: some more renamings for concision and consistency
2016-02-10 16:30:21 +01:00
Mike Hearn
6f3b07a600
Minor: move and api doc the Node.DEFAULT_PORT field
2016-02-10 16:30:20 +01:00
Mike Hearn
5d0d926568
Node: if the node is started twice, abort and tell the sysadmin the PID of the other instance.
2016-02-10 16:30:20 +01:00
Mike Hearn
7a70cdd4de
Minor: rename InMemoryNetwork.Node to InMemoryNetwork.InMemoryNode
...
Makes IDE class navigation easier by avoiding having two classes with the same name.
2016-02-10 16:30:20 +01:00
Mike Hearn
262124385d
Move Crypto.kt into core/crypto/CryptoUtilities.kt
2016-02-10 16:30:20 +01:00
Mike Hearn
1bc57085c8
Rename ContractStateRef -> StateRef. Rename craft* methods to generate*
2016-02-10 16:29:44 +01:00
Mike Hearn
5e30e1b94b
Fix build.
2016-02-10 16:28:22 +01:00
Richard Green
ea2b18eb41
Merged in rg_work_in_progress (pull request #16 )
...
Updated as comments per previous pull request, now generic tests run both Kotlin and Java CommercialPaper class tests.
2016-02-10 15:04:13 +00:00
Richard Green
201803ff36
Now runs Java CommercialPaper unit tests
...
Acted upon comments from last pull request.
Added an interface to enable the usage of the same tests for both the Kotlin and Java example CommercialPaper class - did appropriate refactoring to enable.
Added javadoc, removed public modifier from interfaces.
Various fixes from code review comments.
2016-02-10 14:56:11 +00:00
Mike Hearn
88e02440d4
Kotlin 1.0 RC
...
Hopefully this is the last time they break backwards compatibility.
2016-02-08 19:35:30 +01:00
Mike Hearn
b57f30ff3e
Use DL as the address prefix instead of R3.
2016-02-05 15:49:26 +01:00
Mike Hearn
f705eee312
Use buyer/seller instead of alpha/beta and allow nodes to both be named localhost. Update docs.
2016-02-05 15:48:58 +01:00
Richard 'ragmondo' Green
75a542f79d
Change network config to listen to adapter publicly
2016-02-05 11:59:50 +00:00
Mike Hearn
a06d4d23bd
Add toString() methods to a few data structures and use them to make the output of the trader demo a bit nicer.
...
Import Base58 code from bitcoinj and use it for rendering pubkeys (note: not calculated in the same way as Bitcoin).
2016-02-05 11:13:49 +01:00
Mike Hearn
1e8ea8eb2c
Implement the beginnings of a serving node.
...
It uses Artemis (an embeddable MQ broker) and can run in either a 'serving' mode, in which case it will sit around waiting to sell fake commercial paper assets, or a 'buying' mode in which case it will connect to a specified serving node and run the two party trade protocol.
Most services are either mocked out or too trivial to be useful at this point. They will be fleshed out in the future.
2016-02-03 16:57:01 +01:00
Mike Hearn
f683f50eb5
Logging: mention if a log message is a warning or error.
2016-02-03 15:35:55 +01:00
Mike Hearn
af116f6990
Minor: bugfix for the Java requireSingleCommand API.
2016-02-03 15:35:08 +01:00
Mike Hearn
606926a692
Logging: don't include inner class names in log output (i.e. trim anything after the $ sign in the class name)
2016-02-03 12:49:36 +01:00
Mike Hearn
fbd4b60834
Minor: allow double constants to be used to create Amounts, you can now write 35.99.DOLLARS to mean $35.99
2016-02-03 12:49:36 +01:00
Mike Hearn
0417e24fae
Minor: fix an incorrect use (process specific) of reflection hashCodes in the Kryo wrapper.
2016-02-03 12:49:36 +01:00
Mike Hearn
f51aa73687
Minor: fix bug in BriefLogFormatter
2016-02-03 12:49:36 +01:00
Mike Hearn
a355ad14be
Minor: javadoc fixes
2016-02-03 12:49:35 +01:00
Mike Hearn
b014782959
Minor: comment fix
2016-02-03 12:48:53 +01:00
Richard Green
cb12770b9c
Tyop :-/
2016-02-01 17:48:45 +00:00
Richard Green
68e8f32462
Merge remote-tracking branch 'origin/master'
2016-02-01 17:21:41 +00:00
Richard Green
ca0f5ff9f5
Adding Issue in Commands class to mirror Kotlin code
2016-02-01 17:20:39 +00:00
Mike Hearn
b3e801eb85
Minor: add an explanatory comment to the two-party trade protocol.
2016-02-01 16:09:09 +01:00
Mike Hearn
9cfa5743ff
Minor: rewrap a few lines to be style guide compliant.
2016-01-27 15:01:20 +00:00
Mike Hearn
d9c6df51f4
Update docs for new simpler protocol framework API.
2016-01-13 13:54:10 +01:00
Mike Hearn
3d051ced3a
Minor: fix bug in BriefLogFormatter
2016-01-12 16:40:35 +01:00
Mike Hearn
a729d5134e
Minor: take out the 'inline reified' functions from the ProtocolStateMachine class. The slightly nicer syntax it enables isn't worth the readability hit for readers who aren't familiar with what this Kotlin feature does in this case.
2016-01-12 12:14:46 +01:00
Mike Hearn
363b335896
Minor: use "platform.*" as the naming hierarchy for protocols that are supposed to be standardised.
2016-01-12 12:14:46 +01:00
Mike Hearn
717651db45
Minor: remove a TODO that is now done.
2016-01-12 12:14:45 +01:00
Mike Hearn
78849f44d2
Protocols: simplify the two party (dvp) protocol some more, now that we've switched to Quasar. There's no longer any need to define InitialArgs objects.
2016-01-12 12:14:45 +01:00
Mike Hearn
c59603c26f
Implement timestamping as a separate service that the two party (dvp) protocol calls out to via a simple client object.
...
Lots of big changes in this commit:
* Introduction of "network map" and "legally identifiable node" concepts to the networking abstraction.
* State machines framework now lets you send messages to multiple different destinations in the same protocol.
* Timestamping service that can run inside a node is now implemented and unit tested.
* Starting to benefit from the improvements in Quasar (the initialArgs concept can mostly be got rid of now, etc)
2016-01-12 12:14:45 +01:00
Mike Hearn
412212a860
Switch from JavaFlow to Quasar to provide fibers.
...
Quasar is a more modern, better maintained and more powerful framework. The main improvement is that this lets us avoid the ClassLoader tricks that JavaFlow was requiring, by using an agent. This introduces a requirement to mark methods that might be on a suspended stack as @Suspendable, but means that code interops cleanly. In Java 9 it is hoped that the marking requirement may even go away entirely.
2016-01-12 12:14:39 +01:00
Mike Hearn
018825d7d7
Minor: fix the JDK logging bug workaround
2016-01-07 16:20:44 +01:00
Mike Hearn
9e22cda15c
Messaging interface now exposes the nodes own address.
2016-01-07 15:58:26 +01:00
Mike Hearn
5f8dec4ff9
Minor: add an "until" infix function that applies to Temporal's ... the primary purpose of this beyond a trivial bit of extra readability, is null safety.
2016-01-07 15:58:26 +01:00
Mike Hearn
2190fbf2ee
Minor: reintroduce using Java serialisation for KeyPair as the JDK customises it and the Kryo serialisation is both bloated and (more problematically) non-deterministic!
2016-01-07 15:58:26 +01:00
Mike Hearn
0a9fffe8b7
Minor: remove unused import
2016-01-07 15:58:26 +01:00
Mike Hearn
0d0e75e6ff
Commands must have at least one pubkey.
2016-01-07 15:58:26 +01:00
Mike Hearn
5aeab5c933
Minor: move a bit of code around, add some javadocs
2016-01-04 11:24:14 +01:00
Mike Hearn
cd7d01917f
Kotlin 1.0.0-beta-4584
2015-12-24 17:21:10 +00:00
Mike Hearn
31fbf5e1eb
Improve the transactions API a small amount with lazily deserialized access to the WireTransaction inside a SignedTransaction, and id/hash fields (again lazily calculated).
...
This required bringing back the ImmutableClassSerializer and registration of classes that need it, to ensure the constructors run.
2015-12-22 16:41:25 +00:00
Mike Hearn
3c23c4f53d
Minor: move TransactionForVerification to be next to TransactionGroup and rename the file to be more descriptive.
2015-12-22 15:30:49 +00:00
Mike Hearn
049f0aa3b3
Rename PartialTransaction -> TransactionBuilder. The term "partial transaction" should be reserved to mean a transaction that is lacking some signatures as it's in the process of being built up by multiple parties.
2015-12-22 15:28:38 +00:00
Mike Hearn
bcc56859af
Add a unit test to check before/after processing by the dummy timestamper.
...
Tweak the timestamping API a bit.
2015-12-22 15:03:11 +00:00
Mike Hearn
784452ac50
Reorganise how time is handled: timestamping authorities are now oracles who sign the entire transaction.
...
As a result, TimestampedWireTransaction is gone. Timestamp fields are gone. Timestamp commands contain before/after fields. The notion of time tolerance is now a part of the timestamping interface and timestamp data.
TODO:
- Unit tests to verify the notBefore/notAfter logic
- Documentation update
2015-12-18 19:14:33 +01:00
Mike Hearn
6144ccc2c7
Small cleanup of commands.
...
1. Rename Command -> CommandData, WireCommand -> Command, PartialTransaction.addArg -> addCommand
2. Add some helper functions to PartialTransaction to make creation of transactions simpler.
2015-12-18 12:38:26 +01:00
Mike Hearn
4cec5dac02
Minor: remove ambiguous c'tor in PartialTransaction and rename addItems -> withItems
2015-12-16 16:25:58 +01:00
Mike Hearn
ab9e026053
Minor: some small serialisation type safety improvements
2015-12-16 15:24:52 +01:00
Mike Hearn
5863d489bc
Minor: misc comment/whitespace fixes.
2015-12-15 18:54:22 +01:00
Mike Hearn
06ee9db3f6
Minor: provide a random63BitValue() function and use it instead of the previously duplicated code. Update docs.
2015-12-15 13:16:13 +01:00
Mike Hearn
020a594a60
State machines: thread safety and a few more comments.
2015-12-15 13:01:57 +01:00
Mike Hearn
3c578550a9
State machines: don't leak references to completed state machines. Add an extension function for working with futures.
2015-12-14 21:41:57 +01:00
Mike Hearn
d43bbe8faa
Trading: move session ID into the initial args to avoid possible confusion at the start.
2015-12-14 18:22:00 +01:00
Mike Hearn
f15e24e7be
Messaging: Rename MessagingSystem to MessagingService for consistency with other interfaces.
2015-12-14 17:39:48 +01:00
Mike Hearn
3f19e68b3f
Messaging: another minor simplification to the state machines framework. This is not the end!
2015-12-14 17:35:20 +01:00
Mike Hearn
9720d4e404
Messaging: more huge simplifications to the state machine framework.
...
The usage now looks straightforward enough to document and put into a tutorial.
2015-12-11 20:21:22 +01:00
Mike Hearn
89ba996a3c
Two party trading: big changes to support and test serialisation, refactorings ...
2015-12-11 15:19:13 +01:00
Mike Hearn
65c5fa7502
Messaging: (mock) in memory network implementation improvements.
...
- Now supports simulated restart of nodes
- Messages sent to non-running nodes are queued for delivery
- Messages received by a node that don't match any topics are queued until handlers are registered
These improvements help us unit test various robustness features and ensure things work in truly concurrent context where there can be race conditions like receiving a message before the node had a chance to register the right handlers.
2015-12-11 15:19:13 +01:00
Mike Hearn
0ca47156bc
Trading protocol work in progress
2015-12-11 15:19:13 +01:00
Mike Hearn
fed0ae5629
Add placeholder interfaces for various service submodules.
2015-12-11 15:17:44 +01:00
Mike Hearn
2df8153cda
Minor: rename wallet -> cashStates in the Cash contract spending function.
2015-12-11 15:17:28 +01:00
Mike Hearn
f13b9b00e4
Minor: fix Arrays.asList serialisation by adding the extra serialisers lib as a dependency
2015-12-10 17:14:49 +01:00
Mike Hearn
4c87dc2981
First draft of a basic messaging module interface (VERY ROUGH). Ideally, is something that can have an e.g. Kafka backend, with a full P2P implementation later.
2015-12-10 15:08:11 +01:00
Mike Hearn
7881be07ed
Delete a lot of Kryo/serialisation related boilerplate.
...
This is/was an attempt to be secure against malicious streams, but as Kryo is just a temporary bit of scaffolding and isn't intended to be actually used in any real product, it was just a waste of time and the registration requirement was getting increasingly awkward.
2015-12-10 15:03:34 +01:00
Mike Hearn
951912f8e7
Minor: rename Kryo.registerDataClass to Kryo.registerImmutableClass
2015-12-10 14:27:53 +01:00
Mike Hearn
67c810e315
Make Amount use 64 bit precision and overflow checked operations.
2015-12-08 14:58:16 +01:00
Mike Hearn
73cbd41a09
Misc fixes:
...
- Use the OpaqueBytes wrapper (a box for byte[]) inside TimestampedWireTransaction to avoid array comparison issues.
- Introduce a few utility functions to make OpaqueBytes less painful.
- Make StateAndRef serialisable
- Introduce the notion of an OwnedState which abstracts out the owner field.
2015-12-07 17:53:01 +01:00
Mike Hearn
a656e210c4
Merged in crowdfund-tweaks (pull request #7 )
...
Crowdfunding contract: some cleanups and add some discussion at the top of the different possible models.
2015-12-04 12:34:03 +00:00
Mike Hearn
41f54b8555
Crowdfunding contract: some cleanups and add some discussion at the top of the different possible models.
2015-12-04 12:33:42 +00:00
Mike Hearn
ea4a6d8f06
Add logging utilities using slf4j
2015-12-03 18:24:26 +00:00
Mike Hearn
e5a36580da
Visualiser: reorganise, make it easier to invoke, document it.
2015-12-03 12:00:49 +00:00
Mike Hearn
58c526c68b
Visualiser: reorganise, make it easier to invoke, document it.
2015-12-03 11:54:49 +00:00
Mike Hearn
2193dced0a
Minor: add docs for the cash DSL extensions
2015-12-03 11:07:25 +00:00
Mike Hearn
0e34779fce
Merged in mod-crowdfund-close (pull request #5 )
...
Updated close method
2015-12-03 10:20:18 +00:00
Mike Hearn
f98ebce58b
Update copyrights
2015-12-02 18:53:16 +00:00
Mike Hearn
a95cd056ea
Implement a simple transaction graph visualiser tool.
2015-12-02 09:50:45 +00:00
Mike Hearn
1c1736ff9f
Minor: SecureHash.toString + SecureHash.prefixChars methods
2015-12-01 13:36:58 +00:00
jamescarlyle
91a9b08e7d
Updated close method
2015-11-30 19:16:25 +00:00
Mike Hearn
1f68727f31
Cash: add an onlyParties parameter to the spend crafting method. This allows you to restrict the wallet to only cash issued by particular parties.
2015-11-30 17:58:58 +00:00
Mike Hearn
50c3956988
Rename 'institution' to 'party'.
...
ADP-39 #resolve
2015-11-30 16:51:20 +00:00
Mike Hearn
52288bede1
Add copyright header (not open source for now)
2015-11-30 16:46:26 +00:00
Mike Hearn
9780f6254a
Crowdfund contract: update to latest style for defining commands (singletons don't play nice with serialisation)
2015-11-30 16:39:03 +00:00
Mike Hearn
b3f7e307c7
Reformat the crowdfund contract
2015-11-30 16:36:12 +00:00
Mike Hearn
b8a50a65cf
Merge branch 'finish-timestamping'
...
# Conflicts:
# docs/build/html/searchindex.js
# src/core/serialization/Kryo.kt
2015-11-30 16:35:10 +00:00
jamescarlyle
4e933f6d51
Added basic Crowdfunding contract.
2015-11-27 23:55:47 +00:00
Mike Hearn
42eed3e0a3
Flesh out timestamping logic and fix various serialisation related bugs that it exposes. Timestamps are optional, so update the CommercialPaper contract and tutorial to reflect that.
2015-11-27 18:33:17 +01:00
Mike Hearn
1628c1e17a
Implement and test crafting/generate methods for CommercialPaper.
...
Rename test keys and use real EC keys instead of dummies.
2015-11-27 15:44:43 +01:00
Mike Hearn
d3c15ab7de
Minor: tighten generic bound on StateAndRef
2015-11-27 15:44:06 +01:00
Mike Hearn
a98bc241ae
Early start on support for timestamping (incomplete) and addition of a helper method on LedgerTransaction
2015-11-27 15:43:48 +01:00
Mike Hearn
60f29339ee
Minor: add a convenience extension function to convert from byte arrays to SHA256 hashes.
2015-11-27 15:42:55 +01:00
Mike Hearn
19cd2069c7
Minor: clarify the distinction between sighash and txid hash. Fix Cash contract to not expect keys to be sortable.
2015-11-27 14:56:36 +01:00
Mike Hearn
de40a2082d
Minor: introduce Institution.ref() to get an InstitutionReference
2015-11-27 14:49:08 +01:00
Mike Hearn
3172b0b86a
Contracts: commercial paper issue command doesn't need a nonce, and fix a bug in the unit tests.
2015-11-25 18:14:33 +01:00
Mike Hearn
ff05cb4a4c
Contract: rewrite and finish off tests for commercial paper, using improved test DSL
2015-11-25 17:40:27 +01:00
Mike Hearn
c026e90067
Contracts: JavaCommercialPaper should implement equals/hashCode on its version of the state class and use the same grouping logic as the Kotlin version.
2015-11-25 14:26:17 +01:00
Mike Hearn
5285d3bb47
Minor: define contracts as regular classes instead of using the kotlin singleton syntax
2015-11-24 15:22:19 +01:00
Mike Hearn
5c1e4a0e35
Minor: fix kdoc in Structures.kt, spotted by Richard
2015-11-23 11:53:31 +01:00
Richard G Brown
fa32935e77
legalContractRef changed String to SecureHash (of contract contents)
2015-11-23 10:59:28 +01:00
Mike Hearn
b0b8c74c25
Minor: move the groupBy method to TransactionForVerification where it belongs.
2015-11-20 19:36:20 +01:00
Mike Hearn
a8e34a2bb2
Contracts API: move the notion of grouping into a utility file, and modify the commercial paper contract (java+kotlin) to use it.
...
This resolves several open TODO list items around the composability of contracts.
The current CP tests pass, but they aren't complete, so this doesn't prove the changes are correct. That'll come soon.
2015-11-20 19:25:15 +01:00
Mike Hearn
d6cfa9b9ef
Cash: refactor to allow multi-currency swaps by introducing a notion of grouping.
2015-11-20 18:19:24 +01:00
Mike Hearn
9681f97502
Minor: add a unit test to verify that duplicated inputs are forbidden (conflict) and delete the TODO for it.
2015-11-19 13:09:46 +01:00
Mike Hearn
7f13b8ab4a
Minor: a few misc cleanups
2015-11-19 11:56:07 +01:00
Mike Hearn
a4aef06e41
Major: introduce TransactionGroup for verifying subgraphs.
2015-11-18 19:22:31 +01:00
Mike Hearn
03ddf454c7
Minor: make LedgerTransaction keep track of the hash of the original serialised tx
2015-11-18 13:35:24 +01:00
Mike Hearn
508ce2819f
Minor: fix wording in Cash contract, suggestion from Richard.
2015-11-17 16:29:42 +01:00
Mike Hearn
fa1c6cb01b
Minor: Rename args to commands for consistency
2015-11-17 13:08:18 +01:00
Mike Hearn
5e604a5b0a
Minor: fix bug in JavaCommercialPaper
2015-11-16 21:01:38 +01:00
Mike Hearn
28bd2053cc
Contracts: add an issue crafting function to the cash contract.
2015-11-16 20:50:31 +01:00
Mike Hearn
aecc1de0cf
Contracts: make the Cash craftSpend/generate function update a mutable transaction instead of returning a unit test structure.
...
Tests: move TestUtils into the test package now the cash contract generate function works the right way.
Transactions: various refactorings to support partially signed transactions.
2015-11-16 20:36:27 +01:00
Mike Hearn
1f17053263
Introduce a PartialTransaction class to represent a mutable transaction that we're in the process of building/signing.
2015-11-16 20:08:45 +01:00
Mike Hearn
853b37a6e1
Cash: add a notion of state construction based on Richard's suggestion of a nonce+simply checking the output states are for deposits owned by the signer. No genesis tx is used.
2015-11-16 19:29:11 +01:00
Mike Hearn
5f30684805
Minor: add a kdoc to the select function.
2015-11-16 19:27:39 +01:00
Mike Hearn
0aa643d4c2
Minor: note to self, remember to check for duplicated inputs when converting LedgerTransaction into TransactionForVerification
2015-11-16 19:26:43 +01:00
Mike Hearn
2c27a07c8b
Minor: OpaqueBytes should never be empty. May catch certain types of simple mistake.
2015-11-16 19:23:50 +01:00
Mike Hearn
6c66eee712
Kotlin Beta 2
2015-11-16 19:23:50 +01:00
Mike Hearn
e3e674658d
Contracts: check in a demo of how to implement a simple contract in Java.
2015-11-16 13:30:53 +01:00
Mike Hearn
d1a605de6f
Contracts: Rename ComedyPaper to CommercialPaper and rewrite the comment at the top to flag its not-realistic status.
2015-11-16 12:42:16 +01:00
Mike Hearn
dad59d116c
Major: Integrate serialisation everywhere, implement basic signing/sig checking code.
...
Currently the serialised forms and the form fed into the contract aren't quite joined up, because on disk/network a transaction is serialised with input references i.e. (txhash, output index) pairs, but the contract wants to see all input states in fully loaded form. To do that, we need some notion of a database of transactions.
2015-11-13 23:12:39 +01:00
Mike Hearn
162b830bcd
Add some serialization utilities and tests, using Kryo.
2015-11-13 20:38:29 +01:00
Mike Hearn
5b4969d366
Minor: make commands singletons when they contain no data and are purely type system markers.
...
This may not be really compatible with sandboxing, later on. But we can always change it back if not.
2015-11-13 14:43:59 +01:00
Mike Hearn
1b44081880
Minor: tweak the cash/amount API
2015-11-12 23:38:02 +01:00
Mike Hearn
32143160c2
Minor: reformat code a bit, introduce TimestampedWireTransaction as a wrapper, fix ContractStateRef to be the same as a Bitcoin COutPoint structure.
2015-11-12 23:18:15 +01:00
Mike Hearn
0b02f64f3d
Contracts: a bit more work on the CP implementation, add a unit test for redemption at time.
2015-11-12 22:58:47 +01:00
Mike Hearn
a7bfff486a
Misc comments
2015-11-11 14:20:24 +00:00
Mike Hearn
3041ca73f2
Simply TransactionForLedger.verify
2015-11-10 11:51:26 +00:00
Mike Hearn
ac9a371179
Platform: commands can now have multiple signatures per command (i.e. you only have one command of any type per transaction even if there are multiple authorisations).
2015-11-09 19:27:53 +00:00
Mike Hearn
0dc92822b5
Remove the todo list in Main.kt, it just changes too fast to be worth keeping it up to date. TODOs in the code itself remain.
2015-11-09 18:27:10 +00:00
Mike Hearn
12b7c7c184
Platform: fix the ability to summon cash in uncontrolled ways.
...
Introduce three ways to represent transactions: wire, ledger and for-verification.
TransactionForVerification contains the arguments formally passed to verify(). Making Contract.verify() take only a single object as the argument makes it easier to evolve the Contract binary interface without breaking backwards compatibility with existing contracts that are uploaded to the ledger. The Kotlin "with" construct can be used to bring the members into scope, thus acting syntactically like function arguments.
Make the contracts to be run depend on both input AND output states: this approach seems simpler than trying to have some notion of marking outputs that are checked. The TransactionForVerification class implements this simple logic (it's all moved into Transactions.kt).
2015-11-09 18:18:03 +00:00
Mike Hearn
4b9536af04
Add some TODOs
2015-11-09 17:32:16 +00:00
Mike Hearn
b8c7f949f4
Misc changes from Monday meeting.
2015-11-09 17:23:05 +00:00
Mike Hearn
8a2b8072e6
Contracts: include a string reference to the legal contract that the code is supposed to implement. Suggestion from Richard.
2015-11-08 13:38:51 +01:00
Mike Hearn
03aaf07f70
Cash: alter description of the state to talk about cash claims. Suggestion from Richard.
2015-11-08 13:34:52 +01:00
Mike Hearn
5022f11d9e
More moving around and renaming, to have a consistent style between contracts.
2015-11-08 13:34:24 +01:00
Mike Hearn
83eb45732f
Some renaming and moving around (Children's Paper becomes Comedy Paper to make it clearer that it's sort of a joke implementation)
2015-11-08 12:30:02 +01:00
Mike Hearn
fa626fc5d7
Mark ChildrensPaper as really incomplete more visibly.
2015-11-06 19:00:44 +01:00
Mike Hearn
0131c2cc1d
CP: check in a "childrens paper" contract that is sort of like commercial paper, but not really. Tests are incomplete.
2015-11-06 17:55:20 +01:00
Mike Hearn
1298c4b8ed
Add a time parameter to the contract verify function.
2015-11-06 16:39:33 +01:00
Mike Hearn
163175860d
Improve the contracts DSL, make the Cash contract extend the DSL in a small way to make working with arrays of cash outputs easier.
2015-11-06 16:35:51 +01:00
Mike Hearn
f09c624c0f
Move DepositPointer into Structures
2015-11-06 14:57:16 +01:00
Mike Hearn
847770ed2e
Move Cash into new contracts subfolder, move base code into core
2015-11-06 14:56:00 +01:00
Mike Hearn
c0238b1f21
Cash: add a TODO comment
2015-11-06 13:01:22 +01:00
Mike Hearn
7e7d3ba3bf
Move contracts DSL related stuff into a dedicated ContractsDSL.kt file, to emphasise that there is one :)
2015-11-04 15:47:42 +01:00
Mike Hearn
2455776b43
Cash contract: Implement example of spend crafting.
2015-11-04 15:14:56 +01:00
Mike Hearn
a09120d445
Cash contract: Introduce a DepositPointer abstraction for easier grouping
...
In this current model, you cannot mix up money from different deposits: they must always be kept separate.
2015-11-03 18:05:21 +01:00
Mike Hearn
fd67a85c29
TDD: Cash contract: Some basic tests of spend crafting.
2015-11-03 17:54:18 +01:00
Mike Hearn
e012d2c2f5
TestUtils: add some formatting toString methods to make test failures easier to read.
2015-11-03 17:54:18 +01:00
Mike Hearn
0c6c2df483
Cash contract: don't allow merging of two different origin deposits together.
2015-11-03 17:54:18 +01:00
Mike Hearn
8f46fb4406
Introduce OpaqueBytes, a simple wrapper around the JVM level byte[] which fixes hashCode and equals to use value-type identity rather than instance identity. Allows for more natural code.
2015-11-03 17:54:18 +01:00
Mike Hearn
12f5ddb0aa
Cash contract: multi-issuer support
...
You can now take deposits from multiple different institutions and move/combine/split them appropriately. The issuers are kept separate, you cannot merge 3 different input states from 3 different institutions down to one, but you can merge/split within that specific issuer. Deposit refs are not currently being kept separate, but they should be also (this is coming next).
2015-11-03 17:54:18 +01:00
Mike Hearn
983003a562
Amount: split out of Structures.kt and into a separate file, add operator overloads.
2015-11-03 17:54:18 +01:00
Mike Hearn
c60db5544b
Initial import
2015-11-03 17:54:17 +01:00