将数据从Corda 2迁移到Corda 3 [英] Migrating data from Corda 2 to Corda 3

查看:45
本文介绍了将数据从Corda 2迁移到Corda 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://docs.corda.net/changelog.html#version -3-0 指出 Corda 1.0和2.0的H2数据库实例无法用于Corda 3.0。这是否意味着如果我有一个运行Corda 2.0的Cordapp,并且想将我的CorDapp升级到Corda 3.0,则需要从Corda 2.0中丢弃所有节点存储的信息,重新开始并重新运行接受之前处理的所有事务。新的?

https://docs.corda.net/changelog.html#version-3-0 states that "an H2 database instance of Corda 1.0 and 2.0 cannot be reused for Corda 3.0". Does this means that if I have a Cordapp running Corda 2.0 and I want to upgrade my CorDapp to Corda 3.0, I need to discard all my node's stored information from Corda 2.0, start fresh and re-run all the transactions that were processed before accepting new ones?

让我们举个例子。我有一个Corda 2.0 CorDapp,可以记录入金和出金。该CorDapp运行了一段时间,库中已存储了1万笔交易。假设每天有50笔新交易。

Let's take an example. I have a Corda 2.0 CorDapp to record cash-in and cash-out. This CorDapp has been operating for a while, with 10k transactions stored in the vault already. And let's say that there are 50 new transactions a day.

假设3月1日,爱丽丝存入30美元。 3月2日,Alice提取了$ 20。因此,她只有10美元。

Suppose that on March 1st, Alice deposits $30. On March 2nd, Alice withdraws $20. She therefore only has $10 available.

如果我想在3月14日将Cordapp升级到Corda 3.0,我将需要丢弃从Corda 2.0 Cordapp中存储的数据( persistence.mv​​.db 等),然后在Corda 3.0中重新运行这1万笔交易,然后允许Alice进行任何新的存款/取款(因为我不允许爱丽丝(Alice)的钱不超过10美元)。我的理解正确吗?

If I want to upgrade my Cordapp to Corda 3.0 on March 14th, I'll need to discard the stored data from my Corda 2.0 Cordapp (persistence.mv.db, etc.) and re-run those 10k transactions in Corda 3.0 before allowing Alice to do any new deposits/withdrawals (since I can't allow Alice to have anything different than $10). Is my understanding correct?

推荐答案

是正确的。 Corda 1.0保证了API的稳定性(这意味着您的CorDapps不会从一个Corda版本到另一个版本都中断),但是它不能保证电线的稳定性。这意味着使用Corda 2.0或更早版本创建的数据不一定能被Corda 3.0读取。

That's correct. Corda 1.0 guaranteed API stability (meaning that your CorDapps will not break from one release of Corda to the next), but it did not guarantee wire stability. This means that data created using Corda 2.0 or earlier will not necessarily be readable by Corda 3.0.

Corda 3.0 确实保证了导线的稳定性,这意味着从Corda 3.0及更高版本创建的数据将在以后的版本中可读,并且运行不同Corda版本(3.0+)的节点将能够进行通信。

Corda 3.0 does guarantee wire stability, meaning that data created from Corda 3.0 onwards will be readable by future versions, and that nodes running different Corda versions (3.0+) will be able to communicate.

您迁移的最佳选择从Corda 2.0到Corda 3.0的确是要重新运行Corda 3.0上的所有事务,并且只有在该过程完成后才运行新事务。

Your best option in migrating from Corda 2.0 to Corda 3.0 is indeed to rerun all the transactions on Corda 3.0, and only run new transactions once that process is complete.

这篇关于将数据从Corda 2迁移到Corda 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