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
48192d8d9d
Merged in PLT-60-misc-code-cleanups (pull request #17 )
...
Misc code cleanups
2016-02-10 17:59:53 +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
b023e570fc
Docs: update contracts tutorial to talk about generation instead of crafting
2016-02-10 16:29:44 +01:00
Mike Hearn
1bc57085c8
Rename ContractStateRef -> StateRef. Rename craft* methods to generate*
2016-02-10 16:29:44 +01:00
Mike Hearn
5f9e140545
Put "buyer" and "seller" directories in .gitignore
2016-02-10 16:28:37 +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
ac56ea2495
Regen docsite
2016-02-05 15:54:38 +01:00
Mike Hearn
c0e1b87f7e
Merged in artemis (pull request #15 )
...
Artemis
2016-02-05 15:53:15 +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
9a818247bb
Re-gen docsite
2016-02-03 16:57:01 +01:00
Mike Hearn
c2a10e8fae
Add a page to the docsite about the trading demo.
2016-02-03 16:57:01 +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
360d8ec7ad
Add dependency on Apache Artemis (message queue library) and clean up a few no longer necessary overrides and version pins.
2016-02-03 15:35:55 +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
a95b1b3879
Merged in rg_minor_edits (pull request #14 )
...
Minor doc change
2016-02-03 11:24:09 +00:00
Richard Green
410aeea1d2
Minor doc change
2016-02-03 10:21:20 +00: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