cordapp-template-kotlin | Kotlin CorDapp Template | Application Framework library
kandi X-RAY | cordapp-template-kotlin Summary
kandi X-RAY | cordapp-template-kotlin Summary
Welcome to the Kotlin CorDapp template. The CorDapp template is a stubbed-out CorDapp that you can use to bootstrap your own CorDapps.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cordapp-template-kotlin
cordapp-template-kotlin Key Features
cordapp-template-kotlin Examples and Code Snippets
Community Discussions
Trending Discussions on cordapp-template-kotlin
QUESTION
I had cloned the cordapp-kotlin-template . I've defined a state called LoadState which looks like this:
...ANSWER
Answered 2022-Jan-24 at 04:23After our discussion in the above comments section, it appears that your states have been issued using Whitelist zone constraint.
Also looking at the code it is clear that you have not explicitly added Whitelist Zone constraints for your states. Then there remain two more possibilities by which states are issued using Whitelist Zone constraint.
One is you are using some Corda version before 4 or you have included the necessary configs to include white list zone constraints in network bootstrapper as specified here. You have two options - either start from scratch and make sure you use Corda 4.
If you cannot start from scratch follow this path to first migrate the whitelist zone constraints to signature constraints, before running your UpdateLoadFlow. You can refer to this blog which talks about constraint migration.
QUESTION
We built our application based on cordapp-template-kotlin, and used the client folder infrastructure to provide rest services to a consumer who is a web application.
The services receive a list of data that serve as parameters to the flows. And we call the streams chained to each iteration in the data list. For example, the web provides a list of names, and with that list, we create accounts on corda. We want to improve the performance of our scenario as a whole. And one of the aspects that I thought could improve, would be to parallelize the flow calls. But when I paralleled the creation of accounts, for example, I did not have any performance gain. I would like to know why.
Creating accounts one by one in a linear way had the same performance of doing the creation in a parallel way. Is this the expected behavior or is there a problem in my development?
...ANSWER
Answered 2020-Jul-22 at 12:01Corda Opensource doesn't have a multi-threaded flow state machine. Hence you won't be able to benefit from parallel flow execution on Corda Opensource.
A better approach for this with Corda Opensource would perhaps be batching of accounts with a single transaction on flow, rather than creating the accounts with multiple flow invocation.
With Corda Enterprise, however, you could benefit with multi-threaded flow state machine. But I would still recommend exploring the batching approach and find an optimal solution with maximum efficiency.
QUESTION
In the Kotlin CorDapp template the contracts (and states) are a separate module than workflows.
What is the reason for this separation?
...ANSWER
Answered 2020-Feb-23 at 14:37Two reasons for this:
Each Corda transaction also includes the jar containing the contract definition as an attachment. This is done to ensure that the correct contract is available when a transaction is validated at a later point in time (Considering the contract may upgrade over time). Thus separating the contract and flows jar reduces the size of the contract jar being attached to the transaction and thus reduces the size of the transaction. See more here: https://docs.corda.net/writing-a-cordapp.html#modules
It helps in upgrades. Contracts have constraints and thus contract upgrades take a rather complex path. Also, we anticipate that the contacts are less prone to upgrades than the flows. Hence separating them in separate modules allows for easy upgrades when one just requires to upgrade the flows, which can be done just by replacing the old flow jar with the newer one. Learn more here: https://medium.com/corda/contract-upgrades-and-constraints-in-corda-425055a9a47f
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cordapp-template-kotlin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page