corda

Could not find Party for Anonymous(DLC2iDbLTxfABXk2UgFJzej8RbX6hUQuCjYBDJATYjYAJW) ERROR in corda accounts

故事扮演 提交于 2021-01-28 20:40:14
问题 I am getting this error in one of the flows while using accounts in my cordapp, net.corda.core.CordaRuntimeException: java.lang.IllegalArgumentException: Could not find Party for Anonymous(DLBBYFJYhpPQXEMcTZtuzkg8ixptu92L3dqiN4boD1o2FN) This error comes at the Finality Flow line Here is error log java.lang.IllegalArgumentException: Could not find Party for Anonymous(DLKiQpwdw3E7CewLhUatjRpKvCMkHDhEoEYXfAUrp33z7) at net.corda.core.identity.IdentityUtils.groupAbstractPartyByWellKnownParty

FungibleAsset implementation in Java won't compile (Corda 4.4)

£可爱£侵袭症+ 提交于 2021-01-28 19:33:49
问题 I'm trying to implement a simple State of type FungibleAsset, even though it seems not that delicate, it gives a compilation error. error: TestState is not abstract and does not override abstract method getAmount() in FungibleState public class TestState implements FungibleAsset { error: getAmount() in TestState cannot implement getAmount() in FungibleState public Amount> getAmount() { return type Amount> is not compatible with Amount> where T is a type-variable: T extends Object declared in

Unable to connect Corda node to Postgres with SSL

和自甴很熟 提交于 2021-01-28 10:09:02
问题 My Postgres DB in GCP (Google Cloud Platform) only accepts connections over SSL. I tried the below inside my node.conf without any success: dataSourceProperties { dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource" dataSource.url = "jdbc:postgresql://db-private-ip:5432/my_node" dataSource.ssl = true dataSource.sslMode = verify-ca dataSource.sslRootCert = "/opt/corda/db-certs/server-ca.pem" dataSource.sslCert = "/opt/corda/db-certs/client-cert.pem" dataSource.sslKey = "/opt/corda/db

`No transaction in context` error when running a flow

放肆的年华 提交于 2021-01-28 08:53:20
问题 When running a Corda flow, I receive the following error: java.lang.IllegalStateException: No transaction in context How can I solve this issue? 回答1: This issue is likely caused by a failure to annotate a function called from within a flow with the @Suspendable annotation. This could either be FlowLogic.call , or a function called from within FlowLogic.call (e.g. SignTransactionFlow.checkTransaction if you are overriding this function as part of a call to CollectSignaturesFlow ). If you run

Corda State Management Best Practice

允我心安 提交于 2021-01-28 08:41:15
问题 A strategic question… When a state is going to have one to many type of data, should we always create a collection under the parent state object or create a separate state object for the child with the reference to parent? Example (Employer 1:M Employee) or (Employer 1:M Location) …. When to decide which strategy? I've listed some PROS & CONS for each. Not sure when to use what strategy. Looking for some feedback Adding child as collection PROS ===== - Easier to manage from coding standpoint

serviceHub.vaultQueryService.queryBy returns all related states by default?

时光怂恿深爱的人放手 提交于 2021-01-28 02:27:51
问题 When I tried to use below codes to retrieve the state by linearId, I got 2 records returned, one is the consumed one, the other is the unconsumed one. The initial linearId was passed in from web api. val linearId: UniqueIdentifier = UniqueIdentifier(null, UUID.fromString(legalContractState.legalContract.linearId)) val linearIds = listOf(linearId) val linearStateCriteria = QueryCriteria.LinearStateQueryCriteria(linearId = listOf(linearIds.first(), linearIds.last())) val states = serviceHub

serviceHub.vaultQueryService.queryBy returns all related states by default?

戏子无情 提交于 2021-01-27 22:54:00
问题 When I tried to use below codes to retrieve the state by linearId, I got 2 records returned, one is the consumed one, the other is the unconsumed one. The initial linearId was passed in from web api. val linearId: UniqueIdentifier = UniqueIdentifier(null, UUID.fromString(legalContractState.legalContract.linearId)) val linearIds = listOf(linearId) val linearStateCriteria = QueryCriteria.LinearStateQueryCriteria(linearId = listOf(linearIds.first(), linearIds.last())) val states = serviceHub

When using Corda OS where can I view the flow hospital data?

我只是一个虾纸丫 提交于 2021-01-27 18:29:21
问题 When a transaction fails to make it to the destination node, where can I see those failed transaction data? I understand there is not a UI in the OS version. I am assuming there got to be somewhere in the DB or files system where this information is stored so Corda is able to retrieve it at a later time. If it's in a readable format, where can i find it? 回答1: you can get a list of flows hospitalized by looking at the node_checkpoints table in the database. you can also fire the below command

How Do I Handle Hospital Exceptions From My API?

不想你离开。 提交于 2020-12-15 06:04:18
问题 I have added a unique constraint on a column in my state for business reasons. When I tried to make multiple calls to my REST API that would break this constraint the flow went to the Hospital and the API never returned. [INFO ] 2020-11-13T03:14:02,254Z [Node thread-1] statemachine.StaffedFlowHospital. - Flow [13e5039f-0af6-4225-9d93-964897e406a9] admitted to hospital in state StateMachineState net.corda.node.services.statemachine.StateTransitionException: org.hibernate.exception

How Do I Kill A Flow In The Hospital?

℡╲_俬逩灬. 提交于 2020-12-13 03:22:43
问题 The Hospital docs says: you should be able to call killFlow with the UUID associated with the failing flow in the node’s log messages. I obviously can't access the node logs from my RPC client. So how am I supposed to get a list of flows in the hospital, find the reason why they were put in the hospital and kill the ones that I know will never complete? 回答1: Open the node terminal. Type run stateMachinesSnapshot to see all of the current flows. Get the ID of the hospitalized flow then run