Does Corda IsRelevant () work?

API 1.0 made some changes that removed isRelevant (). What are the best workarounds for this?

In case of use: if there are 100 parties who want to see this requested state and all updates related to it (but are read-only and do not need to be signed), do I need to add them all to the participants list? Does the role of an “observer” not yet exist? Is there also inInformed or something similar if used just for viewing static reference data?

The general function here is the general linear requested state in which the issuer has a change / update wizard that will be distributed to all parties who want to “subscribe” to these changes. I believe that this can work with broadcasting to the "club", but I do not think that the clubs still exist or if they are dynamic network card groups.

+6
source share
2 answers

I’ll take a little background before replying ... The concept of relevance still exists on the platform. As you know, there are two data storage facilities in Cord; storage service and storage.

Storage service

A storage service is a key store → that stores data, such as:

  • Serial Machines with Current Status
  • Applications
  • Deals

, . . . . , , . . !

, . master states, , ( ) , ( ). LinearState OwnableState s. , ORM , , ORM. , , , . " 1000 , ". !

, , a node , node. , , . , , . , , , . , , , , ( ).

Corda

, node , , participants , , VaultService. , node. .

, node , , . , .

OwnableState , , . LinearState, , . M14 isRelevant LinearState, V1 , ( ).

V1

OP, V1 , , , " ". , . :

+7

, , . , -

val consumers: List<AbstractParty> = listOf(lender, borrower)
override val participants: List<AbstractParty> get() = listOf(lender, borrower, extraActor)

override fun verify(tx: LedgerTransaction){
        val command = tx.commands.requireSingleCommand<Commands>()
        when (command.value) {
            is Obligation.Issue -> requireThat {
                "The signers should only be the consumers for the obligation" using
                        (command.signers.toSet() == obligation.consumers.map { it.owningKey }.toSet())
            }

, , TX

val utx = TransactionBuilder(notary = notary)
                    .addOutputState(state, OBLIGATION_CONTRACT_ID)
                    .addCommand(Obligation.Issue(), state.consumers.map { it.owningKey })
                    .setTimeWindow(serviceHub.clock.instant(), 30.seconds)

, tx extraActor . tx- extraActor , , ( ) . i.e Obligation.DoSomethingExtra (command.signers.toSet() == obligation.participants.map { it.owningKey }.toSet())

+2

All Articles