mirror of
https://github.com/corda/corda.git
synced 2024-12-20 21:43:14 +00:00
82a114a329
* wip * wip * wip (need to review IEE comments) * wip * wip * Small refactoring, fixed network-verifier's TestNotaryFlow * Added command line option to explicitly enable hash agility support * wip-do-not-push * wip * wip * wip * aligned merkletree/transaction hash algorithms * wip * Added mixed algorithm support for nodes vs leaves and corrected mixed algorithm tests * moved global computeNonce and componentHash to DigestService * added comment for failing test to fix * wip * Minor cleanups, added deprecated componentHash/computeNonce * restored exploratory changes to failing SignedTransaction test * cleaned up and minor rafactoring * Fixed some tests with hardcoded hash algorithm * some changes and cleanups following code review * WIP commit before large change * WIP Fixed 3 tests * WIP removed direct references to randomSHA256() and sha256() * Updated/added liquibase migrations to support larger hash algorithms * Reviewed, cleanups, comments, fixes * removing direct references to sha256() * WIP verifying obligations test errors * reviewing obligation/attachment issues with sha3_256 * Full review before PR - intermediate commits * Reviewed and cleaned up * Futher cleanup * Fixed partial tree backward compatible json and cleanups * all tests passing * Removed couple of unused imports * Reworked global componentHash function to avoid deprecated warnings * replaced SHA3s with some alternate SHA2s * Removed SHA3-256 and SHA3-512 references * fixed some tests using non ubiquitous hash algorithms * Fixed ABI compatibility (not for TransactionBuilder) * Fixed ABI compatibility to TransactionBuilder * couple of fixes * fixed DigestService's randomHash * Removed constructor with loosely typed args for private constructor of LedgerTransaction class (API removal) * re-introduced LedgerTransaction deprecated ctor for deserialization * Add possibility to load CustomMessageDigest bypassing JCA (#6798) * Change api-current for DigestAlgorithm * disable flaky tests Co-authored-by: Denis Rekalov <denis.rekalov@r3.com> |
||
---|---|---|
.. | ||
src | ||
workflows-trader | ||
build.gradle | ||
README.md |
Trader demo
This demo brings up five nodes: Bank A, Bank B, Bank Of Corda, NonLogging Bank and a notary node that they all use. Bank A will be the buyer, and requests some cash from the Bank of Corda in order to acquire commercial paper from Bank B, the seller.
The NonLogging Bank node is present to demonstrate the usage of the "Configuring Responder Flows" feature of Corda described here.
The override is defined within the deployNodes section of the build.gradle
. In this case, we are overriding the default responder for net.corda.traderdemo.flow.SellerFlow
to be a version that does not print out information about the transaction.
node {
name "O=NonLogging Bank,L=London,C=GB"
p2pPort 10025
rpcUsers = ext.rpcUsers
rpcSettings {
address "localhost:10026"
adminAddress "localhost:10027"
}
extraConfig = ['h2Settings.address' : 'localhost:10035']
flowOverride("net.corda.traderdemo.flow.SellerFlow", "net.corda.traderdemo.flow.BuyerFlow")
}
To run from the command line in Unix:
- Run
./gradlew samples:trader-demo:deployNodes
to create a set of configs and installs undersamples/trader-demo/build/nodes
- Run
./samples/trader-demo/build/nodes/runnodes
to open up five new terminals with the five nodes - Run
./gradlew samples:trader-demo:runBank
to instruct the bank node to issue cash and commercial paper to the buyer and seller nodes respectively - Run
./gradlew samples:trader-demo:runSeller
to trigger the transaction. If you enteredflow watch
, you can see flows running on both sides of transaction. Additionally you should see final trade information displayed to your terminal
To run from the command line in Windows:
- Run
gradlew samples:trader-demo:deployNodes
to create a set of configs and installs undersamples\trader-demo\build\nodes
- Run
samples\trader-demo\build\nodes\runnodes
to open up five new terminals with the five nodes - Run
gradlew samples:trader-demo:runBank
to instruct the buyer node to request issuance of some cash from the Bank of Corda node - Run
gradlew samples:trader-demo:runSeller
to trigger the transaction. If you enteredflow watch
, you can see flows running on both sides of transaction. Additionally you should see final trade information displayed to your terminal