RES: [corda-dev] Can Corda do parallel transactions from the same node?


GEORGE MARCEL MONTEIRO ARCURI SMETANA
 

Avery,

 

Corda Open Source is not meant to Production Environment, nor to high throughput & low latencies scenarios. As far as I know, CorDapps that run in Corda Open Source can run in Corda Enterprise without modifications.

 

Trying to implement multithread with Corda Open Source is tricky (these posts are a bit old right now…):

 

https://medium.com/corda/throughput-a-corda-story-1bc2cb9b2b60

 

https://medium.com/corda/asynchronous-flow-invocations-with-corda-services-3bd8c67661d0

 

https://lankydan.dev/2018/09/22/asynchronous-flow-invocations-with-corda-services

 

Corda Enterprise was built to be multithreaded, along with other enhancements, like HSM integration, monitor & management capabilities, etc.

 

https://docs.corda.net/docs/corda-enterprise/4.6/performance-testing/performance-results.html

 

Obs.: These are Corda 3.0 performance numbers, Corda 4.x improves them.

 

comparison chart

 

Flows / second

 

CE 4.3/4.5 throughput comparison chart

 

https://docs.corda.net/docs/corda-enterprise/4.6/performance-testing/introduction.html

 

https://docs.corda.net/docs/corda-enterprise/4.6/performance-testing/r3-performance-runs.html

 

Best regards,

 

BANCO BRADESCO S.A.

4251 / Departamento de Pesquisa e Inovação

Pesquisas Especiais

George Marcel M. A. Smetana

Tel.: 11 3684-8460, ramal: (2)48460 – Fax: 11 3684-8351

mailto: george.smetana@...

 

Attachments are limited to 2MB

 


De: corda-dev@groups.io <corda-dev@groups.io> Em nome de Avery Starr
Enviada em: sexta-feira, 9 de outubro de 2020 12:41
Para: corda-dev@groups.io
Assunto: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi All,

 

Thank you for the discussion!

 

It really does not matter whether it is an individual or a company who owns that node. It is the problem how one node can transact to thousands of nodes in parallel. We can use this abstract scenario to facilitate our discussion.

 

One node named A owns 10,000 token named X. Node  A needs to give 10X to 1000 other nodes. What we want to do is to spawn 1000 threads (flows) to transact 10X from A to node1, node2…..node1000.

We encountered double spent problem when doing parallel processing in this scenario. We were hoping to find ways to avoid that.

 

And we are using the open source corda. We won’t be able to change to other platforms at this point just because of this problem.

 

Thanks,

Avery

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of GEORGE MARCEL MONTEIRO ARCURI SMETANA
Sent: Friday, October 9, 2020 10:00 AM
To: corda-dev@groups.io
Subject: RES: [corda-dev] Can Corda do parallel transactions from the same node?

 

Are you using Corda Open Source or Corda Enterprise?

 

Best regards,

 

BANCO BRADESCO S.A.

4251 / Departamento de Pesquisa e Inovação

Pesquisas Especiais

George Marcel M. A. Smetana

Tel.: 11 3684-8460, ramal: (2)48460 – Fax: 11 3684-8351

mailto: george.smetana@...

 

Attachments are limited to 2MB

 


De: corda-dev@groups.io <corda-dev@groups.io> Em nome de Lanfranco Morini
Enviada em: sexta-feira, 9 de outubro de 2020 10:49
Para: corda-dev@groups.io
Assunto: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi George,

probably my answer was misleading: I wrote about “post-trading” where latency is not a problem so important like in trading phase…

But, anyway, we are talking about many many Tx that cannot be “blocked” by the previous ones, so the throughput is not the main issue, but it is parallelization. This is why a scenario like the one described by Avery has to be discussed in deep looking for the best implementation pattern…

 

Thanks again,

Lan

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of GEORGE MARCEL MONTEIRO ARCURI SMETANA via groups.io
Sent: venerdì 9 ottobre 2020 15:34
To: corda-dev@groups.io
Subject: RES: [corda-dev] Can Corda do parallel transactions from the same node?

 

Additionally, for high frequency trading, I understand that latency is critical. Enterprise Blockchain still have latency around seconds, I guess.

 

Best regards,

 

BANCO BRADESCO S.A.

4251 / Departamento de Pesquisa e Inovação

Pesquisas Especiais

George Marcel M. A. Smetana

Tel.: 11 3684-8460, ramal: (2)48460 – Fax: 11 3684-8351

mailto: george.smetana@...

 

Attachments are limited to 2MB

 


