This removes the need for the shareParentSessions parameter of FlowLogic.subFlow. It also has the flow's version number so FlowVersion is now no longer needed.
* Added queryBy(QueryCriteria) Vault API and Junit tests.
* Minor fix following rebase.
* Spit out Vault Query tests into separate source file.
* WIP
* Enable composition of QueryCriteria specifications.
Additional JUnit test cases to validate API.
* Added Deprecating annotations.
Added QueryCriteria for set of contractStateTypes
* Minor tweaks and additional JUnit test cases (chain of linear id)
* Added Java Junit tests and QueryCriteria builder support.
* Added API documentation (including coding snippets and examples).
* Added @JvmOverloads to QueryCriteria classes for easy of use from Java.
* Refactored QueryCriteria API to use composition via sealed data classes.
* Enable infix notation.
* Fixed typo.
* Clarified future work to enforce DB level permissioning.
* Moved PageSpec and Order from QueryCriteria to become parameters of Query itself.
* Moved PageSpec and Order from QueryCriteria to become parameters of Query itself.
* TokenType now specified as set of <Class> (was non extensible enum).
* Exposed new Vault Query API functions via RPC.
* Fixed compiler error in java test.
* Addressed a couple of minor PR review scomments from MH.
* Major updates following PR discussion and recommendations.
* All pagination and sorting arguments are optional (and constructed with sensible defaults).
Added Java helper functions for queryBy and trackBy interfaces.
Added Java trackBy unit tests.
Miscellaneous cleanup.
* Added Generic Index schema mapping and query support.
* Query criteria referencing Party now references a String (until Identity framework built out).
Added participants attribute to general query criteria.
* Fleshed our IndexCriteria including PR recommendation to define column aliases for index mappings.
* Removed all directly exposed API dependencies on requery.
* Updated documentation.
* Provide sensible defaults for all Query arguments.
Add RPC Java helpers and increase range of Vault Service helpers.
* Further improvements (upgrading notes) and updates to documentation.
* RST documentation updates.
* Updates to address RP latest set of review comments.
* Updates to address MH latest set of review comments.
* Updated to highlight use of VaultIndexQueryCriteria to directly reference a JPA-annotated entity (versus the indirect, explicitly mapped attribute to GenericIndexSchema approach)
* Aesthetic updates requested by MH
* Reverted Indexing approach: removed all references to VaultIndexedQueryCriteria and GenericVaultIndexSchemaV1 scheme.
* Final clean-up and minor updates prior to merge.
* Fixed compiler warnings (except deprecation warnings)
* Reverted all changes to Vault Schemas (except simple illustrative VaultLinearState used in VaultQueryTests)
* Reverted all changes to Vault Schemas (except simple illustrative VaultLinearState used in VaultQueryTests)
* Commented out @Deprecated annotations (as a hedge against us releasing M12 with the work half-done)
* Renamed RPC JavaHelper functions as RPCDispatcher does not allow more than one method with same name.
Clean up X500 names in Corda simulation, and ensure they're consistent with the standard test names.
This includes using the locations present in those test names, which requires updates to the node
config test.
* Describe new source-tree directories "verifier" and "webserver", and update descriptions for "node" and "tools".
* Update changelog and release notes for M11.
* Thank Gary Rowe for his contribution to M11.
* Update Copyright and fix some broken links.
* Fix reference to CordaRPCOps class.
* Include changelog for CompositeKey upgrade.
* Fix warnings in changelog
* Update release notes after review.
* Add help for IntelliJ/Gradle.
Core flows, which are baked into the platform, are also versioned using the platform version of the node. Several core flows, such as the data vending ones, which were provided via plugins are now instead baked into the node.
Move functions for generating transactions into OnLedgerAsset from various locations in
the code (VaultService, AbstractConserveAmount, etc.) to unify the code paths and reduce
duplication.
* Remove progress Observable from FlowHandle, unless explicitly requested.
* Refactor FlowHandle creation into FlowStateMachine.
* Prevent server-side queue subscription for dummy Observable.
* Refactor so that RPC client does not receive any unused progress Observables. This is the simplest way of ensuring we have no dangling "hot" Observables when the RPC client closes.
* Test flow has correct handle.
* Resolve some compiler warnings.
* Document how starting a flow does not involve progress tracking by default.
* Update changelog and release notes for RPC API.
* Rename new RPC API to startTrackedFlow().
* Remove optimisation because of its affect on the client-side.
* Update documentation.
Add CompositeSignature and CompositeSignatureWithKeys classes as part of preliminary work to make CompositeKey signature validation compatible with java.security classes, so that these keys and signatures can be used readily in X.509 certificates.
Standaridise the identity names of Alice, Bob and Charlie, notary, map service, etc. in order
to ensure consistency across the code base and reduce number of places that have to be changed
to introduce proper X.500 names.
Move Alice, Bob & Charlie identities into the utilities package so they can be used in demos
* Make CompositeKey implement PublicKey
The initial implementation of composite keys as their own distinct class separate from PublicKey
means that the keys cannot be used on standard classes such as Certificate. This work is a beginning
to modifying CompositeKey to being a PublicKey implementation, although significant further work
is required to integrate this properly with the standard Java APIs, especially around verifying
signatures using the new key type.
* First stage of making CompositeKey implement PublicKey interface. Revert to using PublicKey everywhere we expect a key.
* Move algorithm and format into companion object (#432)
Move algorithm and format into companion object so that they can be referenced from other
classes (i.e. the upcoming signature class).
* Add simple invariants to construction of CompositeKey.
Builder emits CompositeKeys in simplified normalised form. Forbid keys with single child node, force ordering on children and forbid duplicates on the same level. It's not full semantical normalisation.
* Make constructor of CompositeKey private, move NodeWeight inside the class.
Add utility function for Kryo deserialization to read list with length constraints.
* Document DemoBench's download link and the location of its log file.
* Document locations of DemoBench's runtime dependencies.
* Initial changes following review from Richard Brown.
* CORDA-307: Initial DemoBench documentation.
* CORDA-307: Update with review comments.
* CORDA-307: Update local installation instructions and download site.
* CORDA-307: Remove download link because it's not ready yet.
* CORDA-307: Mention that the node.conf files within the profiles can be edited by the user.
* CORDA-307: Add DemoBench section to the appendix.
Add an AmountTransfer type to express the concept of asset flows.
Unify the currency amount creators and fix a few old style display conversions in teh explorer cash dialogs.
Modifications according to PR comments.
Change TransferAmount display string as it may not always be a payment.
Update docs
Removed redundant parts of the docsite generator.
Gradle now calls the docsite requirements installation script when building docs via buildDocs
Added docs build script and moved all docs building related code into it
Corrected directories for build.
Fix broken IssuerFlowTest
Fix IssuerFlowTests after rebase.
Resolve conflicts after rebase.
Soft locking converted to use persistent store.
Added additional optional 'includeLockStates' parameter in VaultService states API call.
Added Vault softLocked states query API call.
Fixed commercial paper failing test.
Improved exception handling on soft locking UPDATE statement.
Using SELECT FOR UPDATE to ensure correct soft locking data visibility.
Db query operations moved out of mutex code (as locking managed by underlying DB)
Adjusted logging severity levels.
Adjusted logging severity levels.
GenerateSpending now performing fine grained query for unconsumed states by joining with contract_cash_states table.
Using H2 proprietary cummulative counting feature (using sessioni SET variables)
Refactored and simplified HibernateObserver constructor to enable usage in JUnit tests.
Event generator issues larger random amounts (10,000..1,000,000) to those than are spent (0..10,000)
Adjusted Issue (5:1) and Exit (10:1) generation frequency vs spending.
Minor fixes: added optional lockid into select for spending criteria, set notary, additional trace logging.
Generate Cash Schema by default upon node start-up (as part of NodeSchemaService initialisation).
Explicitly close JDBC statements in finally() blocks.
Tightened HibernateObserver constructor.
Fix CommercialPaper test (was missing auto-generation of CONTRACT_CASH table)
Revert default JVM size back to 200Mb.
Revert default number of iterations in Explorer Node Simulation mode (back to 10000 with .5 sec sleep interval).
Remove redundant setter function.
Added TODO messages indicating Requery / H2 restrictions & caveats.
Consumed states lock updates now performed in general consumed state Update.
Updated/added Soft Locking documentation.
Addressed initial PR comments: use THREAD_LOCAL_KRYO, use AbstractParty, extract helper method, improve readability, address some doc typos
Addressed PR comment: removed lockId from WireTransaction.
Fixed soft locking UPDATE statements.
Improvements to VaultSoftLockManager for auto-registration of soft locks for flows with spendable states (as notifications from vault).
Other optimisations (IssuerFlow no longer explicitly reserve/release issued state) and improvements (soft lock release management of soft locks, docs update)
Performance update: now using Requery for UPDATE in release soft locking (non-composite key statement)
Removed redundant TODO messages (TODO: revisit Kryo bug when using THREAD_LOCAL_KYRO)
Minor fixes following rebase
Fixed failing JUnit following rebase
Addressed MH PR review items (1st pass)
Fix broken JUnit
Significant changes to RDBMS operations within coin selection and soft locking as requested by PR review.
(Removed SELECT FOR UPDATE; added RETRY upon coin selection; reverting partial soft locks)
Addressed a number of PR review requests added by MH (comments/spelling, lockID instantiation, HibernateObserver instantiation, cash schema white-listing usage)
Addressed latest PR review comments from RP.
Minor fixes following rebase from master.
Fixed final failing JUnit (issuer flow concurrent).
Updated TraderDemo to trigger concurrent issuance of cash.
Fixed compiler warning on lockId null check.
Fixed subtle bug in coin selection intermittently surfaced in IntegrationTestTutorial.
Fixed small memory leak.
Removed stray } in logger trace message.
Slight rewording of description of Soft Locking in docs.
Renamed NoStatesAvailableException to StatesNotAvailableException.
generateSpend is now Suspendable (calls sleep method on flow upon coin selection retry).
Added companion function to enable a Strand to sleep but without locking transactional context.
Improved logging, changed to StateNotAvailableException, using Flow sleep upon retry, tweaked SELECT criteria in coin selection, fixed bug when insufficient states selectable, generateSpend is now @suspendable
Improved handling and logging of flow results in Simulation Mode.
Fixed minor error in sleep when not an active flow.
Retry coin selection when unavailable states (as these may become available as new states).
Additional debug logging to highlight and identify H2 coin selection sporadic bug.
Inlined sleep method due to intermittent Quasar error.
Re-introduce selection clause that prevents selection and temporary locking of already locked states (by other flows).
Improved trace logging for coin selection (SQL row level info).
Correctly calling FlowStateMachineImpl sleep (now inlined and working correctly)
Fixed rebase error.
Remove redundant TODO message.
The shell is embedded in the node and offers the ability to monitor
and control the node via the launching terminal.
Still to do:
* Switch to a fork of CRaSH that we can maintain ourselves, and merge in Marek's SSH patch so we can enable SSH access.
* Add persistent command history that survives restarts.
* Tab completion for the 'flow' and 'run' commands.
* Remove the 'jul' command and replace it with a command that lets you see and tail the log4j logs instead.
* Fix or remove the other crash commands that have bitrotted since 2015.
* CORDA-305: Refactor CordaRPCClient into :client:rpc module
* CORDA-305: Remove the Kotlin test framework from the artifacts.
* CORDA-305: Migrate serialisation whitelist into node-api module.
* CORDA-305: Clean up unused RPC observables.
* CORDA-305: Add :client:rpc module to documentation tasks.
* CORDA-305: Include :finance into :client:rpc for its serialisable classes.
* CORDA-305: Move test classes into the correct directory.
* CORDA-305: Migrate :finance dependency from :client:rpc into DemoBench.
* CORDA-305: Update wording of TODO about handling Observables.
* CORDA-304: Refactor :client modules into :client:javafx and :client:mock.
* CORDA-304: Add :client:mock to Dokka tasks, and remove unused integrationTest task.
* CORDA-304: Migrate DriverBasedTest from node into test-utils.
* CORDA-304: Rename .fx. package to .jfx. to prevent confusion with "exchange rate".
* CORDA-304: Rename module to ':client:jfx'.
* Non-ssl artemis acceptor for RPC connection. (#271)
* New non-ssl acceptor in artemis server for RPC connection.
* Rename artemisAddress with messagingAddress
Rename artemisAddress with messagingAddress so that the node configuration file properties match
the code variable names.
Rename artemisPort to messagingPort in Gradle configuration to match node configuration naming.
* Add rpcPort configuration option for Gradle
* Update docs to reflect changes to RPC port configuration
* Renumber ports in example CorDapp to match numbering used elsewhere
* Restructure upgrade guide
* added config file checks on corda startup to make the upgrade path a bit smoother.
Add Capsule configuration for the webserver JAR, so that the classes-only `webserver.jar` is published as well
as the full fat `corda-webserver.jar`. This is required for running the tutorial/template from IntelliJ.
* CORDA-265: Implement "ALL" permission for RPC users. Users with this permission in node.conf can use any flow.
* CORDA-265: Ensure that we always close the RPC proxy object after each test.
* CORDA-265: Refactor construction of dummy RPC client into an abstract base class.
* CORDA-265: Document RPC "ALL" permission.
* Make the network registration process more verbose
* removed gradle task for building standalone jar for the certificate signing request utility
* Added a flag "--initial-registration" to the corda jar to start the registration
* Initial prototyping with Requery as a persistence replacement for Exposed/Hibernate
Applied changes following PR review by RP
Updated timestamp naming (removed committedTimestamp) and StateStatus (removed AWAITING_CONSENSUS) after discussion with RP.
Removed FungibleState and LinearState schemas (and associated tests) - awaiting Requery uni-directional relationship fix.
Added Transaction propagation such that requery re-uses any existing transaction context.
Made requery default logging configurable (disabled by default)
Nullable fields are now truly nullable (in the Kotlin and DDL sense)
Fix for SimmValuation integration test.
Workarounds applied to resolve Requery issues when sharing Transactional context.
Addressed PR review comments from MH.
Further updates following re-review by RP/MH
Further updates following additional PR review comments by RP
Minor update following additional PR review comments by RP
Optimised makeUpdate state processing code.
Resolved conflicts after rebase.
Additional Unit tests and bug fix for correct spending of multiple contract state types within a single transaction.
Required interface change to states() API to take a setOf (ContractStateClassTypes)
Minor code clean-up.
Re-write NodeVaultService consumed state makeUpdate function using SQL.
* Resolve conflict after rebase from master
* Added missing out modifier to UpgradedContract class
* Added ContractUpgradeFlow.Instigator to whitelist in AbstractNode
* Added test for contract upgrade using RPC
* Add support for contract upgrades
* Add interface for the upgraded contract to implement, which provides functionality for upgrading legacy states.
* Add shared upgrade command and verification code for it.
* Add DummyContractV2 to illustrate what an upgraded contract looks like.
* Add new functions to vault service to support upgrading state objects.
* Add contract upgrade flow
Split CashFlow into independent CashIssueFlow, CashExitFlow and CashPaymentFlow,
so that users can be given access to one but not the other(s).
Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
Add AnonymousParty superclass of Party in preparation for anonymising parties stored in
contract states.
Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
Make FinalityFlow do more, and be used more consistently.
Add a new waitForLedgerCommit API that is intended to be used at the end of flows, or at any other point where a flow wants to wait for a transaction to finalise (but the finalisation flow is being done by someone else).
Update the docs a bit.
* Move merkle building extension functions on wire tx to WireTransaction class.
* Add timestamp, notary, transaction type and signers to wire transaction id calculation.
* Change construction of MerkleTree from duplicating last node on a given level to padding leaves' list with zero hash to size of the nearest power of 2 - so we always have a full binary tree.
The problem was that it was possible to construct 2 different transactions with the same ids. Trick worked for txs having number of leaves that were not power of 2.
* Update tear-offs documentation and diagrams to reflect changes in construction of Merkle trees - padding with zero hashes and including all WireTransaction fields in id computation.
* Change in filtering API of WireTransaction for partial Merkle trees calculation.
Instead of many filtering functions over a transaction only one needs to be provided.
Additional change to check and verification of FilteredTransaction.
* IRS demo change. Make filtering function a protected method of RatesFixFlow class.
Comment on situation when capturing too much scope and connected problems with checkpointing.
Change oracle and tear-offs documentation.
Change Party instances to be uniquely identified by the owning key, without taking into account name.
This requires that mock node key generation is reworked so that keys for services and the node itself
are distinct, otherwise the network map service cannot differentiate them.
Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
First draft
Re-structured Key Concepts; added plenty of diagrams; additional content.
Added references to other security docs.
Re-structured Key Concepts; added plenty of diagrams; additional content.
Added references to other security docs.
Updated information, indexes and images.
Incorporated feedback from PR review comments (RGB, RW)
Reformatted diagrams and incorporated feedback from PR reviewers.
Addressed formatting problems.
Updated Flow Framework diagram
Added colour coding to Flow Framework diagram to aid readibility.
Small clarification to vault unconsumed state usage.
Added tutorial reference as suggested by RGB
Updated TOC tree.
Updates following PR review comment from Roger
First pass updates following PR review comments from MH.
Further updates following PR review (including 2 edited diagrams)
Diagram changes and minor text edits following review with MGB
Remove unused diagrams.
Fixed spurious indentation errors.
Changes following review and feedback from JD.
Added clauses and merkle-trees back into TOC.
Added small sub-section on transaction representation in Data Model.
Added future work as note in Vault.
Minor updates to diagrams following MH review.
Updated Corda Ecosystem diagram.
Minor changes to Core & Financial docs following PR review by MH.
Updated following review by MBG.
This deprecates the existing composition clauses and adds new better named versions,
as well as changing 'AnyOf' to require at least one matching subclase (better matching
the name of the clause).
* Update notary change flow to support encumbrances.
Move encumbrance pointer from ContractState to TransactionState.
* Refactor & add new encumbrance tests