De: GEORGE MARCEL MONTEIRO ARCURI SMETANA
Enviada em: sexta-feira, 9 de outubro de 2020 10:32
Para: corda-dev@groups.io
Assunto: RES: [corda-dev] Can Corda do parallel transactions from the same node?

 

Lanfranco,

 

Blockchain Enterprise may not be the best platform for high frequency trading… What is you throughput requirements? Right now, Corda can do around 2.000 TPS for a particular use case. More complex use cases will probably have different performance numbers, depending on who needs to sign a transaction. Also, issuance performance is different from updates, since updates need to go through the Notary.

 

Have you considered using Corda Accounts?

 

Best regards,

 

BANCO BRADESCO S.A.

4251 / Departamento de Pesquisa e Inovação

Pesquisas Especiais

George Marcel M. A. Smetana

Tel.: 11 3684-8460, ramal: (2)48460 – Fax: 11 3684-8351

mailto: george.smetana@...

 

Attachments are limited to 2MB

 

De: corda-dev@groups.io <corda-dev@groups.io> Em nome de Lanfranco Morini
Enviada em: sexta-feira, 9 de outubro de 2020 10:25
Para: corda-dev@groups.io
Assunto: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi George,

I agree with your point about citizens with its own node, but the same scenario can be replicated in a post-trading (Capital Markets) context: so many High Frequency trades to be matched between thousands of corporate counterparties can become hundreds of thousands of TXs…

 

Best,

Lan

 

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of GEORGE MARCEL MONTEIRO ARCURI SMETANA via groups.io
Sent: venerdì 9 ottobre 2020 14:31
To: corda-dev@groups.io
Subject: RES: [corda-dev] Can Corda do parallel transactions from the same node?

 

Avery,

 

Hope you and others in this thread are doing well.

Blockchain / Distributed Ledger wasn’t designed for citizens to have nodes in their homes or smartphones. Citizens will mostly have wallets that store their credentials and private keys in order to transact with the business objects / digital assets (states in Corda) they own.

 

Are you sure you need citizens to have nodes instead of just having wallets / APPs / web portals?

 

Besides, Corda and other Blockchain Enterprise platforms were built so that the nodes from enterprises signs the transactions, not individuals. It is like that the Corda node owns the wallet, while on public Blockchains (bitcoin, Ethereum, etc.), people (and servers can) own the wallet. If you need physical persons to also sign a transaction in Corda, you will have to build it into your application layer.

 

Best regards,

 

BANCO BRADESCO S.A.

4251 / Departamento de Pesquisa e Inovação

Pesquisas Especiais

George Marcel M. A. Smetana

Tel.: 11 3684-8460, ramal: (2)48460 – Fax: 11 3684-8351

mailto: george.smetana@...

 

Attachments are limited to 2MB

 


De: corda-dev@groups.io <corda-dev@groups.io> Em nome de Alex Albano
Enviada em: sexta-feira, 9 de outubro de 2020 07:48
Para: corda-dev@groups.io
Assunto: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery, Stefano, Lanfranco,

 

We've banged our head on this in the past and come through to the other side. 

 

We can help you identify a solution and build exactly the infra you need to do this. Would you like to have a quick chat with me and my colleague Nick, our product manager? We could delve a little bit deeper on what issues you are encountering and put forward our recommendations. 

 

Best Wishes,

Alex

 

____

 

Alex Albano

Sales and Marketing Director  |  Chainstack

 

chainstack.com | +65 8798 7457 | alex.albano@...

 

Book a meeting with me here

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Sent: 09 October 2020 17:57
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Ok, thanks for the explanation…

 

BUT, if I use the second way, in order to obtain a better throughput, I can not be sure that both Tx will close successfully.

I try to explain it better: if I have a stock exchange transaction that can be considered closed only if both legs (buyer and seller) sign the Tx, the only way to be sure that both Tx legs are successfully closed is to include them in a “less plain” Tx… That means that I can have the same issue descripted by Avery (“all the nodes after this node will be pending forever.”)

 

Hope this is clear…

 

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 11:18
To: corda-dev@groups.io; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Say I have 2 states in my Vault

{
  owner: Stefano,
  value: $10
}

 

{
  owner: Stefano
  value: $5
}

and Let's say I want to "move" those states to you and Avery, it is possible to create a single transaction that has those two states as inputs, and outputs

 

{
  owner: Avery,
  value: $10
}

 

{
  owner: Lanfranco
  value: $5
}


OR, it is possible to move each of these states in their own transaction. The second approach will allow for higher flow throughput as each flow is simpler and has a lower chance of getting "stuck" waiting for a counterparty node to respond.


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Sent: 09 October 2020 09:59
To: corda-dev@groups.io <corda-dev@groups.io>; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Stefano,

what do you mean with “multiple moves”?

 

I ask it because I have the same problem…

 

Best,

Lan

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 09:39
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 

AVISO LEGAL 
...Esta mensagem é destinada exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter informação confidencial e/ou legalmente privilegiada. Se você não for destinatário desta mensagem, desde já fica notificado de abster-se a divulgar, copiar, distribuir, examinar ou, de qualquer forma, utilizar a informação contida nesta mensagem, por ser ilegal. Caso você tenha recebido esta mensagem por engano, pedimos que nos retorne este E-Mail, promovendo, desde logo, a eliminação do seu conteúdo em sua base de dados, registros ou sistema de controle. Fica desprovida de eficácia e validade a mensagem que contiver vínculos obrigacionais, expedida por quem não detenha poderes de representação.
LEGAL ADVICE
...This message is exclusively destined for the people to whom it is directed, and it can bear private and/or legally exceptional information. If you are not addressee of this message, since now you are advised to not release, copy, distribute, check or, otherwise, use the information contained in this message, because it is illegal. If you received this message by mistake, we ask you to return this email, making possible, as soon as possible, the elimination of its contents of your database, registrations or controls system. The message that bears any mandatory links, issued by someone who has no representation powers, shall be null or void.

 

AVISO LEGAL 
...Esta mensagem é destinada exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter informação confidencial e/ou legalmente privilegiada. Se você não for destinatário desta mensagem, desde já fica notificado de abster-se a divulgar, copiar, distribuir, examinar ou, de qualquer forma, utilizar a informação contida nesta mensagem, por ser ilegal. Caso você tenha recebido esta mensagem por engano, pedimos que nos retorne este E-Mail, promovendo, desde logo, a eliminação do seu conteúdo em sua base de dados, registros ou sistema de controle. Fica desprovida de eficácia e validade a mensagem que contiver vínculos obrigacionais, expedida por quem não detenha poderes de representação.
LEGAL ADVICE
...This message is exclusively destined for the people to whom it is directed, and it can bear private and/or legally exceptional information. If you are not addressee of this message, since now you are advised to not release, copy, distribute, check or, otherwise, use the information contained in this message, because it is illegal. If you received this message by mistake, we ask you to return this email, making possible, as soon as possible, the elimination of its contents of your database, registrations or controls system. The message that bears any mandatory links, issued by someone who has no representation powers, shall be null or void.

 

AVISO LEGAL 
...Esta mensagem é destinada exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter informação confidencial e/ou legalmente privilegiada. Se você não for destinatário desta mensagem, desde já fica notificado de abster-se a divulgar, copiar, distribuir, examinar ou, de qualquer forma, utilizar a informação contida nesta mensagem, por ser ilegal. Caso você tenha recebido esta mensagem por engano, pedimos que nos retorne este E-Mail, promovendo, desde logo, a eliminação do seu conteúdo em sua base de dados, registros ou sistema de controle. Fica desprovida de eficácia e validade a mensagem que contiver vínculos obrigacionais, expedida por quem não detenha poderes de representação.
LEGAL ADVICE
...This message is exclusively destined for the people to whom it is directed, and it can bear private and/or legally exceptional information. If you are not addressee of this message, since now you are advised to not release, copy, distribute, check or, otherwise, use the information contained in this message, because it is illegal. If you received this message by mistake, we ask you to return this email, making possible, as soon as possible, the elimination of its contents of your database, registrations or controls system. The message that bears any mandatory links, issued by someone who has no representation powers, shall be null or void.

AVISO LEGAL 
...Esta mensagem é destinada exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter informação confidencial e/ou legalmente privilegiada. Se você não for destinatário desta mensagem, desde já fica notificado de abster-se a divulgar, copiar, distribuir, examinar ou, de qualquer forma, utilizar a informação contida nesta mensagem, por ser ilegal. Caso você tenha recebido esta mensagem por engano, pedimos que nos retorne este E-Mail, promovendo, desde logo, a eliminação do seu conteúdo em sua base de dados, registros ou sistema de controle. Fica desprovida de eficácia e validade a mensagem que contiver vínculos obrigacionais, expedida por quem não detenha poderes de representação. LEGAL ADVICE
...This message is exclusively destined for the people to whom it is directed, and it can bear private and/or legally exceptional information. If you are not addressee of this message, since now you are advised to not release, copy, distribute, check or, otherwise, use the information contained in this message, because it is illegal. If you received this message by mistake, we ask you to return this email, making possible, as soon as possible, the elimination of its contents of your database, registrations or controls system. The message that bears any mandatory links, issued by someone who has no representation powers, shall be null or void.